30 template<
class T,
class TMSG,
class CONVERTER>
43 Feed(ros::NodeHandle* n,
const std::string& topic,
int qsize)
46 n->param(
"/tcp_no_delay", no_delay,
false);
51 return data_.size()>0;
55 value =
data_.front();
65 template<
class T,
class TMSG,
class CONVERTER>
72 std::function<void()>
fcn_;
84 n->param(
"/tcp_no_delay", no_delay,
false);
95 return data_.size()>0;
99 value =
data_.front();
104 value =
data_.back();
111 template<
class T,
class TMSG,
class CONVERTER>
121 CONVERTER()(msg,&
data_);
126 Reader(ros::NodeHandle* n,
const std::string& topic,
int qsize)
130 n->param(
"/tcp_no_delay", no_delay,
false);
151 template<
class T,
class TMSG,
class CONVERTER>
157 Writer(ros::NodeHandle* n,
const std::string& topic,
int qsize)
186 void get(
const std::string & name,T& result)
const
188 if(!
n_.getParamCached(name,result))
190 ROS_INFO_STREAM(
"No parameter named " << name <<
" in launch-file. Hardcoded default value used.");
Definition: ros_com_patterns.h:67
virtual void getLatest(T &value) override
Definition: ros_com_patterns.h:102
virtual void getNext(T &value) override
Definition: ros_com_patterns.h:97
std::list< T > data_
Definition: ros_com_patterns.h:69
std::function< void()> fcn_
Definition: ros_com_patterns.h:72
virtual void setCallback(std::function< void()> fcn) override
Definition: ros_com_patterns.h:88
ros::Subscriber subscriber_
Definition: ros_com_patterns.h:70
FeedWithCallback(ros::NodeHandle *n, const std::string &topic, int qsize)
Definition: ros_com_patterns.h:81
CONVERTER converter_
Definition: ros_com_patterns.h:71
bool has_fcn_
Definition: ros_com_patterns.h:73
void receive(TMSG msg)
Definition: ros_com_patterns.h:75
virtual bool hasNext() const override
Definition: ros_com_patterns.h:93
Definition: ros_com_patterns.h:32
virtual void getLatest(T &value) override
Definition: ros_com_patterns.h:58
CONVERTER converter_
Definition: ros_com_patterns.h:36
void receive(TMSG msg)
Definition: ros_com_patterns.h:38
virtual void getNext(T &value) override
Definition: ros_com_patterns.h:53
virtual bool hasNext() const override
Definition: ros_com_patterns.h:49
std::list< T > data_
Definition: ros_com_patterns.h:34
ros::Subscriber subscriber_
Definition: ros_com_patterns.h:35
Feed(ros::NodeHandle *n, const std::string &topic, int qsize)
Definition: ros_com_patterns.h:43
Definition: ros_com_patterns.h:179
ros::NodeHandle n_
Definition: ros_com_patterns.h:182
std::string prefix_
Definition: ros_com_patterns.h:181
void get(const std::string &name, T &result) const
Definition: ros_com_patterns.h:186
ROSParam(ros::NodeHandle n, std::string prefix)
Definition: ros_com_patterns.h:183
Definition: ros_com_patterns.h:113
virtual bool hasUpdate() const override
Definition: ros_com_patterns.h:137
bool changed_
Definition: ros_com_patterns.h:116
Reader(ros::NodeHandle *n, const std::string &topic, int qsize)
Definition: ros_com_patterns.h:126
virtual bool hasData() const override
Definition: ros_com_patterns.h:133
ros::Subscriber subscriber_
Definition: ros_com_patterns.h:118
void receive(TMSG msg)
Definition: ros_com_patterns.h:119
T data_
Definition: ros_com_patterns.h:117
virtual void getData(T &value) override
Definition: ros_com_patterns.h:141
bool initialized_
Definition: ros_com_patterns.h:115
Definition: ros_com_patterns.h:153
virtual bool canWriteMore() const override
Definition: ros_com_patterns.h:161
virtual void write(const T &value)
Definition: ros_com_patterns.h:165
Writer(ros::NodeHandle *n, const std::string &topic, int qsize)
Definition: ros_com_patterns.h:157
ros::Publisher publisher_
Definition: ros_com_patterns.h:155
virtual uint32_t getNumberOfSubscribers() const override
Definition: ros_com_patterns.h:169
Definition: com_patterns.h:46
Definition: com_patterns.h:29
Definition: com_patterns.h:68
Definition: com_patterns.h:97
Definition: areaofeffectconverter.h:20