00001 00002 #include <rtt_roscomm/rtt_rostopic.h> 00003 00004 RTT::ConnPolicy rtt_roscomm::topic(const std::string& name) { 00005 RTT::ConnPolicy cp = RTT::ConnPolicy::data(); 00006 cp.transport = protocol_id; 00007 cp.name_id = name; 00008 cp.init = false; 00009 cp.pull = false; 00010 return cp; 00011 } 00012 00013 RTT::ConnPolicy rtt_roscomm::topicLatched(const std::string& name) { 00014 RTT::ConnPolicy cp = RTT::ConnPolicy::data(); 00015 cp.transport = protocol_id; 00016 cp.name_id = name; 00017 cp.init = true; 00018 cp.pull = false; 00019 return cp; 00020 } 00021 00027 RTT::ConnPolicy rtt_roscomm::topicBuffer(const std::string& name, int size) { 00028 RTT::ConnPolicy cp = RTT::ConnPolicy::buffer(size); 00029 cp.transport = protocol_id; 00030 cp.name_id = name; 00031 cp.init = false; 00032 cp.pull = false; 00033 return cp; 00034 } 00035 00042 RTT::ConnPolicy rtt_roscomm::topicUnbuffered(const std::string& name) { 00043 RTT::ConnPolicy cp = RTT::ConnPolicy(); 00044 cp.type = RTT::ConnPolicy::UNBUFFERED; 00045 cp.transport = protocol_id; 00046 cp.name_id = name; 00047 cp.init = false; 00048 cp.pull = false; 00049 return cp; 00050 } 00051