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@9:a0fb6c370dbb, 2015-12-31 (annotated)
- Committer:
- henryrawas
- Date:
- Thu Dec 31 20:02:58 2015 +0000
- Revision:
- 9:a0fb6c370dbb
- Parent:
- 8:d98e2dec0f40
- Child:
- 11:3a2e6eb9fbb8
report errors
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
henryrawas | 4:36a4eceb1b7f | 1 | /* |
henryrawas | 4:36a4eceb1b7f | 2 | Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license. |
henryrawas | 4:36a4eceb1b7f | 3 | */ |
henryrawas | 4:36a4eceb1b7f | 4 | |
henryrawas | 4:36a4eceb1b7f | 5 | #ifndef __ROBOT_NODE_H__ |
henryrawas | 4:36a4eceb1b7f | 6 | #define __ROBOT_NODE_H__ |
henryrawas | 4:36a4eceb1b7f | 7 | |
henryrawas | 4:36a4eceb1b7f | 8 | enum NodeMeasure |
henryrawas | 4:36a4eceb1b7f | 9 | { |
henryrawas | 8:d98e2dec0f40 | 10 | NM_Temperature = 0x1, |
henryrawas | 8:d98e2dec0f40 | 11 | NM_Voltage = 0x2, |
henryrawas | 8:d98e2dec0f40 | 12 | NM_Degrees = 0x3, |
henryrawas | 8:d98e2dec0f40 | 13 | NM_Load = 0x4 |
henryrawas | 4:36a4eceb1b7f | 14 | }; |
henryrawas | 4:36a4eceb1b7f | 15 | |
henryrawas | 4:36a4eceb1b7f | 16 | enum NodeAction |
henryrawas | 4:36a4eceb1b7f | 17 | { |
henryrawas | 7:6723f6887d00 | 18 | NA_Rotate = 0x1 |
henryrawas | 4:36a4eceb1b7f | 19 | }; |
henryrawas | 4:36a4eceb1b7f | 20 | |
henryrawas | 4:36a4eceb1b7f | 21 | enum NodePartType |
henryrawas | 4:36a4eceb1b7f | 22 | { |
henryrawas | 7:6723f6887d00 | 23 | NT_AX12 = 0x1 |
henryrawas | 4:36a4eceb1b7f | 24 | }; |
henryrawas | 4:36a4eceb1b7f | 25 | |
henryrawas | 4:36a4eceb1b7f | 26 | |
henryrawas | 4:36a4eceb1b7f | 27 | class RobotNode |
henryrawas | 4:36a4eceb1b7f | 28 | { |
henryrawas | 4:36a4eceb1b7f | 29 | public: |
henryrawas | 4:36a4eceb1b7f | 30 | virtual bool HasMeasure(int measureId) = 0; |
henryrawas | 4:36a4eceb1b7f | 31 | |
henryrawas | 4:36a4eceb1b7f | 32 | virtual float GetMeasure(int measureId) = 0; |
henryrawas | 4:36a4eceb1b7f | 33 | |
henryrawas | 4:36a4eceb1b7f | 34 | virtual float GetLastMeasure(int measureId) = 0; |
henryrawas | 4:36a4eceb1b7f | 35 | |
henryrawas | 4:36a4eceb1b7f | 36 | virtual bool HasAction(int actionId) = 0; |
henryrawas | 4:36a4eceb1b7f | 37 | |
henryrawas | 4:36a4eceb1b7f | 38 | virtual bool DoAction(int actionId, float actionValue) = 0; |
henryrawas | 4:36a4eceb1b7f | 39 | |
henryrawas | 7:6723f6887d00 | 40 | virtual int GetLastError() = 0; |
henryrawas | 4:36a4eceb1b7f | 41 | |
henryrawas | 9:a0fb6c370dbb | 42 | virtual bool HasError() = 0; |
henryrawas | 9:a0fb6c370dbb | 43 | |
henryrawas | 4:36a4eceb1b7f | 44 | virtual NodePartType GetNodeType() = 0; |
henryrawas | 4:36a4eceb1b7f | 45 | }; |
henryrawas | 4:36a4eceb1b7f | 46 | |
henryrawas | 4:36a4eceb1b7f | 47 | #endif |