Image Processing Reference
In-Depth Information
Component
Command handler
Tiny task scheduler
Frame
Task 1
Task 2
Event handler
Interface
Component
Command handler
Task enqueue/dequeue
Frame
Task 1
Task 2
Event handler
Interface
Commands
Events
FIGURE .
TinyOS architecture in detail.
definition of the interaction of two components via commands and events, the bidirectional interface
is introduced in TinyOS.
Commands are nonblocking requests made to lower-layer components. A command provides
feedback to its caller by returning status information. Typically, the command handler puts the
command parameters into the frame and posts a task into the task queue for execution. The
acknowledgmentwhetherthecommandwassuccessful,canbesignaledbyanevent.
Event handlers are invoked by events of lower-layer components, or when directly connected to the
hardware, by interrupts. Similar to commands, the frame will be modiied and tasks are posted. Both,
commands and tasks, perform a small fixed amount of work similar to interrupt service routines.
Tasksperformtheprimarywork.heyareatomic,runtocompletion,andcanonlybepreempted
byevents.Tasksarequeuedinairstinirstout(FIFO)taskschedulertoperformanimmediatereturn
of event or command handling routines. Due to the FIFO scheduling, tasks are executed sequen-
tially and should be short. Alternatively to the FIFO task scheduler, priority-based or deadline-based
schedulers can be implemented into the TinyOS framework.
TinyOS distinguishes three categories of components. Hardware abstraction components map
physical hardware into the component model. Mostly, this components export commands to the
underlying hardware and handle hardware interrupts. Synthetic hardware components extend the
functionality of hardware abstraction components by simulating the behavior of advanced hard-
ware functions, for example, bit-to-byte transformation functions. For future hardware releases, these
components can directly cast into hardware. High-level software components perform application-
specific tasks, for example, control, routing, data transmission, calculation on data, and data
aggregation.
An interesting aspect of the TinyOS framework is the similarity of the component description
to the description of hardware modules in hardware description languages, e.g., VHSIC hardware
description language (VHDL) or Verilog. A hardware module, for example, in VHDL is defined by
an entity with input and output declarations, status registers to hold the internal state, and a finite
 
Search WWH ::




Custom Search