Class UdpSenderNode

Inheritance Relationships

Base Type

  • public rclcpp_lifecycle::LifecycleNode

Class Documentation

class UdpSenderNode : public rclcpp_lifecycle::LifecycleNode

UdpSenderNode class which can send UDP datagrams.

Public Functions

explicit UdpSenderNode(const rclcpp::NodeOptions &options)

Default constructor.

Parameters:

options[in] Options for the node

UdpSenderNode(const rclcpp::NodeOptions &options, const IoContext &ctx)

Constructor which accepts IoContext.

Parameters:
  • options[in] Options for the node

  • ctx[in] A shared IoContext

~UdpSenderNode()

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 subscriber_callback(udp_msgs::msg::UdpPacket::SharedPtr msg)

Callback for sending a UDP datagram.