[openrtm-commit:02826] r1046 - in branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src: RTMExamples/TopicTest jp/go/aist/rtm/RTC jp/go/aist/rtm/RTC/executionContext jp/go/aist/rtm/RTC/port jp/go/aist/rtm/RTC/port/publisher jp/go/aist/rtm/RTC/util
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 9月 15日 (金) 14:30:31 JST
Author: kawauchi
Date: 2017-09-15 14:30:31 +0900 (Fri, 15 Sep 2017)
New Revision: 1046
Modified:
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleInImpl.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleOutImpl.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CorbaNaming.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LocalServiceAdmin.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnCorba.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnManager.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java
branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java
Log:
[merge] r1027-1039 have been merged from trunk.
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleInImpl.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleInImpl.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleInImpl.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -22,15 +22,12 @@
import RTC.PortService;
import RTC.PortServiceListHolder;
-import org.omg.PortableServer.POAPackage.ObjectNotActive;
-import org.omg.PortableServer.POAPackage.ServantAlreadyActive;
-import org.omg.PortableServer.POAPackage.WrongPolicy;
-
import org.omg.CORBA.portable.OutputStream;
import jp.go.aist.rtm.RTC.port.CorbaPort;
+import jp.go.aist.rtm.RTC.port.CorbaConsumer;
-import RTMExamples.SimpleService.MyServiceSVC_impl;
+import RTMExamples.SimpleService.MyService;
@@ -51,10 +48,6 @@
public ConsoleInImpl(Manager manager) {
super(manager);
// <rtc-template block="initializer">
- m_out_val = new TimedLong(new RTC.Time(0,0),0);
- m_out = new DataRef<TimedLong>(m_out_val);
- m_outOut = new OutPort<TimedLong>("out", m_out);
-
m_topic_out_val = new TimedLong(new RTC.Time(0,0),0);
m_topic_out = new DataRef<TimedLong>(m_topic_out_val);
m_topic_outOut = new TopicOutPort<TimedLong>("topic_out", m_topic_out);
@@ -78,42 +71,14 @@
// The initialize action (on CREATED->ALIVE transition)
// formaer rtc_init_entry()
-// @Override
+ @Override
protected ReturnCode_t onInitialize() {
-/*
- try {
- addOutPort("out", m_outOut);
- } catch (Exception e) {
- e.printStackTrace();
- }
-*/
addOutPort("topic_out", m_topic_outOut);
- try {
- m_ServicePort.registerProvider("topic_service",
- "TestService",
- m_service);
- } catch (ServantAlreadyActive e) {
- e.printStackTrace();
- } catch (WrongPolicy e) {
- e.printStackTrace();
- } catch (ObjectNotActive e) {
- e.printStackTrace();
- }
+ m_ServicePort.registerConsumer("topic_service",
+ "Service",
+ m_myservice0Base);
+ // Set CORBA Service Ports
addPort(m_ServicePort);
-/*
- PortServiceListHolder pslholder = new PortServiceListHolder();
- pslholder.value = new PortService[0];
- pslholder.value = get_ports();
- PortProfile prof = ports[0].get_port_profile();
- NVListHolder nvholder =
- new NVListHolder(prof.properties);
- CORBA_SeqUtil.push_back(nvholder,
- NVUtil.newNVString("publish_topic","test"));
- prof.properties = nvholder.value;
- ports[0].setPortRef();
-*/
- //m_topic_outOut.appendProperty("publish_topic","test");
-
return super.onInitialize();
}
// The finalize action (on ALIVE->END transition)
@@ -155,22 +120,65 @@
// former rtc_active_do()
@Override
protected ReturnCode_t onExecute(int ec_id) {
- System.out.println("Please input number: ");
+ System.out.print("Please input : ");
BufferedReader buff = new BufferedReader(new InputStreamReader( System.in ));
+ String str = null;
try {
- String str = buff.readLine();
+ str = buff.readLine();
if(str != null){
- m_out_val.data = Integer.parseInt(str);
+ m_topic_out_val.data = Integer.parseInt(str);
}
- } catch (NumberFormatException e) {
- System.out.println("Input number Error!");
-// e.printStackTrace();
- } catch (IOException e) {
- System.out.println("Input number Error!");
-// e.printStackTrace();
+ System.out.println("Sending to subscriber: "
+ + m_topic_out_val.data);
+ m_topic_outOut.write();
+ } catch (Exception e) {
+ if(str != null){
+ String[] argv = str.split(" ");
+ m_myservice0 = m_myservice0Base._ptr();
+ if( argv[0].equals("echo") && argv.length>1 ) {
+ String retmsg = m_myservice0.echo(argv[1]);
+ System.out.println( "echo return: " + retmsg );
+ }
+ else if( argv[0].equals("set_value") && argv.length>1 ) {
+ Float val = Float.valueOf(argv[1]);
+ m_myservice0.set_value(val.floatValue());
+ System.out.println( "Set remote value: " + val );
+ }
+
+ else if( argv[0].equals("get_value") ) {
+ System.out.println( "Current remote value: "
+ + m_myservice0.get_value() );
+ }
+
+ else if( argv[0].equals("get_echo_history") ) {
+ String[] echo_history = m_myservice0.get_echo_history();
+ for( int intIdx=0;intIdx<echo_history.length;intIdx++ ) {
+ System.out.println( intIdx+": "+echo_history[intIdx]);
+ }
+ }
+ else if( argv[0].equals("get_value_history") ) {
+ float[] value_history = m_myservice0.get_value_history();
+ for( int intIdx=0;intIdx<value_history.length;intIdx++ ) {
+ System.out.println( intIdx+": "+value_history[intIdx]);
+ }
+ }
+ else{
+ System.out.println("");
+ System.out.println("Command list: ");
+ System.out.println(" echo [msg] : echo message.");
+ System.out.println(" set_value [value]: set value." );
+ System.out.println(" get_value : "
+ +"get current value.");
+ System.out.println(" get_echo_history : "
+ +"get input messsage history." );
+ System.out.println(" get_value_history: "
+ +"get input value history." );
+ }
+ }
+ else{
+ System.out.println("Input Error!");
+ }
}
- System.out.println("Sending to subscriber: " + m_out_val.data);
- m_outOut.write();
return super.onExecute(ec_id);
}
@@ -217,10 +225,6 @@
// DataOutPort declaration
// <rtc-template block="outport_declare">
- protected TimedLong m_out_val;
- protected DataRef<TimedLong> m_out;
- protected OutPort<TimedLong> m_outOut;
-
protected TimedLong m_topic_out_val;
protected DataRef<TimedLong> m_topic_out;
protected TopicOutPort<TimedLong> m_topic_outOut;
@@ -234,8 +238,12 @@
// Service declaration
// <rtc-template block="service_declare">
- protected MyServiceSVC_impl m_service = new MyServiceSVC_impl();
+ protected CorbaConsumer<MyService> m_myservice0Base =
+ new CorbaConsumer<MyService>(MyService.class);
+ protected MyService m_myservice0;
+ //protected MyServiceSVC_impl m_service = new MyServiceSVC_impl();
+
// </rtc-template>
// Consumer declaration
@@ -256,8 +264,6 @@
System.out.println("Listener: "+m_name);
System.out.println("Profile::name: "+info.name);
System.out.println("Profile::id: "+info.id);
-// System.out.println("Profile::properties: ");
-// System.out.println(info.properties);
System.out.println("Data: "+data.data);
System.out.println("------------------------------");
}
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleOutImpl.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleOutImpl.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/TopicTest/ConsoleOutImpl.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -15,12 +15,15 @@
import jp.go.aist.rtm.RTC.port.ConnectorListenerType;
import jp.go.aist.rtm.RTC.util.DataRef;
+import org.omg.PortableServer.POAPackage.ObjectNotActive;
+import org.omg.PortableServer.POAPackage.ServantAlreadyActive;
+import org.omg.PortableServer.POAPackage.WrongPolicy;
+
import org.omg.CORBA.portable.OutputStream;
import jp.go.aist.rtm.RTC.port.CorbaPort;
-import jp.go.aist.rtm.RTC.port.CorbaConsumer;
-import RTMExamples.SimpleService.MyService;
+import RTMExamples.SimpleService.MyServiceSVC_impl;
public class ConsoleOutImpl extends DataFlowComponentBase {
private class TopicCorbaPort<DataType> extends CorbaPort {
@@ -40,10 +43,6 @@
public ConsoleOutImpl(Manager manager) {
super(manager);
// <rtc-template block="initializer">
- m_in_val = new TimedLong();
- m_in = new DataRef<TimedLong>(m_in_val);
- m_inIn = new InPort<TimedLong>("in", m_in);
-
m_topic_in_val = new TimedLong(new RTC.Time(0,0),0);
m_topic_in = new DataRef<TimedLong>(m_topic_in_val);
m_topic_inIn = new TopicInPort<TimedLong>("topic_in", m_topic_in);
@@ -53,15 +52,6 @@
// Registration: InPort/OutPort/Service
// <rtc-template block="registration">
-/*
- // Set InPort buffers
- try {
-// registerInPort(TimedLong.class, "in", m_inIn); //v042
- registerInPort("in", m_inIn);
- } catch (Exception e) {
- e.printStackTrace();
- }
-*/
// Set OutPort buffer
@@ -76,54 +66,21 @@
// The initialize action (on CREATED->ALIVE transition)
// formaer rtc_init_entry()
-// @Override
+ @Override
protected ReturnCode_t onInitialize() {
-/*
+ addInPort("topic_in", m_topic_inIn);
try {
- addInPort("in", m_inIn);
- } catch (Exception e) {
+ m_ServicePort.registerProvider("topic_service",
+ "Service",
+ m_service);
+ } catch (ServantAlreadyActive e) {
e.printStackTrace();
+ } catch (WrongPolicy e) {
+ e.printStackTrace();
+ } catch (ObjectNotActive e) {
+ e.printStackTrace();
}
-*/
- addInPort("topic_in", m_topic_inIn);
- m_ServicePort.registerConsumer("service",
- "Service",
- m_myservice0Base);
- // Set CORBA Service Ports
addPort(m_ServicePort);
-/*
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_BUFFER_WRITE,
- new DataListener("ON_BUFFER_WRITE"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_BUFFER_FULL,
- new DataListener("ON_BUFFER_FULL"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT,
- new DataListener("ON_BUFFER_WRITE_TIMEOUT"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_BUFFER_OVERWRITE,
- new DataListener("ON_BUFFER_OVERWRITE"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_BUFFER_READ,
- new DataListener("ON_BUFFER_READ"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_SEND,
- new DataListener("ON_SEND"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_RECEIVED,
- new DataListener("ON_RECEIVED"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_RECEIVER_FULL,
- new DataListener("ON_RECEIVER_FULL"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_RECEIVER_TIMEOUT,
- new DataListener("ON_RECEIVER_TIMEOUT"));
- m_inIn.addConnectorDataListener(
- ConnectorDataListenerType.ON_RECEIVER_ERROR,
- new DataListener("ON_RECEIVER_ERROR"));
-*/
-
return super.onInitialize();
}
// The finalize action (on ALIVE->END transition)
@@ -165,12 +122,11 @@
// former rtc_active_do()
@Override
protected ReturnCode_t onExecute(int ec_id) {
- if( m_inIn.isNew() ) {
- m_inIn.read();
-// if( m_inIn.read() ) {
- System.out.print( "Received: " + m_in.v.data + " " );
- System.out.print( "TimeStamp: " + m_in.v.tm.sec + "[s] " );
- System.out.println( m_in.v.tm.nsec + "[ns]" );
+ if( m_topic_inIn.isNew() ) {
+ m_topic_inIn.read();
+ System.out.print( "Received: " + m_topic_in.v.data + " " );
+ System.out.print( "TimeStamp: " + m_topic_in.v.tm.sec + "[s] " );
+ System.out.println( m_topic_in.v.tm.nsec + "[ns]" );
}
try {
Thread.sleep(1);
@@ -218,10 +174,6 @@
//
// DataInPort declaration
// <rtc-template block="inport_declare">
- protected TimedLong m_in_val;
- protected DataRef<TimedLong> m_in;
- protected InPort<TimedLong> m_inIn;
-
protected TimedLong m_topic_in_val;
protected DataRef<TimedLong> m_topic_in;
protected TopicInPort<TimedLong> m_topic_inIn;
@@ -240,11 +192,7 @@
// Service declaration
// <rtc-template block="service_declare">
- protected CorbaConsumer<MyService> m_myservice0Base =
- new CorbaConsumer<MyService>(MyService.class);
-
- protected MyService m_myservice0;
-
+ protected MyServiceSVC_impl m_service = new MyServiceSVC_impl();
// </rtc-template>
// Consumer declaration
@@ -265,8 +213,6 @@
System.out.println("Listener: "+m_name);
System.out.println("Profile::name: "+info.name);
System.out.println("Profile::id: "+info.id);
-// System.out.println("Profile::properties: ");
-// System.out.println(info.properties);
System.out.println("Data: "+data.data);
System.out.println("------------------------------");
}
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CorbaNaming.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CorbaNaming.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CorbaNaming.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -86,7 +86,7 @@
m_nameServer = name_server;
m_rootContext = null;
m_blLength = 100;
-
+
Object obj;
int pos = m_nameServer.indexOf("iiop:");
if(pos==0){
@@ -96,12 +96,15 @@
m_nameServer = "corbaloc::" + m_nameServer + "/NameService";
}
// m_nameServer = "corbaloc:iiop:1.2@" + m_nameServer + "/NameService";
-
- //rtcout.println(Logbuf.PARANOID, "m_nameServer="+m_nameServer);
- obj = m_varORB.string_to_object(m_nameServer);
- //rtcout.println(Logbuf.PARANOID, "obj="+obj);
- m_rootContext = NamingContextExtHelper.narrow(obj);
- if (m_rootContext==null) {
+ try{
+ obj = m_varORB.string_to_object(m_nameServer);
+ m_rootContext = NamingContextExtHelper.narrow(obj);
+ if (m_rootContext==null) {
+ throw new Exception("bad_alloc()");
+ }
+ }
+ catch(Exception ex){
+ String crlf = System.getProperty("line.separator");
throw new Exception("bad_alloc()");
}
}
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LocalServiceAdmin.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LocalServiceAdmin.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LocalServiceAdmin.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -66,7 +66,7 @@
public void init(Properties props) {
rtcout.println(Logbuf.TRACE, "LocalServiceAdmin::init():");
String str = new String();
- props._dump(str,props,0);
+ str = props._dump(str,props,0);
rtcout.println(Logbuf.TRACE, str);
String es = props.getProperty("enabled_services");
String svcs[] = es.split(",");
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -4090,6 +4090,14 @@
else if (c == 'c') {
str.append(properties.getProperty("category"));
}
+ else if (c == 'i') {
+ str.append(properties.getProperty("implementation_id"));
+ }
+ else if (c == 'N') {
+ String id = properties.getProperty("implementation_id");
+ String iname = properties.getProperty("instance_name");
+ str.append(iname.substring(id.length()));
+ }
else if (c == 'h') {
str.append(m_config.getProperty("os.hostname"));
}
@@ -4615,7 +4623,7 @@
admin.init(prop);
rtcout.println(Logbuf.DEBUG,"LocalServiceAdmin's properties:");
String str = new String();
- prop._dump(str,prop,0);
+ str = prop._dump(str,prop,0);
rtcout.println(Logbuf.TRACE, str);
LocalServiceProfile[] svclist = admin.getServiceProfiles();
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ModuleManager.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -168,7 +168,7 @@
throw new IllegalArgumentException(
"Downloading module is not allowed.");
} else {
- throw new IllegalArgumentException(
+ throw new ClassNotFoundException(
"Not implemented." + moduleName);
}
} catch (MalformedURLException moduleName_is_not_URL) {
@@ -233,6 +233,9 @@
fullClassName = fullClassName.replace("..",".");
target = Class.forName(fullClassName);
module_path = fullClassName;
+ if(target!=null){
+ break;
+ }
} catch (ClassNotFoundException e) {
// do nothing
}
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnCorba.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnCorba.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnCorba.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -8,6 +8,7 @@
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
+import org.omg.CosNaming.NameComponent;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextExtHelper;
import org.omg.CosNaming.BindingIteratorHolder;
@@ -222,18 +223,34 @@
public void get_RTC_by_Name(NamingContext context, String name,
RTCListHolder rtcs){
+ rtcout.println(Logbuf.PARANOID, "get_RTC_by_Name("+name+")");
int length = 500;
BindingListHolder bl = new BindingListHolder();
BindingIteratorHolder bi = new BindingIteratorHolder();
context.list(length,bl,bi);
+ rtcout.println(Logbuf.PARANOID, "bl="+bl);
+ rtcout.println(Logbuf.PARANOID, "bl.vlaue="+bl.value);
+ rtcout.println(Logbuf.PARANOID, "bl.vlaue.length="+bl.value.length);
+ rtcout.println(Logbuf.PARANOID, "bi="+bi);
+ rtcout.println(Logbuf.PARANOID, "bi.vlaue="+bi.value);
+ rtcout.println(Logbuf.PARANOID,
+ "BindingType.ncontext.valeu()="+BindingType.ncontext.value());
+ rtcout.println(Logbuf.PARANOID,
+ "BindingType.nobject.vlaue()="+BindingType.nobject.value());
BindingHolder bindholder = new BindingHolder();
- while (bi.value.next_one(bindholder)) {
- if(bindholder.value.binding_type==BindingType.ncontext){
+ Binding bindings[] = bl.value;
+ for(int ic=0;ic<bindings.length;++ic) {
+ BindingType type = bindings[ic].binding_type;
+ rtcout.println(Logbuf.PARANOID,
+ "bindings[ic].binding_type.value()="
+ +type.value());
+ if(type.value()==BindingType.ncontext.value()){
try{
NamingContext next_context
= NamingContextExtHelper.narrow(
- context.resolve(bindholder.value.binding_name));
+ context.resolve(bindings[ic].binding_name));
+
get_RTC_by_Name(next_context, name, rtcs);
}
catch(Exception ex){
@@ -242,14 +259,21 @@
return;
}
}
- else if(bindholder.value.binding_type==BindingType.nobject){
- if(bindholder.value.binding_name[0].id.equals(name) &&
- bindholder.value.binding_name[0].kind.equals("rtc")){
+ else if(type.value()==BindingType.nobject.value()){
+ NameComponent names[] = bindings[ic].binding_name;
+ rtcout.println(Logbuf.PARANOID,
+ "bindings[ic].binding_name[0].id="
+ +names[0].id);
+ rtcout.println(Logbuf.PARANOID,
+ "bindings[ic].binding_name[0].kind="
+ +names[0].kind);
+ if(names[0].id.equals(name) &&
+ names[0].kind.equals("rtc")){
try{
- CorbaConsumer cc = new CorbaConsumer();
- cc.setObject(context.resolve(
- bindholder.value.binding_name));
- RTObject obj = RTObjectHelper.narrow(cc.getObject());
+ rtcout.println(Logbuf.PARANOID, "names="+names);
+ rtcout.println(Logbuf.PARANOID, "context="+context);
+ RTObject obj =
+ RTObjectHelper.narrow(context.resolve(names));
CORBA_SeqUtil.push_back(rtcs, obj);
}
catch (Exception ex) {
@@ -290,24 +314,42 @@
try{
CorbaNaming cns;
+ rtcout.println(Logbuf.PARANOID, "host="+host);
if(host.equals("*")){
cns = m_cosnaming;
}
else{
ORB orb = ORBUtil.getOrb();
+ String[] names = host.split(":");
+ if (names.length == 1 && !names[0].equals("")) {
+ host += ":2809";
+ }
+ rtcout.println(Logbuf.PARANOID, "host="+host);
cns = new CorbaNaming(orb,host);
}
String[] names = rtc_name.split("/");
+ rtcout.println(Logbuf.PARANOID,
+ "names.length="+names.length);
if(names.length == 2 && names[0].equals("*")){
+ rtcout.println(Logbuf.PARANOID,
+ "cns="+cns);
NamingContext root_cxt = cns.getRootContext();
+ rtcout.println(Logbuf.PARANOID,
+ "names[1]="+names[1]);
get_RTC_by_Name(root_cxt, names[1], rtc_list);
return rtc_list.value;
}
else{
+ rtcout.println(Logbuf.PARANOID,
+ "names[0]="+names[0]);
rtc_name += ".rtc";
+ rtcout.println(Logbuf.PARANOID,
+ "rtc_name.rtc="+rtc_name);
Object obj = cns.resolveStr(rtc_name);
if(obj == null){
+ rtcout.println(Logbuf.PARANOID,
+ rtc_name + " is not found on "+host+".");
return null;
}
CORBA_SeqUtil.push_back(rtc_list,
@@ -316,6 +358,10 @@
}
}
catch (Exception ex) {
+ String crlf = System.getProperty("line.separator");
+ rtcout.println(Logbuf.PARANOID,
+ rtc_name + " is not found on "+host+"."
+ + crlf + ex.toString());
return null;
}
}
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnManager.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnManager.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingOnManager.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -369,9 +369,20 @@
try{
String mgrloc = "corbaloc:iiop:";
Properties prop = m_mgr.getConfig();
+
+ String[] names = name.split(":");
+ if (names.length == 1 && !names[0].equals("")) {
+ rtcout.println(Logbuf.PARANOID, "corba.master_managerc=" +
+ prop.getProperty("corba.master_manager"));
+ String[] port =
+ prop.getProperty("corba.master_manager").split(":");
+ name = name + ":" + port[1];
+ }
+
String manager_name = prop.getProperty("manager.name");
mgrloc += name;
mgrloc += "/" + manager_name;
+ rtcout.println(Logbuf.PARANOID, "mgrloc= "+mgrloc);
Object mobj = m_orb.string_to_object(mgrloc);
rtcout.println(Logbuf.DEBUG, "mobj= "+mobj);
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -911,13 +911,23 @@
public ExecutionContext[] get_owned_contexts() throws SystemException {
rtcout.println(Logbuf.TRACE, "RTObject_impl.get_owned_contexts()");
-
ExecutionContextListHolder execlist;
execlist = new ExecutionContextListHolder();
- execlist.value = new ExecutionContext[0];
- CORBA_SeqUtil.for_each(m_ecMine, new ec_copy(execlist));
-
+ //CORBA_SeqUtil.for_each(m_ecMine, new ec_copy(execlist));
+ int len = m_ecMine.value.length;
+ ArrayList<ExecutionContextService> ecs_list
+ = new ArrayList<ExecutionContextService>();
+ for(int ic=0; ic < len ; ++ic) {
+ ExecutionContextService ec_mine = m_ecMine.value[ic];
+
+ if (ec_mine != null) {
+ ecs_list.add(ec_mine);
+ }
+ }
+ execlist.value = new ExecutionContext[ecs_list.size()];
+ execlist.value = (ExecutionContext[])ecs_list.toArray(new ExecutionContext[0]);
+
return execlist.value;
}
@@ -2551,7 +2561,19 @@
rtcout.println(Logbuf.TRACE, "RTObject_impl.setProperties()");
+ {
+ rtcout.println(Logbuf.PARANOID, "prop:");
+ String str = new String();
+ str = prop._dump(str,prop,0);
+ rtcout.println(Logbuf.DEBUG, str);
+ }
m_properties.merge(prop);
+ {
+ rtcout.println(Logbuf.PARANOID, "m_properties:");
+ String str = new String();
+ str = m_properties._dump(str,m_properties,0);
+ rtcout.println(Logbuf.DEBUG, str);
+ }
try {
syncAttributesByProperties();
} catch (Exception ex) {
@@ -3026,7 +3048,26 @@
String propkey = "port.inport.";
propkey += name;
+ {
+ rtcout.println(Logbuf.PARANOID, "addInPort::m_properties:");
+ String str = new String();
+ str = m_properties._dump(str,m_properties,0);
+ rtcout.println(Logbuf.DEBUG, str);
+ }
+ {
+ rtcout.println(Logbuf.PARANOID, "addInPort::port.inport.dataport:");
+ String str = new String();
+ Properties prop = m_properties.getNode("port.inport.dataport");
+ str = prop._dump(str,prop,0);
+ rtcout.println(Logbuf.DEBUG, str);
+ }
m_properties.getNode(propkey).merge(m_properties.getNode("port.inport.dataport"));
+ {
+ rtcout.println(Logbuf.PARANOID, "addInPort::m_properties2:");
+ String str = new String();
+ str = m_properties._dump(str,m_properties,0);
+ rtcout.println(Logbuf.DEBUG, str);
+ }
boolean ret = addPort(inport);
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -442,6 +442,9 @@
return ReturnCode_t.RTC_ERROR;
}
rtcout.println(Logbuf.DEBUG, "addComponent() succeeded.");
+ if (m_running==false) {
+ updateComponentList();
+ }
return ReturnCode_t.RTC_OK;
}
@@ -527,9 +530,13 @@
synchronized (m_removedMutex){
m_removedComps.add(rtobj);
- return ReturnCode_t.RTC_OK;
+ //return ReturnCode_t.RTC_OK;
}
}
+ if (m_running==false) {
+ updateComponentList();
+ }
+ return ReturnCode_t.RTC_OK;
}
public RTObjectStateMachine findComponent(LightweightRTObject comp) {
for (int ic=0; ic < m_comps.size() ; ++ic) {
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -298,6 +298,11 @@
}
public ReturnCode_t onAddedComponent(LightweightRTObject rtobj)
{
+ synchronized (m_workerthread.mutex_) {
+ if(m_workerthread.running_ == false) {
+ m_worker.updateComponentList();
+ }
+ }
return ReturnCode_t.RTC_OK;
}
public ReturnCode_t onRemovingComponent(LightweightRTObject rtobj)
@@ -306,6 +311,11 @@
}
public ReturnCode_t onRemovedComponent(LightweightRTObject rtobj)
{
+ synchronized (m_workerthread.mutex_) {
+ if(m_workerthread.running_ == false) {
+ m_worker.updateComponentList();
+ }
+ }
return ReturnCode_t.RTC_OK;
}
@@ -592,7 +602,8 @@
}
public ReturnCode_t activateComponent(LightweightRTObject comp) {
- rtcout.println(Logbuf.TRACE, "PeriodicExecutionContext.activateComponent()");
+ rtcout.println(Logbuf.TRACE,
+ "PeriodicExecutionContext.activateComponent()");
ReturnCode_t ret = onActivating(comp); // Template
if (ret != ReturnCode_t.RTC_OK)
{
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -69,25 +69,6 @@
*/
public OBJECT_TYPE _ptr() {
- if(this.m_sev != null){
- return this.m_sev;
- }
- if(this.m_var != null){
- return this.m_var;
- }
-
- try{
- if(Manager.isActive()){
- POA poa = Manager.instance().getPOA();
- m_sev = (OBJECT_TYPE)(poa.reference_to_servant((Object)m_var));
- if(m_sev != null){
- return this.m_sev;
- }
- }
- }
- catch(Exception ex){
- return this.m_var;
- }
return this.m_var;
}
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -25,6 +25,7 @@
import org.omg.PortableServer.POA;
import _SDOPackage.NVListHolder;
+import _SDOPackage.NameValue;
import RTC.ConnectorProfile;
import RTC.ConnectorProfileHolder;
import RTC.ReturnCode_t;
@@ -307,12 +308,12 @@
rtcout.println(Logbuf.TRACE, "init()");
rtcout.println(Logbuf.PARANOID, "given properties:");
String str = new String();
- prop._dump(str,prop,0);
+ str = prop._dump(str,prop,0);
rtcout.println(Logbuf.DEBUG, str);
rtcout.println(Logbuf.PARANOID, "m_properties:");
str = "";
- m_properties._dump(str,m_properties,0);
+ str = m_properties._dump(str,m_properties,0);
rtcout.println(Logbuf.DEBUG, str);
m_properties.merge(prop);
@@ -325,7 +326,7 @@
rtcout.println(Logbuf.PARANOID, "updated properties:");
str = "";
- m_properties._dump(str,m_properties,0);
+ str = m_properties._dump(str,m_properties,0);
rtcout.println(Logbuf.DEBUG, str);
if (m_singlebuffer) {
@@ -642,6 +643,12 @@
* << cprof[dataport.inport.buffer.write.full_policy]
*/
prop.merge(conn_prop.getNode("dataport.inport"));
+
+ conn_prop.getNode("dataport").merge(prop);
+ NVListHolder holder = new NVListHolder(new NameValue[0]);
+ NVUtil.copyFromProperties(holder, conn_prop);
+ cprof.value.properties = holder.value;
+
}
rtcout.println(Logbuf.DEBUG,
"ConnectorProfile::properties are as follows.");
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -27,6 +27,7 @@
import org.omg.PortableServer.POA;
import _SDOPackage.NVListHolder;
+import _SDOPackage.NameValue;
import RTC.ConnectorProfile;
import RTC.ConnectorProfileHolder;
import RTC.ReturnCode_t;
@@ -92,12 +93,12 @@
rtcout.println(Logbuf.PARANOID, "given properties:");
String str = new String();
- prop._dump(str,prop,0);
+ str = prop._dump(str,prop,0);
rtcout.println(Logbuf.DEBUG, str);
rtcout.println(Logbuf.PARANOID, "m_properties:");
str = "";
- m_properties._dump(str,m_properties,0);
+ str = m_properties._dump(str,m_properties,0);
rtcout.println(Logbuf.DEBUG, str);
m_properties.merge(prop);
@@ -111,7 +112,7 @@
rtcout.println(Logbuf.PARANOID, "updated properties:");
str = "";
- m_properties._dump(str,m_properties,0);
+ str = m_properties._dump(str,m_properties,0);
rtcout.println(Logbuf.DEBUG, str);
configure();
@@ -649,6 +650,10 @@
* << cprof[dataport.outport.buffer.write.full_policy]
*/
prop.merge(conn_prop.getNode("dataport.outport"));
+ conn_prop.getNode("dataport").merge(prop);
+ NVListHolder holder = new NVListHolder(new NameValue[0]);
+ NVUtil.copyFromProperties(holder, conn_prop);
+ cprof.value.properties = holder.value;
}
rtcout.println(Logbuf.DEBUG,
"ConnectorProfile::properties are as follows.");
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -37,7 +37,7 @@
m_buffer = null;
m_task = null;
m_retcode = ReturnCode.PORT_OK;
- m_pushPolicy = Policy.NEW;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_NEW;
m_skipn = 0;
m_active = false;
m_leftskip = 0;
@@ -73,16 +73,16 @@
public int svc() {
synchronized (m_retmutex) {
switch (m_pushPolicy) {
- case ALL:
+ case PUBLISHER_POLICY_ALL:
m_retcode = pushAll();
break;
- case FIFO:
+ case PUBLISHER_POLICY_FIFO:
m_retcode = pushFifo();
break;
- case SKIP:
+ case PUBLISHER_POLICY_SKIP:
m_retcode = pushSkip();
break;
- case NEW:
+ case PUBLISHER_POLICY_NEW:
m_retcode = pushNew();
break;
default:
@@ -286,7 +286,7 @@
public ReturnCode init(Properties prop) {
rtcout.println(Logbuf.TRACE, "init()");
String str = new String();
- prop._dump(str,prop,0);
+ str = prop._dump(str,prop,0);
rtcout.println(Logbuf.DEBUG, str);
setPushPolicy(prop);
@@ -300,27 +300,27 @@
* @param prop Properties
*/
protected void setPushPolicy(final Properties prop) {
- // push_policy default: NEW
+ // push_policy default: PUBLISHER_POLICY_NEW
String push_policy = prop.getProperty("publisher.push_policy", "new");
rtcout.println(Logbuf.DEBUG, "push_policy: " + push_policy );
push_policy = StringUtil.normalize(push_policy);
if (push_policy.equals("all")) {
- m_pushPolicy = Policy.ALL;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_ALL;
}
else if (push_policy.equals("fifo")) {
- m_pushPolicy = Policy.FIFO;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_FIFO;
}
else if (push_policy.equals("skip")) {
- m_pushPolicy = Policy.SKIP;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_SKIP;
}
else if (push_policy.equals("new")) {
- m_pushPolicy = Policy.NEW;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_NEW;
}
else {
rtcout.println(Logbuf.ERROR,
"invalid push_policy value: " + push_policy );
- m_pushPolicy = Policy.NEW; // default push policy
+ m_pushPolicy = Policy.PUBLISHER_POLICY_NEW; // default push policy
}
// skip_count default: 0
@@ -715,10 +715,10 @@
protected Logbuf rtcout;
protected enum Policy {
- ALL,
- FIFO,
- SKIP,
- NEW
+ PUBLISHER_POLICY_ALL,
+ PUBLISHER_POLICY_FIFO,
+ PUBLISHER_POLICY_SKIP,
+ PUBLISHER_POLICY_NEW
}
/**
* <p> Connector data listener functions </p>
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -34,7 +34,7 @@
m_buffer = null;
m_task = null;
m_retcode = ReturnCode.PORT_OK;
- m_pushPolicy = Policy.NEW;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_NEW;
m_skipn = 0;
m_active = false;
m_readback = false;
@@ -54,16 +54,16 @@
public int svc() {
synchronized (m_retmutex) {
switch (m_pushPolicy) {
- case ALL:
+ case PUBLISHER_POLICY_ALL:
m_retcode = pushAll();
break;
- case FIFO:
+ case PUBLISHER_POLICY_FIFO:
m_retcode = pushFifo();
break;
- case SKIP:
+ case PUBLISHER_POLICY_SKIP:
m_retcode = pushSkip();
break;
- case NEW:
+ case PUBLISHER_POLICY_NEW:
m_retcode = pushNew();
break;
default:
@@ -297,7 +297,7 @@
public ReturnCode init(Properties prop) {
rtcout.println(Logbuf.TRACE, "init()");
String str = new String();
- prop._dump(str,prop,0);
+ str = prop._dump(str,prop,0);
rtcout.println(Logbuf.PARANOID, str);
setPushPolicy(prop);
@@ -311,27 +311,27 @@
* <p> Setting PushPolicy </p>
*/
protected void setPushPolicy(final Properties prop) {
- // push_policy default: NEW
+ // push_policy default: PUBLISHER_POLICY_NEW
String push_policy = prop.getProperty("publisher.push_policy", "new");
rtcout.println(Logbuf.DEBUG, "push_policy: " + push_policy );
push_policy = StringUtil.normalize(push_policy);
if (push_policy.equals("all")) {
- m_pushPolicy = Policy.ALL;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_ALL;
}
else if (push_policy.equals("fifo")) {
- m_pushPolicy = Policy.FIFO;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_FIFO;
}
else if (push_policy.equals("skip")) {
- m_pushPolicy = Policy.SKIP;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_SKIP;
}
else if (push_policy.equals("new")) {
- m_pushPolicy = Policy.NEW;
+ m_pushPolicy = Policy.PUBLISHER_POLICY_NEW;
}
else {
rtcout.println(Logbuf.ERROR,
"invalid push_policy value: " + push_policy );
- m_pushPolicy = Policy.NEW; // default push policy
+ m_pushPolicy = Policy.PUBLISHER_POLICY_NEW; // default push policy
}
// skip_count default: 0
@@ -728,10 +728,10 @@
*/
protected Logbuf rtcout;
protected enum Policy {
- ALL,
- FIFO,
- SKIP,
- NEW
+ PUBLISHER_POLICY_ALL,
+ PUBLISHER_POLICY_FIFO,
+ PUBLISHER_POLICY_SKIP,
+ PUBLISHER_POLICY_NEW
}
/**
* <p> Connector data listener functions </p>
Modified: branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java 2017-09-15 04:33:24 UTC (rev 1045)
+++ branches/RELENG_1_2/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java 2017-09-15 05:30:31 UTC (rev 1046)
@@ -59,7 +59,7 @@
* coil::Properties get_component_profile(const RTC::RTObject_ptr rtc)
*/
public static Properties get_component_profile(final RTObject rtc){
- if(rtc == null){
+ if(rtc == null){
return null;
}
ComponentProfile cprofs = rtc.get_component_profile();
@@ -221,6 +221,9 @@
if(rtc == null){
return -1;
}
+ if(ec == null){
+ return -1;
+ }
ExecutionContext[] eclist = rtc.get_owned_contexts();
for(int ic=0;ic<eclist.length;++ic){
@@ -1583,7 +1586,6 @@
*
*/
public static PortService get_port_by_url(String port_name){
- System.out.println("get_port_by_url:"+port_name);
Manager mgr = Manager.instance();
NamingManager nm = mgr.getNaming();
String[] ports = port_name.split("\\.");
More information about the openrtm-commit
mailing list