Weaning from mechanical ventilation and assessment of extubation readiness.