##// 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
stardundee.h
82 lines | 2.7 KiB | text/x-c | CLexer
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0 #ifndef STARDUNDEE_H
#define STARDUNDEE_H
#include <QWidget>
#include "spw_usb_api.h"
paul@pc-solar1.lab-lpp.local
First version with the Star Dundee bridge operational
r1 #include "spw_config_library.h"
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0 #include <QPushButton>
#include <QGridLayout>
#include <QSpinBox>
#include <QLabel>
Minor updates
r3 #include <QSemaphore>
paul@pc-solar1.lab-lpp.local
First version with the Star Dundee bridge operational
r1 #include "rmapoperations.h"
#define BWAIT_0 0
#define BWAIT_1 1
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
class StarDundee : public QWidget
{
Q_OBJECT
public:
explicit StarDundee(QWidget *parent = 0);
~StarDundee();
Minor updates
r3 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);
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
signals:
void sendMessage(QString message);
Minor updates
r3 void isOpen(bool);
paul@pc-solar1.lab-lpp.local
First version with the Star Dundee bridge operational
r1 void RMAP_write_reply_setText(QString);
void appendToLog(QString);
Minor updates
r3 void ccsdsPacketAvailable(unsigned char*, unsigned int);
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
public slots:
changes on the gresb class, several methods and parameters added
r6 void Open();
void Close();
Minor updates
r3 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;}
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
private:
Minor updates
r3 unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0);
unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0);
void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->acquire();}
void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->acquire();}
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
changes on the gresb class, object ready for usage in the rmapplugin
r7 unsigned int getLinkStatus(unsigned char link);
unsigned int GetRoutingTableEntry();
Minor updates
r3 unsigned char rmapTargetLogicalAddress ;
unsigned char rmapSourceLogicalAddress ;
RMAP_command_codes commandCode;
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
QLabel *usbDeviceNumber_LABEL;
paul@pc-solar1.lab-lpp.local
First version with the Star Dundee bridge operational
r1 QLabel *linkNumber_LABEL;
QLabel *sourceLogicalAddress_LABEL;
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
QSpinBox *usbDeviceNumber_SPINBOX;
paul@pc-solar1.lab-lpp.local
First version with the Star Dundee bridge operational
r1 QSpinBox *linkNumber_SPINBOX;
QSpinBox *sourceLogicalAddress_SPINBOX;
QGridLayout *connection_LAYOUT;
unsigned char pBuffer[10]; // Pointer to the start of the user buffer from which to transmit data
USB_SPACEWIRE_ID pIdentifier; // A pointer to a variable which will be set to contain a unique identifier for the send
star_device_handle hDevice; // Handle to the SpaceWire device
USB_SPACEWIRE_STATUS result; // The result of the send operation
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
Minor updates
r3 // Packet receiver
QSemaphore *rmapPacketSEMAPHORE;
QSemaphore *ccsdsPacketSEMAPHORE;
char* rmapPacket; // The buffer to receive RMAP READ packets
unsigned char *ccsdsPacket;
char *spwPacket;
unsigned int rmapPacketSize;
unsigned int ccsdsPacketSize;
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0 };
#endif // STARDUNDEE_H