bridge.h
54 lines
| 1.7 KiB
| text/x-c
|
CLexer
/ rmapplugin / bridge.h
r4 | #ifndef BRIDGE_H | |||
#define BRIDGE_H | ||||
#include <QWidget> | ||||
r5 | #include <QSemaphore> | |||
#include <QGridLayout> | ||||
#include "rmapoperations.h" | ||||
r4 | ||||
class bridge : public QWidget | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
explicit bridge(QWidget *parent = 0); | ||||
r5 | ~bridge(); | |||
unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); | ||||
unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); | ||||
r9 | //virtual unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |||
r5 | virtual unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0) = 0; | |||
virtual unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0) = 0; | ||||
r9 | //virtual unsigned int getLinkStatus(unsigned char link) = 0; | |||
r5 | ||||
unsigned char rmapTargetLogicalAddress ; | ||||
unsigned char rmapSourceLogicalAddress ; | ||||
RMAP_command_codes commandCode; | ||||
QGridLayout *bridge_LAYOUT; | ||||
QSemaphore *rmapPacketSEMAPHORE; | ||||
QSemaphore *ccsdsPacketSEMAPHORE; | ||||
char *spwPacket; | ||||
char* rmapPacket; | ||||
unsigned char *ccsdsPacket; | ||||
r4 | signals: | |||
r5 | void sendMessage(QString message); | |||
void isOpen(bool); | ||||
void RMAP_write_reply_setText(QString); | ||||
void appendToLog(QString); | ||||
void ccsdsPacketAvailable(unsigned char*, unsigned int); | ||||
r4 | ||||
public slots: | ||||
r9 | //unsigned int Open(); | |||
//unsigned int Close(); | ||||
//virtual int receiveSPWPacket(unsigned char requestID) = 0; | ||||
r5 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} | |||
void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} | ||||
void sourceHasChanged(int target) {rmapSourceLogicalAddress = (unsigned char) target;} | ||||
private: | ||||
r4 | }; | |||
#endif // BRIDGE_H | ||||