SMACC2
|
#include <smacc_service_server_client.hpp>
Public Member Functions | |
SmaccServiceServerClient () | |
SmaccServiceServerClient (std::string service_name) | |
virtual | ~SmaccServiceServerClient () |
template<typename T > | |
boost::signals2::connection | onServiceRequestReceived (void(T::*callback)(const std::shared_ptr< typename TService::Request >, std::shared_ptr< typename TService::Response >), T *object) |
void | onInitialize () override |
Public Member Functions inherited from smacc2::ISmaccClient | |
ISmaccClient () | |
virtual | ~ISmaccClient () |
virtual void | onInitialize () |
virtual std::string | getName () const |
template<typename TComponent > | |
TComponent * | getComponent () |
template<typename TComponent > | |
TComponent * | getComponent (std::string name) |
template<typename TComponent > | |
TComponent * | getComponent (int index) |
virtual smacc2::introspection::TypeInfo::Ptr | getType () |
ISmaccStateMachine * | getStateMachine () |
template<typename TSmaccSignal , typename T > | |
void | connectSignal (TSmaccSignal &signal, void(T::*callback)(), T *object) |
template<typename SmaccClientType > | |
void | requiresClient (SmaccClientType *&storage) |
void | getComponents (std::vector< std::shared_ptr< ISmaccComponent > > &components) |
const std::vector< std::shared_ptr< ISmaccComponent > > & | iterateComponents () const |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
Public Attributes | |
std::optional< std::string > | serviceName_ |
smacc2::SmaccSignal< void(const std::shared_ptr< typename TService::Request >, std::shared_ptr< typename TService::Response >)> | onServiceRequestReceived_ |
Private Types | |
using | TServiceRequest = typename TService::Request |
using | TServiceResponse = typename TService::Response |
Private Member Functions | |
void | serviceCallback (const std::shared_ptr< typename TService::Request > req, std::shared_ptr< typename TService::Response > res) |
Private Attributes | |
rclcpp::Service< TService >::SharedPtr | server_ |
bool | initialized_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccClient | |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createComponent (TArgs... targs) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createNamedComponent (std::string name, TArgs... targs) |
rclcpp::Node::SharedPtr | getNode () |
rclcpp::Logger | getLogger () |
Protected Attributes inherited from smacc2::ISmaccClient | |
std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > | components_ |
Definition at line 32 of file smacc_service_server_client.hpp.
|
private |
Definition at line 34 of file smacc_service_server_client.hpp.
|
private |
Definition at line 35 of file smacc_service_server_client.hpp.
|
inline |
Definition at line 39 of file smacc_service_server_client.hpp.
References smacc2::client_bases::SmaccServiceServerClient< TService >::initialized_.
|
inline |
Definition at line 40 of file smacc_service_server_client.hpp.
References smacc2::client_bases::SmaccServiceServerClient< TService >::initialized_, and smacc2::client_bases::SmaccServiceServerClient< TService >::serviceName_.
|
inlinevirtual |
Definition at line 46 of file smacc_service_server_client.hpp.
|
inlineoverridevirtual |
Reimplemented from smacc2::ISmaccClient.
Definition at line 64 of file smacc_service_server_client.hpp.
References smacc2::ISmaccClient::getLogger(), smacc2::ISmaccClient::getName(), smacc2::ISmaccClient::getNode(), smacc2::client_bases::SmaccServiceServerClient< TService >::initialized_, smacc2::client_bases::SmaccServiceServerClient< TService >::server_, and smacc2::client_bases::SmaccServiceServerClient< TService >::serviceName_.
|
inline |
Definition at line 54 of file smacc_service_server_client.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClient::getStateMachine(), and smacc2::client_bases::SmaccServiceServerClient< TService >::onServiceRequestReceived_.
|
inlineprivate |
Definition at line 90 of file smacc_service_server_client.hpp.
References smacc2::client_bases::SmaccServiceServerClient< TService >::onServiceRequestReceived_.
|
private |
Definition at line 97 of file smacc_service_server_client.hpp.
Referenced by smacc2::client_bases::SmaccServiceServerClient< TService >::onInitialize(), and smacc2::client_bases::SmaccServiceServerClient< TService >::SmaccServiceServerClient().
smacc2::SmaccSignal<void( const std::shared_ptr<typename TService::Request>, std::shared_ptr<typename TService::Response>)> smacc2::client_bases::SmaccServiceServerClient< TService >::onServiceRequestReceived_ |
Definition at line 51 of file smacc_service_server_client.hpp.
Referenced by smacc2::client_bases::SmaccServiceServerClient< TService >::onServiceRequestReceived(), and smacc2::client_bases::SmaccServiceServerClient< TService >::serviceCallback().
|
private |
Definition at line 96 of file smacc_service_server_client.hpp.
Referenced by smacc2::client_bases::SmaccServiceServerClient< TService >::onInitialize().
std::optional<std::string> smacc2::client_bases::SmaccServiceServerClient< TService >::serviceName_ |
Definition at line 38 of file smacc_service_server_client.hpp.
Referenced by smacc2::client_bases::SmaccServiceServerClient< TService >::onInitialize(), and smacc2::client_bases::SmaccServiceServerClient< TService >::SmaccServiceServerClient().