24 bool default_config =
true;
25 if(config.check(
"default-client")) {
26 default_config = config.find(
"default-client").asString() ==
"true";
28 bool default_server =
true;
29 if(config.check(
"default-server")) {
30 default_server = config.find(
"default-server").asString() ==
"true";
33 if (config.check(
"nwc_thrift_port_prefix")){
34 prefix = config.find(
"nwc_thrift_port_prefix").asString() + (default_config ? m_defaultConfigPrefix :
"");
35 if(prefix[0] !=
'/') {prefix =
"/"+prefix;}
36 m_thrift_rpcPort_Name = prefix +
"/" + m_deviceName +
"/thrift";
39 prefix = default_config ? m_defaultConfigPrefix :
"";
40 m_thrift_rpcPort_Name = prefix +
"/" + m_deviceName +
"/thrift";
45 if (config.check(
"nws_thrift_port_prefix")){
46 prefix = config.find(
"nws_thrift_port_prefix").asString() + (default_server ? m_defaultServerPrefix :
"");
47 if(prefix[0] !=
'/') {prefix =
"/"+prefix;}
48 m_thrift_server_rpcPort_Name = prefix +
"/thrift";
51 prefix = default_server ? m_defaultServerPrefix :
"";
52 m_thrift_server_rpcPort_Name = prefix +
"/thrift";
56 if(!m_thrift_rpcPort.open(m_thrift_rpcPort_Name))
67 if (!m_frameTransformStorageGetRPC.yarp().attachAsClient(m_thrift_rpcPort))
74 if(config.check(
"streaming_enabled")) {
75 m_streaming_port_enabled = config.find(
"streaming_enabled").asString() ==
"true";
78 if (m_streaming_port_enabled)
81 if (config.check(
"input_streaming_port_prefix")){
82 prefix = config.find(
"input_streaming_port_prefix").asString() + (default_config ? m_defaultConfigPrefix :
"");
83 if(prefix[0] !=
'/') {prefix =
"/"+prefix;}
84 m_streaming_input_port_name = prefix +
"/" + m_deviceName +
"/tf:i";
87 prefix = default_config ? m_defaultConfigPrefix :
"";
88 m_streaming_input_port_name = prefix +
"/" + m_deviceName +
"/tf:i";
93 if (config.check(
"output_streaming_port_prefix")){
94 prefix = config.find(
"output_streaming_port_prefix").asString() + (default_server ? m_defaultServerPrefix :
"");
95 if(prefix[0] !=
'/') {prefix =
"/"+prefix;}
96 m_streaming_output_port_name = prefix +
"/tf:o";
99 prefix = default_server ? m_defaultServerPrefix :
"";
100 m_streaming_output_port_name = prefix +
"/tf:o";
105 m_dataReader =
new FrameTransformGet_nwc_yarp::DataReader();
106 if(!m_dataReader->open(m_streaming_input_port_name))
118 m_dataReader->useCallback();
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.