demo project
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
RobotNode/RobotNode.h@33:8b9dcbf6d8ec, 2016-02-04 (annotated)
- Committer:
- henryrawas
- Date:
- Thu Feb 04 20:10:33 2016 +0000
- Revision:
- 33:8b9dcbf6d8ec
- Parent:
- 19:2f0ec9ac1238
update libs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
henryrawas | 19:2f0ec9ac1238 | 1 | // Copyright (c) Microsoft. All rights reserved. |
henryrawas | 19:2f0ec9ac1238 | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
henryrawas | 4:36a4eceb1b7f | 3 | |
henryrawas | 4:36a4eceb1b7f | 4 | #ifndef __ROBOT_NODE_H__ |
henryrawas | 4:36a4eceb1b7f | 5 | #define __ROBOT_NODE_H__ |
henryrawas | 4:36a4eceb1b7f | 6 | |
henryrawas | 4:36a4eceb1b7f | 7 | enum NodeMeasure |
henryrawas | 4:36a4eceb1b7f | 8 | { |
henryrawas | 8:d98e2dec0f40 | 9 | NM_Temperature = 0x1, |
henryrawas | 8:d98e2dec0f40 | 10 | NM_Voltage = 0x2, |
henryrawas | 8:d98e2dec0f40 | 11 | NM_Degrees = 0x3, |
henryrawas | 8:d98e2dec0f40 | 12 | NM_Load = 0x4 |
henryrawas | 4:36a4eceb1b7f | 13 | }; |
henryrawas | 4:36a4eceb1b7f | 14 | |
henryrawas | 4:36a4eceb1b7f | 15 | enum NodeAction |
henryrawas | 4:36a4eceb1b7f | 16 | { |
henryrawas | 12:ac6c9d7f8c40 | 17 | NA_Ping = 0x1, |
henryrawas | 12:ac6c9d7f8c40 | 18 | NA_Init = 0x2, |
henryrawas | 12:ac6c9d7f8c40 | 19 | NA_Rotate = 0x3, |
henryrawas | 12:ac6c9d7f8c40 | 20 | NA_ClearError = 0x4 |
henryrawas | 4:36a4eceb1b7f | 21 | }; |
henryrawas | 4:36a4eceb1b7f | 22 | |
henryrawas | 4:36a4eceb1b7f | 23 | enum NodePartType |
henryrawas | 4:36a4eceb1b7f | 24 | { |
henryrawas | 13:ffeff9b5e513 | 25 | NT_AX12 = 0x1, |
henryrawas | 13:ffeff9b5e513 | 26 | NT_Emul = 0x7f |
henryrawas | 4:36a4eceb1b7f | 27 | }; |
henryrawas | 4:36a4eceb1b7f | 28 | |
henryrawas | 4:36a4eceb1b7f | 29 | |
henryrawas | 4:36a4eceb1b7f | 30 | class RobotNode |
henryrawas | 4:36a4eceb1b7f | 31 | { |
henryrawas | 4:36a4eceb1b7f | 32 | public: |
henryrawas | 4:36a4eceb1b7f | 33 | virtual bool HasMeasure(int measureId) = 0; |
henryrawas | 4:36a4eceb1b7f | 34 | |
henryrawas | 4:36a4eceb1b7f | 35 | virtual float GetMeasure(int measureId) = 0; |
henryrawas | 4:36a4eceb1b7f | 36 | |
henryrawas | 15:4bd10f531cdc | 37 | virtual void ClearMeasureCache() = 0; |
henryrawas | 4:36a4eceb1b7f | 38 | |
henryrawas | 4:36a4eceb1b7f | 39 | virtual bool HasAction(int actionId) = 0; |
henryrawas | 4:36a4eceb1b7f | 40 | |
henryrawas | 4:36a4eceb1b7f | 41 | virtual bool DoAction(int actionId, float actionValue) = 0; |
henryrawas | 4:36a4eceb1b7f | 42 | |
henryrawas | 7:6723f6887d00 | 43 | virtual int GetLastError() = 0; |
henryrawas | 4:36a4eceb1b7f | 44 | |
henryrawas | 9:a0fb6c370dbb | 45 | virtual bool HasError() = 0; |
henryrawas | 9:a0fb6c370dbb | 46 | |
henryrawas | 4:36a4eceb1b7f | 47 | virtual NodePartType GetNodeType() = 0; |
henryrawas | 4:36a4eceb1b7f | 48 | }; |
henryrawas | 4:36a4eceb1b7f | 49 | |
henryrawas | 4:36a4eceb1b7f | 50 | #endif |