[openrtm-commit:02140] r878 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC: . src/RTMExamples/SimpleService
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 11月 24日 (木) 18:44:34 JST
Author: kawauchi
Date: 2016-11-24 18:44:34 +0900 (Thu, 24 Nov 2016)
New Revision: 878
Removed:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleService/.#MyServiceConsumer.java.1.9
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml
Log:
[compat,->RELENG_1_2] When building on Linux, "native2ascii" processing has been removed. refs #3715
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml 2016-11-24 07:57:05 UTC (rev 877)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/build.xml 2016-11-24 09:44:34 UTC (rev 878)
@@ -129,7 +129,7 @@
<antcall target="clean" />
- <antcall target="compile" />
+ <antcall target="compile_win" />
<antcall target="jar" />
@@ -382,7 +382,7 @@
</exec>
<delete includeEmptyDirs="true">
- <fileset dir="${source.samples.java.SimpleService}" excludes="**.idl,MyServiceConsumer**.java,MyServiceProvider**.java,MyServiceSVC_impl.java,rtc.conf" />
+ <fileset dir="${source.samples.java.SimpleService}" excludes="**.idl,MyServiceConsumer**.java,MyServiceProvider**.java,MyServiceSVC_impl.java,*.conf" />
</delete>
<exec executable="${java.home}\..\bin\idlj">
@@ -411,9 +411,18 @@
- <target name="compile" description="ソースをコンパイルします">
+ <target name="compile" description="ソースをコンパイルします(Linux)">
<mkdir dir="${build.dir}" />
+ <javac srcdir="${source.sdo}:${source.rtc}:${source.rtm}:${source.openrtm}" destdir="${build.dir}" classpath="lib/commons-cli-1.1.jar:lib/jna-4.2.2.jar:lib/jna-platform-4.2.2.jar" encoding="UTF-8" />
+ <javac srcdir="${source.main}" destdir="${build.dir}" classpath="lib/commons-cli-1.1.jar:lib/jna-4.2.2.jar:lib/jna-platform-4.2.2.jar" encoding="UTF-8" includes="go/aist/**" excludes="go/aist/ForSunOrb/**,go/aist/ForJacOrb/**"/>
+ <javac srcdir="${source.rtcd}:${source.rtcprof}" destdir="${build.dir}" classpath="lib/commons-cli-1.1.jar:lib/jna-4.2.2.jar:lib/jna-platform-4.2.2.jar" encoding="UTF-8"/>
+ <javac srcdir="${source.extension}:" destdir="${build.dir}" classpath="lib/commons-cli-1.1.jar:lib/jna-4.2.2.jar:lib/jna-platform-4.2.2.jar" encoding="UTF-8" />
+ <javac srcdir="${source.examples}:" destdir="${build.dir}" classpath="lib/commons-cli-1.1.jar:lib/jna-4.2.2.jar:lib/jna-platform-4.2.2.jar" encoding="UTF-8" />
+ </target>
+ <target name="compile_win" description="ソースをコンパイルします(Windows)">
+ <mkdir dir="${build.dir}" />
+
<native2ascii encoding="UTF-8" src="${source.sdo}" dest="${source.sdotemp}" >
<include name="**/*.java" />
@@ -654,7 +663,7 @@
</target>
- <target name="compile_tests" description="ソースをコンパイルします">
+ <target name="compile_tests" description="テスト用">
<javac srcdir="${source.sdo}:${source.rtc}:${source.rtm}:${source.openrtm}" destdir="${build.dir.test}" classpath="lib/commons-cli-1.1.jar:lib/jna-4.2.2.jar:lib/jna-platform-4.2.2.jar" encoding="UTF-8" />
Deleted: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleService/.#MyServiceConsumer.java.1.9
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleService/.#MyServiceConsumer.java.1.9 2016-11-24 07:57:05 UTC (rev 877)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleService/.#MyServiceConsumer.java.1.9 2016-11-24 09:44:34 UTC (rev 878)
@@ -1,227 +0,0 @@
-package RTMExamples.SimpleService;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import jp.go.aist.rtm.RTC.DataFlowComponentBase;
-import jp.go.aist.rtm.RTC.Manager;
-import jp.go.aist.rtm.RTC.port.CorbaConsumer;
-import jp.go.aist.rtm.RTC.port.CorbaPort;
-import jp.go.aist.rtm.RTC.util.ORBUtil;
-import RTC.ReturnCode_t;
-
-public class MyServiceConsumer extends DataFlowComponentBase {
-
- public MyServiceConsumer(Manager manager) {
- super(manager);
- // <rtc-template block="initializer">
- m_MyServicePort = new CorbaPort("MyService");
- // </rtc-template>
-
- // Registration: InPort/OutPort/Service
- // <rtc-template block="registration">
- // Set InPort buffers
-
- // Set OutPort buffer
-
- // Set service provider to Ports
-
- // Set service consumers to Ports
- m_MyServicePort.registerConsumer("myservice0", "MyService", m_myservice0);
-
- // Set CORBA Service Ports
- registerPort(m_MyServicePort);
-
- // </rtc-template>
- }
-
- // The initialize action (on CREATED->ALIVE transition)
- // formaer rtc_init_entry()
-// @Override
-// protected ReturnCode_t onInitialize() {
-// return super.onInitialize();
-// }
- // The finalize action (on ALIVE->END transition)
- // formaer rtc_exiting_entry()
-// @Override
-// protected ReturnCode_t onFinalize() {
-// return super.onFinalize();
-// }
- //
- // The startup action when ExecutionContext startup
- // former rtc_starting_entry()
-// @Override
-// protected ReturnCode_t onStartup(int ec_id) {
-// return super.onStartup(ec_id);
-// }
- //
- // The shutdown action when ExecutionContext stop
- // former rtc_stopping_entry()
-// @Override
-// protected ReturnCode_t onShutdown(int ec_id) {
-// return super.onShutdown(ec_id);
-// }
- //
- // The activated action (Active state entry action)
- // former rtc_active_entry()
-// @Override
-// protected ReturnCode_t onActivated(int ec_id) {
-// return super.onActivated(ec_id);
-// }
- //
- // The deactivated action (Active state exit action)
- // former rtc_active_exit()
-// @Override
-// protected ReturnCode_t onDeactivated(int ec_id) {
-// return super.onDeactivated(ec_id);
-// }
- //
- // The execution action that is invoked periodically
- // former rtc_active_do()
- @Override
- protected ReturnCode_t onExecute(int ec_id) {
- try {
- 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." );
- System.out.print("> ");
-
- String args = null;
- int pos;
- String argv[] = null;
-// std::getline(std::cin, args);
- BufferedReader buff = new BufferedReader(new InputStreamReader( System.in ));
- try {
- args = buff.readLine();
- } catch (NumberFormatException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- pos = args.indexOf(" ");
- if( pos>0 ) {
- argv = new String[2];
- argv[0] = args.substring(0,pos);
- argv[1] = args.substring(pos+1);
- } else {
- argv = new String[1];
- argv[0] = args;
-
- }
-
- /*
- std::cout << "command: " << argv[0] << std::endl;
- if (argv.size() > 1)
- std::cout << "arg : " << argv[1] << std::endl;
- */
-
- m_myservice0Ref = MyServiceHelper.narrow(m_myservice0._ptr());
- if( argv[0].equals("echo") && argv.length>1 ) {
- String retmsg = m_myservice0Ref.echo(argv[1]);
- System.out.println( "echo return: " + retmsg );
- return ReturnCode_t.RTC_OK;
- }
-
- if( argv[0].equals("set_value") && argv.length>1 ) {
- Float val = Float.valueOf(argv[1]);
- m_myservice0Ref.set_value(val.floatValue());
- System.out.println( "Set remote value: " + val );
- return ReturnCode_t.RTC_OK;
- }
-
- if( argv[0].equals("get_value") ) {
- System.out.println( "Current remote value: " + m_myservice0Ref.get_value() );
- return ReturnCode_t.RTC_OK;
- }
-
- if( argv[0].equals("get_echo_history") ) {
- String[] echo_history = m_myservice0Ref.get_echo_history();
- for( int intIdx=0;intIdx<echo_history.length;intIdx++ ) {
- System.out.println( intIdx+": "+echo_history[intIdx]);
- }
- return ReturnCode_t.RTC_OK;
- }
-
- if( argv[0].equals("get_value_history") ) {
- float[] value_history = m_myservice0Ref.get_value_history();
- for( int intIdx=0;intIdx<value_history.length;intIdx++ ) {
- System.out.println( intIdx+": "+value_history[intIdx]);
- }
- return ReturnCode_t.RTC_OK;
- }
- System.out.println( "Invalid command or argument(s)." );
- } catch (Exception ex) {
- System.out.println( "No service connected." );
- }
- return ReturnCode_t.RTC_OK;
- }
- //
- // The aborting action when main logic error occurred.
- // former rtc_aborting_entry()
-// @Override
-// public ReturnCode_t on_aborting(int ec_id) {
-// return super.on_aborting(ec_id);
-// }
- //
- // The error action in ERROR state
- // former rtc_error_do()
-// @Override
-// public ReturnCode_t on_error(int ec_id) {
-// return super.on_error(ec_id);
-// }
- //
- // The reset action that is invoked resetting
- // This is same but different the former rtc_init_entry()
-// @Override
-// protected ReturnCode_t onReset(int ec_id) {
-// return super.onReset(ec_id);
-// }
-//
- // The state update action that is invoked after onExecute() action
- // no corresponding operation exists in OpenRTm-aist-0.2.0
-// @Override
-// protected ReturnCode_t onStateUpdate(int ec_id) {
-// return super.onStateUpdate(ec_id);
-// }
- //
- // The action that is invoked when execution context's rate is changed
- // no corresponding operation exists in OpenRTm-aist-0.2.0
-// @Override
-// protected ReturnCode_t onRateChanged(int ec_id) {
-// return super.onRateChanged(ec_id);
-// }
-//
- // DataInPort declaration
- // <rtc-template block="inport_declare">
-
- // </rtc-template>
-
- // DataOutPort declaration
- // <rtc-template block="outport_declare">
-
- // </rtc-template>
-
- // CORBA Port declaration
- // <rtc-template block="corbaport_declare">
- protected CorbaPort m_MyServicePort;
-
- // </rtc-template>
-
- // Service declaration
- // <rtc-template block="service_declare">
-
- // </rtc-template>
-
- // Consumer declaration
- // <rtc-template block="consumer_declare">
- protected CorbaConsumer m_myservice0 = new CorbaConsumer();
- protected MyService m_myservice0Ref;
-
- // </rtc-template>
-}
More information about the openrtm-commit
mailing list