ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::if_ROS::Reader< T, TMSG, CONVERTER > Class Template Reference

#include <ros_com_patterns.h>

Inheritance diagram for adore::if_ROS::Reader< T, TMSG, CONVERTER >:
Inheritance graph
Collaboration diagram for adore::if_ROS::Reader< T, TMSG, CONVERTER >:
Collaboration graph

Public Member Functions

 Reader (ros::NodeHandle *n, const std::string &topic, int qsize)
 
virtual bool hasData () const override
 
virtual bool hasUpdate () const override
 
virtual void getData (T &value) override
 
- Public Member Functions inherited from adore::mad::AReader< T >
virtual std::string getDesc ()
 

Private Member Functions

void receive (TMSG msg)
 

Private Attributes

bool initialized_
 
bool changed_
 
data_
 
ros::Subscriber subscriber_
 

Detailed Description

template<class T, class TMSG, class CONVERTER>
class adore::if_ROS::Reader< T, TMSG, CONVERTER >

ROS specific implementation of the AReader communication pattern.

Constructor & Destructor Documentation

◆ Reader()

template<class T , class TMSG , class CONVERTER >
adore::if_ROS::Reader< T, TMSG, CONVERTER >::Reader ( ros::NodeHandle *  n,
const std::string &  topic,
int  qsize 
)
inline

Member Function Documentation

◆ getData()

template<class T , class TMSG , class CONVERTER >
virtual void adore::if_ROS::Reader< T, TMSG, CONVERTER >::getData ( T &  value)
inlineoverridevirtual

getData returns the latest data item

Implements adore::mad::AReader< T >.

◆ hasData()

template<class T , class TMSG , class CONVERTER >
virtual bool adore::if_ROS::Reader< T, TMSG, CONVERTER >::hasData ( ) const
inlineoverridevirtual

hasData indicates whether the data has been initialized with a first data item

Implements adore::mad::AReader< T >.

◆ hasUpdate()

template<class T , class TMSG , class CONVERTER >
virtual bool adore::if_ROS::Reader< T, TMSG, CONVERTER >::hasUpdate ( ) const
inlineoverridevirtual

hasUpdate indicates whether the data item was updated since last getdata

Implements adore::mad::AReader< T >.

◆ receive()

template<class T , class TMSG , class CONVERTER >
void adore::if_ROS::Reader< T, TMSG, CONVERTER >::receive ( TMSG  msg)
inlineprivate

Member Data Documentation

◆ changed_

template<class T , class TMSG , class CONVERTER >
bool adore::if_ROS::Reader< T, TMSG, CONVERTER >::changed_
private

◆ data_

template<class T , class TMSG , class CONVERTER >
T adore::if_ROS::Reader< T, TMSG, CONVERTER >::data_
private

◆ initialized_

template<class T , class TMSG , class CONVERTER >
bool adore::if_ROS::Reader< T, TMSG, CONVERTER >::initialized_
private

◆ subscriber_

template<class T , class TMSG , class CONVERTER >
ros::Subscriber adore::if_ROS::Reader< T, TMSG, CONVERTER >::subscriber_
private

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