28 #ifndef ROSCPP_NODE_HANDLE_H
29 #define ROSCPP_NODE_HANDLE_H
55 class NodeHandleBackingCollection;
213 std::string resolveName(
const std::string& name,
bool remap =
true)
const;
250 ops.template init<M>(topic, queue_size);
252 return advertise(ops);
320 ops.template init<M>(topic, queue_size, connect_cb, disconnect_cb);
323 return advertise(ops);
399 template<
class M,
class T>
404 ops.template initByFullCallbackType<M>(topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1));
406 return subscribe(ops);
410 template<
class M,
class T>
415 ops.template initByFullCallbackType<M>(topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1));
417 return subscribe(ops);
462 template<
class M,
class T>
468 ops.template init<M>(topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1));
470 return subscribe(ops);
472 template<
class M,
class T>
478 ops.template init<M>(topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1));
480 return subscribe(ops);
526 template<
class M,
class T>
531 ops.template initByFullCallbackType<M>(topic, queue_size, boost::bind(fp, obj.get(), boost::placeholders::_1));
534 return subscribe(ops);
537 template<
class M,
class T>
542 ops.template initByFullCallbackType<M>(topic, queue_size, boost::bind(fp, obj.get(), boost::placeholders::_1));
545 return subscribe(ops);
591 template<
class M,
class T>
597 ops.template init<M>(topic, queue_size, boost::bind(fp, obj.get(), boost::placeholders::_1));
600 return subscribe(ops);
602 template<
class M,
class T>
608 ops.template init<M>(topic, queue_size, boost::bind(fp, obj.get(), boost::placeholders::_1));
611 return subscribe(ops);
657 ops.template initByFullCallbackType<M>(topic, queue_size, fp);
659 return subscribe(ops);
705 ops.template init<M>(topic, queue_size, fp);
707 return subscribe(ops);
752 ops.template init<M>(topic, queue_size, callback);
755 return subscribe(ops);
796 template<
class M,
class C>
797 Subscriber subscribe(
const std::string& topic, uint32_t queue_size,
const boost::function<
void (C)>& callback,
801 ops.template initByFullCallbackType<C>(topic, queue_size, callback);
804 return subscribe(ops);
876 template<
class T,
class MReq,
class MRes>
880 ops.template init<MReq, MRes>(service, boost::bind(srv_func, obj, boost::placeholders::_1, boost::placeholders::_2));
881 return advertiseService(ops);
921 template<
class T,
class MReq,
class MRes>
925 ops.template initBySpecType<ServiceEvent<MReq, MRes> >(service, boost::bind(srv_func, obj, boost::placeholders::_1));
926 return advertiseService(ops);
967 template<
class T,
class MReq,
class MRes>
971 ops.template init<MReq, MRes>(service, boost::bind(srv_func, obj.get(), boost::placeholders::_1, boost::placeholders::_2));
973 return advertiseService(ops);
1014 template<
class T,
class MReq,
class MRes>
1018 ops.template initBySpecType<ServiceEvent<MReq, MRes> >(service, boost::bind(srv_func, obj.get(), boost::placeholders::_1));
1020 return advertiseService(ops);
1058 template<
class MReq,
class MRes>
1062 ops.template init<MReq, MRes>(service, srv_func);
1063 return advertiseService(ops);
1101 template<
class MReq,
class MRes>
1105 ops.template initBySpecType<ServiceEvent<MReq, MRes> >(service, srv_func);
1106 return advertiseService(ops);
1142 template<
class MReq,
class MRes>
1147 ops.template init<MReq, MRes>(service, callback);
1149 return advertiseService(ops);
1192 ops.template initBySpecType<S>(service, callback);
1194 return advertiseService(ops);
1237 template<
class MReq,
class MRes>
1242 ops.template init<MReq, MRes>(service_name, persistent, header_values);
1243 return serviceClient(ops);
1257 template<
class Service>
1262 ops.template init<Service>(service_name, persistent, header_values);
1263 return serviceClient(ops);
1291 template<
class Handler,
class Obj>
1312 bool oneshot =
false,
bool autostart =
true)
const
1314 return createTimer(period, boost::bind(callback, obj, boost::placeholders::_1), oneshot, autostart);
1332 bool oneshot =
false,
bool autostart =
true)
const
1334 return createTimer(period, boost::bind(callback, obj, boost::placeholders::_1), oneshot, autostart);
1354 bool oneshot =
false,
bool autostart =
true)
const
1356 TimerOptions ops(period, boost::bind(callback, obj.get(), boost::placeholders::_1), 0);
1360 return createTimer(ops);
1376 bool autostart =
true)
const;
1409 bool oneshot =
false,
bool autostart =
true)
const
1411 return createWallTimer(period, boost::bind(callback, obj, boost::placeholders::_1), oneshot, autostart);
1432 bool oneshot =
false,
bool autostart =
true)
const
1434 WallTimerOptions ops(period, boost::bind(callback, obj.get(), boost::placeholders::_1), 0);
1438 return createWallTimer(ops);
1454 bool oneshot =
false,
bool autostart =
true)
const;
1488 bool oneshot =
false,
bool autostart =
true)
const
1490 return createSteadyTimer(period, boost::bind(callback, obj, boost::placeholders::_1), oneshot, autostart);
1511 bool oneshot =
false,
bool autostart =
true)
const
1513 SteadyTimerOptions ops(period, boost::bind(callback, obj.get(), boost::placeholders::_1), 0);
1517 return createSteadyTimer(ops);
1533 bool oneshot =
false,
bool autostart =
true)
const;
1560 void setParam(
const std::string& key,
const std::string& s)
const;
1567 void setParam(
const std::string& key,
const char* s)
const;
1574 void setParam(
const std::string& key,
double d)
const;
1581 void setParam(
const std::string& key,
int i)
const;
1588 void setParam(
const std::string& key,
bool b)
const;
1596 void setParam(
const std::string& key,
const std::vector<std::string>& vec)
const;
1603 void setParam(
const std::string& key,
const std::vector<double>& vec)
const;
1610 void setParam(
const std::string& key,
const std::vector<float>& vec)
const;
1617 void setParam(
const std::string& key,
const std::vector<int>& vec)
const;
1624 void setParam(
const std::string& key,
const std::vector<bool>& vec)
const;
1632 void setParam(
const std::string& key,
const std::map<std::string, std::string>& map)
const;
1639 void setParam(
const std::string& key,
const std::map<std::string, double>& map)
const;
1646 void setParam(
const std::string& key,
const std::map<std::string, float>& map)
const;
1653 void setParam(
const std::string& key,
const std::map<std::string, int>& map)
const;
1660 void setParam(
const std::string& key,
const std::map<std::string, bool>& map)
const;
1670 bool getParam(
const std::string& key, std::string& s)
const;
1681 bool getParam(
const std::string& key,
double& d)
const;
1692 bool getParam(
const std::string& key,
float& f)
const;
1703 bool getParam(
const std::string& key,
int& i)
const;
1714 bool getParam(
const std::string& key,
bool& b)
const;
1737 bool getParam(
const std::string& key, std::vector<std::string>& vec)
const;
1748 bool getParam(
const std::string& key, std::vector<double>& vec)
const;
1759 bool getParam(
const std::string& key, std::vector<float>& vec)
const;
1770 bool getParam(
const std::string& key, std::vector<int>& vec)
const;
1781 bool getParam(
const std::string& key, std::vector<bool>& vec)
const;
1793 bool getParam(
const std::string& key, std::map<std::string, std::string>& map)
const;
1804 bool getParam(
const std::string& key, std::map<std::string, double>& map)
const;
1815 bool getParam(
const std::string& key, std::map<std::string, float>& map)
const;
1826 bool getParam(
const std::string& key, std::map<std::string, int>& map)
const;
1837 bool getParam(
const std::string& key, std::map<std::string, bool>& map)
const;
1854 bool getParamCached(
const std::string& key, std::string& s)
const;
1868 bool getParamCached(
const std::string& key,
double& d)
const;
1882 bool getParamCached(
const std::string& key,
float& f)
const;
1896 bool getParamCached(
const std::string& key,
int& i)
const;
1910 bool getParamCached(
const std::string& key,
bool& b)
const;
1939 bool getParamCached(
const std::string& key, std::vector<std::string>& vec)
const;
1953 bool getParamCached(
const std::string& key, std::vector<double>& vec)
const;
1967 bool getParamCached(
const std::string& key, std::vector<float>& vec)
const;
1981 bool getParamCached(
const std::string& key, std::vector<int>& vec)
const;
1995 bool getParamCached(
const std::string& key, std::vector<bool>& vec)
const;
2010 bool getParamCached(
const std::string& key, std::map<std::string, std::string>& map)
const;
2024 bool getParamCached(
const std::string& key, std::map<std::string, double>& map)
const;
2038 bool getParamCached(
const std::string& key, std::map<std::string, float>& map)
const;
2052 bool getParamCached(
const std::string& key, std::map<std::string, int>& map)
const;
2066 bool getParamCached(
const std::string& key, std::map<std::string, bool>& map)
const;
2075 bool hasParam(
const std::string& key)
const;
2088 bool searchParam(
const std::string& key, std::string& result)
const;
2096 bool deleteParam(
const std::string& key)
const;
2117 template<
typename T>
2118 bool param(
const std::string& param_name, T& param_val,
const T& default_val)
const
2120 if (hasParam(param_name))
2122 if (getParam(param_name, param_val))
2128 param_val = default_val;
2150 template<
typename T>
2151 T
param(
const std::string& param_name,
const T& default_val)
const
2154 param(param_name, param_val, default_val);
2178 std::string resolveName(
const std::string& name,
bool remap,
no_validate)
const;
2180 void construct(
const std::string& ns,
bool validate_name);
2183 void initRemappings(
const M_string& remappings);
2185 std::string remapName(
const std::string& name)
const;
2201 #endif // ROSCPP_NODE_HANDLE_H