#ifndef STARDUNDEE_H #define STARDUNDEE_H #include #include "spw_usb_api.h" #include "spw_config_library.h" #include #include #include #include #include "rmapoperations.h" #define BWAIT_0 0 #define BWAIT_1 1 class StarDundee : public QWidget { Q_OBJECT public: explicit StarDundee(QWidget *parent = 0); ~StarDundee(); 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); signals: void sendMessage(QString message); void starDundeeIsOpen(bool); void RMAP_write_reply_setText(QString); void appendToLog(QString); public slots: unsigned int OpenStarDundee(); unsigned int CloseStarDundee(); unsigned int SendPacket(); unsigned int SendRMAP(); unsigned int ReadRMAP(); unsigned int GetRoutingTableEntry(); void updateCommandCode(RMAP_command_codes code); private: char rmapTargetLogicalAddress ; char rmapSourceLogicalAddress ; QPushButton *sendPacket_BUTTON; QPushButton *sendRMAPPacket_BUTTON; QPushButton *readRMAPPacket_BUTTON; QPushButton *getRoutingTableEntry_BUTTON; QLabel *usbDeviceNumber_LABEL; QLabel *linkNumber_LABEL; QLabel *routingTableEntry_LABEL; QLabel *sourceLogicalAddress_LABEL; QSpinBox *usbDeviceNumber_SPINBOX; 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 }; #endif // STARDUNDEE_H