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

#include <ros_com_patterns.h>

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

Public Member Functions

void receive (TMSG msg)
 
 Feed (ros::NodeHandle *n, const std::string &topic, int qsize)
 
virtual bool hasNext () const override
 
virtual void getNext (T &value) override
 
virtual void getLatest (T &value) override
 

Private Attributes

std::list< T > data_
 
ros::Subscriber subscriber_
 
CONVERTER converter_
 

Detailed Description

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

ROS specific implementation of the AFeed communication pattern.

Constructor & Destructor Documentation

◆ Feed()

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

Member Function Documentation

◆ getLatest()

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

getLatest reads the latest data element and discards all previous

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

◆ getNext()

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

getNext reads the next data element

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

◆ hasNext()

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

hasNext indicates whether there is more data to read

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

◆ receive()

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

Member Data Documentation

◆ converter_

template<class T , class TMSG , class CONVERTER >
CONVERTER adore::if_ROS::Feed< T, TMSG, CONVERTER >::converter_
private

◆ data_

template<class T , class TMSG , class CONVERTER >
std::list<T> adore::if_ROS::Feed< T, TMSG, CONVERTER >::data_
private

◆ subscriber_

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

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