SMACC2
Loading...
Searching...
No Matches
cl_http::CbHttpRequestBase Class Reference

#include <cb_http_request.hpp>

Inheritance diagram for cl_http::CbHttpRequestBase:
Inheritance graph
Collaboration diagram for cl_http::CbHttpRequestBase:
Collaboration graph

Public Member Functions

 CbHttpRequestBase (const CpHttpRequestExecutor::HttpMethod http_request_type)
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
virtual void runtimeConfigure () override
 
virtual void onResponseReceived (const CpHttpRequestExecutor::TResponse &)
 
virtual void onEntry () override
 
virtual void onExit () override
 
- Public Member Functions inherited from smacc2::SmaccClientBehavior
virtual ~SmaccClientBehavior ()
 
void onEntry () override
 
void onExit () override
 
- Public Member Functions inherited from smacc2::ISmaccClientBehavior
 ISmaccClientBehavior ()
 
virtual ~ISmaccClientBehavior ()
 
ISmaccStateMachinegetStateMachine ()
 
std::string getName () const
 
template<typename SmaccClientType >
void requiresClient (SmaccClientType *&storage)
 
template<typename SmaccComponentType >
void requiresComponent (SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
 
virtual void executeOnEntry ()
 
virtual void executeOnExit ()
 

Private Attributes

const CpHttpRequestExecutor::HttpMethod kRequestType
 
CpHttpRequestExecutorrequestExecutor_
 

Additional Inherited Members

- Protected Member Functions inherited from smacc2::ISmaccClientBehavior
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
ISmaccStategetCurrentState ()
 
virtual void dispose ()
 
virtual rclcpp::Node::SharedPtr getNode () const
 
virtual rclcpp::Logger getLogger () const
 

Detailed Description

Definition at line 31 of file cb_http_request.hpp.

Constructor & Destructor Documentation

◆ CbHttpRequestBase()

cl_http::CbHttpRequestBase::CbHttpRequestBase ( const CpHttpRequestExecutor::HttpMethod http_request_type)
inline

Definition at line 34 of file cb_http_request.hpp.

35 : kRequestType(http_request_type)
36 {
37 }
const CpHttpRequestExecutor::HttpMethod kRequestType

Member Function Documentation

◆ onEntry()

virtual void cl_http::CbHttpRequestBase::onEntry ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 55 of file cb_http_request.hpp.

CpHttpRequestExecutor * requestExecutor_
void executeRequest(const HttpMethod method, const std::string &path="/", const std::string &body="", const std::unordered_map< std::string, std::string > &headers={})

References cl_http::CpHttpRequestExecutor::executeRequest(), kRequestType, and requestExecutor_.

Here is the call graph for this function:

◆ onExit()

virtual void cl_http::CbHttpRequestBase::onExit ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 57 of file cb_http_request.hpp.

57{}

◆ onResponseReceived()

virtual void cl_http::CbHttpRequestBase::onResponseReceived ( const CpHttpRequestExecutor::TResponse & )
inlinevirtual

Definition at line 53 of file cb_http_request.hpp.

53{}

Referenced by runtimeConfigure().

Here is the caller graph for this function:

◆ onStateOrthogonalAllocation()

template<typename TOrthogonal , typename TSourceObject >
void cl_http::CbHttpRequestBase::onStateOrthogonalAllocation ( )
inline

Definition at line 40 of file cb_http_request.hpp.

41 {
42 // Base implementation - can be overridden by derived classes
43 }

◆ runtimeConfigure()

virtual void cl_http::CbHttpRequestBase::runtimeConfigure ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 45 of file cb_http_request.hpp.

46 {
47 // Access executor component and connect to response signal
51 }
virtual void onResponseReceived(const CpHttpRequestExecutor::TResponse &)
smacc2::SmaccSignal< void(const TResponse &)> onResponseReceived_
void requiresComponent(SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
boost::signals2::connection createSignalConnection(TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object)

References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClientBehavior::getStateMachine(), onResponseReceived(), cl_http::CpHttpRequestExecutor::onResponseReceived_, requestExecutor_, and smacc2::ISmaccClientBehavior::requiresComponent().

Here is the call graph for this function:

Member Data Documentation

◆ kRequestType

const CpHttpRequestExecutor::HttpMethod cl_http::CbHttpRequestBase::kRequestType
private

Definition at line 60 of file cb_http_request.hpp.

Referenced by onEntry().

◆ requestExecutor_

CpHttpRequestExecutor* cl_http::CbHttpRequestBase::requestExecutor_
private

Definition at line 62 of file cb_http_request.hpp.

Referenced by onEntry(), and runtimeConfigure().


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