demo project
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
Diff: RobotNode/NodeEmul.h
- Revision:
- 13:ffeff9b5e513
- Child:
- 15:4bd10f531cdc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RobotNode/NodeEmul.h Fri Jan 15 22:02:46 2016 +0000 @@ -0,0 +1,48 @@ +/* +Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license. +*/ + +#ifndef __NODE_Emul_H__ +#define __NODE_Emul_H__ + +#include "RobotNode.h" + + + +class NodeEmul : public RobotNode +{ +public: + NodeEmul(int id); + + virtual bool HasMeasure(int measureId); + + virtual float GetMeasure(int measureId); + + virtual float GetLastMeasure(int measureId); + + virtual bool HasAction(int actionId); + + virtual bool DoAction(int actionId, float actionValue); + + virtual int GetLastError(); + + virtual bool HasError(); + + virtual NodePartType GetNodeType(); + +private: + + // last read temperature + int _LastTemperature; + + // last read position + float _LastPosition; + + // last read voltage + float _LastVoltage; + + // last read load + float _LastLoad; +}; + +#endif