Class UdpReceiverNode

Inheritance Relationships

Base Type

  • public rclcpp_lifecycle::LifecycleNode

Class Documentation

class UdpReceiverNode : public rclcpp_lifecycle::LifecycleNode

UdpReceiverNode class which can receive UDP datagrams.

Public Functions

explicit UdpReceiverNode(const rclcpp::NodeOptions &options)

Default constructor.

Parameters:

options[in] Options for the node

UdpReceiverNode(const rclcpp::NodeOptions&, const IoContext &ctx)

Constructor which accepts IoContext.

Parameters:
  • options[in] Options for the node

  • ctx[in] A shared IoContext

~UdpReceiverNode()

Destructor - required to manage owned IoContext.

LNI::CallbackReturn on_configure(const lc::State &state) override

Callback from transition to “configuring” state.

Parameters:

state[in] The current state that the node is in.

LNI::CallbackReturn on_activate(const lc::State &state) override

Callback from transition to “activating” state.

Parameters:

state[in] The current state that the node is in.

LNI::CallbackReturn on_deactivate(const lc::State &state) override

Callback from transition to “deactivating” state.

Parameters:

state[in] The current state that the node is in.

LNI::CallbackReturn on_cleanup(const lc::State &state) override

Callback from transition to “unconfigured” state.

Parameters:

state[in] The current state that the node is in.

LNI::CallbackReturn on_shutdown(const lc::State &state) override

Callback from transition to “shutdown” state.

Parameters:

state[in] The current state that the node is in.

void receiver_callback(const std::vector<uint8_t> &buffer)

\breif Callback for receiving a UDP datagram