18 #include <SDKDDKVer.h>
20 #include <boost/asio.hpp>
22 #include <boost/asio.hpp>
53 [[nodiscard]] std::string
type()
const override;
88 static constexpr std::array<int, 2>
PORT_LIMITS = { 0, 65535 };
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Position, Velocity and Attitude Storage Class.
Abstract parent class for all nodes.
Definition Node.hpp:86
UDP Client.
Definition udpRecv.hpp:34
UdpRecv()
Default constructor.
void asyncReceive()
Polls the next data.
void guiConfig() override
ImGui config window which is shown on double click.
static std::string typeStatic()
String representation of the Class Type.
bool initialize() override
Initialize the node.
static constexpr std::array< int, 2 > PORT_LIMITS
Range a port can be in [0, 2^16-1].
Definition udpRecv.hpp:88
~UdpRecv() override
Destructor.
boost::asio::io_context _io_context
Asynchronous receive fct.
Definition udpRecv.hpp:91
UdpRecv(UdpRecv &&)=delete
Move constructor.
bool _isStartup
Startup handler: used in 'initialize()' to differentiate between startup and re-initialization.
Definition udpRecv.hpp:103
bool resetNode() override
Resets the node. Moves the read cursor to the start.
UdpRecv & operator=(const UdpRecv &)=delete
Copy assignment operator.
std::array< double, 13 > _data
Network data stream array.
Definition udpRecv.hpp:112
static std::string category()
String representation of the Class Category.
std::thread _recvThread
Receiver thread.
Definition udpRecv.hpp:98
bool _running
Flag that indicates the running data link.
Definition udpRecv.hpp:101
UdpRecv & operator=(UdpRecv &&)=delete
Move assignment operator.
std::chrono::steady_clock::time_point _startPoint
Time point where the first package has been received.
Definition udpRecv.hpp:106
void restore(const json &j) override
Restores the node from a json object.
static constexpr size_t OUTPUT_PORT_INDEX_NODE_DATA
Object (NodeData)
Definition udpRecv.hpp:73
UdpRecv(const UdpRecv &)=delete
Copy constructor.
json save() const override
Saves the node into a json object.
std::string type() const override
String representation of the Class Type.
boost::asio::ip::udp::socket _socket
Boost udp socket.
Definition udpRecv.hpp:93
static constexpr unsigned int _maxBytes
Network data stream maximum buffer size in [bytes].
Definition udpRecv.hpp:109
int _port
UDP port number.
Definition udpRecv.hpp:85
void deinitialize() override
Deinitialize the node.
boost::asio::ip::udp::endpoint _sender_endpoint
Boost udp endpoint.
Definition udpRecv.hpp:95