Eric Wu / Mbed 2 deprecated WifiRobot

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

irobotSensorStream.h File Reference

irobotSensorStream.h File Reference

iRobot sensor stream functions More...

Go to the source code of this file.

Functions

int32_t irobotSensorStreamConfigure (const irobotUARTPort_t port, const irobotSensorCode *const sensorCodes, uint8_t nSensorCodes)
 configure a sensors stream
int32_t irobotSensorStreamPause (const irobotUARTPort_t port, const bool pause)
 pause or resume a sensor stream
int32_t irobotSensorStreamStartAll (const irobotUARTPort_t port)
 begin a sensor stream containing all sensors (SensorGroup6)
int32_t irobotSensorStreamProcessAll (xqueue_t *const queue, irobotSensorGroup6_t *const sensors, bool *const packetFound)
 process a sensors stream that has been configured to transmit SensorGroup6 (all sensors)

Detailed Description

iRobot sensor stream functions

Author:
Jeff C. Jensen
Date:
2013-12-09 Copyright (C) 2013, Jeff C. Jensen, Edward A. Lee, and Sanjit A. Seshia. This software accompanies An Introductory Lab in Embedded and Cyber-Physical Systems and is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. See http://leeseshia.org/lab.

Definition in file irobotSensorStream.h.


Function Documentation

int32_t irobotSensorStreamConfigure ( const irobotUARTPort_t  port,
const irobotSensorCode *const   sensorCodes,
uint8_t  nSensorCodes 
)

configure a sensors stream

Returns:
error code
Parameters:
[in]portirobot UART port
[in]sensorCodesarray of sensor codes (must be nSensorCodes in size)
[in]nSensorCodesnumber of sensors in each stream packet

Definition at line 14 of file irobotSensorStream.cpp.

int32_t irobotSensorStreamPause ( const irobotUARTPort_t  port,
const bool  pause 
)

pause or resume a sensor stream

Returns:
error code
Parameters:
[in]portirobot UART port
[in]pauseTRUE if set to pause

Definition at line 39 of file irobotSensorStream.cpp.

int32_t irobotSensorStreamProcessAll ( xqueue_t *const   queue,
irobotSensorGroup6_t *const   sensors,
bool *const   packetFound 
)

process a sensors stream that has been configured to transmit SensorGroup6 (all sensors)

Parameters:
[in,out]queueraw byte stream
[out]sensorssensors
[out]packetFoundpacket found

Definition at line 63 of file irobotSensorStream.cpp.

int32_t irobotSensorStreamStartAll ( const irobotUARTPort_t  port )

begin a sensor stream containing all sensors (SensorGroup6)

Warning:
Do not use this to measure distance and angle, as these measurements are subject to roundoff error in each packet; less frequent packets (polling) are needed.
Returns:
error code
Parameters:
[in]portirobot UART port

Definition at line 51 of file irobotSensorStream.cpp.