Apps     Components     Interfaces     All Files     Source Tree     source: apps.Oscilloscope.OscilloscopeM.nc

Component: OscilloscopeM

This module implements the OscilloscopeM component, which periodically takes sensor readings and sends a group of readings over the UART. BUFFER_SIZE defines the number of readings sent in a single packet. The Yellow LED is toggled whenever a new packet is sent, and the red LED is turned on when the sensor reading is above some constant value.

Required Interfaces

Provided Interfaces

Variables

Function Index

Function Descriptions

StdControl.start

command result_t StdControl.start (void)

Starts the SensorControl and CommControl components.
Returns: Always returns SUCCESS.

StdControl.stop

command result_t StdControl.stop (void)

Stops the SensorControl and CommControl components.
Returns: Always returns SUCCESS.

ADC.dataReady

async event result_t ADC.dataReady (uint16_t data)

Signalled when data is ready from the ADC. Stuffs the sensor reading into the current packet, and sends off the packet when BUFFER_SIZE readings have been taken.
Returns: Always returns SUCCESS.

DataMsg.sendDone

event result_t DataMsg.sendDone (TOS_MsgPtr sent, result_t success)

Signalled when the previous packet has been sent.
Returns: Always returns SUCCESS.

Timer.fired

event result_t Timer.fired (void)

Signalled when the clock ticks.
Returns: The result of calling ADC.getData().

ResetCounterMsg.receive

event TOS_MsgPtr ResetCounterMsg.receive (TOS_MsgPtr m)

Signalled when the reset message counter AM is received.
Returns: The free TOS_MsgPtr.