Developmental Flight Test Instrumentation
|
UDP server for vehicle state data. More...
#include <server.hh>
Public Slots | |
void | getRIOData (RIOData data) |
Slot to receive data from the RIO. | |
void | getUADCData (uADCData data) |
Slot to receive data from the Micro Air Data Computer. | |
void | getVN200Data (VN200Data data) |
Slot to receive data from the VN-200 INS. | |
void | writeData (void) |
Slot to write data. | |
Public Member Functions | |
Server (Settings *_settings, QObject *_parent=nullptr) | |
Constructor. More... | |
~Server () | |
Dtor. | |
void | enableUADC (QPointer< uADC > adc) |
Enable Micro Air Data Computer Sensor. More... | |
void | enableRIO (QPointer< RIO > rio) |
Enable Remote I/O unit. More... | |
void | enableVN200 (QPointer< VN200 > ins) |
Enable VN-200 INS Sensor. More... | |
void | start (void) |
Start server. More... | |
UDP server for vehicle state data.
For online system identification and similar use cases, we need the vehicle state data available. This class implements a UDP server that server the StateData structure at a user-specified rate. The data is sent to a user-specified IP address and port; these default to localhost and 2701.
The native byte order and 1-byte padding is used for the structure; no conversions are made to network byte order. The easiest way to receive the data is to bind a socket to the address and port and cast the bytes to the data structure; in C++ static_cast<StateData> should work.
For Python, code similar to the following may be used:
|
explicit |
Constructor.
_settings | Pointer to Settings object. |
_parent | Pointer to parent QObject. |
void dfti::Server::enableRIO | ( | QPointer< RIO > | rio | ) |
Enable Remote I/O unit.
rio | QPointer to RIO object. |
void dfti::Server::enableUADC | ( | QPointer< uADC > | adc | ) |
Enable Micro Air Data Computer Sensor.
adc | QPointer to uADC object. |
void dfti::Server::enableVN200 | ( | QPointer< VN200 > | ins | ) |
Enable VN-200 INS Sensor.
ins | QPointer to VN200 object. |
void dfti::Server::start | ( | void | ) |
Start server.
Connects QTimers to the writeData slot.