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

Committer:
henryrawas
Date:
2016-01-19
Revision:
15:4bd10f531cdc
Parent:
13:ffeff9b5e513
Child:
19:2f0ec9ac1238

File content as of revision 15:4bd10f531cdc:

/* 
Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license.
*/

#ifndef __ROBOT_NODE_H__
#define __ROBOT_NODE_H__

enum NodeMeasure
{
    NM_Temperature      = 0x1,
    NM_Voltage          = 0x2,
    NM_Degrees          = 0x3,
    NM_Load             = 0x4
};

enum NodeAction
{
    NA_Ping             = 0x1,
    NA_Init             = 0x2,
    NA_Rotate           = 0x3,
    NA_ClearError       = 0x4
};

enum NodePartType
{
    NT_AX12             = 0x1,
    NT_Emul             = 0x7f
};


class RobotNode
{
public:
    virtual bool HasMeasure(int measureId) = 0;
    
    virtual float GetMeasure(int measureId) = 0;
    
    virtual void ClearMeasureCache() = 0;
    
    virtual bool HasAction(int actionId) = 0;
    
    virtual bool DoAction(int actionId, float actionValue) = 0;
    
    virtual int GetLastError() = 0;
    
    virtual bool HasError() = 0;
    
    virtual NodePartType GetNodeType() = 0;
};

#endif