23 #include <SDKDDKVer.h>
25 #include <boost/asio.hpp>
27 #include <boost/asio.hpp>
57 [[nodiscard]] std::string
type()
const override;
60 [[nodiscard]]
static std::string
category();
67 [[nodiscard]]
json save()
const override;
96 std::array<int, 4>
_ip{};
105 static constexpr std::array<int, 2>
IP_LIMITS = { 0, 255 };
nlohmann::json json
json namespace
The class is responsible for all time-related tasks.
Utility for the UDP Send and Receive nodes.
The class is responsible for all time-related tasks.
Node(std::string name)
Constructor.
boost::asio::ip::udp::resolver::results_type _endpoints
Boost udp endpoint.
UdpSend & operator=(UdpSend &&)=delete
Move assignment operator.
UdpUtil::MessageType _msgType
Message Type: 0 = posVelAtt, 1 = gnssObs.
static constexpr size_t INPUT_PORT_INDEX_NODE_DATA
Object (NodeData)
bool initialize() override
Initialize the node.
UdpSend()
Default constructor.
static constexpr std::array< int, 2 > IP_LIMITS
Range an IPv4 address can be in [0, 2^8-1].
boost::asio::ip::udp::resolver _resolver
Boost udp resolver.
bool resetNode() override
Resets the node. Moves the read cursor to the start.
void deinitialize() override
Deinitialize the node.
static std::string category()
String representation of the Class Category.
std::string type() const override
String representation of the Class Type.
boost::asio::io_context _io_context
Asynchronous receive fct.
void receiveData(InputPin::NodeDataQueue &queue, size_t pinIdx)
Callback when receiving data on a port.
void restore(const json &j) override
Restores the node from a json object.
void guiConfig() override
ImGui config window which is shown on double click.
UdpSend(UdpSend &&)=delete
Move constructor.
void setMsgTypeAndTime(std::vector< char > &data2send, const InsTime &insTime)
Set the Msg Type And Time object.
static std::string typeStatic()
String representation of the Class Type.
UdpSend(const UdpSend &)=delete
Copy constructor.
UdpSend & operator=(const UdpSend &)=delete
Copy assignment operator.
int _port
UDP port number.
boost::asio::ip::udp::socket _socket
Boost udp socket.
std::array< int, 4 > _ip
IPv4 address.
json save() const override
Saves the node into a json object.
~UdpSend() override
Destructor.
MessageType
Enum specifying the type of the output message.
@ PosVelAtt
Extract PosVelAtt data.