##// END OF EJS Templates
changes on the gresb class, object ready for usage in the rmapplugin
changes on the gresb class, object ready for usage in the rmapplugin

File last commit:

r7:7c1589fec151 default
r7:7c1589fec151 default
Show More
spwpacketreceiver.h
35 lines | 1010 B | text/x-c | CLexer
#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 acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->acquire();}
void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->acquire();}
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