spwpacketreceiver.h
36 lines
| 986 B
| text/x-c
|
CLexer
/ rmapplugin / spwpacketreceiver.h
r0 | #ifndef SPWPACKETRECEIVER_H | |||
#define SPWPACKETRECEIVER_H | ||||
#include <QSemaphore> | ||||
#include <QTcpSocket> | ||||
class spwpacketreceiver : public QObject | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
explicit spwpacketreceiver(QObject *parent = 0); | ||||
~spwpacketreceiver(); | ||||
int fetchRMAPPacket(); | ||||
void acquireRMAPSemaphore(); | ||||
void acquireCCSDSSemaphore(); | ||||
bool isRMAPPacketSemaphoreAvailable(); | ||||
unsigned char* ccsdsPacket; | ||||
char* rmapPacket; | ||||
char* spwPacket; | ||||
unsigned int rmapPacketSize; | ||||
unsigned int ccsdsPacketSize; | ||||
QSemaphore* rmapPacketSEMAPHORE; | ||||
QSemaphore* ccsdsPacketSEMAPHORE; | ||||
QTcpSocket* gresbReceptionSocket; | ||||
public slots: | ||||
int receiveSPWPacket(unsigned char requestID = 0); // request ID by default is 0 for CCSDS | ||||
void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | ||||
signals: | ||||
void ccsdsPacketAvailable(unsigned char* ccsdsPacket, unsigned int size); | ||||
void sendMessage(QString message); | ||||
}; | ||||
#endif // SPWPACKETRECEIVER_H | ||||