Apps
Components
Interfaces
All Files
Source Tree
source:
tos.interfaces.ServiceScheduler.nc
Interface: ServiceScheduler
Interface to the scheduler module
Components providing this interface:
tos.system.ServiceSchedulerC
tos.system.ServiceSchedulerM
Components requiring this interface:
apps.TASKApp.Field
tos.lib.TinyDB.TupleRouterM
Commands
result_t
reschedule
(uint8_t svc_id, tos_service_schedule sched)
This command is used to (re)schedule a service.
tos_service_schedule
get
(uint8_t svc_id)
This command allows an external component to get the schedule for an individual component.
result_t
start_all
(void)
This command allows an external component to start all services.
result_t
setNextEventTime
(uint8_t svc_id, tos_time_t nextTime)
tos_time_t
getNextEventTime
(uint8_t svc_id)
result_t
setExtraSleepTime
(uint8_t svc_id, int32_t extraTime)
result_t
remove
(uint8_t svc_id)
Commands - Details
reschedule
result_t
reschedule
(uint8_t svc_id, tos_service_schedule sched)
This command is used to (re)schedule a service. ServiceScheduler assumes the time syncronization and consequently uses an absolute timer to express the schedule.
start_all
result_t
start_all
(void)
This command allows an external component to start all services. This is useful when it is desirable to disable the service coordinator and leave it in a fully operational state.
Returns:
SUCCESS if all coordinated services were started successfully, FAIL if at least one of them failed.