[openrtm-commit:02748] r3016 - in trunk/OpenRTM-aist: . examples examples/Analyzer examples/AutoTest examples/Composite examples/ConfigSample examples/ExtTrigger examples/HelloWorld examples/SeqIO examples/SimpleIO examples/SimpleService examples/StringIO src 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年 8月 16日 (水) 17:59:45 JST
Author: miyamoto
Date: 2017-08-16 17:59:45 +0900 (Wed, 16 Aug 2017)
New Revision: 3016
Added:
trunk/OpenRTM-aist/CMakeLists.txt
trunk/OpenRTM-aist/Toolchain-vxworks6.6-Linux.cmake
trunk/OpenRTM-aist/Toolchain-vxworks6.cmake
trunk/OpenRTM-aist/examples/Analyzer/
trunk/OpenRTM-aist/examples/Analyzer/Analyzer.cpp
trunk/OpenRTM-aist/examples/Analyzer/Analyzer.h
trunk/OpenRTM-aist/examples/Analyzer/AnalyzerComp.cpp
trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp
trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.h
trunk/OpenRTM-aist/examples/Analyzer/Analyzer_testComp.cpp
trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt
trunk/OpenRTM-aist/run_munch.sh
trunk/OpenRTM-aist/run_munch_69.sh
trunk/OpenRTM-aist/src/CMakeLists.txt
Removed:
trunk/OpenRTM-aist/src/lib/Toolchain-vxworks6.cmake
Modified:
trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt
trunk/OpenRTM-aist/examples/CMakeLists.txt
trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt
trunk/OpenRTM-aist/examples/Composite/Composite.cpp
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/HelloWorld/HelloRTWorldComp.cpp
trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.cpp
trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.h
trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp
trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.cpp
trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.h
trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumer.cpp
trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.cpp
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.h
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/File.h
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/coil/vxworks/coil/Time.h
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/UUID.cpp
trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/rtm/idl/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
Log:
[incompat, VxWorks] #4157
Added: trunk/OpenRTM-aist/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,236 @@
+cmake_minimum_required (VERSION 2.6)
+
+
+set(CORBA ${CORBA} CACHE STRING "set CORBA ")
+
+if(NOT CORBA)
+ message(FATAL_ERROR "Please set CORBA.")
+endif()
+
+
+
+set(ORB_ROOT ${ORB_ROOT} CACHE PATH "set ORB_ROOT")
+
+
+if(NOT ORB_ROOT)
+ if(CORBA MATCHES "omniORB")
+ set(ORB_ROOT "/usr")
+ else()
+ message(FATAL_ERROR "Please set ORB_ROOT.")
+ endif()
+endif()
+
+
+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)
+ if(VXWORKS)
+ set(IDL_COMPILE_COMMAND ${ORB_ROOT}/build/bin/omniidl)
+ else(VXWORKS)
+ set(IDL_COMPILE_COMMAND ${ORB_ROOT}/bin/omniidl)
+ endif(VXWORKS)
+ endif()
+ SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf)
+endif()
+
+if(UNIX)
+ set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper)
+elseif(VXWORKS)
+ set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper)
+elseif(MSVC)
+ set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper.py)
+endif()
+
+
+
+
+
+
+
+
+if(VXWORKS)
+ if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ SET (CPU_TYPE powerpc)
+ elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
+ SET (CPU_TYPE simpentium)
+ elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
+ SET (CPU_TYPE simlinux)
+ endif()
+endif(VXWORKS)
+
+
+
+if(CORBA MATCHES "ORBexpress")
+ set(CORBA_NAME "ORBexpress" CACHE STRING "CORBA name.")
+ if(RTP)
+ set(OE_TARGET gcc_4.1.2_Rp)
+ set(OE_TYPE config_rt_fast)
+ set(ORB_LINK_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/${OE_TARGET}/${OE_TYPE}/lib)
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/${OE_TARGET}/${OE_TYPE}/include)
+
+ set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEorb)
+
+ else(RTP)
+ set(OE_TARGET gcc_4.1.2_ExLcRi)
+ #set(OE_TARGET gcc_4.1.2_Lc)
+ #set(OE_TYPE config_rt_fast)
+ set(OE_TYPE config_rt_full)
+ #set(OE_TYPE config_rt_minimum)
+ #set(OE_TYPE config_rt_small)
+ set(ORB_LINK_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/${OE_TARGET}/config_rt_full/lib ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/${OE_TARGET}/${OE_TYPE}/OENames_2.1.6/lib)
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/${OE_TARGET}/${OE_TYPE}/include)
+ set(ORB_INCLUDE_DIR ${ORB_INCLUDE_DIR} ${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/${OE_TARGET}/${OE_TYPE}/OENames_2.1.6/include)
+
+
+
+
+ #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 OEnames OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEorb)
+ #set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb OEnames)
+
+ endif()
+ SET (ORB_C_FLAGS_LIST
+ -DCORBA_ANY_SHARED_PTR_OPERATORS -DINCLUDE_CORBA_CORBALOC
+# -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})
+elseif(CORBA MATCHES "omniORB")
+ set(CORBA_NAME "omniORB" CACHE STRING "CORBA name.")
+ if(VXWORKS)
+ if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ SET (ORB_C_FLAGS_LIST
+ -D__vxWorks__
+ -D__powerpc__
+ )
+ else()
+ SET (ORB_C_FLAGS_LIST
+ -D__vxWorks__
+ -D__x86__
+ )
+ endif()
+ if(RTP)
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib/${CPU_TYPE}_vxWorks_RTP_${VXWORKS_MAJOR}.${VXWORKS_MINOR})
+ else(RTP)
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib/${CPU_TYPE}_vxWorks_kernel_${VXWORKS_MAJOR}.${VXWORKS_MINOR})
+ endif()
+ elseif(UNIX)
+ SET (ORB_C_FLAGS_LIST
+ -D__x86__
+ )
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib)
+ elseif(MSVC)
+ SET (ORB_C_FLAGS_LIST
+ -D__WIN32__
+ -D__x86__
+ )
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib)
+ endif(VXWORKS)
+
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/include)
+
+
+ set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread)
+
+ ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+endif()
+
+
+if(VXWORKS)
+
+ set(ORB_LIBRARIES_PATH)
+ FOREACH(NAME ${ORB_LIBRARIES})
+ SET(ORB_LIB ORB_${NAME}_LIBRARY)
+ LIST(APPEND ORB_LIBVARS ${ORB_LIB})
+ FIND_LIBRARY(${ORB_LIB} ${NAME}
+ PATHS ${ORB_LINK_DIR}
+ CMAKE_FIND_ROOT_PATH_BOTH)
+ if(${ORB_LIB})
+ LIST(APPEND ORB_LIBRARIES_PATH ${${ORB_LIB}})
+ endif(${ORB_LIB})
+ ENDFOREACH(NAME)
+
+ set(ORB_LIBRARIES ${ORB_LIBRARIES_PATH})
+else(VXWORKS)
+endif(VXWORKS)
+
+
+set(ORB_INCLUDE_DIR ${ORB_INCLUDE_DIR})
+set(ORB_C_FLAGS_LIST ${ORB_C_FLAGS_LIST})
+
+
+
+
+
+
+set(RTM_MAJOR_VERSION 1 CACHE STRING "RTM major version")
+set(RTM_MINOR_VERSION 2 CACHE STRING "RTM minor version")
+set(RTM_REVISION_NUM 0 CACHE STRING "RTM revision numver")
+set(RTM_SHORT_VERSION 120 CACHE STRING "RTM short version")
+set(RTM_VERSION 1.2.0 CACHE STRING "RTM version")
+
+
+
+
+
+
+if(VXWORKS)
+ set(COIL_OS_DIR "vxworks")
+ set (RTM_OS_VXWORKS ON)
+elseif(UNIX)
+ set(COIL_OS_DIR "posix")
+ set (RTM_OS_LINUX ON)
+ ADD_DEFINITIONS(-fPIC)
+ set(RTM_LINKER_OPTION -luuid -ldl -export-dynamic)
+elseif(WIN32)
+ set(COIL_OS_DIR "win32")
+endif()
+
+set(OPENRTM_NAME OpenRTM-aist-1.2.0 CACHE STRING "RTM name.")
+set(OPENRTM_VERSION 1.2.0 CACHE STRING "RTM version.")
+
+set(COIL_PROJECT_NAME coil${RTM_MAJOR_VERSION}${RTM_MINOR_VERSION}${RTM_REVISION_NUM})
+set(RTM_PROJECT_NAME RTC${RTM_MAJOR_VERSION}${RTM_MINOR_VERSION}${RTM_REVISION_NUM})
+set(RTCSKEL_PROJECT_NAME RTCSkel)
+
+if(MSVC)
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008")
+ set(RTM_VC_VER "vc9")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 10 2010")
+ set(RTM_VC_VER "vc10")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 10 2010 Win64")
+ set(RTM_VC_VER "vc10")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 11 2012")
+ set(RTM_VC_VER "vc11")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 11 2012 Win64")
+ set(RTM_VC_VER "vc11")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 12 2013")
+ set(RTM_VC_VER "vc12")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 12 2013 Win64")
+ set(RTM_VC_VER "vc12")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015")
+ set(RTM_VC_VER "vc14")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
+ set(RTM_VC_VER "vc14")
+ endif()
+ set(COIL_PROJECT_NAME ${COIL_PROJECT_NAME}_${RTM_VC_VER})
+ set(RTM_PROJECT_NAME ${RTM_PROJECT_NAME}_${RTM_VC_VER})
+endif()
+
+
+add_subdirectory(src)
+add_subdirectory(examples)
+add_subdirectory(utils)
+
Added: trunk/OpenRTM-aist/Toolchain-vxworks6.6-Linux.cmake
===================================================================
--- trunk/OpenRTM-aist/Toolchain-vxworks6.6-Linux.cmake (rev 0)
+++ trunk/OpenRTM-aist/Toolchain-vxworks6.6-Linux.cmake 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,135 @@
+# VxWorks 6.6 toolchain in Ubuntu environment.
+#
+
+SET (VX_TOOL_FAMILY gnu)
+SET (VX_TOOL e500v2gnu)
+SET (VX_CPU_FAMILY ppc)
+SET (VX_CPU PPC32)
+SET (VX_CPU_CARD ADS8572)
+SET (VX_CPU_VARIANT _ppc85XX_e500v2)
+SET (VX_VERSION vxworks-6.6)
+
+# ホストOSの判定
+FIND_PROGRAM (UNAME uname)
+MARK_AS_ADVANCED (UNAME)
+EXECUTE_PROCESS (COMMAND ${UNAME} OUTPUT_VARIABLE VXWORKS_HOST_OS)
+
+IF (VXWORKS_HOST_OS MATCHES "SunOS")
+ SET (WIND_HOST_TYPE sun4-solaris2)
+ SET (WIND_HOME /usr/local/vw/workbench3.0)
+ELSEIF (VXWORKS_HOST_OS MATCHES "Linux")
+ SET (WIND_HOST_TYPE x86-linux2)
+ IF (NOT EXISTS "$ENV{WIND_HOME}")
+ MESSAGE (STATUS "WIND_HOME=$ENV{WIND_HOME}")
+ MESSAGE (FATAL_ERROR "Please provide valid WIND_HOME environment variable.")
+ ENDIF (NOT EXISTS "$ENV{WIND_HOME}")
+ SET (WIND_HOME "$ENV{WIND_HOME}")
+ENDIF (VXWORKS_HOST_OS MATCHES "SunOS")
+
+# Path Settings
+SET (WIND_BASE ${WIND_HOME}/${VX_VERSION})
+SET (WIND_GNU_BASE ${WIND_HOME}/gnu/4.1.2-${VX_VERSION}/${WIND_HOST_TYPE})
+SET (VX_VW_BASE ${WIND_BASE}/target)
+
+# environment variables required by compiler
+SET (WIND_ENV "WIND_HOME=${WIND_HOME} WIND_HOST_TYPE=${WIND_HOST_TYPE} WIND_BASE=${WIND_BASE}")
+
+################################################################################
+
+SET (VXWORKS ON)
+SET (VXWORKS_MAJOR 6)
+SET (VXWORKS_MINOR 6)
+
+SET (CMAKE_SYSTEM_NAME VxWorks)
+SET (CMAKE_SYSTEM_VERSION ${VX_VERSION})
+SET (CMAKE_SYSTEM_PROCESSOR ${VX_CPU_FAMILY})
+
+INCLUDE (CMakeForceCompiler)
+CMAKE_FORCE_C_COMPILER(${WIND_GNU_BASE}/bin/ccppc GNU)
+CMAKE_FORCE_CXX_COMPILER(${WIND_GNU_BASE}/bin/c++ppc GNU)
+SET (CMAKE_LINKER ${WIND_GNU_BASE}/bin/ldppc CACHE FILEPATH "vxworks linker")
+SET (CMAKE_AR ${WIND_GNU_BASE}/bin/arppc CACHE FILEPATH "vxworks ar")
+SET (CMAKE_NM ${WIND_GNU_BASE}/bin/nmppc CACHE FILEPATH "vxworks nm")
+SET (CMAKE_STRIP ${WIND_GNU_BASE}/bin/stripppc CACHE FILEPATH "vxworks strip")
+SET (CMAKE_OBJCOPY ${WIND_GNU_BASE}/bin/objcopyppc CACHE FILEPATH "vxworks objcopy")
+SET (CMAKE_OBJDUMP ${WIND_GNU_BASE}/bin/objdumpppc CACHE FILEPATH "vxworks objdump")
+SET (CMAKE_RANLIB ${WIND_GNU_BASE}/bin/ranlibppc CACHE FILEPATH "vxworks ranlib")
+SET (CMAKE_EXE_LINKER_FLAGS_INIT -r)
+
+FIND_PROGRAM (SH sh REQUIRED)
+SET (MUNCH ${WIND_BASE}/host/${WIND_HOST_TYPE}/bin/munch CACHE FILEPATH "munch")
+
+SET (CMAKE_C_COMPILE_OBJECT
+ "${WIND_ENV} <CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+# "${WIND_ENV} <CMAKE_C_COMPILER> <DEFINES> <FLAGS> <INCLUDES> -o <OBJECT> -c <SOURCE>")
+SET (CMAKE_CXX_COMPILE_OBJECT
+ "${WIND_ENV} <CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+# "${WIND_ENV} <CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> <INCLUDES> -o <OBJECT> -c <SOURCE>")
+
+SET (CMAKE_C_LINK_EXECUTABLE
+ "${CMAKE_LINKER} <LINK_FLAGS> <CMAKE_C_LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+SET (CMAKE_CXX_LINK_EXECUTABLE
+ "${CMAKE_LINKER} <LINK_FLAGS> <CMAKE_CXX_LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+
+SET (CMAKE_C_FLAGS_DEBUG "-O -g1" CACHE STRING "")
+SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
+
+SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O -g1 -DNDEBUG" CACHE STRING "")
+SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
+
+SET (CMAKE_C_FLAGS_RELEASE "-O -g1 -DNDEBUG" CACHE STRING "")
+SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
+
+INCLUDE_DIRECTORIES (
+ ${VX_VW_BASE}/h
+ ${VX_VW_BASE}/h/wrn/coreip)
+
+SET (VXWORKS_C_FLAGS_LIST
+ -DCPU=${VX_CPU}
+ -DVX_CPU_CARD=${VX_CPU_CARD}
+ -DTOOL_FAMILY=${VX_TOOL_FAMILY}
+ -DTOOL=${VX_TOOL}
+ -D_WRS_KERNEL
+ -DCPU_VARIANT=${VX_CPU_VARIANT}
+ -DVXWORKS_MAJOR=${VXWORKS_MAJOR}
+ -DVXWORKS_MINOR=${VXWORKS_MINOR}
+ -mlongcall
+ -fstrength-reduce
+ -fno-builtin
+ -te500v2
+ -mcpu=8548
+ -mfloat-gprs=double
+ -mspe=yes
+ -mabi=spe
+ -mstrict-align
+ -fno-implicit-fp
+ -DVXWORKS_66
+ )
+
+ADD_DEFINITIONS (${VXWORKS_C_FLAGS_LIST})
+
+
+ string(REPLACE ";" " " VXWORKS_C_FLAGS_LIST_STR "${VXWORKS_C_FLAGS_LIST}")
+ SET (RUN_MUNCH_SCRIPT ${CMAKE_SOURCE_DIR}/run_munch.sh)
+ SET (CMAKE_C_LINK_EXECUTABLE
+ "${CMAKE_LINKER} <LINK_FLAGS> <CMAKE_CXX_LINK_FLAGS> -warn-common -S <OBJECTS> -o <TARGET>_partialImage.o <LINK_LIBRARIES>"
+# "${CMAKE_LINKER} <LINK_FLAGS> <CMAKE_CXX_LINK_FLAGS> -warn-common -S <OBJECTS> -o <TARGET>_partialImage.o <LINK_LIBRARIES> /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/lib/libOEnames.a /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib/libOEtcp.a /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib/libOEmirror.a /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib/libOEbridge.a /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib/libOEudp.a /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib/libOEipmc.a /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib/libOEshrmem.a /home/openrtm/OIS/ORBexpress/RT_2.8.4_PATCH_KC1/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib/libOEorb.a"
+ "sh ${RUN_MUNCH_SCRIPT} ${CMAKE_NM} <TARGET>_partialImage.o ${MUNCH} ctdt.c"
+#sh -c WIND_BASE=${WIND_BASE}\; export WIND_BASE\; WIND_HOST_TYPE=${WIND_HOST_TYPE}\; export WIND_HOST_TYPE\; ${CMAKE_NM} <TARGET>_partialImage.o | ${MUNCH} > ctdt.c"
+ "${CMAKE_C_COMPILER} ${VXWORKS_C_FLAGS_LIST_STR} -o ctdt.o -c ctdt.c"
+ "${CMAKE_LINKER} <LINK_FLAGS> <CMAKE_CXX_LINK_FLAGS> -S -warn-common -o <TARGET> <TARGET>_partialImage.o ctdt.o "
+ )
+ SET (CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
+
+LIST (APPEND CMAKE_FIND_ROOT_PATH /usr/${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM})
+LIST (APPEND CMAKE_PREFIX_PATH /)
+SET (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
+SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+
+MARK_AS_ADVANCED (CMAKE_LINKER CMAKE_AR CMAKE_NM CMAKE_STRIP
+ CMAKE_OBJCOPY CMAKE_OBJDUMP CMAKE_RANLIB CMAKE_C_FLAGS_DEBUG
+ CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_RELEASE SH MUNCH)
Added: trunk/OpenRTM-aist/Toolchain-vxworks6.cmake
===================================================================
--- trunk/OpenRTM-aist/Toolchain-vxworks6.cmake (rev 0)
+++ trunk/OpenRTM-aist/Toolchain-vxworks6.cmake 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,410 @@
+# VxWorks 6.6 settings
+#
+# for J3 Main ECU
+#
+SET (VX_TOOL_FAMILY gnu)
+SET (VX_TOOL sfgnu)
+
+
+set(RTP ${RTP} CACHE BOOL "set RTP")
+
+if(RTP)
+ set(RTP_C_FLAGS -mrtp)
+endif()
+
+
+
+set(VX_CPU_FAMILY ${VX_CPU_FAMILY} CACHE STRING "set VX_CPU_FAMILY ")
+
+if(NOT VX_CPU_FAMILY)
+ set(VX_CPU_FAMILY ppc)
+endif()
+
+if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ SET (VX_CPU PPC32)
+elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
+ SET (VX_CPU SIMPENTIUM)
+elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
+ SET (VX_CPU SIMLINUX)
+endif()
+
+
+
+
+
+#message(STATUS "test")
+#message(STATUS ${VX_CPU_FAMILY})
+
+#SET (VX_CPU_FAMILY ppc)
+#SET (VX_CPU PPC32)
+SET (VX_CPU_CARD ADS8572)
+SET (VX_CPU_VARIANT _ppc85XX_e500v2)
+
+
+
+
+
+
+# ホストOSの判定
+FIND_PROGRAM (UNAME uname)
+MARK_AS_ADVANCED (UNAME)
+EXECUTE_PROCESS (COMMAND ${UNAME} OUTPUT_VARIABLE VXWORKS_HOST_OS)
+
+IF (VXWORKS_HOST_OS MATCHES "SunOS")
+ SET (WIND_HOST_TYPE sun4-solaris2)
+ SET (WIND_HOME /usr/local/vw/workbench3.0)
+ELSEIF (VXWORKS_HOST_OS MATCHES "Linux")
+ SET (WIND_HOST_TYPE x86-linux2)
+ IF (NOT EXISTS "$ENV{WIND_HOME}")
+ MESSAGE (STATUS "WIND_HOME=$ENV{WIND_HOME}")
+ MESSAGE (FATAL_ERROR "Please provide valid WIND_HOME environment variable.")
+ ENDIF (NOT EXISTS "$ENV{WIND_HOME}")
+ SET (WIND_HOME "$ENV{WIND_HOME}")
+ENDIF (VXWORKS_HOST_OS MATCHES "SunOS")
+
+
+if(NOT VX_VERSION)
+ SET (VX_VERSION vxworks-6.9)
+endif()
+
+if("${VX_VERSION}" STREQUAL "vxworks-6.9")
+ SET (GNU_VERSION 4.3.3)
+ SET (VXWORKS_VERSION_FLAG -DVXWORKS_69)
+ SET (WIND_UTIL_PATH ${WIND_HOME}/utilities-1.0/x86-linux2/bin)
+ SET (VXWORKS_MAJOR 6)
+ SET (VXWORKS_MINOR 9)
+else()
+ SET (GNU_VERSION 4.1.2)
+ SET (VXWORKS_VERSION_FLAG -DVXWORKS_66)
+ SET (WIND_UTIL_PATH ${WIND_HOME}/workbench-3.0/x86-linux2/bin)
+ SET (VXWORKS_MAJOR 6)
+ SET (VXWORKS_MINOR 6)
+endif()
+
+
+
+# Path Settings
+SET (WIND_BASE ${WIND_HOME}/${VX_VERSION})
+SET (WIND_GNU_BASE ${WIND_HOME}/gnu/${GNU_VERSION}-${VX_VERSION}/${WIND_HOST_TYPE})
+SET (VX_VW_BASE ${WIND_BASE}/target)
+
+# environment variables required by compiler
+SET (WIND_ENV "WIND_HOME=${WIND_HOME} WIND_HOST_TYPE=${WIND_HOST_TYPE} WIND_BASE=${WIND_BASE}")
+
+################################################################################
+
+SET (VXWORKS ON)
+
+
+SET (CMAKE_SYSTEM_NAME VxWorks)
+SET (CMAKE_SYSTEM_VERSION ${VX_VERSION})
+SET (CMAKE_SYSTEM_PROCESSOR ${VX_CPU_FAMILY})
+
+INCLUDE (CMakeForceCompiler)
+
+if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ CMAKE_FORCE_C_COMPILER(${WIND_GNU_BASE}/bin/ccppc GNU)
+ CMAKE_FORCE_CXX_COMPILER(${WIND_GNU_BASE}/bin/c++ppc GNU)
+ SET (CMAKE_LINKER ${WIND_GNU_BASE}/bin/ldppc CACHE FILEPATH "vxworks linker")
+ SET (CMAKE_AR ${WIND_GNU_BASE}/bin/arppc CACHE FILEPATH "vxworks ar")
+ SET (CMAKE_NM ${WIND_UTIL_PATH}/nmppc CACHE FILEPATH "vxworks nm")
+ SET (CMAKE_STRIP ${WIND_UTIL_PATH}/stripppc CACHE FILEPATH "vxworks strip")
+ SET (CMAKE_OBJCOPY ${WIND_UTIL_PATH}/objcopyppc CACHE FILEPATH "vxworks objcopy")
+ SET (CMAKE_OBJDUMP ${WIND_UTIL_PATH}/objdumpppc CACHE FILEPATH "vxworks objdump")
+ SET (CMAKE_RANLIB ${WIND_GNU_BASE}/bin/ranlibppc CACHE FILEPATH "vxworks ranlib")
+ SET (CPU_TYPE powerpc)
+elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
+ CMAKE_FORCE_C_COMPILER(${WIND_GNU_BASE}/bin/ccpentium GNU)
+ CMAKE_FORCE_CXX_COMPILER(${WIND_GNU_BASE}/bin/c++pentium GNU)
+ SET (CMAKE_LINKER ${WIND_GNU_BASE}/bin/ldpentium CACHE FILEPATH "vxworks linker")
+ SET (CMAKE_AR ${WIND_GNU_BASE}/bin/arpentium CACHE FILEPATH "vxworks ar")
+ SET (CMAKE_NM ${WIND_UTIL_PATH}/nmpentium CACHE FILEPATH "vxworks nm")
+ SET (CMAKE_STRIP ${WIND_UTIL_PATH}/strippentium CACHE FILEPATH "vxworks strip")
+ SET (CMAKE_OBJCOPY ${WIND_UTIL_PATH}/objcopypentium CACHE FILEPATH "vxworks objcopy")
+ SET (CMAKE_OBJDUMP ${WIND_UTIL_PATH}/objdumppentium CACHE FILEPATH "vxworks objdump")
+ SET (CMAKE_RANLIB ${WIND_GNU_BASE}/bin/ranlibpentium CACHE FILEPATH "vxworks ranlib")
+ SET (CPU_TYPE simpentium)
+elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
+ CMAKE_FORCE_C_COMPILER(${WIND_GNU_BASE}/bin/ccpentium GNU)
+ CMAKE_FORCE_CXX_COMPILER(${WIND_GNU_BASE}/bin/c++pentium GNU)
+ SET (CMAKE_LINKER ${WIND_GNU_BASE}/bin/ldpentium CACHE FILEPATH "vxworks linker")
+ SET (CMAKE_AR ${WIND_GNU_BASE}/bin/arpentium CACHE FILEPATH "vxworks ar")
+ SET (CMAKE_NM ${WIND_UTIL_PATH}/nmpentium CACHE FILEPATH "vxworks nm")
+ SET (CMAKE_STRIP ${WIND_UTIL_PATH}/strippentium CACHE FILEPATH "vxworks strip")
+ SET (CMAKE_OBJCOPY ${WIND_UTIL_PATH}/objcopypentium CACHE FILEPATH "vxworks objcopy")
+ SET (CMAKE_OBJDUMP ${WIND_UTIL_PATH}/objdumppentium CACHE FILEPATH "vxworks objdump")
+ SET (CMAKE_RANLIB ${WIND_GNU_BASE}/bin/ranlibpentium CACHE FILEPATH "vxworks ranlib")
+ SET (CPU_TYPE simlinux)
+endif()
+
+
+
+
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
+SET (CMAKE_EXE_LINKER_FLAGS_INIT -r)
+
+
+SET (VSB_DIR ${WIND_BASE}/target/lib)
+SET (VSB_CONFIG_FILE ${VSB_DIR}/h/config/vsbConfig.h)
+
+
+
+FIND_PROGRAM (SH sh REQUIRED)
+
+
+
+
+
+SET (CMAKE_C_COMPILE_OBJECT
+ "${WIND_ENV} <CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+SET (CMAKE_CXX_COMPILE_OBJECT
+ "${WIND_ENV} <CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+
+#set(LINKER_FLAGS "-mhard-float -fno-implicit-fp -mstrict-align -mregnames -D_WRS_HARDWARE_FP -mrtp -fno-strict-aliasing -fasm -Wall" )
+
+
+#set(LINKER_FLAGS "-mhard-float -fno-implicit-fp -mstrict-align -mregnames -fno-strict-aliasing -fasm -Wall" )
+
+if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+
+
+ SET (CMAKE_C_FLAGS_DEBUG "-g" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
+
+ SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -fstrength-reduce -fno-builtin" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
+
+ SET (CMAKE_C_FLAGS_RELEASE "-O2 -fstrength-reduce -fno-builtin" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
+
+ SET (CC_ARCH_SPEC "-fno-implicit-fp -mstrict-align")
+ SET (NM_FLAG ppc)
+
+elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
+
+ SET (CMAKE_C_FLAGS_DEBUG "-g" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
+
+ SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -fno-defer-pop" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
+
+ SET (CMAKE_C_FLAGS_RELEASE "-O2 -fno-defer-pop" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
+
+ SET (CC_ARCH_SPEC "-mtune=i486 -march=i486")
+ SET (NM_FLAG pentium)
+
+
+elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
+
+ SET (CMAKE_C_FLAGS_DEBUG "-g" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
+
+ SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -fno-defer-pop" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
+
+ SET (CMAKE_C_FLAGS_RELEASE "-O2 -fno-defer-pop" CACHE STRING "")
+ SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
+
+ SET (CC_ARCH_SPEC "-mtune=i486 -march=i486")
+ SET (NM_FLAG pentium)
+
+endif()
+
+if(RTP)
+ #set(CMAKE_EXE_LINKER_FLAGS "${CC_ARCH_SPEC} ${RTP_C_FLAGS} -fno-strict-aliasing -fasm -Wall" )
+ set(CMAKE_EXE_LINKER_FLAGS "${CC_ARCH_SPEC} ${RTP_C_FLAGS} -Xbind-lazy -non-static -fno-strict-aliasing -lstdc++ -fasm -D_WRS_HARDWARE_FP -Wall" )
+else(RTP)
+ if("${VX_VERSION}" STREQUAL "vxworks-6.9")
+ set(CMAKE_PARTICALIMAGE_LINKER_FLAGS "-nostdlib -Wl,-X " )
+ set(CMAKE_EXE_LINKER_FLAGS "-nostdlib -Wl,-X -T ${WIND_BASE}/target/h/tool/gnu/ldscripts/link.OUT " )
+ endif()
+endif()
+
+
+#if(RTP)
+# set(CMAKE_EXE_LINKER_FLAGS "${CC_ARCH_SPEC} ${RTP_C_FLAGS} -fno-strict-aliasing -fasm -Wall" )
+#else(RTP)
+# set(CMAKE_EXE_LINKER_FLAGS "-nostdlib -Wl,-X" )
+#endif()
+
+#SET (CMAKE_C_FLAGS_DEBUG "-O -g1" CACHE STRING "")
+#SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
+
+#SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O -g1 -DNDEBUG" CACHE STRING "")
+#SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
+
+#SET (CMAKE_C_FLAGS_RELEASE "-O -g1 -DNDEBUG" CACHE STRING "")
+#SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
+
+if(RTP)
+INCLUDE_DIRECTORIES (
+ ${VX_VW_BASE}/usr/h
+ ${VX_VW_BASE}/usr/h/wrn/coreip)
+else(RTP)
+INCLUDE_DIRECTORIES (
+ ${VX_VW_BASE}/h
+ ${VX_VW_BASE}/h/wrn/coreip)
+#message(STATUS ${VX_VW_BASE}/h/wrn/coreip)
+endif()
+
+
+
+
+
+
+
+
+
+SET (VXWORKS_C_FLAGS_LIST
+ -DCPU=${VX_CPU} -DVX_CPU_CARD=${VX_CPU_CARD} -DTOOL_FAMILY=${VX_TOOL_FAMILY} -DTOOL=${VX_TOOL} -DCPU_VARIANT=${VX_CPU_VARIANT} -DVXWORKS_MAJOR=${VXWORKS_MAJOR} -DVXWORKS_MINOR=${VXWORKS_MINOR} -DVXWORKS ${VXWORKS_VERSION_FLAG} )
+
+
+# -D_VX_CPU=_VX_${VX_CPU}
+# -D_VX_CPU_FAMILY=_VX_${VX_CPU}
+# -D_VX_TOOL_FAMILY=${VX_TOOL_FAMILY}
+# -D_VX_TOOL=${VX_TOOL}
+# -DCPU_FAMILY=_${CPU_FAMILY}
+# -D_VSB_CONFIG_FILE="${VSB_CONFIG_FILE}"
+# -D_WRS_KERNEL
+# ${CC_ARCH_SPEC}
+# -ansi
+# -mrtp
+
+if(RTP)
+ ADD_DEFINITIONS (${VXWORKS_C_FLAGS_LIST} -Xbind-lazy -non-static)
+else(RTP)
+ ADD_DEFINITIONS (${VXWORKS_C_FLAGS_LIST})
+endif(RTP)
+
+
+
+
+
+
+
+if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ if(RTP)
+ SET (CPU_C_FLAGS_LIST
+ -mlongcall
+ -fstrength-reduce
+ -fno-builtin
+ -te500v2
+ -mcpu=8548
+ -mfloat-gprs=double
+ -mspe=yes
+ -mabi=spe
+ -mstrict-align
+ -fno-implicit-fp
+ ${RTP_C_FLAGS}
+ )
+ else(RTP)
+ SET (CPU_C_FLAGS_LIST
+ ${RTP_C_FLAGS}
+ -D_WRS_KERNEL
+ -mlongcall
+ -fstrength-reduce
+ -fno-builtin
+ -te500v2
+ -mcpu=8548
+ -mfloat-gprs=double
+ -mspe=yes
+ -mabi=spe
+ -mstrict-align
+ -fno-implicit-fp
+ )
+ endif()
+elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
+ SET (CPU_C_FLAGS_LIST
+ -mtune=i486
+ -march=i486
+ -ansi
+ ${RTP_C_FLAGS}
+ )
+elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
+ SET (CPU_C_FLAGS_LIST
+ -mtune=i486
+ -march=i486
+ -ansi
+ ${RTP_C_FLAGS}
+ -D_WRS_KERNEL
+ )
+endif()
+
+ADD_DEFINITIONS (${CPU_C_FLAGS_LIST})
+
+
+
+if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ if(RTP)
+ set(COMMON_DIR sfcommon)
+ else(RTP)
+ set(COMMON_DIR common)
+ endif()
+elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
+ set(COMMON_DIR common)
+elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
+ set(COMMON_DIR common)
+endif()
+
+#link_directories(${WIND_BASE}/target/lib/usr/lib/${VX_CPU_FAMILY}/${CPU}/common)
+
+if(RTP)
+ if("${VX_VERSION}" STREQUAL "vxworks-6.9")
+ link_directories(${WIND_BASE}/target/lib/usr/lib/${VX_CPU_FAMILY}/${VX_CPU}/${COMMON_DIR})
+ else()
+ link_directories(${WIND_BASE}/target/usr/lib/${VX_CPU_FAMILY}/${VX_CPU}/${COMMON_DIR})
+ endif()
+else(RTP)
+ link_directories(${WIND_BASE}/target/lib/${VX_CPU_FAMILY}/${VX_CPU}/${COMMON_DIR})
+endif()
+#link_directories(${WIND_BASE}/target/usr/lib/${VX_CPU_FAMILY}/${VX_CPU}/common)
+#link_directories(${WIND_BASE}/target/lib/${VX_CPU_FAMILY}/${VX_CPU}/e500v2common)
+#link_directories(${WIND_BASE}/target/usr/lib/simpentium/SIMPENTIUM/common)
+
+
+if(RTP)
+ SET (CMAKE_C_LINK_EXECUTABLE
+ "${CMAKE_C_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+ SET (CMAKE_CXX_LINK_EXECUTABLE
+ "${CMAKE_CXX_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+else(RTP)
+ if("${VX_VERSION}" STREQUAL "vxworks-6.9")
+ SET (MUNCH ${WIND_BASE}/host/resource/hutils/tcl/munch.tcl CACHE FILEPATH "munch")
+ SET (TCLSH ${WIND_HOME}/workbench-3.3/foundation/x86-linux2/bin/tclsh CACHE FILEPATH "tclsh")
+ SET (TAGS ${VSB_DIR}/tags/${VX_CPU_FAMILY}/${VX_CPU}/common/dkm.tags CACHE FILEPATH "tags")
+ string(REPLACE ";" " " VXWORKS_C_FLAGS_LIST_STR "${VXWORKS_C_FLAGS_LIST}")
+ SET (RUN_MUNCH_SCRIPT ${CMAKE_SOURCE_DIR}/run_munch_69.sh)
+ SET (CMAKE_C_LINK_EXECUTABLE
+ "${CMAKE_C_COMPILER} ${CMAKE_PARTICALIMAGE_LINKER_FLAGS} -o <TARGET>_partialImage.o <OBJECTS> <LINK_LIBRARIES>"
+ "sh ${RUN_MUNCH_SCRIPT} ${CMAKE_NM} <TARGET>_partialImage.o ${TCLSH} ${MUNCH} ${NM_FLAG} ${TAGS} ctdt.c"
+ "${CMAKE_C_COMPILER} ${CC_ARCH_SPEC} -nostdlib -fno-builtin -fdollars-in-identifiers -Wall ${VXWORKS_C_FLAGS_LIST_STR} -o ctdt.o -c ctdt.c"
+ "${CMAKE_C_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} -o <TARGET> <TARGET>_partialImage.o ctdt.o <LINK_LIBRARIES> -lstdc++"
+ )
+ SET (CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
+ else()
+# SET (TCLSH ${WIND_HOME}/workbench-3.0/foundation/4.1.1/x86-linux2/bin/tclsh CACHE FILEPATH "tclsh")
+ SET (MUNCH ${WIND_BASE}/host/${WIND_HOST_TYPE}/bin/munch CACHE FILEPATH "munch")
+ string(REPLACE ";" " " VXWORKS_C_FLAGS_LIST_STR "${VXWORKS_C_FLAGS_LIST};${CPU_C_FLAGS_LIST}")
+ SET (RUN_MUNCH_SCRIPT ${CMAKE_SOURCE_DIR}/run_munch.sh)
+ SET (CMAKE_C_LINK_EXECUTABLE
+ "${CMAKE_LINKER} <LINK_FLAGS> <CMAKE_CXX_LINK_FLAGS> -warn-common -S <OBJECTS> -o <TARGET>_partialImage.o <LINK_LIBRARIES>"
+ "sh ${RUN_MUNCH_SCRIPT} ${CMAKE_NM} <TARGET>_partialImage.o ${MUNCH} ctdt.c"
+ "${CMAKE_C_COMPILER} ${VXWORKS_C_FLAGS_LIST_STR} -o ctdt.o -c ctdt.c"
+ "${CMAKE_LINKER} <LINK_FLAGS> <CMAKE_CXX_LINK_FLAGS> -S -warn-common -o <TARGET> <TARGET>_partialImage.o ctdt.o "
+ )
+ endif()
+
+
+ SET (CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
+endif(RTP)
+
+
+
+MARK_AS_ADVANCED (CMAKE_LINKER CMAKE_AR CMAKE_NM CMAKE_STRIP
+ CMAKE_OBJCOPY CMAKE_OBJDUMP CMAKE_RANLIB CMAKE_C_FLAGS_DEBUG
+ CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_RELEASE SH MUNCH)
Added: trunk/OpenRTM-aist/examples/Analyzer/Analyzer.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/Analyzer.cpp (rev 0)
+++ trunk/OpenRTM-aist/examples/Analyzer/Analyzer.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,299 @@
+// -*- C++ -*-
+/*!
+ * @file Analyzer.cpp
+ * @brief Clock Analyzer Component
+ * @date $Date$
+ *
+ * @author 宮本 信彦 n-miyamoto at aist.go.jp
+ * 産業技術総合研究所 ロボットイノベーション研究センター
+ * ロボットソフトウエアプラットフォーム研究チーム
+ *
+ * $Id$
+ */
+
+#include "Analyzer.h"
+
+// Module specification
+// <rtc-template block="module_spec">
+static const char* analyzer_spec[] =
+ {
+ "implementation_id", "Analyzer",
+ "type_name", "Analyzer",
+ "description", "Clock Analyzer Component",
+ "version", "1.0.0",
+ "vendor", "AIST",
+ "category", "Test",
+ "activity_type", "PERIODIC",
+ "kind", "DataFlowComponent",
+ "max_instance", "1",
+ "language", "C++",
+ "lang_type", "compile",
+ // Configuration variables
+ "conf.default.outputfile", "test.dat",
+ "conf.default.datalength", "10",
+ "conf.default.sleep_time", "0.1",
+ "conf.default.mode", "const",
+ "conf.default.maxsize", "10000000",
+
+ // Widget
+ "conf.__widget__.outputfile", "text",
+ "conf.__widget__.datalength", "text",
+ "conf.__widget__.sleep_time", "text",
+ "conf.__widget__.mode", "radio",
+ "conf.__widget__.maxsize", "text",
+ // Constraints
+
+ "conf.__type__.outputfile", "string",
+ "conf.__type__.datalength", "long",
+ "conf.__type__.sleep_time", "double",
+ "conf.__type__.mode", "string",
+ "conf.__type__.maxsize", "long",
+
+ ""
+ };
+// </rtc-template>
+
+
+
+DataListener::DataListener(Analyzer *comp) : m_comp(comp)
+{
+
+}
+
+DataListener::~DataListener()
+{
+
+}
+
+
+
+
+/*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+Analyzer::Analyzer(RTC::Manager* manager)
+ // <rtc-template block="initializer">
+ : RTC::DataFlowComponentBase(manager),
+ m_inIn("in", m_in),
+ m_outOut("out", m_out),
+ data_size(0)
+
+ // </rtc-template>
+{
+}
+
+/*!
+ * @brief destructor
+ */
+Analyzer::~Analyzer()
+{
+}
+
+
+
+RTC::ReturnCode_t Analyzer::onInitialize()
+{
+ // Registration: InPort/OutPort/Service
+ // <rtc-template block="registration">
+ // Set InPort buffers
+ addInPort("in", m_inIn);
+ m_inIn.addConnectorDataListener(ON_BUFFER_WRITE,new DataListener(this));
+
+ // Set OutPort buffer
+ addOutPort("out", m_outOut);
+
+ // Set service provider to Ports
+
+ // Set service consumers to Ports
+
+ // Set CORBA Service Ports
+
+ // </rtc-template>
+
+ // <rtc-template block="bind_config">
+ // Bind variables and configuration variable
+ bindParameter("outputfile", m_outputfile, "test.dat");
+ bindParameter("datalength", m_datalength, "10");
+ bindParameter("sleep_time", m_sleep_time, "0.1");
+ bindParameter("mode", m_mode, "const");
+ bindParameter("maxsize", m_maxsize, "10000000");
+ // </rtc-template>
+
+ return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t Analyzer::onFinalize()
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer::onStartup(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer::onShutdown(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+
+RTC::ReturnCode_t Analyzer::onActivated(RTC::UniqueId ec_id)
+{
+ data_size = 0;
+ m_fs.open(m_outputfile.c_str(), std::ios::out);
+ if (!m_fs)
+ {
+ return RTC::RTC_ERROR;
+ }
+ return RTC::RTC_OK;
+}
+
+
+
+RTC::ReturnCode_t Analyzer::onDeactivated(RTC::UniqueId ec_id)
+{
+ if (m_fs)
+ {
+ m_fs.close();
+ }
+ return RTC::RTC_OK;
+}
+
+
+
+RTC::ReturnCode_t Analyzer::onExecute(RTC::UniqueId ec_id)
+{
+ //static int ds = 0;
+ //ds += 10000;
+ coil::TimeValue start(coil::gettimeofday());
+ setTimestamp(m_out);
+ //m_out.data.length(m_datalength+ds);
+ if(m_mode == "const")
+ {
+ m_out.data.length(m_datalength);
+ }
+ else
+ {
+ data_size += m_datalength;
+ if(data_size > m_maxsize)
+ {
+ return RTC::RTC_ERROR;
+ }
+ m_out.data.length(data_size);
+ }
+
+
+ //coil::sleep(coil::TimeValue(m_sleep_time));
+ {
+ coil::Guard<coil::Mutex> guard(m_mu);
+ m_datalist.push_back(m_out);
+ //setTimestamp(m_datalist[m_datalist.size()-1]);
+ //m_out.tm.sec = m_datalist[m_datalist.size()-1].tm.sec;
+ //m_out.tm.nsec = m_datalist[m_datalist.size()-1].tm.nsec;
+ }
+ //std::cout << "Analyzer: " << &m_out << std::endl;
+ //std::cout << "Analyzer: " << m_out.tm.sec << "\t" << m_out.tm.nsec << std::endl;
+ coil::TimeValue end(coil::gettimeofday());
+ double diff = (double)(end - start);
+ //std::cout << "Analyzer: " << m_sleep_time - diff << std::endl;
+ if(diff < m_sleep_time)
+ {
+ coil::sleep(coil::TimeValue(m_sleep_time - diff));
+ }
+
+ //coil::TimeValue start1(coil::gettimeofday());
+ //coil::sleep(coil::TimeValue(0.3));
+ //coil::TimeValue end1(coil::gettimeofday());
+ //std::cout << "Analyzer: " << (double)(end1 - start1) << std::endl;
+ //std::cout << "Analyzer: " << m_sleep_time - (double)(end - start) << std::endl;
+
+ m_outOut.write();
+
+
+ return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t Analyzer::onAborting(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer::onError(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer::onReset(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer::onStateUpdate(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer::onRateChanged(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+
+void Analyzer::writeData(const RTC::TimedOctetSeq &data)
+{
+ //std::cout << "writeData" << std::endl;
+ coil::Guard<coil::Mutex> guard(m_mu);
+ for (std::vector<TimedOctetSeq>::iterator itr = m_datalist.begin(); itr != m_datalist.end(); ) {
+ //std::cout << "writeData: " << data.tm.sec << "\t" << data.tm.nsec << std::endl;
+ //std::cout << "writeData2: " << (*itr).tm.sec << "\t" << (*itr).tm.nsec << std::endl;
+ if (data.tm.nsec == (*itr).tm.nsec && data.tm.sec == (*itr).tm.sec)
+ {
+ coil::TimeValue end(coil::gettimeofday());
+ coil::TimeValue start(data.tm.sec, data.tm.nsec/1000);
+
+ double diff = (double)(end - start);
+ std::cout << diff << std::endl;
+ m_fs << data.data.length() << "\t" << diff << std::endl;
+ itr = m_datalist.erase(itr);
+ }
+ else
+ {
+ ++itr;
+ }
+ }
+
+}
+
+
+extern "C"
+{
+
+ void AnalyzerInit(RTC::Manager* manager)
+ {
+ coil::Properties profile(analyzer_spec);
+ manager->registerFactory(profile,
+ RTC::Create<Analyzer>,
+ RTC::Delete<Analyzer>);
+ }
+
+};
+
+
Added: trunk/OpenRTM-aist/examples/Analyzer/Analyzer.h
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/Analyzer.h (rev 0)
+++ trunk/OpenRTM-aist/examples/Analyzer/Analyzer.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,357 @@
+// -*- C++ -*-
+/*!
+ * @file Analyzer.h
+ * @brief Clock Analyzer Component
+ * @date $Date$
+ *
+ * @author 宮本 信彦 n-miyamoto at aist.go.jp
+ * 産業技術総合研究所 ロボットイノベーション研究センター
+ * ロボットソフトウエアプラットフォーム研究チーム
+ *
+ * $Id$
+ */
+
+#ifndef ANALYZER_H
+#define ANALYZER_H
+
+#include <rtm/idl/BasicDataTypeSkel.h>
+#include <rtm/idl/ExtendedDataTypesSkel.h>
+#include <rtm/idl/InterfaceDataTypesSkel.h>
+
+// Service implementation headers
+// <rtc-template block="service_impl_h">
+
+// </rtc-template>
+
+// Service Consumer stub headers
+// <rtc-template block="consumer_stub_h">
+
+// </rtc-template>
+
+// Service Consumer stub headers
+// <rtc-template block="port_stub_h">
+// </rtc-template>
+
+#include <rtm/Manager.h>
+#include <rtm/DataFlowComponentBase.h>
+#include <rtm/CorbaPort.h>
+#include <rtm/DataInPort.h>
+#include <rtm/DataOutPort.h>
+
+#include <vector>
+#include <fstream>
+
+using namespace RTC;
+
+
+class Analyzer;
+
+
+
+
+
+
+/*!
+ * @class Analyzer
+ * @brief Clock Analyzer Component
+ *
+ * 時間計測用RTC
+ *
+ */
+class Analyzer
+ : public RTC::DataFlowComponentBase
+{
+ public:
+ /*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+ Analyzer(RTC::Manager* manager);
+
+ /*!
+ * @brief destructor
+ */
+ ~Analyzer();
+
+ // <rtc-template block="public_attribute">
+
+ // </rtc-template>
+
+ // <rtc-template block="public_operation">
+
+ // </rtc-template>
+
+ /***
+ *
+ * The initialize action (on CREATED->ALIVE transition)
+ * formaer rtc_init_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual RTC::ReturnCode_t onInitialize();
+
+ /***
+ *
+ * The finalize action (on ALIVE->END transition)
+ * formaer rtc_exiting_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onFinalize();
+
+ /***
+ *
+ * The startup action when ExecutionContext startup
+ * former rtc_starting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The shutdown action when ExecutionContext stop
+ * former rtc_stopping_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The activated action (Active state entry action)
+ * former rtc_active_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The deactivated action (Active state exit action)
+ * former rtc_active_exit()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The execution action that is invoked periodically
+ * former rtc_active_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The aborting action when main logic error occurred.
+ * former rtc_aborting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The error action in ERROR state
+ * former rtc_error_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The reset action that is invoked resetting
+ * This is same but different the former rtc_init_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The state update action that is invoked after onExecute() action
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
+ void writeData(const RTC::TimedOctetSeq &data);
+
+ protected:
+ // <rtc-template block="protected_attribute">
+
+ // </rtc-template>
+
+ // <rtc-template block="protected_operation">
+
+ // </rtc-template>
+
+ // Configuration variable declaration
+ // <rtc-template block="config_declare">
+ /*!
+ * 出力ファイル名
+ * - Name: outputfile outputfile
+ * - DefaultValue: test.dat
+ */
+ std::string m_outputfile;
+ /*!
+ * データ長さ
+ * - Name: datalength datalength
+ * - DefaultValue: 10
+ */
+ int m_datalength;
+ /*!
+ * 内部で待機する時間
+ * - Name: sleep_time sleep_time
+ * - DefaultValue: 0.01
+ */
+ double m_sleep_time;
+ /*!
+ * 通信データ量を一定値(const)にするか、徐々に増加する値(increase)にするかの設定
+ * - Name: mode mode
+ * - DefaultValue: const
+ */
+ std::string m_mode;
+ /*!
+ * 通信データ量を徐々に増やすモードの場合最大データサイズ
+ * これを超えるとエラー状態に遷移
+ * - Name: maxsize maxsize
+ * - DefaultValue: 10000000
+ */
+ long m_maxsize;
+
+ // </rtc-template>
+
+ // DataInPort declaration
+ // <rtc-template block="inport_declare">
+ RTC::TimedOctetSeq m_in;
+ /*!
+ * インポートにデータが入力された時間をファイルに記録
+ */
+ InPort<RTC::TimedOctetSeq> m_inIn;
+
+ // </rtc-template>
+
+
+ // DataOutPort declaration
+ // <rtc-template block="outport_declare">
+ RTC::TimedOctetSeq m_out;
+ /*!
+ * アウトポートからデータを出力した時間をファイルに記録
+ */
+ OutPort<RTC::TimedOctetSeq> m_outOut;
+
+ // </rtc-template>
+
+ // CORBA Port declaration
+ // <rtc-template block="corbaport_declare">
+
+ // </rtc-template>
+
+ // Service declaration
+ // <rtc-template block="service_declare">
+
+ // </rtc-template>
+
+ // Consumer declaration
+ // <rtc-template block="consumer_declare">
+
+ // </rtc-template>
+
+
+
+ private:
+ std::ofstream m_fs;
+ std::vector<RTC::TimedOctetSeq> m_datalist;
+ coil::Mutex m_mu;
+ int data_size;
+ // <rtc-template block="private_attribute">
+
+ // </rtc-template>
+
+ // <rtc-template block="private_operation">
+
+ // </rtc-template>
+
+};
+
+class DataListener
+ : public ConnectorDataListenerT<RTC::TimedOctetSeq>
+{
+public:
+ DataListener(Analyzer *comp);
+ virtual ~DataListener();
+
+ virtual void operator()(const ConnectorInfo& info,
+ const TimedOctetSeq& data)
+ {
+ m_comp->writeData(data);
+ }
+ Analyzer *m_comp;
+
+};
+
+
+extern "C"
+{
+ DLL_EXPORT void AnalyzerInit(RTC::Manager* manager);
+};
+
+#endif // ANALYZER_H
Added: trunk/OpenRTM-aist/examples/Analyzer/AnalyzerComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/AnalyzerComp.cpp (rev 0)
+++ trunk/OpenRTM-aist/examples/Analyzer/AnalyzerComp.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,118 @@
+// -*- C++ -*-
+/*!
+ * @file AnalyzerComp.cpp
+ * @brief Standalone component
+ * @date $Date$
+ *
+ * @author 宮本 信彦 n-miyamoto at aist.go.jp
+ * 産業技術総合研究所 ロボットイノベーション研究センター
+ * ロボットソフトウエアプラットフォーム研究チーム
+ *
+ * $Id$
+ */
+
+#include <rtm/Manager.h>
+#include <iostream>
+#include <string>
+#include <stdlib.h>
+#include "Analyzer.h"
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int analyzer_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ AnalyzerInit(manager);
+ comp = manager->createComponent("Analyzer");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+void MyModuleInit(RTC::Manager* manager)
+{
+ AnalyzerInit(manager);
+ RTC::RtcBase* comp;
+
+ // Create a component
+ comp = manager->createComponent("Analyzer");
+
+ if (comp==NULL)
+ {
+ std::cerr << "Component create failed." << std::endl;
+ abort();
+ }
+
+ // Example
+ // The following procedure is examples how handle RT-Components.
+ // These should not be in this function.
+
+ // Get the component's object reference
+// RTC::RTObject_var rtobj;
+// rtobj = RTC::RTObject::_narrow(manager->getPOA()->servant_to_reference(comp));
+
+ // Get the port list of the component
+// PortServiceList* portlist;
+// portlist = rtobj->get_ports();
+
+ // getting port profiles
+// std::cout << "Number of Ports: ";
+// std::cout << portlist->length() << std::endl << std::endl;
+// for (CORBA::ULong i(0), n(portlist->length()); i < n; ++i)
+// {
+// PortService_ptr port;
+// port = (*portlist)[i];
+// std::cout << "Port" << i << " (name): ";
+// std::cout << port->get_port_profile()->name << std::endl;
+//
+// RTC::PortInterfaceProfileList iflist;
+// iflist = port->get_port_profile()->interfaces;
+// std::cout << "---interfaces---" << std::endl;
+// for (CORBA::ULong i(0), n(iflist.length()); i < n; ++i)
+// {
+// std::cout << "I/F name: ";
+// std::cout << iflist[i].instance_name << std::endl;
+// std::cout << "I/F type: ";
+// std::cout << iflist[i].type_name << std::endl;
+// const char* pol;
+// pol = iflist[i].polarity == 0 ? "PROVIDED" : "REQUIRED";
+// std::cout << "Polarity: " << pol << std::endl;
+// }
+// std::cout << "---properties---" << std::endl;
+// NVUtil::dump(port->get_port_profile()->properties);
+// std::cout << "----------------" << std::endl << std::endl;
+// }
+
+ return;
+}
+
+int main (int argc, char** argv)
+{
+ RTC::Manager* manager;
+ manager = RTC::Manager::init(argc, argv);
+
+ // Initialize manager
+ manager->init(argc, argv);
+
+ // Set module initialization proceduer
+ // This procedure will be invoked in activateManager() function.
+ manager->setModuleInitProc(MyModuleInit);
+
+ // Activate manager and register to naming service
+ manager->activateManager();
+
+ // run the manager in blocking mode
+ // runManager(false) is the default.
+ manager->runManager();
+
+ // If you want to run the manager in non-blocking mode, do like this
+ // manager->runManager(true);
+
+ return 0;
+}
+#endif
Added: trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp (rev 0)
+++ trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,210 @@
+// -*- C++ -*-
+/*!
+ * @file Analyzer_test.cpp
+ * @brief Clock Analyzer test
+ * @date $Date$
+ *
+ * @author 宮本 信彦 n-miyamoto at aist.go.jp
+ * 産業技術総合研究所 ロボットイノベーション研究センター
+ * ロボットソフトウエアプラットフォーム研究チーム
+ *
+ * $Id$
+ */
+
+#include "Analyzer_test.h"
+
+// Module specification
+// <rtc-template block="module_spec">
+static const char* analyzer_test_spec[] =
+ {
+ "implementation_id", "Analyzer_test",
+ "type_name", "Analyzer_test",
+ "description", "Clock Analyzer test",
+ "version", "1.0.0",
+ "vendor", "AIST",
+ "category", "Test",
+ "activity_type", "PERIODIC",
+ "kind", "DataFlowComponent",
+ "max_instance", "1",
+ "language", "C++",
+ "lang_type", "compile",
+ // Configuration variables
+ "conf.default.sleep_time", "0.1",
+
+ // Widget
+ "conf.__widget__.sleep_time", "text",
+ // Constraints
+
+ "conf.__type__.sleep_time", "double",
+
+ ""
+ };
+// </rtc-template>
+
+/*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+Analyzer_test::Analyzer_test(RTC::Manager* manager)
+ // <rtc-template block="initializer">
+ : RTC::DataFlowComponentBase(manager),
+ m_inIn("in", m_in),
+ m_outOut("out", m_out)
+
+ // </rtc-template>
+{
+}
+
+/*!
+ * @brief destructor
+ */
+Analyzer_test::~Analyzer_test()
+{
+}
+
+
+
+RTC::ReturnCode_t Analyzer_test::onInitialize()
+{
+ // Registration: InPort/OutPort/Service
+ // <rtc-template block="registration">
+ // Set InPort buffers
+ addInPort("in", m_inIn);
+
+ // Set OutPort buffer
+ addOutPort("out", m_outOut);
+
+ // Set service provider to Ports
+
+ // Set service consumers to Ports
+
+ // Set CORBA Service Ports
+
+ // </rtc-template>
+
+ // <rtc-template block="bind_config">
+ // Bind variables and configuration variable
+ bindParameter("sleep_time", m_sleep_time, "0.1");
+ // </rtc-template>
+
+ return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t Analyzer_test::onFinalize()
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onStartup(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onShutdown(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onActivated(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onDeactivated(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+
+RTC::ReturnCode_t Analyzer_test::onExecute(RTC::UniqueId ec_id)
+{
+ if (m_inIn.isNew())
+ {
+ coil::TimeValue start(coil::gettimeofday());
+ //coil::TimeValue start1(coil::gettimeofday());
+ m_inIn.read();
+ //std::cout << "Analyzer_test: " << &m_in << std::endl;
+ //coil::TimeValue start2(coil::gettimeofday());
+ m_out = m_in;
+ //coil::TimeValue start3(coil::gettimeofday());
+ //coil::sleep(coil::TimeValue(m_sleep_time));
+ //coil::TimeValue end(coil::gettimeofday());
+ //std::cout << double(end-start1) << "\t" << double(end-start2) << "\t" << double(end-start3) << std::endl;
+ coil::TimeValue end(coil::gettimeofday());
+ double diff = (double)(end - start);
+ //std::cout << "Analyzer_test: " << m_sleep_time - diff << std::endl;
+ if(diff < m_sleep_time)
+ {
+ coil::sleep(coil::TimeValue(m_sleep_time - diff));
+ }
+ //std::cout << "Analyzer_test: " << m_sleep_time - (double)(end - start) << std::endl;
+
+ //std::cout << double(start3-start2) << std::endl;
+ m_outOut.write();
+ //std::cout << "Analyzer_test" << std::endl;
+ //std::cout << "Analyzer_test: " << m_out.tm.sec << "\t" << m_out.tm.nsec << std::endl;
+ }
+ return RTC::RTC_OK;
+}
+
+/*
+RTC::ReturnCode_t Analyzer_test::onAborting(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onError(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onReset(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onStateUpdate(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+/*
+RTC::ReturnCode_t Analyzer_test::onRateChanged(RTC::UniqueId ec_id)
+{
+ return RTC::RTC_OK;
+}
+*/
+
+
+
+extern "C"
+{
+
+ void Analyzer_testInit(RTC::Manager* manager)
+ {
+ coil::Properties profile(analyzer_test_spec);
+ manager->registerFactory(profile,
+ RTC::Create<Analyzer_test>,
+ RTC::Delete<Analyzer_test>);
+ }
+
+};
+
+
Added: trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.h
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.h (rev 0)
+++ trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,302 @@
+// -*- C++ -*-
+/*!
+ * @file Analyzer_test.h
+ * @brief Clock Analyzer test
+ * @date $Date$
+ *
+ * @author 宮本 信彦 n-miyamoto at aist.go.jp
+ * 産業技術総合研究所 ロボットイノベーション研究センター
+ * ロボットソフトウエアプラットフォーム研究チーム
+ *
+ * $Id$
+ */
+
+#ifndef ANALYZER_TEST_H
+#define ANALYZER_TEST_H
+
+#include <rtm/idl/BasicDataTypeSkel.h>
+#include <rtm/idl/ExtendedDataTypesSkel.h>
+#include <rtm/idl/InterfaceDataTypesSkel.h>
+
+// Service implementation headers
+// <rtc-template block="service_impl_h">
+
+// </rtc-template>
+
+// Service Consumer stub headers
+// <rtc-template block="consumer_stub_h">
+
+// </rtc-template>
+
+// Service Consumer stub headers
+// <rtc-template block="port_stub_h">
+// </rtc-template>
+
+#include <rtm/Manager.h>
+#include <rtm/DataFlowComponentBase.h>
+#include <rtm/CorbaPort.h>
+#include <rtm/DataInPort.h>
+#include <rtm/DataOutPort.h>
+
+using namespace RTC;
+
+/*!
+ * @class Analyzer_test
+ * @brief Clock Analyzer test
+ *
+ * 時間計測用RTCと接続した個数分通信、処理時間を追加できるRTC
+ *
+ */
+class Analyzer_test
+ : public RTC::DataFlowComponentBase
+{
+ public:
+ /*!
+ * @brief constructor
+ * @param manager Maneger Object
+ */
+ Analyzer_test(RTC::Manager* manager);
+
+ /*!
+ * @brief destructor
+ */
+ ~Analyzer_test();
+
+ // <rtc-template block="public_attribute">
+
+ // </rtc-template>
+
+ // <rtc-template block="public_operation">
+
+ // </rtc-template>
+
+ /***
+ *
+ * The initialize action (on CREATED->ALIVE transition)
+ * formaer rtc_init_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual RTC::ReturnCode_t onInitialize();
+
+ /***
+ *
+ * The finalize action (on ALIVE->END transition)
+ * formaer rtc_exiting_entry()
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onFinalize();
+
+ /***
+ *
+ * The startup action when ExecutionContext startup
+ * former rtc_starting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The shutdown action when ExecutionContext stop
+ * former rtc_stopping_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The activated action (Active state entry action)
+ * former rtc_active_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The deactivated action (Active state exit action)
+ * former rtc_active_exit()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The execution action that is invoked periodically
+ * former rtc_active_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The aborting action when main logic error occurred.
+ * former rtc_aborting_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The error action in ERROR state
+ * former rtc_error_do()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The reset action that is invoked resetting
+ * This is same but different the former rtc_init_entry()
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The state update action that is invoked after onExecute() action
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
+
+ /***
+ *
+ * The action that is invoked when execution context's rate is changed
+ * no corresponding operation exists in OpenRTm-aist-0.2.0
+ *
+ * @param ec_id target ExecutionContext Id
+ *
+ * @return RTC::ReturnCode_t
+ *
+ *
+ */
+ // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
+
+
+ protected:
+ // <rtc-template block="protected_attribute">
+
+ // </rtc-template>
+
+ // <rtc-template block="protected_operation">
+
+ // </rtc-template>
+
+ // Configuration variable declaration
+ // <rtc-template block="config_declare">
+ /*!
+ * sleep_time
+ * - Name: sleep_time sleep_time
+ * - DefaultValue: 0.01
+ * - Unit: s
+ */
+ double m_sleep_time;
+
+ // </rtc-template>
+
+ // DataInPort declaration
+ // <rtc-template block="inport_declare">
+ RTC::TimedOctetSeq m_in;
+ /*!
+ * データ入力ポート
+ * - Type: RTC::TimedOctetSeq
+ */
+ InPort<RTC::TimedOctetSeq> m_inIn;
+
+ // </rtc-template>
+
+
+ // DataOutPort declaration
+ // <rtc-template block="outport_declare">
+ RTC::TimedOctetSeq m_out;
+ /*!
+ * 入力データをタイムスタンプも含めてそのまま出力する
+ * - Type: RTC::TimedOctetSeq
+ */
+ OutPort<RTC::TimedOctetSeq> m_outOut;
+
+ // </rtc-template>
+
+ // CORBA Port declaration
+ // <rtc-template block="corbaport_declare">
+
+ // </rtc-template>
+
+ // Service declaration
+ // <rtc-template block="service_declare">
+
+ // </rtc-template>
+
+ // Consumer declaration
+ // <rtc-template block="consumer_declare">
+
+ // </rtc-template>
+
+ private:
+ // <rtc-template block="private_attribute">
+
+ // </rtc-template>
+
+ // <rtc-template block="private_operation">
+
+ // </rtc-template>
+
+};
+
+
+extern "C"
+{
+ DLL_EXPORT void Analyzer_testInit(RTC::Manager* manager);
+};
+
+#endif // ANALYZER_TEST_H
Added: trunk/OpenRTM-aist/examples/Analyzer/Analyzer_testComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/Analyzer_testComp.cpp (rev 0)
+++ trunk/OpenRTM-aist/examples/Analyzer/Analyzer_testComp.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,120 @@
+// -*- C++ -*-
+/*!
+ * @file Analyzer_testComp.cpp
+ * @brief Standalone component
+ * @date $Date$
+ *
+ * @author 宮本 信彦 n-miyamoto at aist.go.jp
+ * 産業技術総合研究所 ロボットイノベーション研究センター
+ * ロボットソフトウエアプラットフォーム研究チーム
+ *
+ * $Id$
+ */
+
+#include <rtm/Manager.h>
+#include <iostream>
+#include <string>
+#include <stdlib.h>
+#include "Analyzer_test.h"
+
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int analyzer_test_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ Analyzer_testInit(manager);
+ comp = manager->createComponent("Analyzer_test");
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+void MyModuleInit(RTC::Manager* manager)
+{
+ Analyzer_testInit(manager);
+ RTC::RtcBase* comp;
+
+ // Create a component
+ comp = manager->createComponent("Analyzer_test");
+
+ if (comp==NULL)
+ {
+ std::cerr << "Component create failed." << std::endl;
+ abort();
+ }
+
+ // Example
+ // The following procedure is examples how handle RT-Components.
+ // These should not be in this function.
+
+ // Get the component's object reference
+// RTC::RTObject_var rtobj;
+// rtobj = RTC::RTObject::_narrow(manager->getPOA()->servant_to_reference(comp));
+
+ // Get the port list of the component
+// PortServiceList* portlist;
+// portlist = rtobj->get_ports();
+
+ // getting port profiles
+// std::cout << "Number of Ports: ";
+// std::cout << portlist->length() << std::endl << std::endl;
+// for (CORBA::ULong i(0), n(portlist->length()); i < n; ++i)
+// {
+// PortService_ptr port;
+// port = (*portlist)[i];
+// std::cout << "Port" << i << " (name): ";
+// std::cout << port->get_port_profile()->name << std::endl;
+//
+// RTC::PortInterfaceProfileList iflist;
+// iflist = port->get_port_profile()->interfaces;
+// std::cout << "---interfaces---" << std::endl;
+// for (CORBA::ULong i(0), n(iflist.length()); i < n; ++i)
+// {
+// std::cout << "I/F name: ";
+// std::cout << iflist[i].instance_name << std::endl;
+// std::cout << "I/F type: ";
+// std::cout << iflist[i].type_name << std::endl;
+// const char* pol;
+// pol = iflist[i].polarity == 0 ? "PROVIDED" : "REQUIRED";
+// std::cout << "Polarity: " << pol << std::endl;
+// }
+// std::cout << "---properties---" << std::endl;
+// NVUtil::dump(port->get_port_profile()->properties);
+// std::cout << "----------------" << std::endl << std::endl;
+// }
+
+ return;
+}
+
+int main (int argc, char** argv)
+{
+ RTC::Manager* manager;
+ manager = RTC::Manager::init(argc, argv);
+
+ // Initialize manager
+ manager->init(argc, argv);
+
+ // Set module initialization proceduer
+ // This procedure will be invoked in activateManager() function.
+ manager->setModuleInitProc(MyModuleInit);
+
+ // Activate manager and register to naming service
+ manager->activateManager();
+
+ // run the manager in blocking mode
+ // runManager(false) is the default.
+ manager->runManager();
+
+ // If you want to run the manager in non-blocking mode, do like this
+ // manager->runManager(true);
+
+ return 0;
+}
+
+#endif
Added: trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,98 @@
+cmake_minimum_required (VERSION 2.6)
+
+project (Analyzer)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+
+set(target Analyzer)
+
+set(srcs Analyzer.cpp Analyzer.h)
+set(standalone_srcs AnalyzerComp.cpp ${srcs})
+
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+set(target Analyzer_test)
+
+set(srcs Analyzer_test.cpp Analyzer_test.h)
+set(standalone_srcs Analyzer_testComp.cpp ${srcs})
+
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
Modified: trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,9 +1,9 @@
-set(idl_name AutoTestService)
+cmake_minimum_required (VERSION 2.6)
+project (AutoTest)
+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)
@@ -18,11 +18,110 @@
add_custom_target(${idl_name}_TGT DEPENDS ${idl_name}Skel.cpp ${idl_name}Stub.cpp)
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ ${${idl_name}_DIR}
+ )
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
-add_subdirectory(AutoTestOut)
-add_subdirectory(AutoTestIn)
+set(target AutoTestIn)
+set(srcs AutoTestIn.cpp AutoTestIn.h AutoTestServiceSVC_impl.cpp AutoTestServiceSVC_impl.h ${${idl_name}_SKEL})
+set(standalone_srcs AutoTestInComp.cpp ${srcs})
+
+
+
+
+
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+ add_dependencies(${target}Comp ${idl_name}_TGT)
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+set_source_files_properties(${${idl_name}_SKEL} PROPERTIES GENERATED 1)
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+set(target AutoTestOut)
+
+
+set(srcs AutoTestOut.cpp AutoTestOut.h ${${idl_name}_STUB})
+set(standalone_srcs AutoTestOutComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+ add_dependencies(${target}Comp ${idl_name}_TGT)
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+set_source_files_properties(${${idl_name}_STUB} PROPERTIES GENERATED 1)
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
Modified: trunk/OpenRTM-aist/examples/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -6,4 +6,7 @@
add_subdirectory(SimpleService)
#add_subdirectory(StringIO)
add_subdirectory(ConfigSample)
+add_subdirectory(Composite)
+add_subdirectory(Analyzer)
+#add_subdirectory(FileTest)
Modified: trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,6 +1,164 @@
-add_subdirectory(Composite)
-add_subdirectory(Controller)
-add_subdirectory(Motor)
-add_subdirectory(Sensor)
+cmake_minimum_required (VERSION 2.6)
+project (Composite)
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+set(target CompositeComp)
+
+set(srcs Composite.cpp)
+set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+
+
+
+add_executable(${target} ${srcs})
+target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+install(TARGETS ${target} RUNTIME DESTINATION examples)
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+
+
+
+
+
+set(target Controller)
+
+set(srcs Controller.cpp Controller.h)
+set(standalone_srcs ControllerComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+set(target Motor)
+
+set(srcs Motor.cpp Motor.h)
+set(standalone_srcs MotorComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+set(target Sensor)
+
+set(srcs Sensor.cpp Sensor.h)
+set(standalone_srcs SensorComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
Modified: trunk/OpenRTM-aist/examples/Composite/Composite.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Composite/Composite.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/Composite/Composite.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -17,9 +17,29 @@
#include <iostream>
#include <rtm/Manager.h>
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int composite_main (char* arg1, char* arg2, char* arg3,
+ char* arg4, char* arg5, char* arg6,
+ char* arg7, char* arg8, char* arg9)
+{
+ int argc = 0;
+ char* argv[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ argv[argc++] = "rtcd";
+ if (arg1 != 0 && *arg1 != 0) argv[argc++] = arg1; else goto End_Args;
+ if (arg2 != 0 && *arg2 != 0) argv[argc++] = arg2; else goto End_Args;
+ if (arg3 != 0 && *arg3 != 0) argv[argc++] = arg3; else goto End_Args;
+ if (arg4 != 0 && *arg4 != 0) argv[argc++] = arg4; else goto End_Args;
+ if (arg5 != 0 && *arg5 != 0) argv[argc++] = arg5; else goto End_Args;
+ if (arg6 != 0 && *arg6 != 0) argv[argc++] = arg6; else goto End_Args;
+ if (arg7 != 0 && *arg7 != 0) argv[argc++] = arg7; else goto End_Args;
+ if (arg8 != 0 && *arg8 != 0) argv[argc++] = arg8; else goto End_Args;
+ if (arg9 != 0 && *arg9 != 0) argv[argc++] = arg9; else goto End_Args;
+End_Args:
+#else
int main (int argc, char** argv)
{
+#endif
RTC::Manager* manager;
manager = RTC::Manager::init(argc, argv);
Modified: trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,5 +1,6 @@
cmake_minimum_required (VERSION 2.6)
-project (ConfigSample)
+set(target ConfigSample)
+project (${target})
link_directories(${ORB_LINK_DIR})
@@ -13,17 +14,39 @@
-set(srcs ConfigSampleComp.cpp ConfigSample.cpp ConfigSample.h)
+set(srcs ConfigSample.cpp ConfigSample.h)
+set(standalone_srcs ConfigSampleComp.cpp ${srcs})
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
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)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
endif(RTP)
endif(VXWORKS)
-
-add_executable(ConfigSample ${srcs})
-target_link_libraries(ConfigSample ${libs})
-add_dependencies(ConfigSample rtm)
Modified: trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,2 +1,118 @@
-add_subdirectory(ConsoleInEx)
-add_subdirectory(ConsoleOutEx)
+cmake_minimum_required (VERSION 2.6)
+
+project (ExtTrigger)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+set(target ConsoleInEx)
+
+set(srcs ConsoleIn.cpp ConsoleIn.h)
+set(standalone_srcs ConsoleInComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+set(target ConsoleOutEx)
+
+set(srcs ConsoleOut.cpp ConsoleOut.h)
+set(standalone_srcs ConsoleOutComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+
+
+set(target ConnectorCompEx)
+
+
+set(srcs ConnectorComp.cpp)
+
+if(VXWORKS AND NOT RTP)
+
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+
+endif()
+
+
Modified: trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,5 +1,6 @@
cmake_minimum_required (VERSION 2.6)
-project (HelloRTWorld)
+set(target HelloRTWorld)
+project (${target})
link_directories(${ORB_LINK_DIR})
@@ -13,17 +14,39 @@
-set(srcs HelloRTWorldComp.cpp HelloRTWorld.cpp HelloRTWorld.h)
+set(srcs HelloRTWorld.cpp HelloRTWorld.h)
+set(standalone_srcs HelloRTWorldComp.cpp ${srcs})
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
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)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
endif(RTP)
endif(VXWORKS)
-
-add_executable(HelloRTWorld ${srcs})
-target_link_libraries(HelloRTWorld ${libs})
-add_dependencies(HelloRTWorld rtm)
Modified: trunk/OpenRTM-aist/examples/HelloWorld/HelloRTWorldComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/HelloWorld/HelloRTWorldComp.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/HelloWorld/HelloRTWorldComp.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -14,6 +14,26 @@
#include "HelloRTWorld.h"
+
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+int hellortworld_main()
+{
+ RTC::Manager* manager = &RTC::Manager::instance();
+ RTC::RtcBase* comp;
+ HelloRTWorldInit(manager);
+ std::string name;
+ comp = manager->createComponent("HelloRTWorld", "example", name);
+ if(comp)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+#else
+
void MyModuleInit(RtcManager* manager)
{
HelloRTWorldInit(manager);
@@ -41,3 +61,5 @@
return 0;
}
+#endif
+
Modified: trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,4 +1,97 @@
-add_subdirectory(SeqIn)
-add_subdirectory(SeqOut)
+cmake_minimum_required (VERSION 2.6)
+project (SeqIO)
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+set(target SeqIn)
+
+set(srcs SeqIn.cpp SeqIn.h)
+set(standalone_srcs SeqInComp.cpp ${srcs})
+
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+ add_dependencies(${target}Comp ${idl_name}_TGT)
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+set(target SeqOut)
+
+
+set(srcs SeqOut.cpp SeqOut.h)
+set(standalone_srcs SeqOutComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
Modified: trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,2 +1,94 @@
-add_subdirectory(ConsoleIn)
-add_subdirectory(ConsoleOut)
+cmake_minimum_required (VERSION 2.6)
+
+project (SimpleIO)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+set(target ConsoleIn)
+
+set(srcs ConsoleIn.cpp ConsoleIn.h)
+set(standalone_srcs ConsoleInComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+set(target ConsoleOut)
+
+
+
+set(srcs ConsoleOut.cpp ConsoleOut.h)
+set(standalone_srcs ConsoleOutComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -99,7 +99,13 @@
RTC::ReturnCode_t ConsoleIn::onExecute(RTC::UniqueId ec_id)
{
std::cout << "Please input number: ";
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+ static int count = 0;
+ m_out.data = count;
+ count++;
+#else
std::cin >> m_out.data;
+#endif
if (m_out.data == 666) return RTC::RTC_ERROR;
m_outOut.write();
@@ -121,3 +127,4 @@
};
+
Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.h
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.h 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConsoleIn.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -180,3 +180,4 @@
};
#endif // CONSOLEIN_H
+
Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConsoleInComp.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -96,6 +96,7 @@
int main (int argc, char** argv)
{
RTC::Manager* manager;
+
manager = RTC::Manager::init(argc, argv);
// Set module initialization proceduer
Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -127,3 +127,4 @@
};
+
Modified: trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.h
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.h 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleIO/ConsoleOut.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -180,3 +180,4 @@
};
#endif // CONSOLEOUT_H
+
Modified: trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,3 +1,9 @@
+cmake_minimum_required (VERSION 2.6)
+
+project (SimpleService)
+
+
+
set(idl_name MyService)
@@ -20,8 +26,108 @@
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ ${${idl_name}_DIR}
+ )
-add_subdirectory(MyServiceConsumer)
-add_subdirectory(MyServiceProvider)
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+set(target MyServiceConsumer)
+
+set(srcs MyServiceConsumer.cpp MyServiceConsumer.h ${${idl_name}_STUB})
+set(standalone_srcs MyServiceConsumerComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+ add_dependencies(${target}Comp ${idl_name}_TGT)
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+set_source_files_properties(${${idl_name}_STUB} PROPERTIES GENERATED 1)
+
+
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+
+
+set(target MyServiceProvider)
+
+
+
+set(srcs MyServiceProvider.cpp MyServiceProvider.h MyServiceSVC_impl.cpp MyServiceSVC_impl.h ${${idl_name}_SKEL})
+set(standalone_srcs MyServiceProviderComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+ add_dependencies(${target}Comp ${idl_name}_TGT)
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ add_dependencies(${target} ${idl_name}_TGT)
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+set_source_files_properties(${${idl_name}_SKEL} PROPERTIES GENERATED 1)
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
Modified: trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumer.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumer.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/SimpleService/MyServiceConsumer.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -119,7 +119,11 @@
std::string args;
std::string::size_type pos;
std::vector<std::string> argv;
+#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+ args = "echo test";
+#else
std::getline(std::cin, args);
+#endif
pos = args.find_first_of(" ");
if (pos != std::string::npos)
Modified: trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,3 +1,91 @@
-add_subdirectory(StringIn)
-add_subdirectory(StringOut)
+cmake_minimum_required (VERSION 2.6)
+project (StringIO)
+
+
+link_directories(${ORB_LINK_DIR})
+include_directories(
+ ${RTM_INCLUDE_DIR}
+ ${ORB_INCLUDE_DIR}
+ )
+
+ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+
+
+set(target StringIn)
+
+set(srcs StringIn.cpp StringIn.h)
+set(standalone_srcs StringInComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+set(target StringOut)
+
+
+set(srcs StringOut.cpp StringOut.h)
+set(standalone_srcs StringOutComp.cpp ${srcs})
+
+if(VXWORKS AND NOT RTP)
+ set(standalone_srcs ${standalone_srcs} ${CMAKE_SOURCE_DIR}/src/lib/rtm/DataFlowComponentBase.cpp)
+ set(libs ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target} ${standalone_srcs})
+ target_link_libraries(${target} ${libs})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+else()
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+ add_executable(${target}Comp ${standalone_srcs})
+ target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
+
+ add_library(${target} SHARED ${srcs})
+ target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+ add_dependencies(${target} ${RTM_PROJECT_NAME})
+ set_target_properties(${target} PROPERTIES PREFIX "")
+
+ install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+endif()
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target}Comp PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
Added: trunk/OpenRTM-aist/run_munch.sh
===================================================================
--- trunk/OpenRTM-aist/run_munch.sh (rev 0)
+++ trunk/OpenRTM-aist/run_munch.sh 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+NM=$1
+TARGET_NAME=$2
+#TCLSH=$3
+MUNCH=$3
+#NM_FLAG=$5
+#TAGS=$6
+OUTPUT=$4
+
+#export WIND_BASE=/home/openrtm/vxworks-6.6-linux/vxworks-6.6
+#export WIND_HOST_TYPE=x86-linux2
+#/home/openrtm/vxworks-6.6-linux/gnu/4.1.2-vxworks-6.6/x86-linux2/bin/nmppc ConsoleIn_partialImage.o | /home/openrtm/vxworks-6.6-linux/vxworks-6.6/host/x86-linux2/bin/munch > ctdt.c
+
+#echo "$NM $TARGET_NAME | $TCLSH $MUNCH -c $NM_FLAG -tags $TAGS > $OUTPUT"
+#$NM $TARGET_NAME | tclsh $MUNCH > $OUTPUT
+$NM $TARGET_NAME | $MUNCH > $OUTPUT
Added: trunk/OpenRTM-aist/run_munch_69.sh
===================================================================
--- trunk/OpenRTM-aist/run_munch_69.sh (rev 0)
+++ trunk/OpenRTM-aist/run_munch_69.sh 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+NM=$1
+TARGET_NAME=$2
+TCLSH=$3
+MUNCH=$4
+NM_FLAG=$5
+TAGS=$6
+OUTPUT=$7
+
+
+#echo "$NM $TARGET_NAME | $TCLSH $MUNCH -c $NM_FLAG -tags $TAGS > $OUTPUT"
+$NM $TARGET_NAME | $TCLSH $MUNCH -c $NM_FLAG -tags $TAGS > $OUTPUT
Added: trunk/OpenRTM-aist/src/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/CMakeLists.txt (rev 0)
+++ trunk/OpenRTM-aist/src/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -0,0 +1,5 @@
+cmake_minimum_required (VERSION 2.6)
+
+add_subdirectory(lib)
+
+set(RTM_INCLUDE_DIR ${RTM_INCLUDE_DIR} PARENT_SCOPE)
Modified: trunk/OpenRTM-aist/src/lib/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,31 +1,6 @@
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 ${ORB_ROOT}/build/bin/omniidl)
- endif()
- SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf)
-endif()
-
-if(UNIX)
- set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper)
-elseif(VXWORKS)
- set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper)
-elseif(MSVC)
- set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper.py)
-endif()
-
-
-
-
+add_subdirectory(rtm)
add_subdirectory(coil)
-add_subdirectory(rtm)
-add_subdirectory(examples)
-add_subdirectory(utils)
+set(RTM_INCLUDE_DIR ${RTM_INCLUDE_DIR} PARENT_SCOPE)
Deleted: trunk/OpenRTM-aist/src/lib/Toolchain-vxworks6.cmake
===================================================================
--- trunk/OpenRTM-aist/src/lib/Toolchain-vxworks6.cmake 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/Toolchain-vxworks6.cmake 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,385 +0,0 @@
-# VxWorks 6.6 settings
-#
-# for J3 Main ECU
-#
-SET (VX_TOOL_FAMILY gnu)
-SET (VX_TOOL sfgnu)
-
-
-set(RTP ${RTP} CACHE BOOL "set RTP")
-
-if(RTP)
- set(RTP_C_FLAGS -mrtp)
-endif()
-
-
-
-set(VX_CPU_FAMILY ${VX_CPU_FAMILY} CACHE STRING "set VX_CPU_FAMILY ")
-
-if(NOT VX_CPU_FAMILY)
- set(VX_CPU_FAMILY ppc)
-endif()
-
-if("${VX_CPU_FAMILY}" STREQUAL "ppc")
- SET (VX_CPU PPC32)
-elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
- SET (VX_CPU SIMPENTIUM)
-elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
- SET (VX_CPU SIMLINUX)
-endif()
-
-
-
-
-
-#message(STATUS "test")
-#message(STATUS ${VX_CPU_FAMILY})
-
-#SET (VX_CPU_FAMILY ppc)
-#SET (VX_CPU PPC32)
-SET (VX_CPU_CARD ADS8572)
-SET (VX_CPU_VARIANT _ppc85XX_e500v2)
-
-
-
-
-
-
-# ホストOSの判定
-FIND_PROGRAM (UNAME uname)
-MARK_AS_ADVANCED (UNAME)
-EXECUTE_PROCESS (COMMAND ${UNAME} OUTPUT_VARIABLE VXWORKS_HOST_OS)
-
-IF (VXWORKS_HOST_OS MATCHES "SunOS")
- SET (WIND_HOST_TYPE sun4-solaris2)
- SET (WIND_HOME /usr/local/vw/workbench3.0)
-ELSEIF (VXWORKS_HOST_OS MATCHES "Linux")
- SET (WIND_HOST_TYPE x86-linux2)
- IF (NOT EXISTS "$ENV{WIND_HOME}")
- MESSAGE (STATUS "WIND_HOME=$ENV{WIND_HOME}")
- MESSAGE (FATAL_ERROR "Please provide valid WIND_HOME environment variable.")
- ENDIF (NOT EXISTS "$ENV{WIND_HOME}")
- SET (WIND_HOME "$ENV{WIND_HOME}")
-ENDIF (VXWORKS_HOST_OS MATCHES "SunOS")
-
-
-if(NOT VX_VERSION)
- SET (VX_VERSION vxworks-6.9)
-endif()
-
-if("${VX_VERSION}" STREQUAL "vxworks-6.9")
- SET (GNU_VERSION 4.3.3)
- ADD_DEFINITIONS (-DVXWORKS_69)
- SET (WIND_UTIL_PATH ${WIND_HOME}/utilities-1.0/x86-linux2/bin)
- SET (VXWORKS_MAJOR 6)
- SET (VXWORKS_MINOR 9)
-else()
- SET (GNU_VERSION 4.1.2)
- ADD_DEFINITIONS (-DVXWORKS_66)
- SET (WIND_UTIL_PATH ${WIND_HOME}/workbench-3.0/x86-linux2/bin)
- SET (VXWORKS_MAJOR 6)
- SET (VXWORKS_MINOR 6)
-endif()
-
-
-
-# Path Settings
-SET (WIND_BASE ${WIND_HOME}/${VX_VERSION})
-SET (WIND_GNU_BASE ${WIND_HOME}/gnu/${GNU_VERSION}-${VX_VERSION}/${WIND_HOST_TYPE})
-SET (VX_VW_BASE ${WIND_BASE}/target)
-
-# environment variables required by compiler
-SET (WIND_ENV "WIND_HOME=${WIND_HOME} WIND_HOST_TYPE=${WIND_HOST_TYPE} WIND_BASE=${WIND_BASE}")
-
-################################################################################
-
-SET (VXWORKS ON)
-
-
-SET (CMAKE_SYSTEM_NAME VxWorks)
-SET (CMAKE_SYSTEM_VERSION ${VX_VERSION})
-SET (CMAKE_SYSTEM_PROCESSOR ${VX_CPU_FAMILY})
-
-INCLUDE (CMakeForceCompiler)
-
-if("${VX_CPU_FAMILY}" STREQUAL "ppc")
- CMAKE_FORCE_C_COMPILER(${WIND_GNU_BASE}/bin/ccppc GNU)
- CMAKE_FORCE_CXX_COMPILER(${WIND_GNU_BASE}/bin/c++ppc GNU)
- SET (CMAKE_LINKER ${WIND_GNU_BASE}/bin/ldppc CACHE FILEPATH "vxworks linker")
- SET (CMAKE_AR ${WIND_GNU_BASE}/bin/arppc CACHE FILEPATH "vxworks ar")
- SET (CMAKE_NM ${WIND_UTIL_PATH}/nmppc CACHE FILEPATH "vxworks nm")
- SET (CMAKE_STRIP ${WIND_UTIL_PATH}/stripppc CACHE FILEPATH "vxworks strip")
- SET (CMAKE_OBJCOPY ${WIND_UTIL_PATH}/objcopyppc CACHE FILEPATH "vxworks objcopy")
- SET (CMAKE_OBJDUMP ${WIND_UTIL_PATH}/objdumpppc CACHE FILEPATH "vxworks objdump")
- SET (CMAKE_RANLIB ${WIND_GNU_BASE}/bin/ranlibppc CACHE FILEPATH "vxworks ranlib")
- SET (CPU_TYPE powerpc)
-elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
- CMAKE_FORCE_C_COMPILER(${WIND_GNU_BASE}/bin/ccpentium GNU)
- CMAKE_FORCE_CXX_COMPILER(${WIND_GNU_BASE}/bin/c++pentium GNU)
- SET (CMAKE_LINKER ${WIND_GNU_BASE}/bin/ldpentium CACHE FILEPATH "vxworks linker")
- SET (CMAKE_AR ${WIND_GNU_BASE}/bin/arpentium CACHE FILEPATH "vxworks ar")
- SET (CMAKE_NM ${WIND_UTIL_PATH}/nmpentium CACHE FILEPATH "vxworks nm")
- SET (CMAKE_STRIP ${WIND_UTIL_PATH}/strippentium CACHE FILEPATH "vxworks strip")
- SET (CMAKE_OBJCOPY ${WIND_UTIL_PATH}/objcopypentium CACHE FILEPATH "vxworks objcopy")
- SET (CMAKE_OBJDUMP ${WIND_UTIL_PATH}/objdumppentium CACHE FILEPATH "vxworks objdump")
- SET (CMAKE_RANLIB ${WIND_GNU_BASE}/bin/ranlibpentium CACHE FILEPATH "vxworks ranlib")
- SET (CPU_TYPE simpentium)
-elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
- CMAKE_FORCE_C_COMPILER(${WIND_GNU_BASE}/bin/ccpentium GNU)
- CMAKE_FORCE_CXX_COMPILER(${WIND_GNU_BASE}/bin/c++pentium GNU)
- SET (CMAKE_LINKER ${WIND_GNU_BASE}/bin/ldpentium CACHE FILEPATH "vxworks linker")
- SET (CMAKE_AR ${WIND_GNU_BASE}/bin/arpentium CACHE FILEPATH "vxworks ar")
- SET (CMAKE_NM ${WIND_UTIL_PATH}/nmpentium CACHE FILEPATH "vxworks nm")
- SET (CMAKE_STRIP ${WIND_UTIL_PATH}/strippentium CACHE FILEPATH "vxworks strip")
- SET (CMAKE_OBJCOPY ${WIND_UTIL_PATH}/objcopypentium CACHE FILEPATH "vxworks objcopy")
- SET (CMAKE_OBJDUMP ${WIND_UTIL_PATH}/objdumppentium CACHE FILEPATH "vxworks objdump")
- SET (CMAKE_RANLIB ${WIND_GNU_BASE}/bin/ranlibpentium CACHE FILEPATH "vxworks ranlib")
- SET (CPU_TYPE simlinux)
-endif()
-
-
-
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
-SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
-SET (CMAKE_EXE_LINKER_FLAGS_INIT -r)
-
-
-SET (VSB_DIR ${WIND_BASE}/target/lib)
-SET (VSB_CONFIG_FILE ${VSB_DIR}/h/config/vsbConfig.h)
-
-
-
-FIND_PROGRAM (SH sh REQUIRED)
-
-
-
-
-
-SET (CMAKE_C_COMPILE_OBJECT
- "${WIND_ENV} <CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
-SET (CMAKE_CXX_COMPILE_OBJECT
- "${WIND_ENV} <CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
-
-
-#set(LINKER_FLAGS "-mhard-float -fno-implicit-fp -mstrict-align -mregnames -D_WRS_HARDWARE_FP -mrtp -fno-strict-aliasing -fasm -Wall" )
-
-
-#set(LINKER_FLAGS "-mhard-float -fno-implicit-fp -mstrict-align -mregnames -fno-strict-aliasing -fasm -Wall" )
-
-if("${VX_CPU_FAMILY}" STREQUAL "ppc")
-
-
- SET (CMAKE_C_FLAGS_DEBUG "-g" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
-
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -fstrength-reduce -fno-builtin" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
-
- SET (CMAKE_C_FLAGS_RELEASE "-O2 -fstrength-reduce -fno-builtin" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
-
- SET (CC_ARCH_SPEC "-mhard-float -fno-implicit-fp -mstrict-align -mregnames -D_WRS_HARDWARE_FP")
- SET (NM_FLAG ppc)
-
-elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
-
- SET (CMAKE_C_FLAGS_DEBUG "-g" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
-
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -fno-defer-pop" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
-
- SET (CMAKE_C_FLAGS_RELEASE "-O2 -fno-defer-pop" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
-
- SET (CC_ARCH_SPEC "-mtune=i486 -march=i486")
- SET (NM_FLAG pentium)
-
-
-elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
-
- SET (CMAKE_C_FLAGS_DEBUG "-g" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
-
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -fno-defer-pop" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
-
- SET (CMAKE_C_FLAGS_RELEASE "-O2 -fno-defer-pop" CACHE STRING "")
- SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
-
- SET (CC_ARCH_SPEC "-mtune=i486 -march=i486")
- SET (NM_FLAG pentium)
-
-endif()
-
-if(RTP)
- #set(CMAKE_EXE_LINKER_FLAGS "${CC_ARCH_SPEC} ${RTP_C_FLAGS} -fno-strict-aliasing -fasm -Wall" )
- set(CMAKE_EXE_LINKER_FLAGS "${CC_ARCH_SPEC} ${RTP_C_FLAGS} -Xbind-lazy -non-static -fno-strict-aliasing -lstdc++ -fasm -D_WRS_HARDWARE_FP -Wall" )
-else(RTP)
- set(CMAKE_PARTICALIMAGE_LINKER_FLAGS "-nostdlib -Wl,-X " )
- set(CMAKE_EXE_LINKER_FLAGS "-nostdlib -Wl,-X -T ${WIND_BASE}/target/h/tool/gnu/ldscripts/link.OUT " )
-endif()
-
-if(RTP)
- SET (CMAKE_C_LINK_EXECUTABLE
- "${CMAKE_C_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
- SET (CMAKE_CXX_LINK_EXECUTABLE
- "${CMAKE_CXX_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-else(RTP)
-#SET (MUNCH ${WIND_BASE}/host/${WIND_HOST_TYPE}/bin/munch CACHE FILEPATH "munch")
-SET (MUNCH ${WIND_BASE}/host/resource/hutils/tcl/munch.tcl CACHE FILEPATH "munch")
- if("${VX_VERSION}" STREQUAL "vxworks-6.9")
- SET (TCLSH ${WIND_HOME}/workbench-3.3/foundation/x86-linux2/bin/tclsh CACHE FILEPATH "tclsh")
- else()
- SET (TCLSH ${WIND_HOME}/workbench-3.0/foundation/4.1.1/x86-linux2/bin/tclsh CACHE FILEPATH "tclsh")
-
- endif()
- SET (TAGS ${VSB_DIR}/tags/${VX_CPU_FAMILY}/${VX_CPU}/common/dkm.tags CACHE FILEPATH "tags")
- string(REPLACE ";" " " VXWORKS_C_FLAGS_LIST_STR "${VXWORKS_C_FLAGS_LIST}")
- SET (RUN_MUNCH_SCRIPT ${CMAKE_SOURCE_DIR}/run_munch.sh)
- SET (CMAKE_C_LINK_EXECUTABLE
- "${CMAKE_C_COMPILER} ${CMAKE_PARTICALIMAGE_LINKER_FLAGS} -o <TARGET>_partialImage.o <OBJECTS> <LINK_LIBRARIES>"
- "sh ${RUN_MUNCH_SCRIPT} ${CMAKE_NM} <TARGET>_partialImage.o ${TCLSH} ${MUNCH} ${NM_FLAG} ${TAGS} ctdt.c"
-# "${CMAKE_NM} <TARGET>_partialImage.o | ${TCLSH} ${MUNCH} -c ${VX_CPU_FAMILY} -tags ${TAGS} > ctdt.c"
- "${CMAKE_C_COMPILER} ${CC_ARCH_SPEC} -nostdlib -fno-builtin -fdollars-in-identifiers -Wall ${VXWORKS_C_FLAGS_LIST_STR} -o ctdt.o -c ctdt.c"
- "${CMAKE_C_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} -o <TARGET> <TARGET>_partialImage.o ctdt.o <LINK_LIBRARIES> -lstdc++"
- )
- SET (CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
-endif()
-
-
-#if(RTP)
-# set(CMAKE_EXE_LINKER_FLAGS "${CC_ARCH_SPEC} ${RTP_C_FLAGS} -fno-strict-aliasing -fasm -Wall" )
-#else(RTP)
-# set(CMAKE_EXE_LINKER_FLAGS "-nostdlib -Wl,-X" )
-#endif()
-
-#SET (CMAKE_C_FLAGS_DEBUG "-O -g1" CACHE STRING "")
-#SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} CACHE STRING "")
-
-#SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O -g1 -DNDEBUG" CACHE STRING "")
-#SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "")
-
-#SET (CMAKE_C_FLAGS_RELEASE "-O -g1 -DNDEBUG" CACHE STRING "")
-#SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} CACHE STRING "")
-
-if(RTP)
-INCLUDE_DIRECTORIES (
- ${VX_VW_BASE}/usr/h
- ${VX_VW_BASE}/usr/h/wrn/coreip)
-else(RTP)
-INCLUDE_DIRECTORIES (
- ${VX_VW_BASE}/h
- ${VX_VW_BASE}/h/wrn/coreip)
-#message(STATUS ${VX_VW_BASE}/h/wrn/coreip)
-endif()
-
-
-
-
-
-
-
-
-
-SET (VXWORKS_C_FLAGS_LIST
- -DCPU=${VX_CPU} -DVX_CPU_CARD=${VX_CPU_CARD} -DTOOL_FAMILY=${VX_TOOL_FAMILY} -DTOOL=${VX_TOOL} -DCPU_VARIANT=${VX_CPU_VARIANT} -DVXWORKS_MAJOR=${VXWORKS_MAJOR} -DVXWORKS_MINOR=${VXWORKS_MINOR} -DVXWORKS )
-
-
-# -D_VX_CPU=_VX_${VX_CPU}
-# -D_VX_CPU_FAMILY=_VX_${VX_CPU}
-# -D_VX_TOOL_FAMILY=${VX_TOOL_FAMILY}
-# -D_VX_TOOL=${VX_TOOL}
-# -DCPU_FAMILY=_${CPU_FAMILY}
-# -D_VSB_CONFIG_FILE="${VSB_CONFIG_FILE}"
-# -D_WRS_KERNEL
-# ${CC_ARCH_SPEC}
-# -ansi
-# -mrtp
-
-
-ADD_DEFINITIONS (${VXWORKS_C_FLAGS_LIST} -Xbind-lazy -non-static)
-
-
-
-
-
-
-
-if("${VX_CPU_FAMILY}" STREQUAL "ppc")
- if(RTP)
- SET (CPU_C_FLAGS_LIST
- -mlongcall
- -fstrength-reduce
- -fno-builtin
- -te500v2
- -mcpu=8548
- -mfloat-gprs=double
- -mspe=yes
- -mabi=spe
- -mstrict-align
- -fno-implicit-fp
- ${RTP_C_FLAGS}
- )
- else(RTP)
- SET (CPU_C_FLAGS_LIST
- ${RTP_C_FLAGS}
- -mregnames
- -msoft-float
- -D_WRS_KERNEL
- )
- endif()
-elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
- SET (CPU_C_FLAGS_LIST
- -mtune=i486
- -march=i486
- -ansi
- ${RTP_C_FLAGS}
- )
-elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
- SET (CPU_C_FLAGS_LIST
- -mtune=i486
- -march=i486
- -ansi
- ${RTP_C_FLAGS}
- -D_WRS_KERNEL
- )
-endif()
-
-ADD_DEFINITIONS (${CPU_C_FLAGS_LIST})
-
-
-
-if("${VX_CPU_FAMILY}" STREQUAL "ppc")
- if(RTP)
- set(COMMON_DIR sfcommon)
- else(RTP)
- set(COMMON_DIR common)
- endif()
-elseif("${VX_CPU_FAMILY}" STREQUAL "simpentium")
- set(COMMON_DIR common)
-elseif("${VX_CPU_FAMILY}" STREQUAL "simlinux")
- set(COMMON_DIR common)
-endif()
-
-#link_directories(${WIND_BASE}/target/lib/usr/lib/${VX_CPU_FAMILY}/${CPU}/common)
-
-if(RTP)
- if("${VX_VERSION}" STREQUAL "vxworks-6.9")
- link_directories(${WIND_BASE}/target/lib/usr/lib/${VX_CPU_FAMILY}/${VX_CPU}/${COMMON_DIR})
- else()
- link_directories(${WIND_BASE}/target/usr/lib/${VX_CPU_FAMILY}/${VX_CPU}/${COMMON_DIR})
- endif()
-else(RTP)
- link_directories(${WIND_BASE}/target/lib/${VX_CPU_FAMILY}/${VX_CPU}/${COMMON_DIR})
-endif()
-#link_directories(${WIND_BASE}/target/usr/lib/${VX_CPU_FAMILY}/${VX_CPU}/common)
-#link_directories(${WIND_BASE}/target/lib/${VX_CPU_FAMILY}/${VX_CPU}/e500v2common)
-#link_directories(${WIND_BASE}/target/usr/lib/simpentium/SIMPENTIUM/common)
-
-
-MARK_AS_ADVANCED (CMAKE_LINKER CMAKE_AR CMAKE_NM CMAKE_STRIP
- CMAKE_OBJCOPY CMAKE_OBJDUMP CMAKE_RANLIB CMAKE_C_FLAGS_DEBUG
- CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELWITHDEBINFO
- CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_RELEASE SH MUNCH)
Modified: trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 2.6)
-project (coil)
+project (${COIL_PROJECT_NAME})
@@ -50,13 +50,10 @@
if(VXWORKS)
- set(COIL_OS_DIR "vxworks")
- set (RTM_OS_VXWORKS ON)
+ set (COIL_OS_VXWORKS ON)
elseif(UNIX)
- set(COIL_OS_DIR "posix")
- set (RTM_OS_LINUX ON)
+ set (COIL_OS_LINUX ON)
elseif(WIN32)
- set(COIL_OS_DIR "win32")
endif()
@@ -63,7 +60,40 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_coil.h.in ${PROJECT_BINARY_DIR}/config_coil.h)
+set(coil_headers
+ common/coil/Allocator.h
+ common/coil/Async.h
+ common/coil/ClockManager.h
+ common/coil/Factory.h
+ common/coil/Guard.h
+ common/coil/Listener.h
+ common/coil/Logger.h
+ common/coil/NonCopyable.h
+ common/coil/PeriodicTask.h
+ common/coil/PeriodicTaskBase.h
+ common/coil/Properties.h
+ common/coil/Singleton.h
+ common/coil/TimeMeasure.h
+ common/coil/TimeValue.h
+ common/coil/Timer.h
+ common/coil/crc.h
+ common/coil/stringutil.h
+ ${COIL_OS_DIR}/coil/Affinity.h
+ ${COIL_OS_DIR}/coil/Condition.h
+ ${COIL_OS_DIR}/coil/DynamicLib.h
+ ${COIL_OS_DIR}/coil/Mutex.h
+ ${COIL_OS_DIR}/coil/OS.h
+ ${COIL_OS_DIR}/coil/Routing.h
+ ${COIL_OS_DIR}/coil/Process.h
+ ${COIL_OS_DIR}/coil/Signal.h
+ ${COIL_OS_DIR}/coil/Task.h
+ ${COIL_OS_DIR}/coil/Time.h
+ ${COIL_OS_DIR}/coil/UUID.h
+ ${COIL_OS_DIR}/coil/atomic.h
+ ${PROJECT_BINARY_DIR}/config_coil.h
+)
+
set(coil_srcs
common/coil/Allocator.cpp
common/coil/ClockManager.cpp
@@ -84,8 +114,8 @@
${COIL_OS_DIR}/coil/Task.cpp
${COIL_OS_DIR}/coil/Time.cpp
${COIL_OS_DIR}/coil/UUID.cpp
+ ${coil_headers}
-
)
@@ -97,7 +127,15 @@
)
#message(STATUS ${CMAKE_INCLUDE_DIRECTORIES_BEFORE})
-add_library(coil STATIC ${coil_srcs} )
+if(VXWORKS)
+ add_library(${COIL_PROJECT_NAME} STATIC ${coil_srcs} )
+ install(TARGETS ${COIL_PROJECT_NAME} ARCHIVE DESTINATION lib)
+else(VXWORKS)
+ add_library(${COIL_PROJECT_NAME} SHARED ${coil_srcs} )
+ target_link_libraries(${COIL_PROJECT_NAME} ${RTM_LINKER_OPTION})
+ install(TARGETS ${COIL_PROJECT_NAME} LIBRARY DESTINATION lib)
+endif(VXWORKS)
+install(FILES ${coil_headers} DESTINATION include/coil)
#add_executable(coil ${coil_srcs} )
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -24,6 +24,8 @@
#include <sysSymTbl.h>
#endif
+
+
namespace coil
{
/*!
@@ -194,12 +196,13 @@
#else
if (!m_id) return NULL;
MODULE_INFO mi;
- if (!moduleInfoGet(m_id, &mi)) return 0;
+ if (moduleInfoGet(m_id, &mi) != OK) return 0;
SymbolObj symbolObj;
symbolObj.name = const_cast<char*>(symbol_name);
symbolObj.group = mi.group;
symbolObj.addr = 0;
symEach(sysSymTbl, reinterpret_cast<FUNCPTR>(SymbolIterator), reinterpret_cast<int>(&symbolObj));
+
return symbolObj.addr;
#endif
}
@@ -227,9 +230,9 @@
if (group == symbolObj->group && std::strcmp(name, symbolObj->name) == 0)
{
symbolObj->addr = reinterpret_cast<void*>(val);
- return true;
+ return false;
}
- else return false;
+ else return true;
};
#endif
};
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.h 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/DynamicLib.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,6 +1,6 @@
// -*- C++ -*-
/*!
- * @file DynamicLib_posix.h
+ * @file DynamicLib.h
* @brief DynamicLib class
* @date $Date$
* @author Nobuhiko Miyamoto <n-miyamoto at aist.go.jp>
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/File.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/File.h 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/File.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -27,8 +27,13 @@
#include <coil/config_coil.h>
#include <coil/stringutil.h>
+#ifdef __RTP__
+#else
+#include <pathLib.h>
+#endif
+
namespace coil
{
@@ -57,7 +62,39 @@
*/
inline std::string dirname(char* path)
{
+#ifdef __RTP__
return "";
+#else
+ unsigned int len = strlen(path);
+ char path_name[len+1];
+ memset( path_name , '\0' , len+1 );
+ char dir_name[len+1];
+ memset( dir_name , '\0' , len+1 );
+ char file_name[len+1];
+ memset( file_name , '\0' , len+1 );
+ if(len>1 && strncmp("/", &path[len-1], 1)==0)
+ {
+ strncpy(path_name, path, len-1);
+ }
+ else
+ {
+ strcpy(path_name, path);
+ }
+ pathSplit(path_name, dir_name, file_name);
+ std::string ret = dir_name;
+ if(ret == "")
+ {
+ if(strncmp("/", &path_name[0], 1) == 0)
+ {
+ ret = "/";
+ }
+ else
+ {
+ ret = ".";
+ }
+ }
+ return ret;
+#endif
}
/*!
@@ -85,8 +122,39 @@
*/
inline std::string basename(const char* path)
{
-
+#ifdef __RTP__
return "";
+#else
+ unsigned int len = strlen(path);
+ char path_name[len+1];
+ memset( path_name , '\0' , len+1 );
+ char dir_name[len+1];
+ memset( dir_name , '\0' , len+1 );
+ char file_name[len+1];
+ memset( file_name , '\0' , len+1 );
+ if(len>1 && strncmp("/", &path[len-1], 1)==0)
+ {
+ strncpy(path_name, path, len-1);
+ }
+ else
+ {
+ strcpy(path_name, path);
+ }
+ pathSplit(path_name, dir_name, file_name);
+ std::string ret = file_name;
+ if(ret == "")
+ {
+ if(strncmp("/", &path_name[0], 1) == 0)
+ {
+ ret = "/";
+ }
+ else
+ {
+ ret = ".";
+ }
+ }
+ return ret;
+#endif
}
/*!
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -18,6 +18,7 @@
#include <coil/Task.h>
+
/*
#ifdef __RTP__
#define DEFAULT_PRIORITY 110
@@ -115,6 +116,7 @@
{
if (m_count == 0)
{
+// m_waitmutex.lock();
m_tid = taskSpawn(
0,
m_priority,
@@ -157,7 +159,21 @@
{
if (m_count > 0)
{
+ int task_priority = get_priority();
+ int current_priority = -1;
+ taskPriorityGet(taskIdSelf(), ¤t_priority);
+ if(task_priority >= current_priority)
+ {
+ set_priority(current_priority-1);
+ }
+
+
+
+//taskDelete(m_tid);
Guard guard(m_waitmutex);
+//m_waitmutex.lock();
+//m_waitmutex.unlock();
+
/*
#ifdef __RTP__
Guard guard(m_waitmutex);
@@ -180,7 +196,7 @@
*/
int Task::suspend(void)
{
- return 0;
+ return (OK == taskSuspend(m_tid));
}
/*!
@@ -192,7 +208,7 @@
*/
int Task::resume(void)
{
- return 0;
+ return (OK == taskResume(m_tid));
}
/*!
@@ -231,10 +247,14 @@
extern "C" void* Task::svc_run(void* args)
{
Task* t = (coil::Task*)args;
+
Guard guard(t->m_waitmutex);
+
+ //t->m_waitmutex.lock();
int status;
status = t->svc();
t->finalize();
+ //t->m_waitmutex.unlock();
return 0;
}
/*
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.h 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Task.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -56,8 +56,8 @@
typedef coil::Guard<coil::Mutex> Guard;
#endif
*/
+ public:
typedef coil::Guard<coil::Mutex> Guard;
- public:
/*!
* @if jp
*
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Time.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Time.h 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Time.h 2017-08-16 08:59:45 UTC (rev 3016)
@@ -31,6 +31,9 @@
#include <coil/config_coil.h>
#include <coil/TimeValue.h>
+#include <taskLib.h>
+#include <sysLib.h>
+/*
#ifdef __RTP__
#include <taskLib.h>
#include <sysLib.h>
@@ -37,6 +40,7 @@
#else
#include <selectLib.h>
#endif
+*/
namespace coil
{
@@ -64,6 +68,16 @@
*/
inline unsigned int sleep(unsigned int seconds)
{
+ int tps = sysClkRateGet();
+ if(taskDelay(seconds*tps) == OK)
+ {
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+/*
#ifdef __RTP__
int tps = sysClkRateGet();
if(taskDelay(seconds*tps) == OK)
@@ -77,6 +91,7 @@
#else
return ::sleep(seconds);
#endif
+*/
}
/*!
@@ -102,6 +117,17 @@
*/
inline int sleep(TimeValue interval)
{
+ int tps = sysClkRateGet();
+
+ if(taskDelay(interval.sec()*tps + (interval.usec()*tps)/1000000l) == OK)
+ {
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+/*
#ifdef __RTP__
int tps = sysClkRateGet();
if(taskDelay((double)interval.sec()*tps + (double)(interval.usec()*tps)/1000000l) == OK)
@@ -118,6 +144,7 @@
tv.tv_usec = interval.usec();
return ::select(0, 0, 0, 0, &tv);
#endif
+*/
}
/*!
@@ -143,6 +170,16 @@
*/
inline int usleep(unsigned int usec)
{
+ int tps = sysClkRateGet();
+ if(taskDelay(usec*tps/1000000l) == OK)
+ {
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+/*
#ifdef __RTP__
int tps = sysClkRateGet();
if(taskDelay((double)(usec*tps)/1000000000l) == OK)
@@ -157,6 +194,7 @@
struct timespec req = {0,usec * 1000};
return ::nanosleep(&req, NULL);
#endif
+*/
}
/*!
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/UUID.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/UUID.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/UUID.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -116,8 +116,10 @@
result += "-";
result += StringToUUID<uint16_t>(_uuid.time_hi_version,4);
result += "-";
- result += StringToUUID<uint8_t>(_uuid.clock_seq_low,2);
- result += StringToUUID<uint8_t>(_uuid.clock_seq_hi_variant,2);
+ result += StringToUUID<uint16_t>((uint16_t)_uuid.clock_seq_low,2);
+ result += StringToUUID<uint16_t>((uint16_t)_uuid.clock_seq_hi_variant,2);
+ //result += StringToUUID<uint8_t>(_uuid.clock_seq_low,2);
+ //result += StringToUUID<uint8_t>(_uuid.clock_seq_hi_variant,2);
result += "-";
result += StringToUUID<uint32_t>(_uuid.node_low,8);
result += StringToUUID<uint16_t>(_uuid.node_high,4);
Modified: trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 2.6)
-project (rtm)
+project (${RTM_PROJECT_NAME})
@@ -7,6 +7,7 @@
+
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)
@@ -56,137 +57,83 @@
option (_REENTRANT "Multi Thread Support" ON)
-
set(LT_OBJDIR .libs/ CACHE STRING "Define to the sub-directory in which libtool stores uninstalled libraries.")
-set(RTM_MAJOR_VERSION 1 CACHE STRING "RTM major version")
-set(RTM_MINOR_VERSION 2 CACHE STRING "RTM minor version")
-set(RTM_REVISION_NUM 0 CACHE STRING "RTM revision numver")
-set(RTM_SHORT_VERSION 120 CACHE STRING "RTM short version")
-set(RTM_VERSION 1.2.0 CACHE STRING "RTM version")
-set(STDC_HEADERS 1 CACHE STRING "Define to 1 if you have the ANSI C header files.")
-set(OSVERSION 69 CACHE STRING "OS version.")
+if(VXWORKS)
+ set (OSVERSION ON)
+ set(OSVERSION ${VXWORKS_MAJOR}${VXWORKS_MINOR} CACHE STRING "OS version.")
+ set (RTM_OS_VXWORKS ON)
+ set (STDC_HEADERS ON)
+# set (STDC_HEADERS_VALUE 1 CACHE STRING "Define to 1 if you have the ANSI C header files.")
+elseif(UNIX)
+ set (STDC_HEADERS OFF)
+ set (OSVERSION OFF)
+ set (RTM_OS_LINUX ON)
+elseif(WIN32)
+ set (STDC_HEADERS OFF)
+ set (OSVERSION OFF)
+endif()
+if(CORBA MATCHES "ORBexpress")
+ set (ORB_IS_ORBEXPRESS ON)
+elseif(CORBA MATCHES "omniORB")
+ if(OMNI_VERSION MATCHES "40")
+ set (RTM_OMNIORB_40 ON)
+ elseif(OMNI_VERSION MATCHES "41")
+ set (RTM_OMNIORB_41 ON)
+ else()
+ set (RTM_OMNIORB_42 ON)
+ endif()
+ set (ORB_IS_OMNIORB ON)
+endif()
-set(CORBA ${CORBA} CACHE PATH "set CORBA ")
-if(NOT CORBA)
- message(FATAL_ERROR "Please set CORBA.")
-endif()
-set(ORB_ROOT ${ORB_ROOT} CACHE STRING "set ORB_ROOT")
+set (RTC_CORBA_CXXMAPPING11 ON)
-if(NOT ORB_ROOT)
- message(FATAL_ERROR "Please set ORB_ROOT.")
-endif()
+#ADD_DEFINITIONS(-DRTC_CORBA_CXXMAPPING11)
-if(CORBA MATCHES "ORBexpress")
- if(RTP)
- 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_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)
-
- endif()
- 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)
- set(ORB_LINK_DIR ${ORB_ROOT}/lib/${CPU_TYPE}_vxWorks_RTP_${VXWORKS_MAJOR}.${VXWORKS_MINOR})
- else(RTP)
- set(ORB_LINK_DIR ${ORB_ROOT}/lib/${CPU_TYPE}_vxWorks_kernel_${VXWORKS_MAJOR}.${VXWORKS_MINOR})
- endif()
- link_directories(${ORB_LINK_DIR})
- set(ORB_INCLUDE_DIR ${ORB_ROOT}/include)
-
- include_directories(${ORB_INCLUDE_DIR})
- set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread)
- if("${VX_CPU_FAMILY}" STREQUAL "ppc")
- SET (ORB_C_FLAGS_LIST
- -D__vxWorks__
- -D__powerpc__
- )
- else()
- SET (ORB_C_FLAGS_LIST
- -D__vxWorks__
- -D__x86__
- )
- endif()
- 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(-DCORBA_ANY_SHARED_PTR_OPERATORS -DINCLUDE_CORBA_CORBALOC)
-#ADD_DEFINITIONS(-DRTC_CORBA_CXXMAPPING11)
-set (RTC_CORBA_CXXMAPPING11 ON)
-#ADD_DEFINITIONS(-DCORBA_ANY_SHARED_PTR_OPERATORS -DINCLUDE_CORBA_CORBALOC)
-
-
-
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()
+else(VXWORKS)
+ link_directories(${ORB_LINK_DIR})
+endif(VXWORKS)
+include_directories(${ORB_INCLUDE_DIR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_rtc.h.in ${PROJECT_BINARY_DIR}/config_rtc.h)
-
-set(OPENRTM_NAME OpenRTM-aist-1.2.0 CACHE STRING "RTM name.")
-set(OPENRTM_VERSION 1.2.0 CACHE STRING "RTM version.")
-set(CORBA_NAME omniORB CACHE STRING "CORBA name.")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${PROJECT_BINARY_DIR}/version.h)
set(RTM_INCLUDE_DIR ${CMAKE_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}/coil/common
+ ${CMAKE_SOURCE_DIR}/src/lib/coil/common
${PROJECT_BINARY_DIR}/idl
- ${CMAKE_SOURCE_DIR}/coil/${COIL_OS_DIR}
- ${PROJECT_BINARY_DIR}/..)
+ ${CMAKE_SOURCE_DIR}/src/lib/coil/${COIL_OS_DIR}
+ ${PROJECT_BINARY_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ )
include_directories(
${RTM_INCLUDE_DIR}
@@ -196,6 +143,95 @@
set(RTM_INCLUDE_DIR ${RTM_INCLUDE_DIR} PARENT_SCOPE)
+set(rtm_headers
+ ConfigAdmin.h
+ ModuleManager.h
+ CorbaNaming.h
+ NVUtil.h
+ ManagerActionListener.h
+ LocalServiceAdmin.h
+ Factory.h
+ PublisherPeriodic.h
+ ECFactory.h
+ OutPortCorbaCdrConsumer.h
+ PeriodicExecutionContext.h
+ InPortPushConnector.h
+ CORBA_IORUtil.h
+ ManagerServant.h
+ OpenHRPExecutionContext.h
+ RTObjectStateMachine.h
+ InPortProvider.h
+ PortConnectListener.h
+ DefaultPeriodicTask.h
+ NamingManager.h
+ OutPortCorbaCdrProvider.h
+ InPortDirectProvider.h
+ PortBase.h
+ OutPortProvider.h
+ ExecutionContextProfile.h
+ PublisherFlush.h
+ OutPortPushConnector.h
+ CorbaPort.h
+ SdoConfiguration.h
+ RTObject.h
+ DataFlowComponentBase.h
+ ManagerConfig.h
+ SystemLogger.h
+ ExecutionContextWorker.h
+ ExecutionContextBase.h
+ ExtTrigExecutionContext.h
+ InPortBase.h
+ SdoOrganization.h
+ PortAdmin.h
+ InPortPullConnector.h
+ ConfigurationListener.h
+ OutPortPullConnector.h
+ LogstreamFile.h
+ RTCUtil.h
+ CdrRingBuffer.h
+ InPortCorbaCdrProvider.h
+ ConnectorListener.h
+ PeriodicECSharedComposite.h
+ PublisherNew.h
+ ComponentActionListener.h
+ InPortDirectConsumer.h
+ OutPortBase.h
+ Manager.h
+ InPortCorbaCdrConsumer.h
+ FactoryInit.h
+ SdoServiceAdmin.h
+ InPortConnector.h
+ OutPortConnector.h
+ NumberingPolicy.h
+ BufferBase.h
+ BufferStatus.h
+ CORBA_SeqUtil.h
+ CdrBufferBase.h
+ ConnectorBase.h
+ CorbaConsumer.h
+ DataInPort.h
+ DataOutPort.h
+ DataPortStatus.h
+ DefaultConfiguration.h
+ InPort.h
+ InPortConsumer.h
+ ListenerHolder.h
+ LocalServiceBase.h
+ ObjectManager.h
+ OutPort.h
+ OutPortConsumer.h
+ PeriodicTaskFactory.h
+ PortCallback.h
+ PublisherBase.h
+ RTC.h
+ RingBuffer.h
+ SdoServiceConsumerBase.h
+ SdoServiceProviderBase.h
+ StateMachine.h
+ Typename.h
+ ${PROJECT_BINARY_DIR}/config_rtc.h
+ ${PROJECT_BINARY_DIR}/version.h
+)
set(rtm_srcs
ConfigAdmin.cpp
@@ -257,6 +293,7 @@
InPortConnector.cpp
OutPortConnector.cpp
NumberingPolicy.cpp
+ ${rtm_headers}
)
if(VXWORKS)
@@ -273,18 +310,28 @@
#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})
+if(VXWORKS)
+ add_library(${RTM_PROJECT_NAME} STATIC ${rtm_srcs})
+ install(TARGETS ${RTM_PROJECT_NAME} ARCHIVE DESTINATION lib)
+else(VXWORKS)
+ add_library(${RTM_PROJECT_NAME} SHARED ${rtm_srcs})
+ target_link_libraries(${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME} ${RTM_LINKER_OPTION})
+ install(TARGETS ${RTM_PROJECT_NAME} LIBRARY DESTINATION lib)
+endif(VXWORKS)
+install(FILES ${rtm_headers} DESTINATION include/rtm)
-add_dependencies(rtm coil)
+
+
+add_dependencies(${RTM_PROJECT_NAME} ${COIL_PROJECT_NAME})
#add_dependencies(rtm ALL_IDL_TGT)
add_subdirectory(idl)
-add_dependencies(rtm RTCSkel)
+add_dependencies(${RTM_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
Modified: trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -11,7 +11,7 @@
macro(idl_compile idl_name)
-
+ set(ALL_IDL_FILES ${ALL_IDL_FILES} ${idl_name}.idl)
add_custom_command(
OUTPUT ${idl_name}Skel.cpp
#COMMAND mkdir -p include/rtm/idl
@@ -28,8 +28,17 @@
#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)
+ set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}Skel.h)
+ set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}Stub.cpp)
+ set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}Stub.h)
+ set(ALL_IDL_HEADERS ${ALL_IDL_HEADERS} ${PROJECT_BINARY_DIR}/${idl_name}Skel.h)
+ set(ALL_IDL_HEADERS ${ALL_IDL_HEADERS} ${PROJECT_BINARY_DIR}/${idl_name}Stub.h)
+ #set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}_c.cc)
+ #set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}_c.h)
+ #set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}.cc)
+ #set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}.h)
+
if(NOT TARGET ALL_IDL_TGT)
add_custom_target(ALL_IDL_TGT)
endif(NOT TARGET ALL_IDL_TGT)
@@ -80,4 +89,7 @@
add_dependencies(RTCSkel ALL_IDL_TGT)
+install(FILES ${ALL_IDL_FILES} ${ALL_IDL_HEADERS} DESTINATION include/rtm/idl)
+
+
Modified: trunk/OpenRTM-aist/utils/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/utils/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -4,3 +4,10 @@
add_subdirectory(rtcd)
add_subdirectory(rtcprof)
+
+if(CORBA MATCHES "ORBexpress")
+ if(RTP)
+ else(RTP)
+ add_subdirectory(Names)
+ endif(RTP)
+endif()
Modified: trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,5 +1,6 @@
cmake_minimum_required (VERSION 2.6)
-project (rtcd)
+set(target rtcd)
+project (${target})
link_directories(${ORB_LINK_DIR})
@@ -11,13 +12,28 @@
ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
if(VXWORKS)
- add_executable(rtcd rtcd_vxorks.cpp)
+ add_executable(${target} rtcd_vxorks.cpp)
+# add_executable(${target} rtcd_vxorks.cpp ConsoleIn.cpp ConsoleIn.h)
+# add_executable(${target} hello_s.cxx hello_s.h server.cpp hello.cxx hello.h)
else(VXWORKS)
- add_executable(rtcd rtcd.cpp)
+ add_executable(${target} rtcd.cpp)
endif(VXWORKS)
-add_dependencies(rtcd rtm)
+add_dependencies(${target} ${RTM_PROJECT_NAME})
+target_link_libraries(${target} ${RTM_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME} ${COIL_PROJECT_NAME} ${ORB_LIBRARIES} ${RTM_LINKER_OPTION})
+#target_link_libraries(${target} ${ORB_LIBRARIES})
-target_link_libraries(rtcd rtm ${ORB_LIBRARIES} coil RTCSkel)
+
+
+if(VXWORKS)
+ if(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
+ endif(RTP)
+endif(VXWORKS)
+
+
+install(TARGETS ${target} RUNTIME DESTINATION bin)
Modified: trunk/OpenRTM-aist/utils/rtcd/rtcd_vxorks.cpp
===================================================================
--- trunk/OpenRTM-aist/utils/rtcd/rtcd_vxorks.cpp 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/utils/rtcd/rtcd_vxorks.cpp 2017-08-16 08:59:45 UTC (rev 3016)
@@ -18,19 +18,48 @@
#include <iostream>
#include <rtm/Manager.h>
+//#include "ConsoleIn.h"
#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
-int rtcd_main (int argc, char** argv)
+int rtcd_main (char* arg1, char* arg2, char* arg3,
+ char* arg4, char* arg5, char* arg6,
+ char* arg7, char* arg8, char* arg9)
+{
+ int argc = 0;
+ char* argv[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ argv[argc++] = "rtcd";
+ if (arg1 != 0 && *arg1 != 0) argv[argc++] = arg1; else goto End_Args;
+ if (arg2 != 0 && *arg2 != 0) argv[argc++] = arg2; else goto End_Args;
+ if (arg3 != 0 && *arg3 != 0) argv[argc++] = arg3; else goto End_Args;
+ if (arg4 != 0 && *arg4 != 0) argv[argc++] = arg4; else goto End_Args;
+ if (arg5 != 0 && *arg5 != 0) argv[argc++] = arg5; else goto End_Args;
+ if (arg6 != 0 && *arg6 != 0) argv[argc++] = arg6; else goto End_Args;
+ if (arg7 != 0 && *arg7 != 0) argv[argc++] = arg7; else goto End_Args;
+ if (arg8 != 0 && *arg8 != 0) argv[argc++] = arg8; else goto End_Args;
+ if (arg9 != 0 && *arg9 != 0) argv[argc++] = arg9; else goto End_Args;
+
+End_Args:
#else
int main (int argc, char** argv)
+{
#endif
-{
+
RTC::Manager* manager;
+/*
+ const int argc_ = 9;
+ const char *argv_[argc_] = { "ManagerTest", "-f", "/mnt/apps/openrtm-vxworks/rtc.conf", "-o", "corba.nameservers:172.30.1.1", "-o", "manager.shutdown_on_nortcs:NO", "-o", "manager.shutdown_auto:NO" };
+ manager = RTC::Manager::init(argc_, const_cast<char**>(argv_));
+*/
manager = RTC::Manager::init(argc, argv);
manager->activateManager();
-
+//ConsoleInInit(manager);
+//manager->createComponent("ConsoleIn");
+//#if defined(RTM_OS_VXWORKS) && not defined(__RTP__)
+// manager->runManager(true);
+//#else
manager->runManager();
+//#endif
return 0;
}
Modified: trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt 2017-07-27 05:20:22 UTC (rev 3015)
+++ trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt 2017-08-16 08:59:45 UTC (rev 3016)
@@ -1,5 +1,6 @@
cmake_minimum_required (VERSION 2.6)
-project (rtcprof)
+set(target rtcprof)
+project (${target})
link_directories(${ORB_LINK_DIR})
@@ -19,16 +20,29 @@
set(srcs rtcprof.cpp)
+#if(VXWORKS)
+# if(RTP)
+# set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+# else(RTP)
+# set(srcs ${srcs} ${CMAKE_SOURCE_DIR}/rtm/DataFlowComponentBase.cpp)
+# set(libs ${RTCSKEL_PROJECT_NAME})
+# endif(RTP)
+#endif(VXWORKS)
+
+set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+
+add_executable(${target} ${srcs})
+target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+add_dependencies(${target} ${RTM_PROJECT_NAME})
+
+
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)
+ set_target_properties(${target} PROPERTIES SUFFIX ".vxe")
+ else(RTP)
+ set_target_properties(${target} PROPERTIES SUFFIX ".out")
endif(RTP)
endif(VXWORKS)
-add_executable(rtcprof ${srcs})
-target_link_libraries(rtcprof ${libs})
-add_dependencies(rtcprof rtm)
+install(TARGETS ${target} RUNTIME DESTINATION bin)
More information about the openrtm-commit
mailing list