Template Class Service

Inheritance Relationships

Base Types

Class Documentation

template<typename T, typename pRequestType = typename T::Request::SharedPtr, typename pResponseType = typename T::Response::SharedPtr>
class Service : public virtual soar_ros::Input<typename T::Request::SharedPtr>, public virtual soar_ros::Output<typename T::Response::SharedPtr>, public soar_ros::Interface

Public Functions

inline Service(sml::Agent *agent, rclcpp::Node::SharedPtr node, const std::string &service_name)
inline ~Service()
virtual void parse(pRequestType msg) = 0
virtual pResponseType parse(sml::Identifier *id) override = 0

Parse Soar working memory structure to a ROS message.

Parameters:

id

Returns:

inline virtual std::string getTopic() override

Get the topic of the subscriber.

Returns:

inline virtual sml::Agent *getAgent() override

Get the agent of the current interface.

Returns:

Protected Functions

inline void callback([[maybe_unused]] const std::shared_ptr<rmw_request_id_t> request_header, pRequestType request, pResponseType response)

Protected Attributes

rclcpp::Service<T>::SharedPtr m_service
std::string m_topic
rclcpp::Node::SharedPtr m_node
sml::Agent *m_pAgent