#ifndef CMDWRD_H #define CMDWRD_H #include "declarations.h" class CommandWord:public QObject { Q_OBJECT public: typedef union { uint16_t all; struct { unsigned numDW: 5; // DW - data word unsigned subAddr: 5; unsigned K: 1; // translate/receive flag unsigned addrRT: 5; // RT - remote terminal }; } CW_t; CW_t CW; uint8_t addrRTf; uint8_t Kf; uint8_t subAddrf; uint8_t numDWf; QHash cmdCode; //01001 - 01111 reserved, 10110 - 11111 reserved enum codeName {dynBC, sync1, transSW, initST, transS, overrTS, inhTFB, overrITF, resetRT, transVW = 0b10000, sync2, transLC, transBW, selectedSW, overrSTS}; void description(QString CmdW); uint8_t addrRTFind(uint16_t cmdw); uint8_t KFind(uint16_t cmdw); uint8_t subAddrFind(uint16_t cmdw); uint8_t numDWFind(uint16_t cmdw); CommandWord(); ~CommandWord(); }; #endif // CMDWRD_H