#ifndef PUSHBUTTON_H #define PUSHBUTTON_H #define PROTOCOL_LENGTH 8 #define MESSAGE_DIRECTION 0x00 #define PushButtonDataLength 0x01 #define PushButtonType 0x04 #define PushButtonPush 0x01 #define PushButtonRelease 0x00 #define TIME_TAG 0x00 #include "Led.h" class PushButton { private: char _functionCode; Led _led; QByteArray generateCode(bool isPressed); public: PushButton(char functionCode); PushButton(char functionCode, char ledFunctionCode); QByteArray press(); QByteArray release(); Led* getLed(); }; #endif //PUSHBUTTON_H