Cortex iOS
 All Classes Functions Properties
SleepDurationCoach Class Reference
Inheritance diagram for SleepDurationCoach:
Coach

Instance Methods

(void) - setManualGoalDailySleep:
 
(void) - setPersonalGoalSleepWithBaseline:withDynamic:
 
(void) - setPopulationGoalWithDynamic:
 
(NSTimeInterval) - getGoal
 
(Task *) - setValueManually:forTask:
 
(void) - resetState
 
- Instance Methods inherited from Coach
(id) - init
 
(NSArray *) - getCurrentTasks
 
(NSArray *) - getFutureTasksFrom:to:
 
(NSArray *) - getPastTasksFrom:to:
 
(NSArray *) - getAllTasksFrom:to:
 
(void) - pause
 
(void) - resume
 
(Task *) - setValue:forTask:
 

Additional Inherited Members

- Class Methods inherited from Coach
(NSString *) + stringFromCoachType:
 
(CoachType) + coachTypeFromString:
 
- Properties inherited from Coach
CoachType type
 Type to identifies the coach.
 

Method Documentation

- (NSTimeInterval) getGoal

Return the set goal.

Returns
the goal time (in seconds) to sleep each day
- (void) resetState

Reset the state.

- (void) setManualGoalDailySleep: (NSTimeInterval)  sleepPerDay

Set the goal to a manually specified goal.

Parameters
sleepPerDaygoal time (in seconds) to sleep each day.
- (void) setPersonalGoalSleepWithBaseline: (NSTimeInterval)  baseline
withDynamic: (BOOL)  dynamic 

Set the personal goal.

Parameters
baselinebaseline sleep time (in seconds) per day
- (void) setPopulationGoalWithDynamic: (BOOL)  dynamic

Set a population based goal.

Parameters
dynamicWhether the coach should adjust it's goals based upon the progress the user is making
- (Task *) setValueManually: (NSTimeInterval)  duration
forTask: (Task*)  task 

Set the sleep duration of the specified the task manually. This can be used to override/correct the measurements. An example to set the current sleep task to 5 hours: [coach setValueManually:5*60*60 forTask:[[coach getCurrentTasks] firstObject]]

Parameters
durationthe duration in seconds how long the user slept
thetask for which the value should be updated
Returns
the updated task

Set the value of the task manually. This is for users to override the automatic measurement.

Parameters
dateValueNSDictionary with "date" and @"value" keys containing the new value.
thetask for which the value should be updated
Returns
the updated task

The documentation for this class was generated from the following files: