TinyOSNesC_TutorialPart2

TinyOSNesC_TutorialPart2 - EE/CS652 PartII AmitabhaGhosh...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
EE/CS 652: An Introduction to TinyOS and NesC  – Part II Amitabha Ghosh EE-Systems, USC
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Recap Components as building blocks Modules Configurations (wiring) Syntax, Scopes: specification, implementation Interfaces commands, events Clauses: provides, uses Tasks, Split-phase post taskname(), send(), sendDone() Demo of Blink, BlinkSingle, compile, flash comp A comp B call i1.command1() raise i1.event1() interface Today ?
Background image of page 2
Communication Interfaces Packet clear a message's contents command void clear (message_t* msg); get payload length command uint8_t payloadLength (message_t* msg); get pointer to its payload area command void* getPayload (message_t* msg, uint8_t* len); Send Receive PacketAcknowledgements AMPacket – similar to Packet AMSend – similar to Send AM: Active Message layer to multiplex tinyos-2.x/tos/interfaces
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Who Implements? Components (that come with tinyos distribution) AMReceiverC Receive, Packet, AMPacket AMSenderC Packet, AMSend, AMPacket, PacketAcknowledgements tinyos-2.x/tos/system Code specifies both the interfaces the application uses as well as the components which provide (implement) those interfaces
Background image of page 4
The Message Structure typedef nx_struct message_t { nx_uint8_t header[ sizeof (message_header_t)]; nx_uint8_t data[TOSH_DATA_LENGTH]; nx_uint8_t footer[ sizeof (message_header_t)]; nx_uint8_t metadata[ sizeof (message_metadata_t)]; } message_t ; message_t : TinyOS 2.x tinyos-2.x/tos/types/message.h Fields are opaque: Accessed through the interfaces AMPacket, AMSend, Packet etc Accessor / Mutator methods
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sending a Message Interfaces used Boot, Leds, Timer<Tmilli> as Timer0 Components used
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/21/2010 for the course EE 652 taught by Professor Bhaskarkrishnamachari during the Fall '07 term at USC.

Page1 / 19

TinyOSNesC_TutorialPart2 - EE/CS652 PartII AmitabhaGhosh...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online