Sunteți pe pagina 1din 56

TinyOS Developers Programming

Topics:
TinyOS Structures
Commands, Events, & Tasks
Configurations, Components, & Modules
Implementation
Application Example
How the pieces fit together
TOS Advanced Flows
TOS Messaging
TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

TinyOS Layers
Application
Configuration

TOS Scheduler (Main)

Legend
User

Application Interfaces

TOS

Application Specific
Components
Library
Components

Commands

HW

Events

TOS Component Interfaces

System Components
Hardware Presentation/Abstraction Layer
Mote Devices
TinyOS/nesC Programming (Parts 1 and 2)

Sensor Devices
2

San Jose / February 9-10, 2005

Mote CPU
Processor

4 to 8 MIPs
8-bit RISC

Memory

4 KB SRAM
-- Variables and data
128 KB Flash -- Code space

Peripherals

Timers: two 8-bit, two 16-bit


ADC: 8 channel 10-bit
Buses: I2C, SPI, UART

Storage

512 KB Flash -- Off-chip serial flash

TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

TinyOS System Components

TOS

Component

Description

ADCM.nc

Interface to the ADC

AMStandard.nc

Active Messages implementation

CRCPacket.nc

CRC packet calculator

ClockC.nc

Timing component

GenericComm.nc

Generic communication stack

FramerM.nc

Serial packetizer -- reliability layer component

I2CPacketC.nc

I2C protocol implementation

LedsC.nc

LED interface

LoggerM.nc

Interface to log data to the off-chip flash

TimerM.nc

Multi-application timer module

UART.nc

UART interface module

VoltageM.nc

Battery voltage measurement component

TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

TinyOS Structure

Configuration

A wiring of Components together

Component

Provides a specific Service


Message Handling, Signal Processing

Implemented in a Module (code)


Wired up of other components in a Configuration
TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

CntToLedsAndRfm Example
Study an Application to see Components, Configurations,
Commands, Events, and Tasks in action
LAB: Auto-generate Documentation
cd tinyos-1.x/contrib/xbow/CntToLedsAndRfm
make mica2 docs
Open with Document file Explorer
C:\tinyos\cygwin\opt\tinyos-1.x\
doc\nesdoc\mica2\apps.cnttoledsandrfm.CntToLedsAndRfm.n
c.app.html

TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

CntToLedsandRfm Wiring

TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

TinyOS Configuration
Connects Components together
Every TOS Application has a single top-level
CONFIGURATION file
A configuration wire connects Components
together through Interfaces

TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

Configuration Template
Tinyos-1.x/tos/lib/IntToRfm.nc
includes IntMsg;
Interface to Components
configuration IntToRfm
Implementation
{ provides {
interface IntOutput;
interface StdControl;
}}
implementation
{ components IntToRfmM, GenericComm as Comm;
IntOutput = IntToRfmM;
as alias
StdControl = IntToRfmM;
IntToRfmM.Send -> Comm.SendMsg[AM_INTMSG];
IntToRfmM.SubControl -> Comm;
}
Wiring to other components

TinyOS/nesC Programming (Parts 1 and 2)

San Jose / February 9-10, 2005

TinyOS Interface Overview

TOS

Interface

Description

ADC.nc

Interface to the ADC

I2C.nc

I2C bus protocol interface

Leds.nc

LED actuation interface

LogData.nc

Interface for logging data to storage device

Radio.nc

Bit level interface for radio hardware

Receive.nc

Generic messaging interface receive

Send.nc

Generic messaging interface send

StdControl.nc

Standard component control interface

Timer.nc

General timer control interface

TinyOS/nesC Programming (Parts 1 and 2)

10

San Jose / February 9-10, 2005

Configuration Syntax
Binds the User to the Providers component via an
Interface:

User.interface -> Provider.interface


myApp.Timer -> FastClocker.Timer

or

myApp.Timer -> FastClocker


Timer interface implied

TinyOS/nesC Programming (Parts 1 and 2)

11

San Jose / February 9-10, 2005

nesC Component Structure


Specification

Declares the services provided


Lists all interfaces the component
uses
Must implement any used event
provides
Must implement any provided command

Alias interfaces as nickname

Component
Specification
provides

Interface_A

uses

Interface_B

Implementation
Frame

Implementation

Functions

Defines internal workings


May include other components and associated
wiring

TinyOS/nesC Programming (Parts 1 and 2)

12

San Jose / February 9-10, 2005

Interface Syntax
Tinyos-1.x/tos/interfaces/timer.nc
includes Timer; // make TIMER_x constants available
interface Timer {
/**
* Start the timer.
* @param type The type of timer to start.
*/
command result_t start(char type, uint32_t interval);
command result_t stop();
event result_t fired();
}

TinyOS/nesC Programming (Parts 1 and 2)

13

San Jose / February 9-10, 2005

Implementation
Defines how the component works.

E.g. What happens on a Start command?


Commands

Events

Allows multiple Implementations for any


Interface
E.g. Radio
MICA2 vs. MICAz implementations

Multiple interfaces

Interface_A

Component Implementation
Functions

1: Control (start, stop)


2. Data flow (send, receive)

Interface_B

Frame

Interface_C

Commands
TinyOS/nesC Programming (Parts 1 and 2)

14

Events

San Jose / February 9-10, 2005

Implementation Requirements
All Commands & Events declared as provided in
the INTERFACE section must be implemented.
Two Sections

1. Module: Declares Interfaces Provided and Used


2. Implementation: Program code

TinyOS/nesC Programming (Parts 1 and 2)

15

San Jose / February 9-10, 2005

Module Syntax
Tinyos-1.x/tos/lib/counter.nc
module Counter {
provides {
interface StdControl; }
uses {
interface Timer;
interface IntOutput; }}
implementation {
Frame
Frame memory
memory variable
variable
int state;
command result_t StdControl.start() {
return call Timer.start(TIMER_REPEAT, 250); }
event result_t IntOutput.outputComplete(result_t success){
if(success == 0) state --;
return SUCCESS; }
}//implementation

TinyOS/nesC Programming (Parts 1 and 2)

16

San Jose / February 9-10, 2005

nesC Filename Convention


Configuration (aka wiring)

myApp.nc at Top Level


myComponentC.nc at lower levels

Interfaces

myComponent.nc

Implementation

Modules - myComponentM.nc
Configurations myComponentC.nc

TinyOS/nesC Programming (Parts 1 and 2)

17

San Jose / February 9-10, 2005

TOS Process Categories


Events

Time Critical
Interrupts cause Events (Timer, ADC, Sensors)
Small / short duration
Suspend Tasks

Tasks

Time Flexible
Run sequentially by TOS Scheduler
Run to completion wrt other Tasks
Interruptible

TinyOS/nesC Programming (Parts 1 and 2)

18

San Jose / February 9-10, 2005

TinyOS Process Flow


Two level scheduling: events and tasks
Scheduler is simple FIFO
A task cannot preempt another task
Events preempt tasks (higher priority)

TinyOS/nesC Programming (Parts 1 and 2)

Preempt
POST
events

main {

while(1) {
while(more_tasks)
schedule_task;
sleep;
}
}

Tasks
FIFO
commands

commands
Interrupts
Time

Hardware
19

San Jose / February 9-10, 2005

Tiny OS Kernel
INTERRUPT

TOS KERNEL SCHEDULER


TASK QUE

TASK#1
TASK#2
TASK#3

IF
TASK QUE
EMPTY
then
SLEEP

INTERRUPT
VECTORs
ADC

TIMER0 Time Out


Wakeup

ISR

TIMER1

EVENT
Handler

UART0
SPI

if Que !Empty:
execute TASK

TASK#n

INT0

Call Command(B)
Return
Event Return

Task Return
No TASKS pending

Command(s)

TASK(m)
Call Command(A)

Return

TinyOS/nesC Programming (Parts 1 and 2)

Command(s)
20

INTERRUPT

SLEEP
(Interrupts Enabled)

San Jose / February 9-10, 2005

Commands and Events


Component1

Event

signal keyword triggers an event


Flows upward to wired component(s)
Issued to higher level: provides callback
A C callback function
Control returns to signaling component

Command

Functions
signal event1
call command1

call keyword executes a command


Flows down the configuration hierarchy
Issued to lower level: uses library code
Just a C function call - parameters on stack
Control returns to caller

TinyOS/nesC Programming (Parts 1 and 2)

Component2

Interface

21

Interface

Component3

San Jose / February 9-10, 2005

Commands
Implemented under the keyword command
Invoked/called by call syntax
call InterfaceName.CommandName(params)

Tinyos-1.x/tos/lib/counter.nc
command result_t StdControl.start() {
return call Timer.start(TIMER_REPEAT, 250);
}

TinyOS/nesC Programming (Parts 1 and 2)

22

San Jose / February 9-10, 2005

Events
Initiated by a signal.
Handled with an Event Handler
Tinyos-1.x/tos/lib/counter.nc
event result_t Send.sendDone(TOS_MsgPtr msg,result_t success) {
if (pending && msg == &data){
pending = FALSE;
signal IntOutput.outputComplete(success);}
return SUCCESS;
}

TinyOS/nesC Programming (Parts 1 and 2)

23

San Jose / February 9-10, 2005

Tasks
Declared before they are invoked
No parameters (use Frame variables)
Tinyos-1.x/tos/system/TimerM.nc
task void HandleFire() {
if (mState) {
for (i=0;i<NUM_TIMERS;i++) {

post signalOneTimer();
}//HandleFire
async event result_t Clock.fire() {
post HandleFire();
return SUCCESS;
}

TinyOS/nesC Programming (Parts 1 and 2)

24

San Jose / February 9-10, 2005

TinyOS Tasks
Time flexible
Run sequentially by TOS Scheduler

synchronous first in, first out, (FIFO) Schedule

Run to completion with respect to other Tasks


Interrupted by Events

TinyOS/nesC Programming (Parts 1 and 2)

25

San Jose / February 9-10, 2005

TinyOS Scheduler
Scheduler is a simple first in, first out scheme
TinyOS STATE
TinyOS Task First-in First-Out Queue & Scheduler
Sleep

Sleep

TASK3
TASK1

TASK2

TASK3

HPL TinyOS Layer APP

POST T3
POST T2
TASK1

EVENT 2

POST Task1

TASK 1

TASK2

T3

TASK2

TASK3

T3

COMP 2
E3

EVENT 1
COMP 1
TOSH_SIGNAL ISR

INTERRUPT

Time
TinyOS/nesC Programming (Parts 1 and 2)

26

San Jose / February 9-10, 2005

Shared States and atomic


Updates to shared state are allowed:
Sync
Only in synchronous code (e.g., tasks)

Atomic block
atomic {
//code is atomic can not be interrupted
ApplicationState = NewState;

atomic is a macro that disables all interrupts for


duration of the block {}
Be careful: atomic may impact Node performance

TinyOS/nesC Programming (Parts 1 and 2)

27

San Jose / February 9-10, 2005

atomic Syntax
Tinyos-1.x/tos/system/TimerM.nc
command result_t Timer.stop[uint8_t id]() {
if (id>=NUM_TIMERS) return FAIL;
if (mState&(0x1L<<id)) { // if the timer is running
atomic mState &= ~(0x1L<<id);
if (!mState) {
setIntervalFlag = 1;
}
return SUCCESS;
}
return FAIL; //timer not running
}

TinyOS/nesC Programming (Parts 1 and 2)

28

San Jose / February 9-10, 2005

async vs. sync


async Code

Code that is reachable from at least one Interrupt Handler

sync Code

Command, Events, or Tasks only reachable from Tasks

Any update to shared state (memory) that is


reachable from async is a potential data race.
nesC reports a compile-time error for any command
or event that is async and that was not declared with
async.
This ensures that code that was not written to execute

safely in an interrupt handler is not called inadvertently.


TinyOS/nesC Programming (Parts 1 and 2)

29

San Jose / February 9-10, 2005

async Syntax
async attribute used to indicate command or event

is part of an asynchronous flow


async processes are decoupled by posting a task
A task is always synchronous

tinyos-1.x/tos/system/TimerM.nc
async event result_t Clock.fire() {
post HandleFire();
return SUCCESS;
}

TinyOS/nesC Programming (Parts 1 and 2)

30

The
The post
post task
task decouples
decouples
the
the async
async event
event

San Jose / February 9-10, 2005

TOS Rules
Hardware Event handler Commands and Events
must be declared with the async keyword

Indicates that this code may execute asynchronously to


Tasks and other processes.
nesC will check & warn if states (variables) could be
affected (races)

Races are avoided by

accessing shared data exclusively within Tasks


Because Tasks cant interrupt each other

Use atomic statement to access shared variables

TinyOS/nesC Programming (Parts 1 and 2)

31

San Jose / February 9-10, 2005

TOS Architecture Review


Events vs. Tasks
Configurations
Components

Component1

Component2

Interface
Implementation

Interface

Functions

signal event1

Modules
Provides, uses

call command1
Interface

Component3

TinyOS/nesC Programming (Parts 1 and 2)

32

San Jose / February 9-10, 2005

TinyOS Programming & Messaging


TinyOS Programming

Split Phase Operations


Parameterized Interfaces
Wiring Fan-In & Fan-Out

TOS Messaging

Groups, Addresses
Active Messaging

Wireless Communication

TinyOS/nesC Programming (Parts 1 and 2)

33

San Jose / February 9-10, 2005

Split Phase Request & Done Sequence

Component1
commandA {

call Comp2.goCmdX;
//continue
return SUCCESS}

Event handler

event cmdXDone{
//process result

return SUCCESS}

Commands initiate an
operation
Continue/idle
Event indicates
completion

Component2

goCmdX{

post task1();
return SUCCESS}
Task1{
//do stuff
signal cmdXDone();
return SUCCESS}

TOS Scheduler
TinyOS/nesC Programming (Parts 1 and 2)

34

San Jose / February 9-10, 2005

Split Phase Use


Variable Duration processes
Hardware I/O Operations

ADC Start Conversion > Data Ready

Slow devices

Flash Memory Write Buffer > Done

Asynchronous or Complex Processes

Send a Message to Communications Stack and continue


with operations until .sendDone

TinyOS/nesC Programming (Parts 1 and 2)

35

San Jose / February 9-10, 2005

Split Phase Example: Client Side


Tinyos-1.x/lib/Counters/Counter.nc
event result_t Timer.fired()
{
state++;
return call IntOutput.output(state);
}

Phase
Phase 11 Start
Start the
the output
output
operation
operation

event result_t IntOutput.outputComplete(result_t success)


{
Phase
Phase 22 output
output is
is complete
complete
if(success == 0) state --;
return SUCCESS;
}

Counter.IntOutput -> IntToRfm;

TinyOS/nesC Programming (Parts 1 and 2)

36

San Jose / February 9-10, 2005

Split Phase Example: Server Side


Tinyos-1.x/lib/Counters/IntToRfmM.nc
command result_t IntOutput.output(uint16_t value) {
IntMsg *message = (IntMsg *)data.data;
Phase
Phase 11 Start
Start the
the output
output
if (!pending){
operation
operation
pending = TRUE;
message->val = value;
atomic { message->src = TOS_LOCAL_ADDRESS;}
if (call Send.send(TOS_BCAST_ADDR, sizeof(IntMsg), &data))
return SUCCESS;
pending = FALSE;}
return FAIL;
}
event result_t Send.sendDone(TOS_MsgPtr msg, result_t success) {
if (pending && msg == &data){
pending = FALSE;
signal IntOutput.outputComplete(success);}
return SUCCESS;
Phase
Phase 22 output
output is
is complete
complete
}

TinyOS/nesC Programming (Parts 1 and 2)

37

San Jose / February 9-10, 2005

Parameterized Interfaces
Multiple Users of a Component

One Timer component but many Users with different Event


time requirements
When a Timer fires which component should be
signaled?

How does TinyOS handle this ?

Multiple Instantiations of a Components Interface


Parameter specifies the specific Instance

TinyOS/nesC Programming (Parts 1 and 2)

38

San Jose / February 9-10, 2005

Parameterized Interfaces
A parameterized interface allows a component to
provide multiple instances of an interface
Parameterization (index) is set by a compile-time
value
provides interface Timer[uint8_t id];

Total number of Instances permitted may be limited


by Implementation

TinyOS/nesC Programming (Parts 1 and 2)

39

San Jose / February 9-10, 2005

Unique Instances
How to make sure your instance Parameter is not
used by some one else?
unique(astring)
generates a unique 8-bit identifier from the string given as
an argument.
Multiple Components using
timer[unique("Timer")]
are each guaranteed to get a signal associated with their
specific timer settings.

All Components must use the same string

TinyOS/nesC Programming (Parts 1 and 2)

40

San Jose / February 9-10, 2005

Timer Parameter Interface Wiring


Provides
Provides aa Parameterized
Parameterized Interface
Interface
Tinyos-1.x/apps/CntToLedsandRfm.nc

Tinyos-1.x/tos/system/TimerM.nc

configuration CntToLedsAndRfm {
}
implementation {
components Main, Counter, IntToLeds,
IntToRfm, TimerC;

module TimerM {
provides interface Timer[uint8_t id];
provides interface StdControl;
uses {
interface Leds;
interface Clock;
interface PowerManagement;
}
}

Main.StdControl -> Counter.StdControl;


Main.StdControl -> IntToLeds.StdControl;
Main.StdControl -> IntToRfm.StdControl;
Main.StdControl -> TimerC.StdControl;
Counter.Timer->TimerC.Timer[unique("Timer")];
IntToLeds <- Counter.IntOutput;
Counter.IntOutput -> IntToRfm;

implementation {
uint32_t mState;
uint8_t queue_size;
uint8_t queue[NUM_TIMERS];

Instantiates
Instantiates the
the Timer
Timer number
number uniquely
uniquely

TinyOS/nesC Programming (Parts 1 and 2)

41

San Jose / February 9-10, 2005

Fan-Out
Component is wired to multiple Destinations
Commands and Events will flow between all
connected components
Order is not guaranteed
Tinyos-1.x/apps/CntToLedsAndRfm.nc
configuration CntToLedsAndRfm {
}
implementation {
components Main, Counter, IntToLeds, IntToRfm, TimerC;
Counter.IntOutput -> IntToLeds;
Counter.IntOutput -> IntToRfm;

TinyOS/nesC Programming (Parts 1 and 2)

42

San Jose / February 9-10, 2005

Communicating between Nodes


Message Flow
1. Fill a Message buffer with Data to send
2. Specify node address to receive the message
3. Specify Message Type (AM Number)
4. Lock Message buffer during .send operation
Buffering the incoming message
5. Processing the message on reception

TinyOS/nesC Programming (Parts 1 and 2)

43

San Jose / February 9-10, 2005

Group IDs and Addresses


Nodes only communicate within a common Group ID
Assigned in Makelocal or MakeXbowlocal

Node addresses, <#>, must be unique


Assigned in install.<#>

Reserved node addresses


Broadcast
UART Channel

TinyOS/nesC Programming (Parts 1 and 2)

0xFF
0x7E

44

San Jose / February 9-10, 2005

TOS Radio & UART Messages


Information passed between Motes use a standard
message format
Messages include
Destination Address
Group ID
Message Type

Routes to Receivers appropriate Message Handler

Message Size and Data

TinyOS/nesC Programming (Parts 1 and 2)

45

San Jose / February 9-10, 2005

TOSmsg (tinyos-1.x/tos/types/am.h)
#define TOSH_DATA_LENGTH 29
typedef struct TOS_Msg{
uint16_t addr;
uint8_t type;
uint8_t group;
uint8_t length;
int8_t data[TOSH_DATA_LENGTH];
uint16_t crc;

TOS
TOS Message
Message 36
36 Bytes
Bytes

//Extra
uint16_t strength;
uint8_t ack;
uint16_t time;
uint8_t sendSecurityMode;
uint8_t receiveSecurityMode;
} TOS_Msg;

TinyOS/nesC Programming (Parts 1 and 2)

46

Extension
Extension passed
passed from
from MAC
MAC layer
layer
77 bytes
bytes

San Jose / February 9-10, 2005

TOSMsg Supplemental info


Ack: Transmission Acknowledge by Receiver
Strength:

RSSI on Receive
LowPowerRadioStack: Determines PowerMode / Preamble
size on Transmit

TinyOS/nesC Programming (Parts 1 and 2)

47

San Jose / February 9-10, 2005

Active Messaging Flow


TOS Msg[AM#]

Application

Senders TOS Message


specifies AM# (Message
Type)& Destination Address
Receivers Message filtered
for GroupID & Node Address
Routed by AM handlers
parameterized interface to
appropriate Message Event
handler

AM
RADIO
STACK
TX

RX
RADIO
STACK
Generic
Comm
AM

signal[m](TOSMsg) signal[n]

AM Handler
#m
TinyOS/nesC Programming (Parts 1 and 2)

48

Generic
Comm

AM Handler
#n

signal[p]

AM Handler
#m
San Jose / February 9-10, 2005

Active Message: A Parameterized Interface


Tinyos-1.x/tos/lib/Counters/IntToRfm.nc
includes IntMsg;
configuration IntToRfm
{ provides {
interface IntOutput;
interface StdControl;
}}
implementation
{ components IntToRfmM, GenericComm as Comm;
IntOutput = IntToRfmM;
StdControl = IntToRfmM;
IntToRfmM.Send -> Comm.SendMsg[AM_INTMSG];
IntToRfmM.SubControl -> Comm;

Active Message ID
defined in IntMsg.h

TinyOS/nesC Programming (Parts 1 and 2)

49

San Jose / February 9-10, 2005

Message Buffer Exchange


TX Side
AM Component gets ownership
of TXBuffer until Signals
Transmission has completed

TX Component

.send(&TXBuffer)

.sendDone(&TXBuffer)

RX Side
Event Handler gets RXBuffer.
Returns a buffer for next RX
message.

TinyOS/nesC Programming (Parts 1 and 2)

Signal.Rcv(&RXBuffer)

RX
Event Handler

50

AM Component

AM Component

return (&RXBuffer)

San Jose / February 9-10, 2005

TOS Message Buffers


Buffer Ownership alternates between Application and
Messaging Layers
Buffers are allocated at COMPILE time

Send Message (split phase)

AM Layer owns the TX buffer once called


User must NOT modify buffer until .sendDone Event from
AM Layer

Receive Event

AM Layer passes a RX Message buffer pointer


User must return a valid free buffer pointer for the next
Received message

TinyOS/nesC Programming (Parts 1 and 2)

51

San Jose / February 9-10, 2005

Sending a Message
IntToRfmM.nc
The
bool pending;
The buffer
buffer is
is now
now busy
busy
struct TOS_Msg data;
/* ... */
command result_t IntOutput.output(uint16_t value) {
IntMsg *message = (IntMsg *)data.data;
if (!pending) {
pending = TRUE;
message->val = value;
TXBuffer
TXBuffer pointer
pointer
atomic {
message->src = TOS_LOCAL_ADDRESS;
}
if(call Send.send(TOS_BCAST_ADDR, sizeof(IntMsg),&data))
return SUCCESS;
pending = FALSE; //request failed /
return FAIL;
Destination
Destination address
address
}
TinyOS/nesC Programming (Parts 1 and 2)

52

San Jose / February 9-10, 2005

AMStandard: Receiving Messages


TOS_MsgPtr received(TOS_MsgPtr packet){
uint16_t addr = TOS_LOCAL_ADDRESS;
counter++;
if (packet->crc == 1 &&
packet->group == TOS_AM_GROUP &&
(packet->addr == TOS_BCAST_ADDR ||
packet->addr == addr)){
Check
Check GroupID,
GroupID, Node
Node Address
Address
uint8_t type = packet->type;
TOS_MsgPtr tmp;
tmp = signal receiveMsg.receive[type](packet);
if (tmp) packet = tmp;
}//if valid packet
Signal
Signal the
the assigned
assigned AM
AM Handler
Handler
return packet;}

Use
Use the
the returned
returned buffer
buffer for
for next
next Msg
Msg
TinyOS/nesC Programming (Parts 1 and 2)

53

San Jose / February 9-10, 2005

Application Layer Active Message Handler

event TOS_MsgPtr ReceiveIntMsg.receive(TOS_MsgPtr pTOS) {


IntMsg *message = (IntMsg *)pTOS->data;
call IntOutput.output(message->val);
Typecast
Typecast the
the Buffer
Buffer
return pTOS;
}
IntOutput now has a private copy of val
IntOutput now has a private copy of val

Return
Return the
the Buffer
Buffer to
to GenericComm
GenericComm

TinyOS/nesC Programming (Parts 1 and 2)

54

San Jose / February 9-10, 2005

TinyOS Review
Split phase processes

Indeterminate duration
Parallelism

Parameterized interfaces
Active messages
Routing
Message structure
Buffers

Groups and node IDs

TinyOS/nesC Programming (Parts 1 and 2)

55

San Jose / February 9-10, 2005

End of TinyOS Developers Programming

TinyOS/nesC Programming (Parts 1 and 2)

56

San Jose / February 9-10, 2005

S-ar putea să vă placă și