Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface HTTPClient_KVplus MbedJSONValue SDFileSystem TextLCD mbed-rtos mbed picojson
libMotiv/Device.h
- Committer:
- TimWoo
- Date:
- 2014-12-04
- Revision:
- 3:21c8adb97c8f
File content as of revision 3:21c8adb97c8f:
#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