C++ YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
ServerNode Class Referencefinal

A ROS 2 service server node for adding two integers. More...

Inheritance diagram for ServerNode:
Collaboration diagram for ServerNode:

Public Member Functions

 ServerNode ()
 Constructor for the ServerNode class.
 

Private Attributes

rclcpp::Service< example_interfaces::srv::AddTwoInts >::SharedPtr srv_
 Shared pointer to the "add_two_ints" service.
 

Detailed Description

A ROS 2 service server node for adding two integers.

This node provides a service named "add_two_ints" that accepts two integers as input and returns their sum. It also supports an optional one-shot mode that shuts down the server after handling the first request.

Constructor & Destructor Documentation

◆ ServerNode()

ServerNode::ServerNode ( )
inlineexplicit

Constructor for the ServerNode class.

Initializes the service server and an optional one-shot timer.

Parameters
optionsNode options for initialization.

Member Data Documentation

◆ srv_

rclcpp::Service<example_interfaces::srv::AddTwoInts>::SharedPtr ServerNode::srv_
private

Shared pointer to the "add_two_ints" service.


The documentation for this class was generated from the following file: