|
|
#ifndef GRESB_H
|
|
|
#define GRESB_H
|
|
|
|
|
|
#include <QWidget>
|
|
|
#include <QLabel>
|
|
|
#include <QPushButton>
|
|
|
#include <QSpinBox>
|
|
|
#include <QGridLayout>
|
|
|
#include <QTcpSocket>
|
|
|
#include <QDialog>
|
|
|
|
|
|
#include "gresbstatusenquiry.h"
|
|
|
#include "spwpacketreceiver.h"
|
|
|
#include "rmapoperations.h"
|
|
|
#include "qipdialogbox.h"
|
|
|
|
|
|
class gresb : public QWidget
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
public:
|
|
|
explicit gresb(QWidget *parent = 0);
|
|
|
~gresb();
|
|
|
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);
|
|
|
unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication);
|
|
|
unsigned int getLinkStatus(unsigned char link);
|
|
|
|
|
|
signals:
|
|
|
void sendMessage(QString message);
|
|
|
void isOpen(bool);
|
|
|
void RMAP_write_reply_setText(QString);
|
|
|
void appendToLog(QString);
|
|
|
void ccsdsPacketAvailable(unsigned char*, unsigned int);
|
|
|
|
|
|
public slots:
|
|
|
void Open();
|
|
|
void Close();
|
|
|
int receiveSPWPacket(unsigned char requestID);
|
|
|
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 slots:
|
|
|
int GRESBStatusQuery();
|
|
|
|
|
|
private:
|
|
|
int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link);
|
|
|
|
|
|
unsigned char rmapTargetLogicalAddress ;
|
|
|
unsigned char rmapSourceLogicalAddress ;
|
|
|
|
|
|
RMAP_command_codes commandCode;
|
|
|
|
|
|
QPushButton *gresbStatusQueryRetryButton;
|
|
|
QPushButton *gresbStatusQueryAbortButton;
|
|
|
|
|
|
QLabel *gresbBridgeIPLabel;
|
|
|
QLabel *gresbVirtualLinkLabel;
|
|
|
QLabel *spwLinkLabel;
|
|
|
QLabel *rmapSourceLogicalAddressLabel;
|
|
|
QLabel *rmapSendStateLabel;
|
|
|
QLabel *rmapReceiveStateLabel;
|
|
|
QLabel *gresbStatusQueryLabel;
|
|
|
QLabel *gresbStatusQueryDialogLabel;
|
|
|
|
|
|
QDialog *gresbStatusQueryDialog;
|
|
|
|
|
|
QIPDialogBox* gresbBridgeIPDialogBox;
|
|
|
|
|
|
QSpinBox *gresbVirtualLinkSpinBox;
|
|
|
QSpinBox *spwLinkSpinBox;
|
|
|
QSpinBox *rmapSourceLogicalAddressSpinBox;
|
|
|
|
|
|
QGridLayout *connectionLayout;
|
|
|
QGridLayout *gresbStatusQueryDialogLayout;
|
|
|
|
|
|
QTcpSocket *RMAPSend_SOCKET;
|
|
|
QTcpSocket *RMAPReceive_SOCKET;
|
|
|
QTcpSocket *GRESBStatusQuery_SOCKET;
|
|
|
|
|
|
spwpacketreceiver *spwPacketReceiverOBJECT;
|
|
|
|
|
|
gresbStatusEnquiry* spwLinkStatusEnquiry;
|
|
|
};
|
|
|
|
|
|
#endif // GRESB_H
|
|
|
|