Apps
Components
Interfaces
All Files
Source Tree
source:
tos.system.ServiceSchedulerM.nc
Component: ServiceSchedulerM
Required Interfaces
StdControl
Services
AbsoluteTimer
TimeUtil
Time
Provided Interfaces
ServiceScheduler
StdControl
SchedulerClt
Variables
struct ServiceSchedulerM.__nesc_unnamed4252 { char (*compare)(pq_element e1, pq_element e2); uint8_t size; uint8_t n_elements; pq_element heap[10]; } event_q
int32_t extraSleep
tos_service_schedule sched_info[ServiceSchedulerM.MAX_SERVICES]
Function Index
char
compare_elts
(pq_element i, pq_element j)
event result_t
AbsoluteTimer.fired
(void)
command result_t
Services.init
(uint8_t id)
command result_t
Services.start
(uint8_t id)
command result_t
Services.stop
(uint8_t id)
command result_t
SchedulerClt.init
(void)
Initialize the service scheduler.
command result_t
SchedulerClt.start
(void)
Start the service scheduler.
command result_t
SchedulerClt.stop
(void)
Stop the service scheduler: leave the services in their current state and just stop the timer.
command result_t
ServiceScheduler.reschedule
(uint8_t svc_id, tos_service_schedule sched)
command result_t
ServiceScheduler.setNextEventTime
(uint8_t svc_id, tos_time_t nextTime)
command tos_time_t
ServiceScheduler.getNextEventTime
(uint8_t svc_id)
command result_t
ServiceScheduler.setExtraSleepTime
(uint8_t svc_id, int32_t extraTime)
command tos_service_schedule
ServiceScheduler.get
(uint8_t svc_id)
command result_t
ServiceScheduler.start_all
(void)
command result_t
ServiceScheduler.remove
(uint8_t svc_id)
Function Descriptions
SchedulerClt.init
command result_t
SchedulerClt.init
(void)
Initialize the service scheduler. It boils down to initializing the scheduling queue and the service scheduling info. All services are initialized in the DISABLED state.
SchedulerClt.start
command result_t
SchedulerClt.start
(void)
Start the service scheduler. Note that this is not at all synonymous with starting the subordinate services. Instead, if there are runnable serivces ready to be scheduled, this will fire off the timer.