SMACC2
Public Member Functions | Private Attributes | List of all members
sm_dance_bot_warehouse_3::cl_service3::CbService3 Class Reference

#include <cb_service3.hpp>

Inheritance diagram for sm_dance_bot_warehouse_3::cl_service3::CbService3:
Inheritance graph
Collaboration diagram for sm_dance_bot_warehouse_3::cl_service3::CbService3:
Collaboration graph

Public Member Functions

 CbService3 (Service3Command value)
 
void onEntry () override
 
- Public Member Functions inherited from smacc2::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)
 

Private Attributes

ClService3serviceClient_
 
Service3Command value_
 

Additional Inherited Members

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

Detailed Description

Definition at line 34 of file cb_service3.hpp.

Constructor & Destructor Documentation

◆ CbService3()

sm_dance_bot_warehouse_3::cl_service3::CbService3::CbService3 ( Service3Command  value)
inline

Definition at line 41 of file cb_service3.hpp.

References value_.

Member Function Documentation

◆ onEntry()

void sm_dance_bot_warehouse_3::cl_service3::CbService3::onEntry ( )
inlineoverridevirtual

Reimplemented from smacc2::SmaccClientBehavior.

Definition at line 43 of file cb_service3.hpp.

44 {
46
47 auto req = std::make_shared<std_srvs::srv::SetBool::Request>();
49 req->data = true;
50 else
51 req->data = false;
52
53 serviceClient_->call(req);
54 }
void requiresClient(SmaccClientType *&storage)
std::shared_ptr< typename ServiceType::Response > call(std::shared_ptr< typename ServiceType::Request > &request)

References smacc2::client_bases::SmaccServiceClient< ServiceType >::call(), smacc2::ISmaccClientBehavior::requiresClient(), sm_dance_bot_warehouse_3::cl_service3::SERVICE3_ON, serviceClient_, and value_.

Here is the call graph for this function:

Member Data Documentation

◆ serviceClient_

ClService3* sm_dance_bot_warehouse_3::cl_service3::CbService3::serviceClient_
private

Definition at line 37 of file cb_service3.hpp.

Referenced by onEntry().

◆ value_

Service3Command sm_dance_bot_warehouse_3::cl_service3::CbService3::value_
private

Definition at line 38 of file cb_service3.hpp.

Referenced by CbService3(), and onEntry().


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