[openrtm-commit:02800] r3039 - in trunk/OpenRTM-aist: . examples/AutoTest examples/SimpleService src src/lib/coil src/lib/coil/win32/coil src/lib/rtm src/lib/rtm/idl utils/rtm-skelwrapper
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 9月 5日 (火) 07:43:29 JST
Author: miyamoto
Date: 2017-09-05 07:43:29 +0900 (Tue, 05 Sep 2017)
New Revision: 3039
Modified:
trunk/OpenRTM-aist/CMakeLists.txt
trunk/OpenRTM-aist/convert_character_code.py
trunk/OpenRTM-aist/examples/AutoTest/AutoTestService.idl
trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleService/MyService.idl
trunk/OpenRTM-aist/src/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/win32/coil/Time.h
trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp
trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.h
trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h
trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPort.h
trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrConsumer.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp
trunk/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h
trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrConsumer.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortPushConnector.cpp
trunk/OpenRTM-aist/src/lib/rtm/RTC.h
trunk/OpenRTM-aist/src/lib/rtm/idl/BasicDataType.idl
trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/rtm/idl/DataPort.idl
trunk/OpenRTM-aist/src/lib/rtm/idl/SDOPackage.idl
trunk/OpenRTM-aist/utils/rtm-skelwrapper/skel_wrapper.py
Log:
[build, CMake] Support TAO.
Modified: trunk/OpenRTM-aist/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/CMakeLists.txt 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/CMakeLists.txt 2017-09-04 22:43:29 UTC (rev 3039)
@@ -49,6 +49,17 @@
endif()
SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf -Wbshortcut)
#SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf)
+elseif(CORBA MATCHES "TAO")
+ if(NOT IDL_COMPILE_COMMAND)
+ if(VXWORKS)
+ message(FATAL_ERROR "Please set IDL_COMPILE_COMMAND.")
+ elseif(UNIX)
+ set(IDL_COMPILE_COMMAND ${ORB_ROOT}/bin/tao_idl)
+ elseif(MSVC)
+ set(IDL_COMPILE_COMMAND ${ORB_ROOT}/bin/tao_idl)
+ endif(VXWORKS)
+ endif()
+ SET(IDLCOMMAND_FLAGS -as -DTAO_IDL -I${ORB_ROOT}/TAO)
endif()
if(UNIX)
@@ -111,6 +122,11 @@
-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
)
+ if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ set(ORB_C_FLAGS_LIST ${ORB_C_FLAGS_LIST} -D__powerpc__)
+ else()
+ set(ORB_C_FLAGS_LIST ${ORB_C_FLAGS_LIST} -D__x86__)
+ endif()
ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
elseif(CORBA MATCHES "omniORB")
set(CORBA_NAME "omniORB" CACHE STRING "CORBA name.")
@@ -152,7 +168,30 @@
ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
+elseif(CORBA MATCHES "TAO")
+ set(CORBA_NAME "TAO" CACHE STRING "CORBA name.")
+ if(VXWORKS)
+ if("${VX_CPU_FAMILY}" STREQUAL "ppc")
+ SET(ORB_C_FLAGS_LIST -D__powerpc__)
+ else()
+ SET(ORB_C_FLAGS_LIST -D__x86__)
+ endif()
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib)
+ set(ORB_LIBRARIES ACE TAO TAO_AnyTypeCode TAO_PortableServer TAO_Svc_Utils TAO_CosNaming TAO_IORTable TAO_CodecFactory TAO_PI TAO_Utils)
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/include)
+ elseif(UNIX)
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib)
+ set(ORB_LIBRARIES ACE TAO TAO_AnyTypeCode TAO_PortableServer TAO_Svc_Utils TAO_CosNaming TAO_IORTable TAO_CodecFactory TAO_PI TAO_Utils)
+ set(ORB_INCLUDE_DIR ${ORB_ROOT}/include)
+ elseif(MSVC)
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib)
+ set(ORB_LIBRARIES optimized;ACE;optimized;TAO;optimized;TAO_AnyTypeCode;optimized;TAO_PortableServer;optimized;TAO_Svc_Utils;optimized;TAO_CosNaming;optimized;TAO_IORTable;optimized;TAO_CodecFactory;optimized;TAO_PI;optimized;TAO_Utils;debug;ACEd;debug;TAOd;debug;TAO_AnyTypeCoded;debug;TAO_PortableServerd;debug;TAO_Svc_Utilsd;debug;TAO_CosNamingd;debug;TAO_IORTabled;debug;TAO_CodecFactoryd;debug;TAO_PId;debug;TAO_Utilsd;iphlpapi)
+ set(ORB_INCLUDE_DIR ${ORB_ROOT} ${ORB_ROOT}/TAO ${ORB_ROOT}/TAO/orbsvcs)
+ SET(ORB_C_FLAGS_LIST ${ORB_C_FLAGS_LIST} -D_WINSOCKAPI_ -DWITH_ACE)
+ endif()
+
+ ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
endif()
@@ -243,6 +282,12 @@
if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
set(RTM_VC_VER "vc14")
endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 15 2017")
+ set(RTM_VC_VER "vc141")
+ endif()
+ if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 15 2017 Win64")
+ set(RTM_VC_VER "vc141")
+ endif()
set(COIL_PROJECT_NAME ${COIL_PROJECT_NAME}_${RTM_VC_VER})
set(RTM_PROJECT_NAME ${RTM_PROJECT_NAME}_${RTM_VC_VER})
endif()
@@ -256,3 +301,6 @@
add_subdirectory(examples)
add_subdirectory(utils)
+if(WIN32)
+ install(FILES ${CMAKE_SOURCE_DIR}/win32/OpenRTM-aist/bin/rtm-naming.bat DESTINATION bin)
+endif(WIN32)
\ No newline at end of file
Modified: trunk/OpenRTM-aist/convert_character_code.py
===================================================================
--- trunk/OpenRTM-aist/convert_character_code.py 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/convert_character_code.py 2017-09-04 22:43:29 UTC (rev 3039)
@@ -22,7 +22,8 @@
"src/lib/coil/common",
os.path.join("src/lib/coil", target, "coil"),
"examples/*",
- "utils/*"]
+ "utils/*",
+ "src/ext/*/*"]
#path_list = [os.path.join("src/lib/coil", target, "coil")]
for p in path_list:
@@ -34,12 +35,16 @@
with open(n, mode='rb') as f:
encoding = chardet.detect(f.read())["encoding"]
str_list = []
- with codecs.open(n, "r", encoding) as f:
- for row in f:
- str_list.append(row)
- with codecs.open(n, "w", code) as f:
- for row in str_list:
- f.write(row)
+ if encoding != code:
+ try:
+ with codecs.open(n, "r", encoding) as f:
+ for row in f:
+ str_list.append(row)
+ with codecs.open(n, "w", code) as f:
+ for row in str_list:
+ f.write(row)
+ except:
+ pass
Modified: trunk/OpenRTM-aist/examples/AutoTest/AutoTestService.idl
===================================================================
--- trunk/OpenRTM-aist/examples/AutoTest/AutoTestService.idl 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/examples/AutoTest/AutoTestService.idl 2017-09-04 22:43:29 UTC (rev 3039)
@@ -1,3 +1,7 @@
+#ifdef TAO_IDL
+#include <tao/orb.idl>
+#endif
+
module AutoTest {
typedef sequence<string> EchoList;
typedef sequence<float> ValueList;
Modified: trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt 2017-09-04 22:43:29 UTC (rev 3039)
@@ -17,7 +17,7 @@
add_custom_command(
OUTPUT ${idl_name}Skel.cpp ${idl_name}Stub.cpp
- COMMAND ${IDL_COMPILE_COMMAND} ${IDLCOMMAND_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/rtm/idl ${CMAKE_CURRENT_SOURCE_DIR}/${idl_name}.idl
+ COMMAND ${IDL_COMPILE_COMMAND} ${IDLCOMMAND_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/src/lib/rtm/idl ${CMAKE_CURRENT_SOURCE_DIR}/${idl_name}.idl
COMMAND python ${SKELWRAPPER_COMMAND} --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=${idl_name}.idl
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
Modified: trunk/OpenRTM-aist/examples/SimpleService/MyService.idl
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/MyService.idl 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/examples/SimpleService/MyService.idl 2017-09-04 22:43:29 UTC (rev 3039)
@@ -1,3 +1,8 @@
+#ifdef TAO_IDL
+#include <tao/orb.idl>
+#endif
+
+
module SimpleService {
typedef sequence<string> EchoList;
typedef sequence<float> ValueList;
Modified: trunk/OpenRTM-aist/src/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/CMakeLists.txt 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/CMakeLists.txt 2017-09-04 22:43:29 UTC (rev 3039)
@@ -1,5 +1,6 @@
cmake_minimum_required (VERSION 2.6)
add_subdirectory(lib)
+add_subdirectory(ext)
set(RTM_INCLUDE_DIR ${RTM_INCLUDE_DIR} PARENT_SCOPE)
Modified: trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-09-04 22:43:29 UTC (rev 3039)
@@ -58,6 +58,9 @@
set (COIL_OS_WIN32 ON)
endif()
+#if(CORBA MATCHES "TAO")
+# set (WITH_ACE ON)
+#endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_coil_cmake.h.in ${PROJECT_BINARY_DIR}/config_coil.h)
@@ -169,6 +172,7 @@
elseif(WIN32)
set_source_files_properties(${DEF_FILE_NAME} PROPERTIES GENERATED 1)
add_dependencies(${COIL_PROJECT_NAME} ${COIL_PROJECT_NAME}_TGT)
+ add_dependencies(${COIL_PROJECT_NAME} ${COIL_PROJECT_NAME}_static)
install(TARGETS ${COIL_PROJECT_NAME} RUNTIME DESTINATION bin)
endif()
endif(VXWORKS)
Modified: trunk/OpenRTM-aist/src/lib/coil/win32/coil/Time.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/win32/coil/Time.h 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/coil/win32/coil/Time.h 2017-09-04 22:43:29 UTC (rev 3039)
@@ -21,7 +21,11 @@
#include <windows.h>
+#ifdef WITH_ACE
+#include <WinSock2.h>
+#else
#include <winsock.h>
+#endif
//#include <winsock2.h>
//#pragma comment(lib, "WS2_32.LIB")
#include <time.h>
Modified: trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-09-04 22:43:29 UTC (rev 3039)
@@ -88,7 +88,9 @@
else()
set (RTM_OMNIORB_42 ON)
endif()
- set (ORB_IS_OMNIORB ON)
+ set (ORB_IS_OMNIORB ON)
+elseif(CORBA MATCHES "TAO")
+ set (ORB_IS_TAO ON)
endif()
@@ -351,9 +353,9 @@
add_dependencies(${RTM_PROJECT_NAME}_TGT ${RTM_PROJECT_NAME}_static)
set(rtm_srcs ${rtm_srcs} ${CMAKE_CURRENT_BINARY_DIR}/${DEF_FILE_NAME})
- #get_property(rtcskel_location TARGET RTCSkel PROPERTY LOCATION)
- #add_custom_command(OUTPUT RTCSkel.def
- # COMMAND python ${MAKE_DEF_COMMAND} ${rtcskel_location} RTCSkel ${RTM_SHORT_VERSION} RTCSkel.def
+ #get_property(rtcskel_location TARGET ${RTCSKEL_PROJECT_NAME} PROPERTY LOCATION)
+ #add_custom_command(OUTPUT ${RTCSKEL_PROJECT_NAME}.def
+ # COMMAND python ${MAKE_DEF_COMMAND} ${rtcskel_location} ${RTCSKEL_PROJECT_NAME} ${RTM_SHORT_VERSION} ${RTCSKEL_PROJECT_NAME}.def
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
#)
@@ -380,6 +382,7 @@
elseif(WIN32)
set_source_files_properties(${DEF_FILE_NAME} PROPERTIES GENERATED 1)
add_dependencies(${RTM_PROJECT_NAME} ${RTM_PROJECT_NAME}_TGT)
+ add_dependencies(${RTM_PROJECT_NAME} ${RTM_PROJECT_NAME}_static)
install(TARGETS ${RTM_PROJECT_NAME} RUNTIME DESTINATION bin)
endif()
endif(VXWORKS)
Modified: trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -32,7 +32,7 @@
typedef _CORBA_Unbounded_Sequence_String StringUSequence;
#endif
-#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS)
+#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)
// prototype of static functions
static void print_key(std::stringstream& s, OctetUSequence& key);
@@ -53,7 +53,7 @@
* @brief Convert from IOR string to IOR structure
* @endif
*/
-#ifndef ORB_IS_ORBEXPRESS
+#if not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)
bool toIOR(const char* iorstr, IOP::IOR& ior)
{
#ifndef ORB_IS_RTORB
@@ -121,7 +121,7 @@
* @brief Convert from IOR structure to IOR string
* @endif
*/
-#ifndef ORB_IS_ORBEXPRESS
+#if not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)
bool toString(IOP::IOR& ior, std::string& iorstr)
{
#ifndef ORB_IS_RTORB
@@ -185,7 +185,7 @@
*/
bool replaceEndpoint(std::string& iorstr, const std::string& endpoint)
{
-#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS)
+#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)
try
{
IOP::IOR ior;
@@ -231,7 +231,7 @@
std::string formatIORinfo(const char* iorstr)
{
std::stringstream retstr;
-#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS)
+#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)
IOP::IOR ior;
toIOR(iorstr, ior);
@@ -293,7 +293,7 @@
}
-#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS)
+#if not defined(ORB_IS_RTORB) && not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)
//------------------------------------------------------------
// static functions
Modified: trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.h 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/CORBA_IORUtil.h 2017-09-04 22:43:29 UTC (rev 3039)
@@ -50,7 +50,7 @@
*
* @endif
*/
-#ifndef ORB_IS_ORBEXPRESS
+#if not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)
bool toIOR(const char* iorstr, IOP::IOR& ior);
#endif
@@ -63,7 +63,7 @@
*
* @endif
*/
-#ifndef ORB_IS_ORBEXPRESS
+#if not defined(ORB_IS_ORBEXPRESS) && not defined(ORB_IS_TAO)S
bool toString(IOP::IOR& ior, std::string& iorstr);
#endif
Modified: trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/ConnectorListener.h 2017-09-04 22:43:29 UTC (rev 3039)
@@ -336,6 +336,8 @@
DataType data;
#ifdef ORB_IS_ORBEXPRESS
cdrMemoryStream cdr(cdrdata);
+#elif defined(ORB_IS_TAO)
+ cdrMemoryStream cdr(cdrdata);
#else
cdrMemoryStream cdr(cdrdata.bufPtr(), cdrdata.bufSize());
#endif
@@ -357,6 +359,8 @@
cdr.is_little_endian(false);
}
cdr >> data;
+#elif defined(ORB_IS_TAO)
+ cdr.cdr << data;
#else
if (endian[0] == "little")
{
Modified: trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -18,7 +18,7 @@
*/
#ifdef WIN32
-#define ACE_HAS_WINSOCK2 0
+//#define ACE_HAS_WINSOCK2 0
#endif //WIN32
#include <assert.h>
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPort.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPort.h 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPort.h 2017-09-04 22:43:29 UTC (rev 3039)
@@ -442,6 +442,8 @@
RTC_DEBUG(("data read succeeded"));
#ifdef ORB_IS_ORBEXPRESS
cdr >> m_value;
+#elif defined(ORB_IS_TAO)
+ TAO_InputCDR(cdr.cdr) >> m_value;
#else
m_value <<= cdr;
#endif
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrConsumer.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrConsumer.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrConsumer.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -77,6 +77,10 @@
*static_cast<CORBA::Octet*>(to) = data_tmp.read_octet();
::OpenRTM::CdrData tmp(data_tmp.size_written(), data_tmp.size_written(),
to, 0);
+#elif defined(ORB_IS_TAO)
+ char *c = const_cast<char*>(data.cdr.buffer());
+ ::OpenRTM::CdrData tmp(data.cdr.length(), data.cdr.length(),
+ reinterpret_cast<CORBA::Octet*>(c), 0);
#else
::OpenRTM::CdrData tmp(data.bufSize(), data.bufSize(),
static_cast<CORBA::Octet*>(data.bufPtr()), 0);
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -160,6 +160,8 @@
cdrMemoryStream cdr;
#ifdef ORB_IS_ORBEXPRESS
cdr.write_array_1(data.get_buffer(), data.length());
+#elif defined(ORB_IS_TAO)
+ cdr.cdr.write_octet_array(data.get_buffer(), data.length());
#else
cdr.put_octet_array(&(data[0]), data.length());
#endif
@@ -178,6 +180,10 @@
cdr.is_little_endian(endian_type);
cdr.write_array_1(data.get_buffer(), data.length());
RTC_PARANOID(("converted CDR data size: %d", cdr.size_written()));
+#elif defined(ORB_IS_TAO)
+ //cdr.setByteSwapFlag(endian_type);
+ cdr.cdr.write_octet_array(data.get_buffer(), data.length());
+ RTC_PARANOID(("converted CDR data size: %d", cdr.cdr.length()));
#else
cdr.setByteSwapFlag(endian_type);
cdr.put_octet_array(&(data[0]), data.length());
Modified: trunk/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -838,6 +838,7 @@
*/
bool ManagerServant::createINSManager()
{
+#ifndef ORB_IS_TAO
try
{
//Ppreparing INS POA
@@ -881,6 +882,9 @@
{
return false;
}
+#else
+ m_objref = _this();
+#endif
return true;
}
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h 2017-09-04 22:43:29 UTC (rev 3039)
@@ -254,6 +254,10 @@
RTC_TRACE(("connector endian: %s", isLittleEndian() ? "little":"big"));
m_cdr.is_little_endian(isLittleEndian());
m_cdr << data;
+#elif defined(ORB_IS_TAO)
+ //m_cdr.cdr.;
+ RTC_TRACE(("connector endian: %s", isLittleEndian() ? "little" : "big"));
+ m_cdr.cdr << data;
#else
m_cdr.rewindPtrs();
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrConsumer.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrConsumer.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrConsumer.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -108,6 +108,8 @@
RTC_DEBUG(("get() successful"));
#ifdef ORB_IS_ORBEXPRESS
data.write_array_1(cdr_data->get_buffer(), (CORBA::ULong)cdr_data->length());
+#elif defined(ORB_IS_TAO)
+ data.cdr.write_octet_array(cdr_data->get_buffer(), (CORBA::ULong)cdr_data->length());
#else
data.put_octet_array(&(cdr_data[0]), (int)cdr_data->length());
#endif
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -182,6 +182,8 @@
{
#ifdef ORB_IS_ORBEXPRESS
CORBA::ULong len((CORBA::ULong)cdr.size_written());
+#elif defined(ORB_IS_TAO)
+ CORBA::ULong len((CORBA::ULong)cdr.cdr.length());
#else
CORBA::ULong len((CORBA::ULong)cdr.bufSize());
#endif
@@ -195,6 +197,9 @@
data->length(len);
#ifdef ORB_IS_ORBEXPRESS
cdr.read_array_1(data->get_buffer(), len);
+#elif defined(ORB_IS_TAO)
+ TAO_InputCDR cdr_tmp = cdr.cdr;
+ cdr_tmp.read_octet_array(&((*data)[0]), len);
#else
cdr.get_octet_array(&((*data)[0]), len);
#endif
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortPushConnector.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortPushConnector.cpp 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortPushConnector.cpp 2017-09-04 22:43:29 UTC (rev 3039)
@@ -88,6 +88,8 @@
RTC_TRACE(("write()"));
#ifdef ORB_IS_ORBEXPRESS
RTC_PARANOID(("data size = %d bytes", data.size_written()));
+#elif defined(ORB_IS_TAO)
+ RTC_PARANOID(("data size = %d bytes", data.cdr.length()));
#else
RTC_PARANOID(("data size = %d bytes", data.bufSize()));
#endif
Modified: trunk/OpenRTM-aist/src/lib/rtm/RTC.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/RTC.h 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/RTC.h 2017-09-04 22:43:29 UTC (rev 3039)
@@ -85,10 +85,33 @@
namespace RTC
{
typedef coil::Properties Properties;
+
+};
+
#ifdef ORB_IS_ORBEXPRESS
- typedef CORBA::Stream cdrMemoryStream;
+typedef CORBA::Stream cdrMemoryStream;
+#elif defined(ORB_IS_TAO)
+class cdrMemoryStream
+{
+public:
+ cdrMemoryStream()
+ {
+ };
+ cdrMemoryStream(const cdrMemoryStream& rhs)
+ {
+ cdr.write_char_array(rhs.cdr.buffer(), rhs.cdr.length());
+ };
+
+ cdrMemoryStream& operator= (const cdrMemoryStream& rhs)
+ {
+ cdr.write_char_array(rhs.cdr.buffer(), rhs.cdr.length());
+ return *this;
+ };
+
+ TAO_OutputCDR cdr;
+};
+//typedef TAO_OutputCDR cdrMemoryStream;
#endif
-};
//#endif // COMPAT_OPENRTM_0_4
Modified: trunk/OpenRTM-aist/src/lib/rtm/idl/BasicDataType.idl
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/idl/BasicDataType.idl 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/idl/BasicDataType.idl 2017-09-04 22:43:29 UTC (rev 3039)
@@ -18,7 +18,11 @@
#ifndef BasicDataType_idl
#define BasicDataType_idl
+#ifdef TAO_IDL
+#include <tao/orb.idl>
+#endif
+
module RTC {
//------------------------------------------------------------
// Basic data type definition
Modified: trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/idl/CMakeLists.txt 2017-09-04 22:43:29 UTC (rev 3039)
@@ -29,8 +29,8 @@
#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}Stub.cpp)
- set(ALL_IDL_SRCS ${ALL_IDL_SRCS} ${idl_name}Stub.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)
Modified: trunk/OpenRTM-aist/src/lib/rtm/idl/DataPort.idl
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/idl/DataPort.idl 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/idl/DataPort.idl 2017-09-04 22:43:29 UTC (rev 3039)
@@ -21,6 +21,10 @@
#ifndef DataInPort_idl
#define DataInPort_idl
+#ifdef TAO_IDL
+#include <tao/orb.idl>
+#endif
+
module OpenRTM
{
enum PortStatus
Modified: trunk/OpenRTM-aist/src/lib/rtm/idl/SDOPackage.idl
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/idl/SDOPackage.idl 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/src/lib/rtm/idl/SDOPackage.idl 2017-09-04 22:43:29 UTC (rev 3039)
@@ -34,7 +34,7 @@
#include <orb.idl>
#endif
#ifdef TAO_IDL
-#include <orb.idl>
+#include <tao/orb.idl>
#endif
#ifdef USE_MONITORING
#include <CosNotifyComm.idl>
Modified: trunk/OpenRTM-aist/utils/rtm-skelwrapper/skel_wrapper.py
===================================================================
--- trunk/OpenRTM-aist/utils/rtm-skelwrapper/skel_wrapper.py 2017-09-04 08:08:01 UTC (rev 3038)
+++ trunk/OpenRTM-aist/utils/rtm-skelwrapper/skel_wrapper.py 2017-09-04 22:43:29 UTC (rev 3039)
@@ -110,6 +110,7 @@
# include "[include_dir][basename]-skelimpl.c"
#elif defined ORB_IS_ORBEXPRESS
# include "[include_dir][basename].cc"
+# include "[include_dir][basename]_c.cc"
#else
# error "NO ORB defined"
#endif
More information about the openrtm-commit
mailing list