ControllerBox directs electromechanical equipment in restaurants to display information.

Dependencies:   EthernetInterface HTTPClient_KVplus MbedJSONValue SDFileSystem TextLCD mbed-rtos mbed picojson

libMotiv/Device.h

Committer:
TimWoo
Date:
2014-12-07
Revision:
4:8155d4d6a193
Parent:
3:21c8adb97c8f

File content as of revision 4:8155d4d6a193:

#ifndef MOTIV_DEVICE_H
#define MOTIV_DEVICE_H

#include <string>

#define DELIMITER ';'

//a default constructor that takes no arguments
//a copy constructor ex: book(const &book b);
//an overloaded assignment operato

class MCommand
{
    public:
    
    MCommand();
    MCommand(char id, char cmd, char val);
    ~MCommand();
    
    MCommand& operator=(const MCommand& mc);
    
    char getId(), getCmd(), getVal();
    void print();
    
    private:
    char id, cmd, val;
};



class Device
{
public:
    Device();
    Device(int id);
    ~Device();

    Device(const Device& d);
    Device& operator=(const Device& d);
    
    int getId() const;

//private: 
//    struct mCommand { //3 chars to be sent to the hardware
//        char id; //device id
//        char cmd; //command number
//        char val; //command specific value
//        char delim; //delimiter
//    };
    /**
        mCommand buildCommand(int,int);
    */
    MCommand buildCommand(char cmd, char value);
    
protected:
    
    int id;

private:


};

#endif