##// END OF EJS Templates
First version with the Star Dundee bridge operational
First version with the Star Dundee bridge operational

File last commit:

r1:45ff379330d3 default
r1:45ff379330d3 default
Show More
spwpacketreceiver.h
36 lines | 986 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 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