[openrtm-commit:03058] r1096 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 10日 (水) 11:19:32 JST
Author: t-katami
Date: 2018-01-10 11:19:32 +0900 (Wed, 10 Jan 2018)
New Revision: 1096
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
Log:
[compat,bugfix,->RELENG_1_2] Deleted the redundant lines.
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2018-01-10 02:09:30 UTC (rev 1095)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2018-01-10 02:19:32 UTC (rev 1096)
@@ -881,176 +881,6 @@
precreateComponent();
initPreConnection();
initPreActivation();
-/*
- { // pre-connection
- String preconnect
- = m_config.getProperty("manager.components.preconnect");
- rtcout.println(Logbuf.TRACE, "Connection pre-connection: "
- + preconnect);
- String[] connectors = new String[0];
- if ( preconnect == null || preconnect.length() == 0 ) {
- }
- else {
- connectors = preconnect.split(",");
- rtcout.println(Logbuf.TRACE, "connectors: "
- +Arrays.toString(connectors));
- }
- for (int ic=0; ic < connectors.length; ++ic) {
- // ConsoleIn.out:Console.in(dataflow_type=push&....)
- String[] conn_prop = connectors[ic].split("\\(");
- if ( conn_prop == null || conn_prop.length == 0 ) {
- }
- if ( conn_prop.length == 2 ) {
- conn_prop[1] = conn_prop[1].replace(")","");
- }
- String[] comp_ports = conn_prop[0].split(":");
- if(comp_ports.length != 2) {
- rtcout.println(Logbuf.ERROR,
- "Invalid format for pre-connection.");
- rtcout.println(Logbuf.ERROR,
- "Format must be Comp0.port0:Comp1.port1");
- continue;
- }
- String comp0_name = comp_ports[0].split("\\.")[0];
- String comp1_name = comp_ports[1].split("\\.")[0];
- RTObject_impl comp0 = getComponent(comp0_name);
- RTObject_impl comp1 = getComponent(comp1_name);
- if (comp0 == null) {
- rtcout.println(Logbuf.ERROR,
- comp0_name + " not found.");
- continue;
- }
- if (comp1 == null) {
- rtcout.println(Logbuf.ERROR,
- comp1_name + " not found.");
- continue;
- }
- String port0 = comp_ports[0];
- String port1 = comp_ports[1];
-
- PortServiceListHolder ports0 = new PortServiceListHolder();
- ports0.value = comp0.get_ports();
-
- PortServiceListHolder ports1 = new PortServiceListHolder();
- ports1.value = comp1.get_ports();
-
- rtcout.println(Logbuf.DEBUG, comp0_name + " has "
- + ports0.value.length + " ports.");
- rtcout.println(Logbuf.DEBUG, comp1_name + " has "
- + ports1.value.length + " ports.");
-
- PortServiceListHolder port0_var = new PortServiceListHolder();
- port0_var.value = new PortService[0];
- int port0_ic = -1;
- for (int p=0; p < ports0.value.length; ++p) {
- RTC.PortProfile pp = ports0.value[p].get_port_profile();
- String s = pp.name;
- if (comp_ports[0].equals(s)) {
- rtcout.println(Logbuf.DEBUG, "port " + comp_ports[0]
- + " found: ");
- port0_ic = p;
- }
- }
- PortServiceListHolder port1_var = new PortServiceListHolder();
- int port1_ic = -1;
- for (int p=0; p < ports1.value.length; ++p) {
- RTC.PortProfile pp = ports1.value[p].get_port_profile();
- String s = pp.name;
- if (comp_ports[1].equals(s)) {
- rtcout.println(Logbuf.DEBUG, "port " + comp_ports[1]
- + " found: ");
- port1_ic = p;
- }
- }
- if (port0_ic == -1) {
- rtcout.println(Logbuf.ERROR,
- "port0 " + comp_ports[0] +" is nil obj");
- continue;
- }
- if (port1_ic == -1) {
- rtcout.println(Logbuf.ERROR,
- "port1 " + comp_ports[1] +" is nil obj");
- continue;
- }
- ConnectorProfile conn_prof = new ConnectorProfile();
- String prof_name;
- conn_prof.name = connectors[ic];
- conn_prof.connector_id = "";
- conn_prof.ports = new PortService[2];
- conn_prof.ports[0] = ports0.value[port0_ic];
- conn_prof.ports[1] = ports1.value[port1_ic];
-
- NVListHolder nvholder = new NVListHolder();
- nvholder.value = conn_prof.properties;
- if( nvholder.value==null ) {
- nvholder.value = new NameValue[0];
- }
-
-
- if ( conn_prop.length == 2 ) {
- String[] opt_props = conn_prop[1].split("\\&");
- for (int o=0; o < opt_props.length; ++o) {
- String[] temp = opt_props[o].split("=");
- //prop["dataport." + temp[0]] = temp[1];
- rtcout.println(Logbuf.TRACE, "options: " + Arrays.toString(temp));
- CORBA_SeqUtil.push_back(nvholder,
- NVUtil.newNVString("dataport." + temp[0],temp[1]));
- }
- }
- int index;
- index = NVUtil.find_index(nvholder,"dataport.dataflow_type");
- if(index<0) {
- CORBA_SeqUtil.push_back(nvholder,
- NVUtil.newNVString("dataport.dataflow_type", "push"));
- }
- index = NVUtil.find_index(nvholder,"dataport.interface_type");
- if(index<0) {
- CORBA_SeqUtil.push_back(nvholder,
- NVUtil.newNVString("dataport.interface_type","corba_cdr"));
- }
- conn_prof.properties = nvholder.value;
-
- ConnectorProfileHolder profileholder = new ConnectorProfileHolder();
- profileholder.value = conn_prof;
-
- if (ReturnCode_t.RTC_OK != ports0.value[port0_ic].connect(profileholder)) {
- rtcout.println(Logbuf.ERROR,
- "Connection error: " + connectors[ic]);
- }
-
- NVUtil.dump(nvholder);
- }
- } // end of pre-connection
-*/
-/*
- { // pre-activation
- String preactivation
- = m_config.getProperty("manager.components.preactivation");
- rtcout.println(Logbuf.TRACE,
- "Components pre-activation: "
- + Arrays.toString(preactivation.split(",")));
- String[] comps = new String[0];
- if ( preactivation == null || preactivation.length() == 0 ) {
- }
- else {
- comps = preactivation.split(",");
- }
-
- for (int ic=0; ic < comps.length; ++ic) {
- comps[ic] = comps[ic].trim();
- RTObject_impl comp = getComponent(comps[ic]);
- if (comp == null) {
- rtcout.println(Logbuf.ERROR, comps[ic] + " not found.");
- continue;
- }
- ExecutionContextListHolder eclistholder
- = new ExecutionContextListHolder();
- eclistholder.value = new ExecutionContext[0];
- eclistholder.value = comp.get_owned_contexts();
- eclistholder.value[0].activate_component(comp.getObjRef());
- }
- } // end of pre-activation
-*/
return true;
}
More information about the openrtm-commit
mailing list