// CommandDecoder.h #ifndef _COMMANDDECODER_h #define _COMMANDDECODER_h #if defined(ARDUINO) && ARDUINO >= 100 #include "arduino.h" #else #include "WProgram.h" #endif #include "GlobalDatas.h" class CommandDecoder { private: byte cmd[8] = { 0 }; private: byte _CheckSUM(byte main, byte data1, byte data2, byte data3); public: CommandDecoder(); CommandDecoder(byte* arr); CommandDecoder(const CommandDecoder& obj) = delete; public: bool CommandValidate(); public: byte GetDevice(); byte GetMainCommand(); byte GetDataBit(byte num); //1 - 3 }; #endif