demo project

Dependencies:   AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL

Committer:
henryrawas
Date:
Fri Jan 15 22:02:46 2016 +0000
Revision:
13:ffeff9b5e513
Child:
15:4bd10f531cdc
Always test status and send data

Who changed what in which revision?

UserRevisionLine numberNew contents of line
henryrawas 13:ffeff9b5e513 1 /*
henryrawas 13:ffeff9b5e513 2 Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license.
henryrawas 13:ffeff9b5e513 3 */
henryrawas 13:ffeff9b5e513 4
henryrawas 13:ffeff9b5e513 5 #ifndef __NODE_Emul_H__
henryrawas 13:ffeff9b5e513 6 #define __NODE_Emul_H__
henryrawas 13:ffeff9b5e513 7
henryrawas 13:ffeff9b5e513 8 #include "RobotNode.h"
henryrawas 13:ffeff9b5e513 9
henryrawas 13:ffeff9b5e513 10
henryrawas 13:ffeff9b5e513 11
henryrawas 13:ffeff9b5e513 12 class NodeEmul : public RobotNode
henryrawas 13:ffeff9b5e513 13 {
henryrawas 13:ffeff9b5e513 14 public:
henryrawas 13:ffeff9b5e513 15 NodeEmul(int id);
henryrawas 13:ffeff9b5e513 16
henryrawas 13:ffeff9b5e513 17 virtual bool HasMeasure(int measureId);
henryrawas 13:ffeff9b5e513 18
henryrawas 13:ffeff9b5e513 19 virtual float GetMeasure(int measureId);
henryrawas 13:ffeff9b5e513 20
henryrawas 13:ffeff9b5e513 21 virtual float GetLastMeasure(int measureId);
henryrawas 13:ffeff9b5e513 22
henryrawas 13:ffeff9b5e513 23 virtual bool HasAction(int actionId);
henryrawas 13:ffeff9b5e513 24
henryrawas 13:ffeff9b5e513 25 virtual bool DoAction(int actionId, float actionValue);
henryrawas 13:ffeff9b5e513 26
henryrawas 13:ffeff9b5e513 27 virtual int GetLastError();
henryrawas 13:ffeff9b5e513 28
henryrawas 13:ffeff9b5e513 29 virtual bool HasError();
henryrawas 13:ffeff9b5e513 30
henryrawas 13:ffeff9b5e513 31 virtual NodePartType GetNodeType();
henryrawas 13:ffeff9b5e513 32
henryrawas 13:ffeff9b5e513 33 private:
henryrawas 13:ffeff9b5e513 34
henryrawas 13:ffeff9b5e513 35 // last read temperature
henryrawas 13:ffeff9b5e513 36 int _LastTemperature;
henryrawas 13:ffeff9b5e513 37
henryrawas 13:ffeff9b5e513 38 // last read position
henryrawas 13:ffeff9b5e513 39 float _LastPosition;
henryrawas 13:ffeff9b5e513 40
henryrawas 13:ffeff9b5e513 41 // last read voltage
henryrawas 13:ffeff9b5e513 42 float _LastVoltage;
henryrawas 13:ffeff9b5e513 43
henryrawas 13:ffeff9b5e513 44 // last read load
henryrawas 13:ffeff9b5e513 45 float _LastLoad;
henryrawas 13:ffeff9b5e513 46 };
henryrawas 13:ffeff9b5e513 47
henryrawas 13:ffeff9b5e513 48 #endif