Apps     Components     Interfaces     All Files     Source Tree     source: apps.TestTinySec.TestTinySecM.nc

Component: TestTinySecM

Module to test TinySec. Implements a simple counter that sends a message over TinySec every tic. Programming two motes with the apps should result in both motes flashing green and red leds (green for sending and red for receiving). You can also listen in on messages with SecureTOSBase and should see a counter. Messages are both encrypted and authenticated over the air.
Author: Chris Karlof

Required Interfaces

Provided Interfaces

Variables

Function Index

Function Descriptions

Send.sendDone

event result_t Send.sendDone (TOS_MsgPtr m, result_t s)

Signalled when a TinySec message done sending.
Returns: Whether sending was successful or not.

ReceiveIntMsg.receive

event TOS_MsgPtr ReceiveIntMsg.receive (TOS_MsgPtr m)

Signalled when a TinySec message is received.
Returns: The same TOS_MsgPtr that was passed up.

IntOutput.output

command result_t IntOutput.output (uint16_t v)

Called when the counter fires. Updates the value and posts a task to send another message.
Returns: Always returns SUCCESS.