Template Class Client

Inheritance Relationships

Base Types

Class Documentation

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

Public Functions

inline Client(sml::Agent *agent, rclcpp::Node::SharedPtr node, const std::string &client_name)
inline ~Client()
virtual void parse(pResponseType msg) = 0
virtual pRequestType 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 run()

Periodically check the m_s2rQueue and m_r2sQueue for input and output.

Protected Attributes

rclcpp::Client<T>::SharedPtr m_client
std::string m_topic
rclcpp::Node::SharedPtr m_node
sml::Agent *m_pAgent
std::thread m_send_client_requests
std::atomic<bool> isRunning