[openrtm-commit:02653] r3005 - in trunk/OpenRTM-aist/src/lib: coil coil/vxworks/coil rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 6月 26日 (月) 19:01:49 JST
Author: miyamoto
Date: 2017-06-26 19:01:49 +0900 (Mon, 26 Jun 2017)
New Revision: 3005
Added:
trunk/OpenRTM-aist/src/lib/rtm/version.h.in
Modified:
trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/OS.h
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Routing.cpp
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.cpp
trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.h
trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp
Log:
[compat, VxWorks] fixed bug.
Modified: trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-06-19 10:52:34 UTC (rev 3004)
+++ trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-06-26 10:01:49 UTC (rev 3005)
@@ -2,6 +2,13 @@
project (coil)
+if(VXWORKS)
+ set(COIL_OS_DIR "vxworks")
+elseif(UNIX)
+ set(COIL_OS_DIR "posix")
+elseif(WIN32)
+ set(COIL_OS_DIR "win32")
+endif()
@@ -8,7 +15,6 @@
-
set(coil_srcs
common/coil/Allocator.cpp
common/coil/ClockManager.cpp
@@ -19,24 +25,25 @@
common/coil/Timer.cpp
common/coil/crc.cpp
common/coil/stringutil.cpp
- vxworks/coil/Affinity.cpp
- vxworks/coil/Condition.cpp
- vxworks/coil/DynamicLib.cpp
- vxworks/coil/Mutex.cpp
- vxworks/coil/Routing.cpp
- vxworks/coil/Process.cpp
- vxworks/coil/Signal.cpp
- vxworks/coil/Task.cpp
- vxworks/coil/Time.cpp
- vxworks/coil/UUID.cpp
+ ${COIL_OS_DIR}/coil/Affinity.cpp
+ ${COIL_OS_DIR}/coil/Condition.cpp
+ ${COIL_OS_DIR}/coil/DynamicLib.cpp
+ ${COIL_OS_DIR}/coil/Mutex.cpp
+ ${COIL_OS_DIR}/coil/Routing.cpp
+ ${COIL_OS_DIR}/coil/Process.cpp
+ ${COIL_OS_DIR}/coil/Signal.cpp
+ ${COIL_OS_DIR}/coil/Task.cpp
+ ${COIL_OS_DIR}/coil/Time.cpp
+ ${COIL_OS_DIR}/coil/UUID.cpp
)
+
include_directories(
${PROJECT_SOURCE_DIR}/common
- ${PROJECT_SOURCE_DIR}/vxworks
+ ${PROJECT_SOURCE_DIR}/${COIL_OS_DIR}
)
message(STATUS ${CMAKE_INCLUDE_DIRECTORIES_BEFORE})
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/OS.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/OS.h 2017-06-19 10:52:34 UTC (rev 3004)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/OS.h 2017-06-26 10:01:49 UTC (rev 3005)
@@ -23,6 +23,9 @@
#if defined(__RTP__)
#include <sys/utsname.h>
+#else
+#include <hostLib.h>
+#include <kernelLib.h>
#endif
#include <sys/types.h>
#include <unistd.h>
@@ -60,12 +63,42 @@
*/
#if defined(__RTP__)
typedef ::utsname utsname;
+#else
+ #define COIL_UTSNAME_LENGTH 256
+ struct utsname
+ {
+ char sysname[COIL_UTSNAME_LENGTH];
+ char nodename[COIL_UTSNAME_LENGTH];
+ char release[COIL_UTSNAME_LENGTH];
+ char version[COIL_UTSNAME_LENGTH];
+ char machine[COIL_UTSNAME_LENGTH];
+ };
+
+#endif
inline int uname(utsname* name)
{
+#if defined(__RTP__)
return ::uname(name);
+#else
+ if(!name)
+ {
+ return -1;
+ }
+
+ if (gethostname(name->nodename, MAXHOSTNAMELEN) < 0) {
+ return -1;
+ }
+
+ ::strcpy(name->machine, kernelVersion());
+ ::strcpy(name->release, RUNTIME_VERSION);
+ ::strcpy(name->sysname, RUNTIME_NAME);
+ ::strcpy(name->version, "reserved");
+
+ return 0;
+#endif
}
-#endif
+
/*!
* @if jp
*
@@ -85,7 +118,7 @@
*
* @endif
*/
- typedef wind_rtp* pid_t;
+ typedef RTP_ID pid_t;
inline pid_t getpid()
{
return ::getpid();
@@ -110,13 +143,17 @@
*
* @endif
*/
-#if defined(__RTP__)
+
inline pid_t getppid()
{
+#if defined(__RTP__)
return ::getppid();
+#else
+ return 0;
+#endif
}
-#endif
+
/*!
* @if jp
*
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Routing.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Routing.cpp 2017-06-19 10:52:34 UTC (rev 3004)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Routing.cpp 2017-06-26 10:01:49 UTC (rev 3005)
@@ -42,6 +42,7 @@
*/
bool dest_to_endpoint(std::string dest_addr, std::string& endpoint)
{
+/*
std::string dest_if;
if (!find_dest_ifname(dest_addr, dest_if))
{
@@ -48,6 +49,8 @@
return false;
}
return ifname_to_ipaddr(dest_if, endpoint);
+*/
+ return false;
}
/*!
@@ -59,7 +62,8 @@
*/
bool find_dest_ifname(std::string dest_addr, std::string& dest_if)
{
-#ifdef __RTP__
+#ifndef __RTP__
+/*
// This logic should be replaced by direct retrieving using
// routing interface like AFROUTE or sysctl.
struct ::hostent *hostent;
@@ -113,7 +117,9 @@
} while (!feof(fp));
pclose(fp);
wait(NULL);
+*/
#endif
+
return false;
}
@@ -127,6 +133,7 @@
bool ifname_to_ipaddr(std::string ifname, std::string& ipaddr)
{
#ifdef __RTP__
+/*
std::string cmd("ifconfig ");
cmd += ifname;
cmd += " 2> /dev/null";
@@ -159,6 +166,7 @@
} while (!feof(fp));
pclose(fp);
wait(NULL);
+*/
#else
#endif
return false;
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.cpp 2017-06-19 10:52:34 UTC (rev 3004)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.cpp 2017-06-26 10:01:49 UTC (rev 3005)
@@ -32,7 +32,7 @@
* @endif
*/
SignalAction::SignalAction()
- : m_handle(0), m_signum(0), m_mask(0), m_flags(0)
+ : m_handle(0), m_signum(0), m_mask(0), m_vxflags(0)
{
}
@@ -48,7 +48,7 @@
* @endif
*/
SignalAction::SignalAction(SignalHandler handle, int signum)
- : m_handle(handle), m_signum(signum), m_mask(0), m_flags(0)
+ : m_handle(handle), m_signum(signum), m_mask(0), m_vxflags(0)
{
struct sigaction action;
memset(&action, 0, sizeof(action)); // clear.
@@ -61,7 +61,7 @@
m_handle = 0;
m_signum = 0;
m_mask = 0;
- m_flags = 0;
+ m_vxflags = 0;
}
}
@@ -78,7 +78,7 @@
m_handle = 0;
m_signum = 0;
m_mask = 0;
- m_flags = 0;
+ m_vxflags = 0;
}
};
Modified: trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.h 2017-06-19 10:52:34 UTC (rev 3004)
+++ trunk/OpenRTM-aist/src/lib/coil/vxworks/coil/Signal.h 2017-06-26 10:01:49 UTC (rev 3005)
@@ -107,7 +107,7 @@
SignalHandler m_handle;
int m_signum;
sigset_t* m_mask;
- int m_flags;
+ int m_vxflags;
};
};
Modified: trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-06-19 10:52:34 UTC (rev 3004)
+++ trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-06-26 10:01:49 UTC (rev 3005)
@@ -1,45 +1,167 @@
cmake_minimum_required (VERSION 2.6)
project (rtm)
-set(ORB_ROOT ${ORB_ROOT} CACHE STRING "set ORB_ROOT")
add_subdirectory(idl)
-if(RTP)
- link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/lib)
- include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/include)
- set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb )
-else(RTP)
+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)
+option (HAVE_MEMORY_H "Define to 1 if you have the <memory.h> header file." ON)
+option (HAVE_NLIST_H "Define to 1 if you have the <nlist.h> header file." ON)
+option (HAVE_STDINT_H "Define to 1 if you have the <stdlib.h> header file." ON)
+option (HAVE_STRINGS_H "Define to 1 if you have the <strings.h> header file." ON)
+option (HAVE_STRING_H "Define to 1 if you have the <string.h> header file." ON)
+option (HAVE_SYS_STAT_H "Define to 1 if you have the <sys/stat.h> header file." ON)
+option (HAVE_SYS_TYPES_H "Define to 1 if you have the <sys/types.h> header file." ON)
+option (HAVE_UNAME "Define to 1 if you have the `uname' function." ON)
+option (HAVE_UNISTD_H "Define to 1 if you have the <unistd.h> header file." ON)
+option (ORB_IS_MICO "ORB is MICO" OFF)
+option (ORB_IS_OMNIORB "ORB is omniORB" OFF)
+option (ORB_IS_ORBEXPRESS "ORB is ORBexpresds" OFF)
+option (ORB_IS_ORBACUS "ORB is ORBacus" OFF)
+option (ORB_IS_ORBIT2 "ORB is ORBit2" OFF)
+option (ORB_IS_ORBIX "ORB is Orbix" OFF)
+option (ORB_IS_RTORB "ORB is RtORB" OFF)
+option (ORB_IS_TAO "ORB is TAO" OFF)
+option (RTM_PACKAGE "Name of package" OFF)
+option (RTM_PACKAGE_BUGREPORT "Define to the address where bug reports for this package should be sent." OFF)
+option (RTM_PACKAGE_NAME "Define to the full name of this package." OFF)
+option (RTM_PACKAGE_STRING "Define to the full name and version of this package." OFF)
+option (RTM_PACKAGE_TARNAME "Define to the one symbol short name of this package." OFF)
+option (RTM_PACKAGE_URL "Define to the home page for this package." OFF)
+option (RTM_PACKAGE_VERSION "Define to the version of this package." OFF)
+option (PYTHON_WRAPPER " Python wrapper is enable" OFF)
+option (RTC_CORBA_CXXMAPPING11 "CORBA C++ mapping is ver1.1" OFF)
+option (RTC_SOCK_DATAPORT "Socket DataPort is enable" OFF)
+option (RTM_GCC2 "RTM is compiled with gcc2" OFF)
+option (RTM_OMNIORB_40 "omniORB version is 4.0" OFF)
+option (RTM_OMNIORB_41 "omniORB version is 4.1" OFF)
+option (RTM_OMNIORB_42 "omniORB version is 4.2" OFF)
+option (RTM_OS_CYGWIN "OS is Cygwin" OFF)
+option (RTM_OS_DARWIN "OS is Max OS X" OFF)
+option (RTM_OS_FREEBSD "OS is FreeBSD" OFF)
+option (RTM_OS_HPUX "OS is HP-UX" OFF)
+option (RTM_OS_IRIX "OS is IRIX" OFF)
+option (RTM_OS_LINUX "OS is Linux" OFF)
+option (RTM_OS_VXWORKS "OS is VxWorks" OFF)
+option (RTM_OS_OSF1 "OS is OSF1" OFF)
+option (RTM_OS_QNX "OS is QNX" OFF)
+option (RTM_OS_SUNOS "OS is SunOS" OFF)
+option (RTM_RTDSC "RDTSC is enable" OFF)
+option (WITH_DMALLOC "Define if using the dmalloc debugging malloc package" OFF)
+option (_REENTRANT "Multi Thread Support" ON)
- link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib)
- include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/include)
- link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/lib)
- include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/include)
-
- set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb )
+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.")
+
+
+
+
+
+
+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")
-#ADD_DEFINITIONS (-DORB_IS_ORBEXPRESS)
-ADD_DEFINITIONS("-Wpointer-arith -Wwrite-strings -Waggregate-return -Wredundant-decls -Wno-unused -Wshadow -Wundef -Wold-style-cast -fno-implement-inlines -fvolatile -ansi -msoft-float ")
+if(NOT ORB_ROOT)
+ message(FATAL_ERROR "Please set ORB_ROOT.")
+endif()
+
+
+
+if(CORBA MATCHES "ORBExpress")
+ if(RTP)
+ link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/lib)
+ include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_Rp/config_rt_fast/include)
+ set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb )
+
+ else(RTP)
+
+ link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/lib)
+ include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/include)
+
+
+ link_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/lib)
+ include_directories(${ORB_ROOT}/target/ppc_8xx-vxworks_6.6/gcc_4.1.2_ExLcRi/config_rt_full/OENames_2.1.6/include)
+
+ set(ORB_LIBRARIES OEtcp OEmirror OEbridge OEudp OEipmc OEshrmem OEudp OEorb )
+
+ endif()
+ ADD_DEFINITIONS("-Wpointer-arith -Wwrite-strings -Waggregate-return -Wredundant-decls -Wno-unused -Wshadow -Wundef -Wold-style-cast -fno-implement-inlines -fvolatile -ansi -msoft-float ")
+ set (ORB_IS_ORBEXPRESS ON)
+elseif(CORBA MATCHES "omniORB")
+ if(RTP)
+ link_directories(${ORB_ROOT}/lib/simpentium_vxWorks_RTP_6.9)
+ else(RTP)
+ link_directories(${ORB_ROOT}/lib/simlinux_vxWorks_kernel_6.9)
+ endif()
+ include_directories(${ORB_ROOT}/include)
+ set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread )
+ SET (ORB_C_FLAGS_LIST
+ -D__vxWorks__
+ -D__x86__
+ )
+ ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+ set (ORB_IS_OMNIORB ON)
+endif()
+
+
+#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()
+
+
+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)
+
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/coil/common
- ${CMAKE_SOURCE_DIR}/coil/vxworks
+ ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/coil/${COIL_OS_DIR}
${PROJECT_BINARY_DIR}/..
)
@@ -102,15 +224,18 @@
InPortCorbaCdrConsumer.cpp
FactoryInit.cpp
SdoServiceAdmin.cpp
+ InPortConnector.cpp
+ OutPortConnector.cpp
+ NumberingPolicy.cpp
)
+#message(STATUS ${ALL_IDL_SRCS})
+#message(STATUS ${ORB_LIBRARIES})
+#add_executable(rtm rtcd.cpp TestRTC.cpp ${rtm_srcs} ${ALL_IDL_SRCS})
+add_library(rtm STATIC ${rtm_srcs} ${ALL_IDL_SRCS} )
-
-add_executable(rtm rtcd.cpp TestRTC.cpp ${rtm_srcs} ${ALL_IDL_SRCS})
-#add_library(rtm STATIC ${rtm_srcs} ${ALL_IDL_SRCS} )
-
set_source_files_properties(${ALL_IDL_SRCS} PROPERTIES GENERATED 1)
if(NOT TARGET ALL_IDL_TGT)
Modified: trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp 2017-06-19 10:52:34 UTC (rev 3004)
+++ trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp 2017-06-26 10:01:49 UTC (rev 3005)
@@ -235,7 +235,6 @@
//
// Get system information by using ACE_OS::uname (UNIX/Windows)
//
-#if not defined(VXWORKS) || defined(__RTP__)
coil::utsname sysinfo;
if (coil::uname(&sysinfo) != 0)
{
@@ -255,7 +254,7 @@
prop.setProperty("os.arch", sysinfo.machine);
prop.setProperty("os.hostname", sysinfo.nodename);
prop.setProperty("manager.pid", pidc);
-#endif
+
return;
}
Added: trunk/OpenRTM-aist/src/lib/rtm/version.h.in
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/version.h.in (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/version.h.in 2017-06-26 10:01:49 UTC (rev 3005)
@@ -0,0 +1,12 @@
+// This header file is automatically generated.
+// Do not edit this file.
+
+#ifndef INCLUDE_GUARD_VERSION_H
+#define INCLUDE_GUARD_VERSION_H
+
+static const char* openrtm_name = "@OPENRTM_NAME@";
+static const char* openrtm_version = "@OPENRTM_VERSION@";
+static const char* corba_name = "@CORBA_NAME@";
+
+#endif // INCLUDE_GUARD_VERSION_H
+
More information about the openrtm-commit
mailing list