stardundee.h
72 lines
| 2.1 KiB
| text/x-c
|
CLexer
/ rmapplugin / stardundee.h
r0 | #ifndef STARDUNDEE_H | |||
#define STARDUNDEE_H | ||||
#include <QWidget> | ||||
#include "spw_usb_api.h" | ||||
|
r1 | #include "spw_config_library.h" | ||
r0 | #include <QPushButton> | |||
#include <QGridLayout> | ||||
#include <QSpinBox> | ||||
#include <QLabel> | ||||
|
r1 | #include "rmapoperations.h" | ||
#define BWAIT_0 0 | ||||
#define BWAIT_1 1 | ||||
r0 | ||||
class StarDundee : public QWidget | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
explicit StarDundee(QWidget *parent = 0); | ||||
~StarDundee(); | ||||
|
r1 | unsigned int WriteStarDundee(unsigned int *Value,unsigned int count,unsigned int address=0); | ||
unsigned int ReadStarDundee(unsigned int *Value,unsigned int count,unsigned int address=0); | ||||
r0 | ||||
signals: | ||||
void sendMessage(QString message); | ||||
|
r1 | void starDundeeIsOpen(bool); | ||
void RMAP_write_reply_setText(QString); | ||||
void appendToLog(QString); | ||||
r0 | ||||
public slots: | ||||
unsigned int OpenStarDundee(); | ||||
unsigned int CloseStarDundee(); | ||||
|
r1 | unsigned int SendPacket(); | ||
unsigned int SendRMAP(); | ||||
unsigned int ReadRMAP(); | ||||
unsigned int GetRoutingTableEntry(); | ||||
void updateCommandCode(RMAP_command_codes code); | ||||
r0 | ||||
private: | ||||
|
r1 | char rmapTargetLogicalAddress ; | ||
char rmapSourceLogicalAddress ; | ||||
r0 | ||||
|
r1 | QPushButton *sendPacket_BUTTON; | ||
QPushButton *sendRMAPPacket_BUTTON; | ||||
QPushButton *readRMAPPacket_BUTTON; | ||||
QPushButton *getRoutingTableEntry_BUTTON; | ||||
r0 | ||||
QLabel *usbDeviceNumber_LABEL; | ||||
|
r1 | QLabel *linkNumber_LABEL; | ||
QLabel *routingTableEntry_LABEL; | ||||
QLabel *sourceLogicalAddress_LABEL; | ||||
r0 | ||||
QSpinBox *usbDeviceNumber_SPINBOX; | ||||
|
r1 | QSpinBox *linkNumber_SPINBOX; | ||
QSpinBox *routingTableEntry_SPINBOX; | ||||
QSpinBox *sourceLogicalAddress_SPINBOX; | ||||
QGridLayout *connection_LAYOUT; | ||||
unsigned char pBuffer[10]; // Pointer to the start of the user buffer from which to transmit data | ||||
unsigned char* rmapPacket; // The buffer to receive RMAP READ packets | ||||
USB_SPACEWIRE_ID pIdentifier; // A pointer to a variable which will be set to contain a unique identifier for the send | ||||
RMAP_command_codes commandCode; | ||||
star_device_handle hDevice; // Handle to the SpaceWire device | ||||
USB_SPACEWIRE_STATUS result; // The result of the send operation | ||||
r0 | ||||
}; | ||||
#endif // STARDUNDEE_H | ||||