##// END OF EJS Templates
Minor updates
Minor updates

File last commit:

r3:bf349cb3902d default
r3:bf349cb3902d default
Show More
stardundee.h
82 lines | 2.8 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 WriteStarDundee(unsigned int *Value, unsigned int count, unsigned int address);
unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication);
unsigned int getLinkStatus(unsigned char link);
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:
Minor updates
r3 unsigned int Open();
unsigned int 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;}
Initial commit: rmapplugin fully operational with the GRESB Ethernet/SpaceWire bridge.
r0
private:
Minor updates
r3 unsigned int GetRoutingTableEntry();
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
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