SMACC
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType > Class Template Reference

#include <cb_default_multirole_sensor_behavior.h>

Inheritance diagram for cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >:
Inheritance graph
Collaboration diagram for cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >:
Collaboration graph

Public Types

typedef ClientType::TMessageType TMessageType
 

Public Member Functions

 CbDefaultMultiRoleSensorBehavior ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename EvType >
void propagateEvent (const TMessageType &msg)
 
template<typename EvType >
void propagateEvent2 (const ros::TimerEvent &tdata)
 
virtual void onEntry () override
 
void onExit ()
 
virtual void onMessageCallback (const TMessageType &msg)
 
virtual void onEntry () override
 
virtual void onExit () override
 
- Public Member Functions inherited from smacc::ISmaccClientBehavior
 ISmaccClientBehavior ()
 
virtual ~ISmaccClientBehavior ()
 
ISmaccStateMachinegetStateMachine ()
 
std::string getName () const
 
template<typename SmaccClientType >
void requiresClient (SmaccClientType *&storage)
 
template<typename SmaccComponentType >
void requiresComponent (SmaccComponentType *&storage)
 
ros::NodeHandle getNode ()
 

Static Public Member Functions

static std::string getEventLabel ()
 

Public Attributes

ClientType * sensor_
 
std::function< void()> deferedEventPropagation
 

Additional Inherited Members

- Protected Member Functions inherited from smacc::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 executeOnEntry ()
 
virtual void executeOnExit ()
 
virtual void dispose ()
 

Detailed Description

template<typename ClientType>
class cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >

Definition at line 9 of file cb_default_multirole_sensor_behavior.h.

Member Typedef Documentation

◆ TMessageType

template<typename ClientType >
typedef ClientType::TMessageType cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::TMessageType

Definition at line 12 of file cb_default_multirole_sensor_behavior.h.

Constructor & Destructor Documentation

◆ CbDefaultMultiRoleSensorBehavior()

template<typename ClientType >
cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::CbDefaultMultiRoleSensorBehavior ( )
inline

Member Function Documentation

◆ getEventLabel()

template<typename ClientType >
static std::string cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::getEventLabel ( )
inlinestatic

Definition at line 21 of file cb_default_multirole_sensor_behavior.h.

22 {
23 // show ros message type
24 return demangleSymbol(typeid(TMessageType).name());
25 }
std::string demangleSymbol()
Definition: introspection.h:75

References smacc::introspection::demangleSymbol().

Here is the call graph for this function:

◆ onEntry()

template<typename ClientType >
virtual void cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::onEntry ( )
inlineoverridevirtual

Reimplemented from smacc::SmaccClientBehavior.

Definition at line 52 of file cb_default_multirole_sensor_behavior.h.

53 {
54 ROS_INFO("[CbDefaultMultiRoleSensorBehavior] onEntry. Requires client of type '%s'", demangleSymbol<ClientType>().c_str());
55
57
58 if (sensor_ == nullptr)
59 {
60 ROS_FATAL_STREAM("Sensor client behavior needs a client of type: " << demangleSymbol<ClientType>() << " but it is not found.");
61 }
62 else
63 {
65 ROS_INFO("[CbDefaultMultiRoleSensorBehavior] onEntry. sensor initialize");
66 sensor_->initialize();
67 }
68 }
void requiresClient(SmaccClientType *&storage)

References cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::deferedEventPropagation, smacc::ISmaccClientBehavior::requiresClient(), and cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::sensor_.

Here is the call graph for this function:

◆ onExit()

template<typename ClientType >
void cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::onExit ( )
inlinevirtual

Reimplemented from smacc::SmaccClientBehavior.

Definition at line 70 of file cb_default_multirole_sensor_behavior.h.

71 {
72 }

◆ onMessageCallback()

template<typename ClientType >
virtual void cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::onMessageCallback ( const TMessageType msg)
inlinevirtual

Definition at line 74 of file cb_default_multirole_sensor_behavior.h.

75 {
76 // empty to fill by sensor customization based on inheritance
77 }

◆ onOrthogonalAllocation()

template<typename ClientType >
template<typename TOrthogonal , typename TSourceObject >
void cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::onOrthogonalAllocation ( )
inline

Definition at line 30 of file cb_default_multirole_sensor_behavior.h.

31 {
33 // just propagate the client events from this client behavior source.
34 sensor_->onMessageReceived(&CbDefaultMultiRoleSensorBehavior<ClientType>::propagateEvent<EvTopicMessage<TSourceObject, TOrthogonal>>, this);
35 sensor_->onFirstMessageReceived(&CbDefaultMultiRoleSensorBehavior<ClientType>::propagateEvent<EvTopicInitialMessage<TSourceObject, TOrthogonal>>, this);
36 sensor_->onMessageTimeout(&CbDefaultMultiRoleSensorBehavior<ClientType>::propagateEvent2<EvTopicMessageTimeout<TSourceObject, TOrthogonal>>, this);
37 };
38 }

References cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::deferedEventPropagation, and cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::sensor_.

◆ propagateEvent()

template<typename ClientType >
template<typename EvType >
void cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::propagateEvent ( const TMessageType msg)
inline

Definition at line 41 of file cb_default_multirole_sensor_behavior.h.

42 {
43 this->postEvent<EvType>();
44 }

◆ propagateEvent2()

template<typename ClientType >
template<typename EvType >
void cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::propagateEvent2 ( const ros::TimerEvent &  tdata)
inline

Definition at line 47 of file cb_default_multirole_sensor_behavior.h.

48 {
49 this->postEvent<EvType>();
50 }

Member Data Documentation

◆ deferedEventPropagation

template<typename ClientType >
std::function<void()> cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::deferedEventPropagation

◆ sensor_

template<typename ClientType >
ClientType* cl_multirole_sensor::CbDefaultMultiRoleSensorBehavior< ClientType >::sensor_

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