|
SMACC2
|
HTTP/HTTPS client with pure component-based architecture. More...
#include <cl_http.hpp>


Public Types | |
| enum class | kHttpRequestMethod { GET = static_cast<int>(boost::beast::http::verb::get) , POST = static_cast<int>(boost::beast::http::verb::post) , PUT = static_cast<int>(boost::beast::http::verb::put) } |
| using | TResponse = http_session_base::TResponse |
Public Member Functions | |
| ClHttp (const std::string &server, const int &timeout=1500) | |
| virtual | ~ClHttp () |
| void | onInitialize () override |
| template<typename TOrthogonal , typename TClient > | |
| void | onComponentInitialization () |
Public Member Functions inherited from smacc2::ISmaccClient | |
| ISmaccClient () | |
| virtual | ~ISmaccClient () |
| 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 () |
Private Attributes | |
| const int | HTTP_VERSION = 11 |
| bool | initialized_ |
| std::string | server_url_ |
| CpHttpConnectionManager * | connectionManager_ |
| CpHttpSessionManager * | sessionManager_ |
| CpHttpRequestExecutor * | requestExecutor_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccClient | |
| template<typename TOrthogonal , typename TClient > | |
| void | onComponentInitialization () |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| 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_ |
HTTP/HTTPS client with pure component-based architecture.
This client acts as a minimal orchestrator that creates and configures three specialized components during initialization. All HTTP functionality is delegated to components.
Components created:
Behaviors should access CpHttpRequestExecutor directly via requiresComponent() rather than using the client interface.
Definition at line 61 of file cl_http.hpp.
Definition at line 71 of file cl_http.hpp.
|
strong |
|
explicit |
Definition at line 25 of file cl_http.cpp.
|
virtual |
Definition at line 35 of file cl_http.cpp.
|
inline |
Definition at line 81 of file cl_http.hpp.
References connectionManager_, smacc2::ISmaccClient::createComponent(), requestExecutor_, server_url_, sessionManager_, cl_http::CpHttpRequestExecutor::setDependencies(), and cl_http::CpHttpSessionManager::setServerUrl().

|
overridevirtual |
Reimplemented from smacc2::ISmaccClient.
Definition at line 40 of file cl_http.cpp.
References initialized_.
|
private |
Definition at line 103 of file cl_http.hpp.
Referenced by onComponentInitialization().
|
private |
Definition at line 96 of file cl_http.hpp.
|
private |
Definition at line 98 of file cl_http.hpp.
Referenced by onInitialize().
|
private |
Definition at line 105 of file cl_http.hpp.
Referenced by onComponentInitialization().
|
private |
Definition at line 100 of file cl_http.hpp.
Referenced by onComponentInitialization().
|
private |
Definition at line 104 of file cl_http.hpp.
Referenced by onComponentInitialization().