v2
This commit is contained in:
70
statwrd.h
Normal file
70
statwrd.h
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifndef STATWRD_H
|
||||
#define STATWRD_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
class StatusWord:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
typedef union {
|
||||
uint16_t all;
|
||||
struct {
|
||||
unsigned termFlg: 1; // terminal flag
|
||||
unsigned dynBCA: 1; // dynamic bus control acceptance
|
||||
unsigned subSysF: 1; // subsystem flag
|
||||
unsigned busy: 1;
|
||||
unsigned broadCR: 1; // broadcast command recieved
|
||||
unsigned reserved: 3;
|
||||
unsigned serReq: 1; // service request
|
||||
unsigned instr: 1; // instrumentation
|
||||
unsigned messErr: 1; // message error
|
||||
unsigned addrRT:5;
|
||||
};
|
||||
} SW_t;
|
||||
|
||||
SW_t SW;
|
||||
|
||||
uint8_t addrRTf;
|
||||
uint8_t messErrf;
|
||||
uint8_t instrf;
|
||||
uint8_t serReqf;
|
||||
uint8_t reservf;
|
||||
uint8_t broadCRf;
|
||||
uint8_t busyf;
|
||||
uint8_t subSysFf;
|
||||
uint8_t dynBCAf;
|
||||
uint8_t termFlgf;
|
||||
|
||||
void description(uint16_t statw);
|
||||
uint8_t addrRTFind(uint16_t statw);
|
||||
uint8_t messErrFind(uint16_t statw);
|
||||
uint8_t instrFind(uint16_t statw);
|
||||
uint8_t serReqFind(uint16_t statw);
|
||||
uint8_t reservFind(uint16_t statw);
|
||||
uint8_t broadCRFind(uint16_t statw);
|
||||
uint8_t busyFind(uint16_t statw);
|
||||
uint8_t subSysFFind(uint16_t statw);
|
||||
uint8_t dynBCAFind(uint16_t statw);
|
||||
uint8_t termFlgFind(uint16_t statw);
|
||||
|
||||
StatusWord()
|
||||
{
|
||||
qDebug() << "StatusWord constructor";
|
||||
addrRTf = 0;
|
||||
messErrf = 0;
|
||||
instrf = 0;
|
||||
serReqf = 0;
|
||||
reservf = 0;
|
||||
broadCRf = 0;
|
||||
busyf = 0;
|
||||
subSysFf = 0;
|
||||
dynBCAf = 0;
|
||||
termFlgf = 0;
|
||||
}
|
||||
~StatusWord();
|
||||
};
|
||||
|
||||
#endif // STATWRD_H
|
Reference in New Issue
Block a user