CC2420 Layer Architecture

From TinyOS Wiki
Revision as of 02:58, 10 November 2009 by Sissou (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The CC2420 radio stack consists of layers of functionality stacked on top of each other to provide a complete mechanism that modifies, filters, transmits, and controls inbound and outbound messages. Each layer is a distinct module that can provide and use three sets of interfaces in relation to the actual radio stack: Send, Receive, and SplitControl. If a general layer provides one of those interfaces, it also uses that interface from the layer below it in the stack. This allows any given layer to be inserted anywhere in the stack through independant wiring. For example:

 provides interface Send;
 uses interface Send as SubSend;
 
 provides interface Receive;
 uses interface Receive as SubReceive;
 
 provides interface SplitControl;
 uses interface SplitControl as subControl;
 

The actual wiring of the CC2420 radio stack is done at the highest level of the stack, inside CC2420ActiveMessageC. This configuration defines three branches: Send, Receive, and SplitControl. Note that not all layers need to provide and use all three Send, Receive, and SplitControl interfaces:

 // SplitControl Layers
 SplitControl = LplC;
 LplC.SubControl -> CsmaC;
 
 // Send Layers
 AM.SubSend -> UniqueSendC;
 UniqueSendC.SubSend -> LinkC;
 LinkC.SubSend -> LplC.Send;
 LplC.SubSend -> TinyosNetworkC.Send;
 TinyosNetworkC.SubSend -> CsmaC;
 
 // Receive Layers
 AM.SubReceive -> LplC;
 LplC.SubReceive -> UniqueReceiveC.Receive;
 UniqueReceiveC.SubReceive -> TinyosNetworkC.Receive;
 TinyosNetworkC.SubReceive -> CsmaC;

If another layer were to be added, CC2420ActiveMessageC would need to be modified to wire it into the correct location.


See Also

Next