SLIDE 18 Chenyang Lu CSE 467S 35
A Complete Application
RFM Radio byte (MAC) Radio Packet i2c Temp photo Messaging Layer clocks bit byte packet Routing Layer sensing application application
HW SW
ADC messaging routing
- D. Culler et. Al., TinyOS boot camp presentation, Feb 2001
Chenyang Lu CSE 467S 36
TOS Component
//AM.comp// TOS_MODULE AM; ACCEPTS{ char AM_SEND_MSG(char addr, char type, char* data); void AM_POWER(char mode); char AM_INIT(); }; SIGNALS{ char AM_MSG_REC(char type, char* data); char AM_MSG_SEND_DONE(char success); }; HANDLES{ char AM_TX_PACKET_DONE(char success); char AM_RX_PACKET_DONE(char* packet); }; USES{ char AM_SUB_TX_PACKET(char* data); void AM_SUB_POWER(char mode); char AM_SUB_INIT(); };
Messaging Component AM_SUB_INIT AM_SUB_POWER AM_SUB_TX_PACKET AM_TX_PACKET _DONE AM_RX_PACKET _DONE
Internal State
AM_INIT AM_POWER AM_SEND_MSG AM_MSG_REC AM_MSG_SEND_DONE
Internal Tasks
Commands Events