// TrafficLightCommand.h #ifndef _TRAFFICLIGHTCOMMAND_h #define _TRAFFICLIGHTCOMMAND_h #if defined(ARDUINO) && ARDUINO >= 100 #include "arduino.h" #else #include "WProgram.h" #endif #include "CommandEncoder.h" class TrafficLightCommand : private CommandEncoder { public: enum class Color { Red = 0x01, Green = 0x02, Yellow = 0x03 }; private: uint8_t RandomDisc(); public: TrafficLightCommand(); public: void UsingA(); void UsingB(); public: byte* CMD_EnterIdentifyMode(); byte* CMD_CheckResult(Color color); byte* CMD_CheckRandomResult(); public: bool IsTrafficLightCommand(byte* cmd); bool ModeChangeSuccess(byte* cmd); }; #endif