mainwindow.h
66 lines
| 1.6 KiB
| text/x-c
|
CLexer
/ spwtimegenerator / mainwindow.h
r14 | #ifndef MAINWINDOW_H | |||
#define MAINWINDOW_H | ||||
r50 | #include <mainwindowui.h> | |||
r14 | #include <QtGui/QMainWindow> | |||
#include <QDialog> | ||||
#include <QObject> | ||||
#include <QTimer> | ||||
r62 | #include <tcpackettosend.h> | |||
r14 | ||||
r50 | #include "spw_usb_api.h" | |||
#include "spw_config_library.h" | ||||
#include "TC_types.h" | ||||
#define BWAIT_0 0 | ||||
#define BWAIT_1 1 | ||||
#define PATH_ADDRESSING_OFFSET 1 | ||||
r14 | class MainWindow : public QWidget | |||
{ | ||||
Q_OBJECT | ||||
public: | ||||
MainWindow(QWidget *parent = 0); | ||||
~MainWindow(); | ||||
r50 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |||
TCPacketToSend *packetToSend; | ||||
r14 | ||||
private: | ||||
unsigned int getLinkStatus(unsigned char link); | ||||
r50 | USB_SPACEWIRE_ID pIdentifier; | |||
USB_SPACEWIRE_STATUS result; // The result of the send operation | ||||
r14 | star_device_handle hDevice; // Handle to the SpaceWire device | |||
bool isRunning; | ||||
mainwindowui *UI; | ||||
QTimer *time; | ||||
r50 | long systemTime; | |||
r62 | bool flag_sendSystemTimePacket; | |||
bool flag_sendArbitraryTimePacket; | ||||
bool flag_sendTimecodesPeriodicallyStarDundee; | ||||
r50 | ||||
r14 | signals: | |||
void sendMessage(QString); | ||||
r50 | void systemTimeHasChanged(long time); | |||
r14 | ||||
public slots: | ||||
unsigned int Open(); | ||||
r62 | unsigned int testBrick(); | |||
r14 | void sendOneTimecode(); | |||
r62 | void sendTimecodesPeriodicallyPC(); | |||
void sendTimecodesPeriodicallyStarDundee(); | ||||
r50 | void periodicalTimecodeTimeout(); | |||
void sendTimePacketTimeout(); | ||||
void sendSystemTime(); | ||||
void sendArbitraryTime(); | ||||
r62 | void sendSystemTimeAndTimecode(); | |||
void sendArbitraryTimeAndTimecode(); | ||||
r50 | void sendUpdateTime(long time); | |||
r14 | void reTestSPWLink(); | |||
}; | ||||
#endif // MAINWINDOW_H | ||||