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

#include <ros_com_patterns.h>

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

Public Member Functions

void receive (TMSG msg)
 
 FeedWithCallback (ros::NodeHandle *n, const std::string &topic, int qsize)
 
virtual void setCallback (std::function< void()> fcn) override
 
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_
 
std::function< void()> fcn_
 
bool has_fcn_
 

Constructor & Destructor Documentation

◆ FeedWithCallback()

template<class T , class TMSG , class CONVERTER >
adore::if_ROS::FeedWithCallback< T, TMSG, CONVERTER >::FeedWithCallback ( 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::FeedWithCallback< T, TMSG, CONVERTER >::getLatest ( T &  value)
inlineoverridevirtual

getLatest reads the latest data element and discards all previous

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

◆ getNext()

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

getNext reads the next data element

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

◆ hasNext()

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

hasNext indicates whether there is more data to read

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

◆ receive()

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

◆ setCallback()

template<class T , class TMSG , class CONVERTER >
virtual void adore::if_ROS::FeedWithCallback< T, TMSG, CONVERTER >::setCallback ( std::function< void()>  fcn)
inlineoverridevirtual

Member Data Documentation

◆ converter_

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

◆ data_

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

◆ fcn_

template<class T , class TMSG , class CONVERTER >
std::function<void()> adore::if_ROS::FeedWithCallback< T, TMSG, CONVERTER >::fcn_
private

◆ has_fcn_

template<class T , class TMSG , class CONVERTER >
bool adore::if_ROS::FeedWithCallback< T, TMSG, CONVERTER >::has_fcn_
private

◆ subscriber_

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

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