Interface: tos.interfaces.SplitControl

interface SplitControl

The TinyOS standard control interface. All components that require initialization or can be powered down should provide this interface. start() and stop() are synonymous with powering on and off, when appropriate. On boot, the init() of all wired components must be called. init() may be called multiple times, and in subcomponents before some of their supercomponents (e.g. if they are the subcomponent of multiple components). After init() has been called, start() and stop() may be called multiple times, in any order. The call sequence is therefore:

init* (start|stop)*

Author:
Jason Hill
David Gay
Philip Levis

Commands
command result_t init() Initialize the component and its subcomponents.
command result_t start() Start the component and its subcomponents.
command result_t stop() Stop the component and pertinent subcomponents (not all subcomponents may be turned off due to wakeup timers, etc.).

Events
event result_t initDone() Notify components that the component has been init
event result_t startDone() Notify components that the component has been started and is ready to receive other commands
event result_t stopDone() Notify components that the component has been stopped.

Commands - Details

init

command result_t init()

Initialize the component and its subcomponents.

Returns:
Whether initialization was successful.

start

command result_t start()

Start the component and its subcomponents.

Returns:
Whether starting was successful.

stop

command result_t stop()

Stop the component and pertinent subcomponents (not all subcomponents may be turned off due to wakeup timers, etc.).

Returns:
Whether stopping was successful.

Events - Details

initDone

event result_t initDone()

Notify components that the component has been init

startDone

event result_t startDone()

Notify components that the component has been started and is ready to receive other commands

stopDone

event result_t stopDone()

Notify components that the component has been stopped.