[openrtm-commit:02663] r3010 - in trunk/OpenRTM-aist: examples examples/AutoTest examples/Composite examples/ConfigSample examples/ExtTrigger examples/HelloWorld examples/SeqIO examples/SimpleIO examples/SimpleService examples/StringIO src/lib src/lib/coil src/lib/coil/vxworks/coil src/lib/rtm src/lib/rtm/idl utils utils/rtcd utils/rtcprof
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 7月 6日 (木) 17:00:45 JST
Author: miyamoto
Date: 2017-07-06 17:00:45 +0900 (Thu, 06 Jul 2017)
New Revision: 3010
Added:
trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt
trunk/OpenRTM-aist/examples/CMakeLists.txt
trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt
trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt
trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt
trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt
trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt
trunk/OpenRTM-aist/utils/CMakeLists.txt
trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt
trunk/OpenRTM-aist/utils/rtcd/rtcd_vxorks.cpp
trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt
Modified:
trunk/OpenRTM-aist/examples/AutoTest/AutoTestInComp.cpp
trunk/OpenRTM-aist/examples/AutoTest/AutoTestOutComp.cpp
trunk/OpenRTM-aist/examples/Composite/ControllerComp.cpp
trunk/OpenRTM-aist/examples/Composite/MotorComp.cpp
trunk/OpenRTM-aist/examples/Composite/SensorComp.cpp
trunk/OpenRTM-aist/examples/ConfigSample/ConfigSampleComp.cpp
trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleInComp.cpp
trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleOutComp.cpp
trunk/OpenRTM-aist/examples/SeqIO/SeqInComp.cpp
trunk/OpenRTM-aist/examples/SeqIO/SeqOutComp.cpp
trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp
trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp
trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumerComp.cpp
trunk/OpenRTM-aist/examples/SimpleService/MyServiceProviderComp.cpp
trunk/OpenRTM-aist/examples/StringIO/StringInComp.cpp
trunk/OpenRTM-aist/examples/StringIO/StringOutComp.cpp
trunk/OpenRTM-aist/src/lib/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.cpp
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.h
trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h
trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt
Log:
[incompat, VxWorks] add CMakeLists.txt.
Modified: trunk/OpenRTM-aist/examples/AutoTest/AutoTestInComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/AutoTest/AutoTestInComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/AutoTest/AutoTestInComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -14,6 +14,26 @@
#include "AutoTestIn.h"
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int autotestin_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ AutoTestInInit(manager);
+
+ comp = manager->createComponent("AutoTestIn");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
void MyModuleInit(RTC::Manager* manager)
{
AutoTestInInit(manager);
@@ -95,3 +115,5 @@
return 0;
}
+
+#endif
\ No newline at end of file
Modified: trunk/OpenRTM-aist/examples/AutoTest/AutoTestOutComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/AutoTest/AutoTestOutComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/AutoTest/AutoTestOutComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -14,6 +14,26 @@
#include "AutoTestOut.h"
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int motor_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ AutoTestOutInit(manager);
+
+ comp = manager->createComponent("AutoTestOut");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
void MyModuleInit(RTC::Manager* manager)
{
AutoTestOutInit(manager);
@@ -95,3 +115,4 @@
return 0;
}
+#endif
\ No newline at end of file
Added: trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,28 @@
+set(idl_name AutoTestService)
+
+
+
+
+
+set(${idl_name}_DIR ${CMAKE_CURRENT_BINARY_DIR})
+set(${idl_name}_SKEL ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Skel.cpp ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Skel.h)
+set(${idl_name}_STUB ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Stub.cpp ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Stub.h)
+
+
+add_custom_command(
+ OUTPUT ${idl_name}Skel.cpp ${idl_name}Stub.cpp
+ COMMAND ${IDL_COMPILE_COMMAND} ${IDLCOMMAND_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/rtm/idl ${CMAKE_CURRENT_SOURCE_DIR}/${idl_name}.idl
+ COMMAND python ${SKELWRAPPER_COMMAND} --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=${idl_name}.idl
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+add_custom_target(${idl_name}_TGT DEPENDS ${idl_name}Skel.cpp ${idl_name}Stub.cpp)
+
+
+
+
+
+
+add_subdirectory(AutoTestOut)
+add_subdirectory(AutoTestIn)
+
+
Added: trunk/OpenRTM-aist/examples/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,9 @@
+add_subdirectory(SimpleIO)
+add_subdirectory(SeqIO)
+add_subdirectory(AutoTest)
+#add_subdirectory(HelloWorld)
+add_subdirectory(ExtTrigger)
+add_subdirectory(SimpleService)
+#add_subdirectory(StringIO)
+
+
Added: trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,6 @@
+add_subdirectory(Composite)
+add_subdirectory(Controller)
+add_subdirectory(Motor)
+add_subdirectory(Sensor)
+
+
Modified: trunk/OpenRTM-aist/examples/Composite/ControllerComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Composite/ControllerComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/Composite/ControllerComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -12,6 +12,27 @@
#include "Controller.h"
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int controller_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ ControllerInit(manager);
+
+ comp = manager->createComponent("Controller");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
+
void MyModuleInit(RTC::Manager* manager)
{
ControllerInit(manager);
@@ -89,3 +110,5 @@
return 0;
}
+#endif
+
Modified: trunk/OpenRTM-aist/examples/Composite/MotorComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Composite/MotorComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/Composite/MotorComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -12,6 +12,26 @@
#include "Motor.h"
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int motor_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ MotorInit(manager);
+
+ comp = manager->createComponent("Motor");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
+
void MyModuleInit(RTC::Manager* manager)
{
MotorInit(manager);
@@ -89,3 +109,4 @@
return 0;
}
+#endif
Modified: trunk/OpenRTM-aist/examples/Composite/SensorComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Composite/SensorComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/Composite/SensorComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -12,6 +12,24 @@
#include "Sensor.h"
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int sensor_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ SensorInit(manager);
+
+ comp = manager->createComponent("Sensor");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
void MyModuleInit(RTC::Manager* manager)
{
SensorInit(manager);
@@ -89,3 +107,4 @@
return 0;
}
+#endif
Added: trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,29 @@
+cmake_minimum_required (VERSION 2.6)
+project (ConfigSample)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+
+
+set(srcs ConfigSampleComp.cpp ConfigSample.cpp ConfigSample.h)
+
+if(VXWORKS)
+ if(RTP)
+ set(libs rtm ${ORB_LIBRARIES} coil RTCSkel)
+ else(RTP)
+ set(srcs ${srcs} ${CMAKE_SOURCE_DIR}/rtm/DataFlowComponentBase.cpp)
+ set(libs RTCSkel)
+ endif(RTP)
+endif(VXWORKS)
+
+add_executable(ConfigSample ${srcs})
+target_link_libraries(ConfigSample ${libs})
+add_dependencies(ConfigSample rtm)
Modified: trunk/OpenRTM-aist/examples/ConfigSample/ConfigSampleComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/ConfigSample/ConfigSampleComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/ConfigSample/ConfigSampleComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -13,6 +13,23 @@
#include "ConfigSample.h"
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int configsample_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ ConfigSampleInit(manager);
+ comp = manager->createComponent("ConfigSample");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
void MyModuleInit(RTC::Manager* manager)
{
ConfigSampleInit(manager);
@@ -58,3 +75,4 @@
return 0;
}
+#endif
\ No newline at end of file
Added: trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,2 @@
+add_subdirectory(ConsoleInEx)
+add_subdirectory(ConsoleOutEx)
Modified: trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleInComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleInComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleInComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -14,6 +14,23 @@
#include <rtm/NVUtil.h>
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int consolein_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ ConsoleInInit(manager);
+ comp = manager->createComponent("ConsoleIn");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
void MyModuleInit(RTC::Manager* manager)
{
ConsoleInInit(manager);
@@ -95,3 +112,4 @@
return 0;
}
+#endif
\ No newline at end of file
Modified: trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleOutComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleOutComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/ExtTrigger/ConsoleOutComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -12,7 +12,23 @@
#include <string>
#include "ConsoleOut.h"
-
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int consoleout_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ ConsoleOutInit(manager);
+ comp = manager->createComponent("ConsoleOut");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
void MyModuleInit(RTC::Manager* manager)
{
ConsoleOutInit(manager);
@@ -96,3 +112,4 @@
return 0;
}
+#endif
\ No newline at end of file
Added: trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,29 @@
+cmake_minimum_required (VERSION 2.6)
+project (HelloRTWorld)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+
+
+set(srcs HelloRTWorldComp.cpp HelloRTWorld.cpp HelloRTWorld.h)
+
+if(VXWORKS)
+ if(RTP)
+ set(libs rtm ${ORB_LIBRARIES} coil RTCSkel)
+ else(RTP)
+ set(srcs ${srcs} ${CMAKE_SOURCE_DIR}/rtm/DataFlowComponentBase.cpp)
+ set(libs RTCSkel)
+ endif(RTP)
+endif(VXWORKS)
+
+add_executable(HelloRTWorld ${srcs})
+target_link_libraries(HelloRTWorld ${libs})
+add_dependencies(HelloRTWorld rtm)
Added: trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,4 @@
+add_subdirectory(SeqIn)
+add_subdirectory(SeqOut)
+
+
Modified: trunk/OpenRTM-aist/examples/SeqIO/SeqInComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SeqIO/SeqInComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/SeqIO/SeqInComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -16,6 +16,24 @@
// Connector Listener Dump Flag : default OFF
extern bool g_Listener_dump_enabled;
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int seqin_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ SeqInInit(manager);
+ comp = manager->createComponent("SeqIn");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
void MyModuleInit(RTC::Manager* manager)
{
SeqInInit(manager);
@@ -105,3 +123,5 @@
return 0;
}
+
+#endif
Modified: trunk/OpenRTM-aist/examples/SeqIO/SeqOutComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SeqIO/SeqOutComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/SeqIO/SeqOutComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -15,6 +15,25 @@
// Connector Listener Dump Flag : default OFF
extern bool g_Listener_dump_enabled;
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int seqout_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ SeqOutInit(manager);
+ comp = manager->createComponent("SeqOut");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
void MyModuleInit(RTC::Manager* manager)
{
SeqOutInit(manager);
@@ -104,3 +123,5 @@
return 0;
}
+
+#endif
Added: trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,2 @@
+add_subdirectory(ConsoleIn)
+add_subdirectory(ConsoleOut)
Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -14,6 +14,25 @@
#include <rtm/NVUtil.h>
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int consolein_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ ConsoleInInit(manager);
+ comp = manager->createComponent("ConsoleIn");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
void MyModuleInit(RTC::Manager* manager)
{
ConsoleInInit(manager);
@@ -77,7 +96,10 @@
int main (int argc, char** argv)
{
RTC::Manager* manager;
- manager = RTC::Manager::init(argc, argv);
+ const int argc_ = 5;
+ const char *argv_[argc_] = { "ManagerTest", "-f", "/home/openrtm/testRTM/rtc.conf", "-o", "corba.nameservers:192.168.200.254" };
+ manager = RTC::Manager::init(argc_, const_cast<char**>(argv_));
+ //manager = RTC::Manager::init(argc, argv);
// Set module initialization proceduer
// This procedure will be invoked in activateManager() function.
@@ -95,3 +117,5 @@
return 0;
}
+
+#endif
Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -13,6 +13,25 @@
#include "ConsoleOut.h"
+
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int consoleout_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ ConsoleOutInit(manager);
+ comp = manager->createComponent("ConsoleOut");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
void MyModuleInit(RTC::Manager* manager)
{
ConsoleOutInit(manager);
@@ -96,3 +115,5 @@
return 0;
}
+
+#endif
Added: trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,27 @@
+set(idl_name MyService)
+
+
+
+
+
+set(${idl_name}_DIR ${CMAKE_CURRENT_BINARY_DIR})
+set(${idl_name}_SKEL ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Skel.cpp ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Skel.h)
+set(${idl_name}_STUB ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Stub.cpp ${CMAKE_CURRENT_BINARY_DIR}/${idl_name}Stub.h)
+
+
+add_custom_command(
+ OUTPUT ${idl_name}Skel.cpp ${idl_name}Stub.cpp
+ COMMAND ${IDL_COMPILE_COMMAND} ${IDLCOMMAND_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/rtm/idl ${CMAKE_CURRENT_SOURCE_DIR}/${idl_name}.idl
+ COMMAND python ${SKELWRAPPER_COMMAND} --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=${idl_name}.idl
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+add_custom_target(${idl_name}_TGT DEPENDS ${idl_name}Skel.cpp ${idl_name}Stub.cpp)
+
+
+
+
+
+add_subdirectory(MyServiceConsumer)
+add_subdirectory(MyServiceProvider)
+
+
Modified: trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumerComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumerComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumerComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -13,6 +13,24 @@
#include "MyServiceConsumer.h"
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int myserviceconsumer_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ MyServiceConsumerInit(manager);
+ comp = manager->createComponent("MyServiceConsumer");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
void MyModuleInit(RTC::Manager* manager)
{
MyServiceConsumerInit(manager);
@@ -86,3 +104,4 @@
return 0;
}
+#endif
\ No newline at end of file
Modified: trunk/OpenRTM-aist/examples/SimpleService/MyServiceProviderComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/MyServiceProviderComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/SimpleService/MyServiceProviderComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -13,6 +13,23 @@
#include "MyServiceProvider.h"
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int myserviceprovider_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ MyServiceProviderInit(manager);
+ comp = manager->createComponent("MyServiceProvider");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
void MyModuleInit(RTC::Manager* manager)
{
MyServiceProviderInit(manager);
@@ -86,3 +103,4 @@
return 0;
}
+#endif
\ No newline at end of file
Added: trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,3 @@
+add_subdirectory(StringIn)
+add_subdirectory(StringOut)
+
Modified: trunk/OpenRTM-aist/examples/StringIO/StringInComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/StringIO/StringInComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/StringIO/StringInComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -16,6 +16,26 @@
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int stringin_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ StringInInit(manager);
+ std::string name;
+
+ comp = manager->createComponent("StringIn", "Generic", name);
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
void MyModuleInit(RtcManager* manager)
{
StringInInit(manager);
@@ -44,3 +64,5 @@
return 0;
}
+
+#endif
Modified: trunk/OpenRTM-aist/examples/StringIO/StringOutComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/StringIO/StringOutComp.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/examples/StringIO/StringOutComp.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -14,7 +14,27 @@
#include <string>
#include "StringOut.h"
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int stringout_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ StringOutInit(manager);
+ std::string name;
+ comp = manager->createComponent("StringOut", "Generic", name);
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
+
void MyModuleInit(RtcManager* manager)
{
StringOutInit(manager);
@@ -43,4 +63,4 @@
return 0;
}
-
+#endif
Modified: trunk/OpenRTM-aist/src/lib/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/CMakeLists.txt 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/src/lib/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -1,5 +1,31 @@
cmake_minimum_required (VERSION 2.6)
+
+if(CORBA MATCHES "ORBexpress")
+ if(NOT IDL_COMPILE_COMMAND)
+ set(IDL_COMPILE_COMMAND ${ORB_ROOT}/host/x86_linux_2.6/bin/idl2cpp)
+ endif()
+ SET(IDLCOMMAND_FLAGS -m -a -ex -fhh -fxcc -fc_c -fs -q -dOE_IDL -I${ORB_ROOT}/idl )
+elseif(CORBA MATCHES "omniORB")
+ if(NOT IDL_COMPILE_COMMAND)
+ set(IDL_COMPILE_COMMAND /home/openrtm/omniORB-4.2.2/build/bin/omniidl)
+ endif()
+ SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf)
+endif()
+
+if(UNIX)
+ set(SKELWRAPPER_COMMAND ${OPENRTM_DIRS}/utils/rtm-skelwrapper/rtm-skelwrapper)
+elseif(VXWORKS)
+ set(SKELWRAPPER_COMMAND ${OPENRTM_DIRS}/utils/rtm-skelwrapper/rtm-skelwrapper)
+elseif(MSVC)
+ set(SKELWRAPPER_COMMAND ${OPENRTM_DIRS}/utils/rtm-skelwrapper/rtm-skelwrapper.py)
+endif()
+
+
+
+
add_subdirectory(coil)
add_subdirectory(rtm)
+add_subdirectory(examples)
+add_subdirectory(utils)
Modified: trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -2,19 +2,68 @@
project (coil)
+
+
+
+
+option (ACE_5_6_1_OR_EARLIER "ACE version 5.6.1 or earlier" OFF)
+option (COIL_OS_DARWIN "OS is Max OS X" OFF)
+option (COIL_OS_FREEBSD "OS is FreeBSD" OFF)
+option (COIL_OS_HPUX "OS is HP-UX" OFF)
+option (COIL_OS_IRIX "OS is IRIX" OFF)
+option (COIL_OS_LINUX "OS is Linux" OFF)
+option (COIL_OS_OSF1 "OS is OSF1" OFF)
+option (COIL_OS_QNX "OS is QNX" OFF)
+option (COIL_OS_SUNOS "OS is SunOS" OFF)
+option (COIL_OS_VXWORKS "OS is VxWorks" OFF)
+option (HAVE_DLFCN_H "Define to 1 if you have the <dlfcn.h> header file." ON)
+option (HAVE_INTTYPES_H "Define to 1 if you have the <inttypes.h> header file." ON)
+option (HAVE_MEMORY_H "Define to 1 if you have the <memory.h> header file." ON)
+option (HAVE_NLIST_H "Define to 1 if you have the <nlist.h> header file." OFF)
+option (HAVE_STDINT_H "Define to 1 if you have the <stdint.h> header file." ON)
+option (HAVE_STDLIB_H "Define to 1 if you have the <stdlib.h> header file." ON)
+option (HAVE_STRINGS_H "Define to 1 if you have the <strings.h> header file." ON)
+option (HAVE_STRING_H "Define to 1 if you have the <string.h> header file." ON)
+option (HAVE_SYS_STAT_H "Define to 1 if you have the <sys/stat.h> header file." ON)
+option (HAVE_SYS_TYPES_H "Define to 1 if you have the <sys/types.h> header file." ON)
+option (HAVE_UNAME "Define to 1 if you have the `uname' function." ON)
+option (HAVE_UNISTD_H "Define to 1 if you have the <unistd.h> header file." ON)
+option (STDC_HEADERS "Define to 1 if you have the ANSI C header files." ON)
+option (WITH_ACE "compiled with ACE" OFF)
+option (WITH_DMALLOC "Define if using the dmalloc debugging malloc package" OFF)
+option (_REENTRANT "Multi Thread Support" ON)
+
+set(COIL_MAJOR_VERSION "1.0" CACHE STRING "COIL major version")
+set(COIL_MINOR_VERSION "1.0" CACHE STRING "COIL minor version")
+set(COIL_PLATFORM "POSIX" CACHE STRING "coil platform is ACE")
+set(COIL_REVISION_NUM "1.0" CACHE STRING "")
+set(COIL_SHORT_VERSION "1.01.01.0" CACHE STRING "COIL version")
+set(COIL_VERSION "1.0" CACHE STRING "COIL version")
+set(PACKAGE "coil" CACHE STRING "Name of package")
+set(PACKAGE_BUGREPORT "n-ando at aist.go.jp" CACHE STRING "Define to the address where bug reports for this package should be sent.")
+set(PACKAGE_NAME "coil" CACHE STRING "Define to the full name of this package.")
+set(PACKAGE_STRING "coil 1.0" CACHE STRING "Define to the full name and version of this package.")
+set(PACKAGE_TARNAME "coil" CACHE STRING "Define to the one symbol short name of this package.")
+set(PACKAGE_VERSION "1.0" CACHE STRING "Define to the version of this package.")
+
+
+
+
if(VXWORKS)
set(COIL_OS_DIR "vxworks")
+ set (RTM_OS_VXWORKS ON)
elseif(UNIX)
set(COIL_OS_DIR "posix")
+ set (RTM_OS_LINUX ON)
elseif(WIN32)
set(COIL_OS_DIR "win32")
endif()
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_coil.h.in ${PROJECT_BINARY_DIR}/config_coil.h)
-
set(coil_srcs
common/coil/Allocator.cpp
common/coil/ClockManager.cpp
@@ -44,8 +93,9 @@
include_directories(
${PROJECT_SOURCE_DIR}/common
${PROJECT_SOURCE_DIR}/${COIL_OS_DIR}
+ ${PROJECT_BINARY_DIR}/..
)
-message(STATUS ${CMAKE_INCLUDE_DIRECTORIES_BEFORE})
+#message(STATUS ${CMAKE_INCLUDE_DIRECTORIES_BEFORE})
add_library(coil STATIC ${coil_srcs} )
#add_executable(coil ${coil_srcs} )
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.cpp 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -18,10 +18,14 @@
#include <coil/Task.h>
+/*
#ifdef __RTP__
#define DEFAULT_PRIORITY 110
#define DEFAULT_STACKSIZE 60000
#endif
+*/
+#define DEFAULT_PRIORITY 110
+#define DEFAULT_STACKSIZE 60000
namespace coil
{
@@ -35,6 +39,11 @@
*/
Task::Task()
: m_count(0)
+ ,m_priority(DEFAULT_PRIORITY)
+ ,m_stacksize(DEFAULT_STACKSIZE)
+ {
+ }
+/*
#ifdef __RTP__
,m_priority(DEFAULT_PRIORITY)
,m_stacksize(DEFAULT_STACKSIZE)
@@ -45,7 +54,7 @@
::pthread_attr_init(&m_attr);
#endif
}
-
+*/
/*!
* @if jp
* @brief ¥Ç¥¹¥È¥é¥¯¥¿
@@ -105,6 +114,16 @@
{
if (m_count == 0)
{
+ m_tid = taskSpawn(
+ 0,
+ m_priority,
+ VX_FP_TASK | VX_NO_STACK_FILL,
+ m_stacksize,
+ (FUNCPTR)Task::svc_run,
+ (int)this,
+ 0,0,0,0,0,0,0,0,0
+ );
+/*
#ifdef __RTP__
m_tid = taskSpawn(
0,
@@ -121,6 +140,7 @@
(void* (*)(void*))Task::svc_run,
this);
#endif
+*/
++m_count;
};
}
@@ -136,6 +156,8 @@
{
if (m_count > 0)
{
+ Guard guard(m_waitmutex);
+/*
#ifdef __RTP__
Guard guard(m_waitmutex);
//taskExit(0);
@@ -143,6 +165,7 @@
void* retval;
::pthread_join(m_thread, &retval);
#endif
+*/
}
return 0;
}
@@ -202,6 +225,18 @@
* @brief Start thread Execution
* @endif
*/
+
+
+ extern "C" void* Task::svc_run(void* args)
+ {
+ Task* t = (coil::Task*)args;
+ Guard guard(t->m_waitmutex);
+ int status;
+ status = t->svc();
+ t->finalize();
+ return 0;
+ }
+/*
#ifdef __RTP__
extern "C" void* Task::svc_run(void* args)
#else
@@ -217,9 +252,11 @@
t->finalize();
return 0;
}
+*/
-
+/*
#ifdef __RTP__
+*/
/*!
* @if jp
*
@@ -262,7 +299,9 @@
{
m_stacksize = stacksize;
}
+/*
#endif
+*/
};
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.h 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.h 2017-07-06 08:00:45 UTC (rev 3010)
@@ -19,6 +19,11 @@
#ifndef COIL_TASK_H
#define COIL_TASK_H
+#include <vxWorks.h>
+#include <taskLib.h>
+#include <coil/Mutex.h>
+#include <coil/Guard.h>
+/*
#ifdef __RTP__
#include <vxWorks.h>
#include <taskLib.h>
@@ -27,6 +32,7 @@
#else
#include <pthread.h>
#endif
+*/
namespace coil
{
@@ -45,9 +51,12 @@
*/
class Task
{
+/*
#ifdef __RTP__
typedef coil::Guard<coil::Mutex> Guard;
#endif
+*/
+ typedef coil::Guard<coil::Mutex> Guard;
public:
/*!
* @if jp
@@ -264,8 +273,9 @@
* @endif
*/
static void* svc_run(void* args = 0);
-
+/*
#ifdef __RTP__
+*/
/*!
* @if jp
*
@@ -302,7 +312,16 @@
* @endif
*/
void set_stacksize(int stacksize);
+ coil::Mutex m_waitmutex;
+ private:
+ int m_count;
+ int m_tid;
+ int m_priority;
+ int m_stacksize;
+
+/*
#endif
+
#ifdef __RTP__
coil::Mutex m_waitmutex;
#endif
@@ -316,6 +335,7 @@
pthread_t m_thread;
pthread_attr_t m_attr;
#endif
+*/
void* m_args;
};
Modified: trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -2,11 +2,11 @@
project (rtm)
-add_subdirectory(idl)
+
option (ARTLINUX "ARTLinux is avaiable" OFF)
option (HAVE_DLFCN_H "Define to 1 if you have the <dlfcn.h> header file." ON)
option (HAVE_INTTYPES_H "Define to 1 if you have the <inttypes.h> header file." ON)
@@ -89,34 +89,45 @@
-if(CORBA MATCHES "ORBExpress")
+if(CORBA MATCHES "ORBexpress")
if(RTP)
- link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/lib)
- include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/include)
- set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb )
+ set(ORB_LINK_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/lib)
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/include)
+ link_directories(${ORB_LINK_DIR})
+ include_directories(${ORB_INCLUDE_DIR})
+ set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb)
else(RTP)
+ set(ORB_LINK_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/lib)
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/include)
+ set(ORB_INCLUDE_DIR ${ORB_INCLUDE_DIR} ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/include)
- link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib)
- include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/include)
-
- link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/lib)
- include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/include)
+
+ link_directories(${ORB_LINK_DIR})
+ include_directories(${ORB_INCLUDE_DIR})
+ #include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/include)
- set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb )
+ set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb)
endif()
- ADD_DEFINITIONS("-Wpointer-arith -Wwrite-strings -Waggregate-return -Wredundant-decls -Wno-unused -Wshadow -Wundef -Wold-style-cast -fno-implement-inlines -fvolatile -ansi -msoft-float ")
+ SET (ORB_C_FLAGS_LIST
+ -Wpointer-arith -Wwrite-strings -Waggregate-return -Wredundant-decls -Wno-unused -Wshadow -Wundef -Wold-style-cast -fno-implement-inlines -fvolatile -ansi -msoft-float
+ )
+ ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
set (ORB_IS_ORBEXPRESS ON)
+ set (ORB_IS_ORBEXPRESS ON PARENT_SCOPE)
elseif(CORBA MATCHES "omniORB")
if(RTP)
- link_directories(${ORB_ROOT}/lib/simpentium_vxWorks_RTP_6.9)
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib/${CPU_TYPE}_vxWorks_RTP_${VXWORKS_MAJOR}.${VXWORKS_MINOR})
else(RTP)
- link_directories(${ORB_ROOT}/lib/simlinux_vxWorks_kernel_6.9)
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib/${CPU_TYPE}_vxWorks_kernel_${VXWORKS_MAJOR}.${VXWORKS_MINOR})
endif()
- include_directories(${ORB_ROOT}/include)
- set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread )
+ link_directories(${ORB_LINK_DIR})
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/include)
+
+ include_directories(${ORB_INCLUDE_DIR})
+ set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread)
SET (ORB_C_FLAGS_LIST
-D__vxWorks__
-D__x86__
@@ -123,9 +134,15 @@
)
ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
set (ORB_IS_OMNIORB ON)
+ set (ORB_IS_OMNIORB ON PARENT_SCOPE)
endif()
+set(ORB_C_FLAGS_LIST ${ORB_C_FLAGS_LIST} PARENT_SCOPE)
+set(ORB_LINK_DIR ${ORB_LINK_DIR} PARENT_SCOPE)
+set(ORB_INCLUDE_DIR ${ORB_INCLUDE_DIR} PARENT_SCOPE)
+set(ORB_LIBRARIES ${ORB_LIBRARIES} PARENT_SCOPE)
+
#ADD_DEFINITIONS(-DRTC_CORBA_CXXMAPPING11)
set (RTC_CORBA_CXXMAPPING11 ON)
@@ -157,16 +174,22 @@
set(CORBA_NAME omniORB CACHE STRING "CORBA name.")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${PROJECT_BINARY_DIR}/version.h)
-include_directories(
- ${CMAKE_SOURCE_DIR}
+
+set(RTM_INCLUDE_DIR ${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/coil/common
${PROJECT_BINARY_DIR}/idl
${CMAKE_SOURCE_DIR}/coil/${COIL_OS_DIR}
- ${PROJECT_BINARY_DIR}/..
+ ${PROJECT_BINARY_DIR}/..)
+
+include_directories(
+ ${RTM_INCLUDE_DIR}
)
+set(RTM_INCLUDE_DIR ${RTM_INCLUDE_DIR} PARENT_SCOPE)
+
+
set(rtm_srcs
ConfigAdmin.cpp
ModuleManager.cpp
@@ -234,23 +257,26 @@
#message(STATUS ${ORB_LIBRARIES})
#add_executable(rtm rtcd.cpp TestRTC.cpp ${rtm_srcs} ${ALL_IDL_SRCS})
-add_library(rtm STATIC ${rtm_srcs} ${ALL_IDL_SRCS} )
+#add_library(rtm STATIC ${rtm_srcs} ${ALL_IDL_SRCS} )
+add_library(rtm STATIC ${rtm_srcs})
-set_source_files_properties(${ALL_IDL_SRCS} PROPERTIES GENERATED 1)
-if(NOT TARGET ALL_IDL_TGT)
- add_custom_target(ALL_IDL_TGT)
-endif(NOT TARGET ALL_IDL_TGT)
+
add_dependencies(rtm coil)
-add_dependencies(rtm ALL_IDL_TGT)
+#add_dependencies(rtm ALL_IDL_TGT)
+add_subdirectory(idl)
+add_dependencies(rtm RTCSkel)
-target_link_libraries(rtm ${ORB_LIBRARIES} coil)
+#target_link_libraries(rtm ${ORB_LIBRARIES} coil)
+
+
+
Modified: trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h 2017-07-06 08:00:45 UTC (rev 3010)
@@ -335,7 +335,7 @@
{
DataType data;
#ifdef ORB_IS_ORBEXPRESS
- CORBA::Stream cdr(&cdrdata.read_octet(), cdrdata.size_written());
+ cdrMemoryStream cdr(cdrdata);
#else
cdrMemoryStream cdr(cdrdata.bufPtr(), cdrdata.bufSize());
#endif
Modified: trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt 2017-07-06 07:25:24 UTC (rev 3009)
+++ trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -1,6 +1,7 @@
cmake_minimum_required (VERSION 2.6)
+project (RTCSkel)
@@ -7,31 +8,27 @@
-set(IDL_COMPILE_COMMAND ${ORB_ROOT}/host/x86_linux_2.6/bin/idl2cpp)
-
macro(idl_compile idl_name)
- if(UNIX)
- set(skelwrapper_commend ${OPENRTM_DIRS}/utils/rtm-skelwrapper/rtm-skelwrapper)
- elseif(VXWORKS)
- set(skelwrapper_commend ${OPENRTM_DIRS}/utils/rtm-skelwrapper/rtm-skelwrapper)
- elseif(MSVC)
- set(skelwrapper_commend ${OPENRTM_DIRS}/utils/rtm-skelwrapper/rtm-skelwrapper.py)
- endif()
+
add_custom_command(
OUTPUT ${idl_name}Skel.cpp
#COMMAND mkdir -p include/rtm/idl
#COMMAND cd include/rtm/idl
- COMMAND ${IDL_COMPILE_COMMAND} -m -a -ex -fhh -fxcc -fc_c -fs -q -dOE_IDL -I${PROJECT_SOURCE_DIR}/idl -I${ORB_ROOT}/idl ${PROJECT_SOURCE_DIR}/idl/${idl_name}.idl
- COMMAND python ${skelwrapper_commend} --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=${idl_name}.idl
+ #COMMAND ${IDL_COMPILE_COMMAND} ${IDLCOMMAND_FLAGS} -I${PROJECT_SOURCE_DIR}/idl ${PROJECT_SOURCE_DIR}/idl/${idl_name}.idl
+ COMMAND ${IDL_COMPILE_COMMAND} ${IDLCOMMAND_FLAGS} -I${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/${idl_name}.idl
+ COMMAND python ${SKELWRAPPER_COMMAND} --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=${idl_name}.idl
#WORKING_DIRECTORY ${CURRENT_BINARY_DIR}/include/rtm/idl
- WORKING_DIRECTORY ${CURRENT_BINARY_DIR}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_target(${idl_name}_TGT DEPENDS ${idl_name}Skel.cpp)
- set(ALL_IDL_SRCS ${ALL_IDL_SRCS} idl/${idl_name}Skel.cpp)
+ #set(ALL_IDL_SRCS ${ALL_IDL_SRCS} idl/${idl_name}Skel.cpp)
+ #set(ALL_IDL_SRCS ${ALL_IDL_SRCS} idl/${idl_name}SKel.h)
+ set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}Skel.cpp)
+ set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}SKel.h)
if(NOT TARGET ALL_IDL_TGT)
add_custom_target(ALL_IDL_TGT)
@@ -59,16 +56,28 @@
endforeach(idl)
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+#set(ALL_IDL_SRCS ${ALL_IDL_SRCS} PARENT_SCOPE)
+set_source_files_properties(${ALL_IDL_SRCS} PROPERTIES GENERATED 1)
-set(ALL_IDL_SRCS ${ALL_IDL_SRCS} PARENT_SCOPE)
+add_library(RTCSkel STATIC ${ALL_IDL_SRCS} )
+if(NOT TARGET ALL_IDL_TGT)
+ add_custom_target(ALL_IDL_TGT)
+endif(NOT TARGET ALL_IDL_TGT)
+add_dependencies(RTCSkel ALL_IDL_TGT)
Added: trunk/OpenRTM-aist/utils/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/utils/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,6 @@
+cmake_minimum_required (VERSION 2.6)
+
+
+add_subdirectory(rtcd)
+add_subdirectory(rtcprof)
+
Added: trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,23 @@
+cmake_minimum_required (VERSION 2.6)
+project (rtcd)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+if(VXWORKS)
+ add_executable(rtcd rtcd_vxorks.cpp)
+else(VXWORKS)
+ add_executable(rtcd rtcd.cpp)
+endif(VXWORKS)
+
+
+add_dependencies(rtcd rtm)
+
+
+target_link_libraries(rtcd rtm ${ORB_LIBRARIES} coil RTCSkel)
Added: trunk/OpenRTM-aist/utils/rtcd/rtcd_vxorks.cpp
===================================================================
--- trunk/OpenRTM-aist/utils/rtcd/rtcd_vxorks.cpp (rev 0)
+++ trunk/OpenRTM-aist/utils/rtcd/rtcd_vxorks.cpp 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,38 @@
+// -*- C++ -*-
+/*!
+ * @file rtcd.cpp
+ * @brief RT component server daemon
+ * @date $Date: 2005-05-12 09:06:19 $
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2003-2008
+ * Task-intelligence Research Group,
+ * Intelligent Systems Research Institute,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ * $Id: rtcd.cpp 775 2008-07-28 16:14:45Z n-ando $
+ *
+ */
+
+#include <iostream>
+#include <rtm/Manager.h>
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int rtcd_main (int argc, char** argv)
+#else
+int main (int argc, char** argv)
+#endif
+{
+ RTC::Manager* manager;
+ manager = RTC::Manager::init(argc, argv);
+
+ manager->activateManager();
+
+ manager->runManager();
+
+ return 0;
+}
+
+
Added: trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt 2017-07-06 08:00:45 UTC (rev 3010)
@@ -0,0 +1,34 @@
+cmake_minimum_required (VERSION 2.6)
+project (rtcprof)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+
+
+
+
+
+set(srcs rtcprof.cpp)
+
+
+if(VXWORKS)
+ if(RTP)
+ set(libs rtm ${ORB_LIBRARIES} coil RTCSkel)
+ else(RTP)
+ set(srcs ${srcs} ${CMAKE_SOURCE_DIR}/rtm/DataFlowComponentBase.cpp)
+ set(libs RTCSkel)
+ endif(RTP)
+endif(VXWORKS)
+
+add_executable(rtcprof ${srcs})
+target_link_libraries(rtcprof ${libs})
+add_dependencies(rtcprof rtm)
+
More information about the openrtm-commit
mailing list