Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
WifiRobot/RoombaControl/irobot/irobotSensor.h@0:2deb247ab4bd, 2014-12-09 (annotated)
- Committer:
- wueric
- Date:
- Tue Dec 09 05:06:37 2014 +0000
- Revision:
- 0:2deb247ab4bd
sharing stuff;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| wueric | 0:2deb247ab4bd | 1 | /** \file irobotSensor.h |
| wueric | 0:2deb247ab4bd | 2 | * |
| wueric | 0:2deb247ab4bd | 3 | * iRobot Create sensor operations. |
| wueric | 0:2deb247ab4bd | 4 | * |
| wueric | 0:2deb247ab4bd | 5 | * \author Jeff C. Jensen |
| wueric | 0:2deb247ab4bd | 6 | * \date 2013-12-09 |
| wueric | 0:2deb247ab4bd | 7 | * \copyright Copyright (C) 2013, Jeff C. Jensen, Edward A. Lee, and Sanjit A. Seshia. |
| wueric | 0:2deb247ab4bd | 8 | * This software accompanies An Introductory Lab in Embedded and Cyber-Physical Systems |
| wueric | 0:2deb247ab4bd | 9 | * and is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 |
| wueric | 0:2deb247ab4bd | 10 | * Unported License. See http://leeseshia.org/lab. |
| wueric | 0:2deb247ab4bd | 11 | */ |
| wueric | 0:2deb247ab4bd | 12 | |
| wueric | 0:2deb247ab4bd | 13 | #ifndef _IROBOTSENSOR_H |
| wueric | 0:2deb247ab4bd | 14 | #define _IROBOTSENSOR_H |
| wueric | 0:2deb247ab4bd | 15 | |
| wueric | 0:2deb247ab4bd | 16 | #include "irobotSensorTypes.h" |
| wueric | 0:2deb247ab4bd | 17 | #include "irobotError.h" |
| wueric | 0:2deb247ab4bd | 18 | #include "xqueue.h" |
| wueric | 0:2deb247ab4bd | 19 | |
| wueric | 0:2deb247ab4bd | 20 | /// read a sensor from a data queue |
| wueric | 0:2deb247ab4bd | 21 | /// \return error code |
| wueric | 0:2deb247ab4bd | 22 | int32_t irobotReadBumps_Wheeldrops( |
| wueric | 0:2deb247ab4bd | 23 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 24 | irobotBumps_WheelDrops_t * const bumps_wheelDrops ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 25 | ); |
| wueric | 0:2deb247ab4bd | 26 | |
| wueric | 0:2deb247ab4bd | 27 | /// read a sensor from a data queue |
| wueric | 0:2deb247ab4bd | 28 | /// \return error code |
| wueric | 0:2deb247ab4bd | 29 | int32_t irobotReadButtons( |
| wueric | 0:2deb247ab4bd | 30 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 31 | irobotButtons_t * const buttons ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 32 | ); |
| wueric | 0:2deb247ab4bd | 33 | |
| wueric | 0:2deb247ab4bd | 34 | /// read a sensor from a data queue |
| wueric | 0:2deb247ab4bd | 35 | /// \return error code |
| wueric | 0:2deb247ab4bd | 36 | int32_t irobotReadCargoBayDigitalInputs( |
| wueric | 0:2deb247ab4bd | 37 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 38 | irobotCargoBayDigitalInputs_t * const digitalInputs ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 39 | ); |
| wueric | 0:2deb247ab4bd | 40 | |
| wueric | 0:2deb247ab4bd | 41 | /// read a sensor from a data queue |
| wueric | 0:2deb247ab4bd | 42 | /// \return error code |
| wueric | 0:2deb247ab4bd | 43 | int32_t irobotReadChargingSourcesAvailable( |
| wueric | 0:2deb247ab4bd | 44 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 45 | irobotChargingSourcesAvailable_t * const sources ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 46 | ); |
| wueric | 0:2deb247ab4bd | 47 | |
| wueric | 0:2deb247ab4bd | 48 | /// read a sensor from a data queue |
| wueric | 0:2deb247ab4bd | 49 | /// \return error code |
| wueric | 0:2deb247ab4bd | 50 | int32_t irobotReadLowSideDriver_WheelOvercurrent( |
| wueric | 0:2deb247ab4bd | 51 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 52 | irobotLowSideDriver_WheelOvercurrent_t * const lsd_wo ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 53 | ); |
| wueric | 0:2deb247ab4bd | 54 | |
| wueric | 0:2deb247ab4bd | 55 | /// read a sensor group from a data queue |
| wueric | 0:2deb247ab4bd | 56 | /// \return error code |
| wueric | 0:2deb247ab4bd | 57 | int32_t irobotReadSensorGroup0( |
| wueric | 0:2deb247ab4bd | 58 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 59 | irobotSensorGroup0_t * const sensorGroup0 ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 60 | ); |
| wueric | 0:2deb247ab4bd | 61 | |
| wueric | 0:2deb247ab4bd | 62 | /// read a sensor group from a data queue |
| wueric | 0:2deb247ab4bd | 63 | /// \return error code |
| wueric | 0:2deb247ab4bd | 64 | int32_t irobotReadSensorGroup1( |
| wueric | 0:2deb247ab4bd | 65 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 66 | irobotSensorGroup1_t * const sensorGroup1 ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 67 | ); |
| wueric | 0:2deb247ab4bd | 68 | |
| wueric | 0:2deb247ab4bd | 69 | /// read a sensor group from a data queue |
| wueric | 0:2deb247ab4bd | 70 | /// \return error code |
| wueric | 0:2deb247ab4bd | 71 | int32_t irobotReadSensorGroup2( |
| wueric | 0:2deb247ab4bd | 72 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 73 | irobotSensorGroup2_t * const sensorGroup2 ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 74 | ); |
| wueric | 0:2deb247ab4bd | 75 | |
| wueric | 0:2deb247ab4bd | 76 | /// read a sensor group from a data queue |
| wueric | 0:2deb247ab4bd | 77 | /// \return error code |
| wueric | 0:2deb247ab4bd | 78 | int32_t irobotReadSensorGroup3( |
| wueric | 0:2deb247ab4bd | 79 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 80 | irobotSensorGroup3_t * const sensorGroup3 ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 81 | ); |
| wueric | 0:2deb247ab4bd | 82 | |
| wueric | 0:2deb247ab4bd | 83 | /// read a sensor group from a data queue |
| wueric | 0:2deb247ab4bd | 84 | /// \return error code |
| wueric | 0:2deb247ab4bd | 85 | int32_t irobotReadSensorGroup4( |
| wueric | 0:2deb247ab4bd | 86 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 87 | irobotSensorGroup4_t * const sensorGroup4 ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 88 | ); |
| wueric | 0:2deb247ab4bd | 89 | |
| wueric | 0:2deb247ab4bd | 90 | /// read a sensor group from a data queue |
| wueric | 0:2deb247ab4bd | 91 | /// \return error code |
| wueric | 0:2deb247ab4bd | 92 | int32_t irobotReadSensorGroup5( |
| wueric | 0:2deb247ab4bd | 93 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 94 | irobotSensorGroup5_t * const sensorGroup5 ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 95 | ); |
| wueric | 0:2deb247ab4bd | 96 | |
| wueric | 0:2deb247ab4bd | 97 | /// read a sensor group from a data queue |
| wueric | 0:2deb247ab4bd | 98 | /// \return error code |
| wueric | 0:2deb247ab4bd | 99 | int32_t irobotReadSensorGroup6( |
| wueric | 0:2deb247ab4bd | 100 | xqueue_t * const queue, ///< [in/out] queue containing sensor packet |
| wueric | 0:2deb247ab4bd | 101 | irobotSensorGroup6_t * const sensorGroup6 ///< [out] sensor value |
| wueric | 0:2deb247ab4bd | 102 | ); |
| wueric | 0:2deb247ab4bd | 103 | |
| wueric | 0:2deb247ab4bd | 104 | /// print all irobot sensors |
| wueric | 0:2deb247ab4bd | 105 | /// \return error code |
| wueric | 0:2deb247ab4bd | 106 | int32_t irobotPrintSensorGroup6( |
| wueric | 0:2deb247ab4bd | 107 | const irobotSensorGroup6_t * const sensors |
| wueric | 0:2deb247ab4bd | 108 | ); |
| wueric | 0:2deb247ab4bd | 109 | |
| wueric | 0:2deb247ab4bd | 110 | |
| wueric | 0:2deb247ab4bd | 111 | #endif /// _IROBOTSENSOR_H |
