From 08948a7c222a0f154b3400f2e995378bacb53d27 Mon Sep 17 00:00:00 2001 From: n-kawauchi Date: Fri, 15 Dec 2023 16:10:08 +0900 Subject: [PATCH] Fixed bugs in sample RTC (cpack settings, RTC.xml). --- examples/ConsoleIn/.appveyor.yml | 2 +- examples/ConsoleIn/CMakeLists.txt | 13 +- examples/ConsoleIn/COPYING | 2 +- examples/ConsoleIn/COPYING.LESSER | 2 +- examples/ConsoleIn/README.md | 34 +----- examples/ConsoleIn/RTC.xml | 2 - examples/ConsoleIn/cmake/License.rtf | 2 +- examples/ConsoleIn/cmake/consolein.pc.in | 2 +- examples/ConsoleIn/doc/conf.py.in | 2 +- examples/ConsoleIn/doc/doxyfile.in | 2 +- examples/ConsoleIn/idl/CMakeLists.txt | 19 +-- .../ConsoleIn/include/ConsoleIn/ConsoleIn.h | 18 +-- .../ConsoleIn/scripts/ubuntu_1804/Dockerfile | 2 +- examples/ConsoleIn/src/ConsoleIn.cpp | 106 ++++++++--------- examples/ConsoleIn/src/ConsoleInComp.cpp | 4 +- .../include/ConsoleInTest/ConsoleInTest.h | 14 ++- examples/ConsoleIn/test/src/ConsoleInTest.cpp | 107 ++++++++--------- .../ConsoleIn/test/src/ConsoleInTestComp.cpp | 8 +- examples/ConsoleOut/.appveyor.yml | 2 +- examples/ConsoleOut/CMakeLists.txt | 13 +- examples/ConsoleOut/COPYING | 2 +- examples/ConsoleOut/COPYING.LESSER | 2 +- examples/ConsoleOut/README.md | 34 +----- examples/ConsoleOut/RTC.xml | 2 - examples/ConsoleOut/cmake/License.rtf | 2 +- examples/ConsoleOut/cmake/consoleout.pc.in | 2 +- examples/ConsoleOut/doc/conf.py.in | 2 +- examples/ConsoleOut/doc/doxyfile.in | 2 +- examples/ConsoleOut/idl/CMakeLists.txt | 19 +-- .../include/ConsoleOut/ConsoleOut.h | 18 +-- .../ConsoleOut/scripts/ubuntu_1804/Dockerfile | 2 +- examples/ConsoleOut/src/ConsoleOut.cpp | 106 ++++++++--------- examples/ConsoleOut/src/ConsoleOutComp.cpp | 4 +- .../include/ConsoleOutTest/ConsoleOutTest.h | 13 +- .../ConsoleOut/test/src/ConsoleOutTest.cpp | 111 +++++++++--------- .../test/src/ConsoleOutTestComp.cpp | 8 +- examples/MyServiceConsumer/RTC.xml | 2 +- 37 files changed, 275 insertions(+), 412 deletions(-) diff --git a/examples/ConsoleIn/.appveyor.yml b/examples/ConsoleIn/.appveyor.yml index d15601dae..03a3d4222 100644 --- a/examples/ConsoleIn/.appveyor.yml +++ b/examples/ConsoleIn/.appveyor.yml @@ -1,4 +1,4 @@ -version: '{build}' +version: '{build}' clone_folder: c:\workspace\ConsoleIn platform: - x64 diff --git a/examples/ConsoleIn/CMakeLists.txt b/examples/ConsoleIn/CMakeLists.txt index 07e36d502..0190b2689 100644 --- a/examples/ConsoleIn/CMakeLists.txt +++ b/examples/ConsoleIn/CMakeLists.txt @@ -18,7 +18,7 @@ set(PROJECT_SHORT_VER ${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}${PROJECT_ set(PROJECT_DESCRIPTION "Console input component") set(PROJECT_VENDOR "AIST") set(PROJECT_MAINTAINER "Noriaki Ando ") -set(PROJECT_TYPE "c++/examples") +set(PROJECT_TYPE "c++/example") find_package(OpenRTM REQUIRED) set(RTM_VER ${OPENRTM_VERSION}) @@ -106,18 +106,19 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Set up installation directories if(WIN32) - set(OPENRTM_SHARE_PREFIX "Components/${PROJECT_TYPE}/${RTM_VC_VER}") + set(RTM_COMPONENT_PREFIX "Components/${PROJECT_TYPE}") + set(OPENRTM_SHARE_PREFIX "OpenRTM-aist/${RTM_VER}/${RTM_COMPONENT_PREFIX}") + set(INSTALL_PREFIX ${PROJECT_NAME}) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}/${OPENRTM_SHARE_PREFIX}" CACHE PATH "..." FORCE) + set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}/${RTM_COMPONENT_PREFIX}" CACHE PATH "..." FORCE) else() - set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${RTM_VER}/${OPENRTM_SHARE_PREFIX}") + set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${OPENRTM_SHARE_PREFIX}") endif() - set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}) else(WIN32) set(OPENRTM_SHARE_PREFIX "share/openrtm-${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}") set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}/${PROJECT_NAME}") endif(WIN32) - + # Subdirectories add_subdirectory(cmake) if(BUILD_DOCUMENTATION) diff --git a/examples/ConsoleIn/COPYING b/examples/ConsoleIn/COPYING index b4345876d..94a9ed024 100644 --- a/examples/ConsoleIn/COPYING +++ b/examples/ConsoleIn/COPYING @@ -1,4 +1,4 @@ - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. diff --git a/examples/ConsoleIn/COPYING.LESSER b/examples/ConsoleIn/COPYING.LESSER index 9cff3c49a..65c5ca88a 100644 --- a/examples/ConsoleIn/COPYING.LESSER +++ b/examples/ConsoleIn/COPYING.LESSER @@ -1,4 +1,4 @@ - GNU LESSER GENERAL PUBLIC LICENSE + GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. diff --git a/examples/ConsoleIn/README.md b/examples/ConsoleIn/README.md index 17e5be8e6..f489f5230 100644 --- a/examples/ConsoleIn/README.md +++ b/examples/ConsoleIn/README.md @@ -1,4 +1,4 @@ -# ConsoleIn +# ConsoleIn ## Overview @@ -62,36 +62,12 @@ Console input component - on_activated - implemented - - Description - - - - PreCondition - - - - PostCondition - - + on_activated + - on_deactivated - implemented - - Description - - - - PreCondition - - - - PostCondition - - + on_deactivated + on_execute diff --git a/examples/ConsoleIn/RTC.xml b/examples/ConsoleIn/RTC.xml index d603bdfc2..9f6a81447 100644 --- a/examples/ConsoleIn/RTC.xml +++ b/examples/ConsoleIn/RTC.xml @@ -16,8 +16,6 @@ - - diff --git a/examples/ConsoleIn/cmake/License.rtf b/examples/ConsoleIn/cmake/License.rtf index 61047b13c..9dd0f54eb 100644 --- a/examples/ConsoleIn/cmake/License.rtf +++ b/examples/ConsoleIn/cmake/License.rtf @@ -1,4 +1,4 @@ -{\rtf1\ansi\ansicpg932\deff0\deflang1033\deflangfe1041{\fonttbl{\f0\froman\fprq1\fcharset128 \'82\'6c\'82\'72 \'82\'6f\'83\'53\'83\'56\'83\'62\'83\'4e;}} +{\rtf1\ansi\ansicpg932\deff0\deflang1033\deflangfe1041{\fonttbl{\f0\froman\fprq1\fcharset128 \'82\'6c\'82\'72 \'82\'6f\'83\'53\'83\'56\'83\'62\'83\'4e;}} {\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\lang1041\f0\fs20 LICENSE\par =======\par \par diff --git a/examples/ConsoleIn/cmake/consolein.pc.in b/examples/ConsoleIn/cmake/consolein.pc.in index 2858d3a55..beac6be13 100644 --- a/examples/ConsoleIn/cmake/consolein.pc.in +++ b/examples/ConsoleIn/cmake/consolein.pc.in @@ -1,4 +1,4 @@ -# This file was generated by CMake for @PROJECT_NAME@ +# This file was generated by CMake for @PROJECT_NAME@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=${prefix}/@LIB_INSTALL_DIR@ diff --git a/examples/ConsoleIn/doc/conf.py.in b/examples/ConsoleIn/doc/conf.py.in index 32059d06b..b75dc1129 100644 --- a/examples/ConsoleIn/doc/conf.py.in +++ b/examples/ConsoleIn/doc/conf.py.in @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # # ConsoleIn documentation build configuration file, created by # sphinx-quickstart on Mon Aug 8 11:28:05 2011. diff --git a/examples/ConsoleIn/doc/doxyfile.in b/examples/ConsoleIn/doc/doxyfile.in index da64d2cca..3ffaecf37 100644 --- a/examples/ConsoleIn/doc/doxyfile.in +++ b/examples/ConsoleIn/doc/doxyfile.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.20 +# Doxyfile 1.8.20 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- diff --git a/examples/ConsoleIn/idl/CMakeLists.txt b/examples/ConsoleIn/idl/CMakeLists.txt index 4348229db..6fe518da5 100644 --- a/examples/ConsoleIn/idl/CMakeLists.txt +++ b/examples/ConsoleIn/idl/CMakeLists.txt @@ -15,26 +15,9 @@ macro(_COMPILE_IDL _idl_file) else(WIN32) set(_python_command "python3") endif(WIN32) - - if(${OPENRTM_VERSION_MAJOR} LESS 2) - if(NOT WIN32) - execute_process(COMMAND rtm-config --prefix OUTPUT_VARIABLE OPENRTM_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND rtm-config --idlflags OUTPUT_VARIABLE OPENRTM_IDLFLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE) - separate_arguments(OPENRTM_IDLFLAGS) - execute_process(COMMAND rtm-config --idlc OUTPUT_VARIABLE OPENRTM_IDLC - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(_rtm_skelwrapper_command "rtm-skelwrapper") - else(NOT WIN32) - set(_rtm_skelwrapper_command "rtm-skelwrapper.py") - endif(NOT WIN32) - set(OPENRTM_IDL_WRAPPER ${_rtm_skelwrapper_command}) - set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir= --skel-suffix=Skel --stub-suffix=Stub --idl-file=${_idl}.idl) - endif() add_custom_command(OUTPUT ${${_idl_srcs_var}} - COMMAND ${_python_command} ${OPENRTM_DIR}/bin/${_rtm_skelwrapper_command} --include-dir= --skel-suffix=Skel --stub-suffix=Stub --idl-file=${_idl}.idl + COMMAND ${_python_command} ${OPENRTM_DIR}/bin/${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${_idl}.idl COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${_idl_file} WORKING_DIRECTORY ${CURRENT_BINARY_DIR} DEPENDS ${_idl_file} diff --git a/examples/ConsoleIn/include/ConsoleIn/ConsoleIn.h b/examples/ConsoleIn/include/ConsoleIn/ConsoleIn.h index 233f7d240..9c8f95cc1 100644 --- a/examples/ConsoleIn/include/ConsoleIn/ConsoleIn.h +++ b/examples/ConsoleIn/include/ConsoleIn/ConsoleIn.h @@ -1,17 +1,11 @@ -// -*- C++ -*- +// -*- C++ -*- // -/*! \mainpage - * - * @author Noriaki Ando - * - */ - - /*! +/*! * @file ConsoleIn.h * @brief Console input component - * @date $Date$ * - * $Id$ + * @author Noriaki Ando + * */ // @@ -180,7 +174,7 @@ class ConsoleIn * * */ - // RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; /*** * @@ -192,7 +186,7 @@ class ConsoleIn * * */ - // RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; /*** * diff --git a/examples/ConsoleIn/scripts/ubuntu_1804/Dockerfile b/examples/ConsoleIn/scripts/ubuntu_1804/Dockerfile index 5722ef5d0..686af0c82 100644 --- a/examples/ConsoleIn/scripts/ubuntu_1804/Dockerfile +++ b/examples/ConsoleIn/scripts/ubuntu_1804/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:18.04 RUN apt-get update\ && apt-get install -y --no-install-recommends\ diff --git a/examples/ConsoleIn/src/ConsoleIn.cpp b/examples/ConsoleIn/src/ConsoleIn.cpp index 770f34795..c936a31ee 100644 --- a/examples/ConsoleIn/src/ConsoleIn.cpp +++ b/examples/ConsoleIn/src/ConsoleIn.cpp @@ -1,13 +1,11 @@ -// -*- C++ -*- +// -*- C++ -*- // /*! * @file ConsoleIn.cpp * @brief Console input component - * @date $Date$ * * @author Noriaki Ando * - * $Id$ */ // @@ -122,33 +120,30 @@ RTC::ReturnCode_t ConsoleIn::onFinalize() } */ -/* -RTC::ReturnCode_t ConsoleIn::onStartup(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleIn::onShutdown(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleIn::onStartup(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleIn::onActivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleIn::onDeactivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleIn::onShutdown(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleIn::onActivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleIn::onDeactivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + RTC::ReturnCode_t ConsoleIn::onExecute(RTC::UniqueId /*ec_id*/) { @@ -172,40 +167,35 @@ RTC::ReturnCode_t ConsoleIn::onExecute(RTC::UniqueId /*ec_id*/) return RTC::RTC_OK; } -/* -RTC::ReturnCode_t ConsoleIn::onAborting(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleIn::onError(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleIn::onAborting(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleIn::onReset(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleIn::onStateUpdate(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleIn::onError(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleIn::onRateChanged(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ + +//RTC::ReturnCode_t ConsoleIn::onReset(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleIn::onStateUpdate(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleIn::onRateChanged(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} @@ -221,5 +211,3 @@ extern "C" } } - - diff --git a/examples/ConsoleIn/src/ConsoleInComp.cpp b/examples/ConsoleIn/src/ConsoleInComp.cpp index 0613108b5..2075ea24d 100644 --- a/examples/ConsoleIn/src/ConsoleInComp.cpp +++ b/examples/ConsoleIn/src/ConsoleInComp.cpp @@ -1,13 +1,11 @@ -// -*- C++ -*- +// -*- C++ -*- // /*! * @file ConsoleInComp.cpp * @brief Standalone component - * @date $Date$ * * @author Noriaki Ando * - * $Id$ */ // diff --git a/examples/ConsoleIn/test/include/ConsoleInTest/ConsoleInTest.h b/examples/ConsoleIn/test/include/ConsoleInTest/ConsoleInTest.h index 290df2bb2..1a9bf5733 100644 --- a/examples/ConsoleIn/test/include/ConsoleInTest/ConsoleInTest.h +++ b/examples/ConsoleIn/test/include/ConsoleInTest/ConsoleInTest.h @@ -1,11 +1,13 @@ -// -*- C++ -*- +// -*- C++ -*- +// /*! * @file ConsoleInTest.h - * @brief Console input component - * @date $Date$ + * @brief Console input component (test code) + * + * @author Noriaki Ando * - * $Id$ */ +// #ifndef CONSOLEIN_TEST__H #define CONSOLEIN_TEST_H @@ -113,7 +115,7 @@ class ConsoleInTest * * */ - RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; /*** * @@ -125,7 +127,7 @@ class ConsoleInTest * * */ - RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; /*** * diff --git a/examples/ConsoleIn/test/src/ConsoleInTest.cpp b/examples/ConsoleIn/test/src/ConsoleInTest.cpp index 8a9c3e6ca..505e81c64 100644 --- a/examples/ConsoleIn/test/src/ConsoleInTest.cpp +++ b/examples/ConsoleIn/test/src/ConsoleInTest.cpp @@ -1,13 +1,13 @@ -// -*- C++ -*- +// -*- C++ -*- +// /*! * @file ConsoleInTest.cpp - * @brief Console input component - * @date $Date$ + * @brief Console input component (test code) * * @author Noriaki Ando * - * $Id$ */ +// #include "ConsoleInTest.h" @@ -82,72 +82,65 @@ RTC::ReturnCode_t ConsoleInTest::onFinalize() } */ -/* -RTC::ReturnCode_t ConsoleInTest::onStartup(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleInTest::onShutdown(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleInTest::onStartup(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -RTC::ReturnCode_t ConsoleInTest::onActivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} +//RTC::ReturnCode_t ConsoleInTest::onShutdown(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -RTC::ReturnCode_t ConsoleInTest::onDeactivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} +//RTC::ReturnCode_t ConsoleInTest::onActivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -RTC::ReturnCode_t ConsoleInTest::onExecute(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} +//RTC::ReturnCode_t ConsoleInTest::onDeactivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleInTest::onAborting(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleInTest::onError(RTC::UniqueId ec_id) +RTC::ReturnCode_t ConsoleInTest::onExecute(RTC::UniqueId /*ec_id*/) { return RTC::RTC_OK; } -*/ -/* -RTC::ReturnCode_t ConsoleInTest::onReset(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleInTest::onStateUpdate(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleInTest::onAborting(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleInTest::onError(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleInTest::onReset(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleInTest::onRateChanged(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ + +//RTC::ReturnCode_t ConsoleInTest::onStateUpdate(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleInTest::onRateChanged(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} bool ConsoleInTest::runTest() @@ -167,6 +160,4 @@ extern "C" RTC::Delete); } -}; - - +} diff --git a/examples/ConsoleIn/test/src/ConsoleInTestComp.cpp b/examples/ConsoleIn/test/src/ConsoleInTestComp.cpp index c44d0f243..6c4e535b0 100644 --- a/examples/ConsoleIn/test/src/ConsoleInTestComp.cpp +++ b/examples/ConsoleIn/test/src/ConsoleInTestComp.cpp @@ -1,13 +1,13 @@ -// -*- C++ -*- +// -*- C++ -*- +// /*! * @file ConsoleInTestComp.cpp - * @brief Standalone component - * @date $Date$ + * @brief Standalone component (test code) * * @author Noriaki Ando * - * $Id$ */ +// #include #include diff --git a/examples/ConsoleOut/.appveyor.yml b/examples/ConsoleOut/.appveyor.yml index 56b5fe067..0e8d07b8c 100644 --- a/examples/ConsoleOut/.appveyor.yml +++ b/examples/ConsoleOut/.appveyor.yml @@ -1,4 +1,4 @@ -version: '{build}' +version: '{build}' clone_folder: c:\workspace\ConsoleOut platform: - x64 diff --git a/examples/ConsoleOut/CMakeLists.txt b/examples/ConsoleOut/CMakeLists.txt index 205cfb8b8..e62044b06 100644 --- a/examples/ConsoleOut/CMakeLists.txt +++ b/examples/ConsoleOut/CMakeLists.txt @@ -18,7 +18,7 @@ set(PROJECT_SHORT_VER ${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}${PROJECT_ set(PROJECT_DESCRIPTION "Console output component") set(PROJECT_VENDOR "AIST") set(PROJECT_MAINTAINER "Noriaki Ando ") -set(PROJECT_TYPE "c++/examples") +set(PROJECT_TYPE "c++/example") find_package(OpenRTM REQUIRED) set(RTM_VER ${OPENRTM_VERSION}) @@ -106,18 +106,19 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Set up installation directories if(WIN32) - set(OPENRTM_SHARE_PREFIX "Components/${PROJECT_TYPE}/${RTM_VC_VER}") + set(RTM_COMPONENT_PREFIX "Components/${PROJECT_TYPE}") + set(OPENRTM_SHARE_PREFIX "OpenRTM-aist/${RTM_VER}/${RTM_COMPONENT_PREFIX}") + set(INSTALL_PREFIX ${PROJECT_NAME}) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}/${OPENRTM_SHARE_PREFIX}" CACHE PATH "..." FORCE) + set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}/${RTM_COMPONENT_PREFIX}" CACHE PATH "..." FORCE) else() - set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${RTM_VER}/${OPENRTM_SHARE_PREFIX}") + set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${OPENRTM_SHARE_PREFIX}") endif() - set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}) else(WIN32) set(OPENRTM_SHARE_PREFIX "share/openrtm-${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}") set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}/${PROJECT_NAME}") endif(WIN32) - + # Subdirectories add_subdirectory(cmake) if(BUILD_DOCUMENTATION) diff --git a/examples/ConsoleOut/COPYING b/examples/ConsoleOut/COPYING index b4345876d..94a9ed024 100644 --- a/examples/ConsoleOut/COPYING +++ b/examples/ConsoleOut/COPYING @@ -1,4 +1,4 @@ - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. diff --git a/examples/ConsoleOut/COPYING.LESSER b/examples/ConsoleOut/COPYING.LESSER index 9cff3c49a..65c5ca88a 100644 --- a/examples/ConsoleOut/COPYING.LESSER +++ b/examples/ConsoleOut/COPYING.LESSER @@ -1,4 +1,4 @@ - GNU LESSER GENERAL PUBLIC LICENSE + GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. diff --git a/examples/ConsoleOut/README.md b/examples/ConsoleOut/README.md index d84d1a05a..3dbd4e4e0 100644 --- a/examples/ConsoleOut/README.md +++ b/examples/ConsoleOut/README.md @@ -1,4 +1,4 @@ -# ConsoleOut +# ConsoleOut ## Overview @@ -62,36 +62,12 @@ Console output component - on_activated - implemented - - Description - - - - PreCondition - - - - PostCondition - - + on_activated + - on_deactivated - implemented - - Description - - - - PreCondition - - - - PostCondition - - + on_deactivated + on_execute diff --git a/examples/ConsoleOut/RTC.xml b/examples/ConsoleOut/RTC.xml index e5a0ff80b..8e0474687 100644 --- a/examples/ConsoleOut/RTC.xml +++ b/examples/ConsoleOut/RTC.xml @@ -16,8 +16,6 @@ - - diff --git a/examples/ConsoleOut/cmake/License.rtf b/examples/ConsoleOut/cmake/License.rtf index 61047b13c..9dd0f54eb 100644 --- a/examples/ConsoleOut/cmake/License.rtf +++ b/examples/ConsoleOut/cmake/License.rtf @@ -1,4 +1,4 @@ -{\rtf1\ansi\ansicpg932\deff0\deflang1033\deflangfe1041{\fonttbl{\f0\froman\fprq1\fcharset128 \'82\'6c\'82\'72 \'82\'6f\'83\'53\'83\'56\'83\'62\'83\'4e;}} +{\rtf1\ansi\ansicpg932\deff0\deflang1033\deflangfe1041{\fonttbl{\f0\froman\fprq1\fcharset128 \'82\'6c\'82\'72 \'82\'6f\'83\'53\'83\'56\'83\'62\'83\'4e;}} {\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\lang1041\f0\fs20 LICENSE\par =======\par \par diff --git a/examples/ConsoleOut/cmake/consoleout.pc.in b/examples/ConsoleOut/cmake/consoleout.pc.in index 2858d3a55..beac6be13 100644 --- a/examples/ConsoleOut/cmake/consoleout.pc.in +++ b/examples/ConsoleOut/cmake/consoleout.pc.in @@ -1,4 +1,4 @@ -# This file was generated by CMake for @PROJECT_NAME@ +# This file was generated by CMake for @PROJECT_NAME@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=${prefix}/@LIB_INSTALL_DIR@ diff --git a/examples/ConsoleOut/doc/conf.py.in b/examples/ConsoleOut/doc/conf.py.in index bc6ed8953..79c35d474 100644 --- a/examples/ConsoleOut/doc/conf.py.in +++ b/examples/ConsoleOut/doc/conf.py.in @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # # ConsoleOut documentation build configuration file, created by # sphinx-quickstart on Mon Aug 8 11:28:05 2011. diff --git a/examples/ConsoleOut/doc/doxyfile.in b/examples/ConsoleOut/doc/doxyfile.in index da64d2cca..3ffaecf37 100644 --- a/examples/ConsoleOut/doc/doxyfile.in +++ b/examples/ConsoleOut/doc/doxyfile.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.20 +# Doxyfile 1.8.20 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- diff --git a/examples/ConsoleOut/idl/CMakeLists.txt b/examples/ConsoleOut/idl/CMakeLists.txt index 1b5569cb1..6fe518da5 100644 --- a/examples/ConsoleOut/idl/CMakeLists.txt +++ b/examples/ConsoleOut/idl/CMakeLists.txt @@ -16,25 +16,8 @@ macro(_COMPILE_IDL _idl_file) set(_python_command "python3") endif(WIN32) - if(${OPENRTM_VERSION_MAJOR} LESS 2) - if(NOT WIN32) - execute_process(COMMAND rtm-config --prefix OUTPUT_VARIABLE OPENRTM_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND rtm-config --idlflags OUTPUT_VARIABLE OPENRTM_IDLFLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE) - separate_arguments(OPENRTM_IDLFLAGS) - execute_process(COMMAND rtm-config --idlc OUTPUT_VARIABLE OPENRTM_IDLC - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(_rtm_skelwrapper_command "rtm-skelwrapper") - else(NOT WIN32) - set(_rtm_skelwrapper_command "rtm-skelwrapper.py") - endif(NOT WIN32) - set(OPENRTM_IDL_WRAPPER ${_rtm_skelwrapper_command}) - set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir= --skel-suffix=Skel --stub-suffix=Stub --idl-file=${_idl}.idl) - endif() - add_custom_command(OUTPUT ${${_idl_srcs_var}} - COMMAND ${_python_command} ${OPENRTM_DIR}/bin/${_rtm_skelwrapper_command} --include-dir= --skel-suffix=Skel --stub-suffix=Stub --idl-file=${_idl}.idl + COMMAND ${_python_command} ${OPENRTM_DIR}/bin/${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${_idl}.idl COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${_idl_file} WORKING_DIRECTORY ${CURRENT_BINARY_DIR} DEPENDS ${_idl_file} diff --git a/examples/ConsoleOut/include/ConsoleOut/ConsoleOut.h b/examples/ConsoleOut/include/ConsoleOut/ConsoleOut.h index 6bdc7f312..88162efff 100644 --- a/examples/ConsoleOut/include/ConsoleOut/ConsoleOut.h +++ b/examples/ConsoleOut/include/ConsoleOut/ConsoleOut.h @@ -1,17 +1,11 @@ -// -*- C++ -*- +// -*- C++ -*- // -/*! \mainpage - * - * @author Noriaki Ando - * - */ - - /*! +/*! * @file ConsoleOut.h * @brief Console output component - * @date $Date$ * - * $Id$ + * @author Noriaki Ando + * */ // @@ -180,7 +174,7 @@ class ConsoleOut * * */ - // RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; /*** * @@ -192,7 +186,7 @@ class ConsoleOut * * */ - // RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; /*** * diff --git a/examples/ConsoleOut/scripts/ubuntu_1804/Dockerfile b/examples/ConsoleOut/scripts/ubuntu_1804/Dockerfile index b7ddf173a..c459c8dac 100644 --- a/examples/ConsoleOut/scripts/ubuntu_1804/Dockerfile +++ b/examples/ConsoleOut/scripts/ubuntu_1804/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:18.04 RUN apt-get update\ && apt-get install -y --no-install-recommends\ diff --git a/examples/ConsoleOut/src/ConsoleOut.cpp b/examples/ConsoleOut/src/ConsoleOut.cpp index 2304336b7..579994e4e 100644 --- a/examples/ConsoleOut/src/ConsoleOut.cpp +++ b/examples/ConsoleOut/src/ConsoleOut.cpp @@ -1,13 +1,11 @@ -// -*- C++ -*- +// -*- C++ -*- // /*! * @file ConsoleOut.cpp * @brief Console output component - * @date $Date$ * * @author Noriaki Ando * - * $Id$ */ // @@ -122,33 +120,30 @@ RTC::ReturnCode_t ConsoleOut::onFinalize() } */ -/* -RTC::ReturnCode_t ConsoleOut::onStartup(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleOut::onShutdown(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleOut::onStartup(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleOut::onActivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleOut::onDeactivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleOut::onShutdown(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleOut::onActivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleOut::onDeactivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + RTC::ReturnCode_t ConsoleOut::onExecute(RTC::UniqueId /*ec_id*/) { @@ -168,40 +163,35 @@ RTC::ReturnCode_t ConsoleOut::onExecute(RTC::UniqueId /*ec_id*/) return RTC::RTC_OK; } -/* -RTC::ReturnCode_t ConsoleOut::onAborting(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleOut::onError(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleOut::onAborting(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleOut::onReset(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleOut::onStateUpdate(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleOut::onError(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleOut::onRateChanged(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ + +//RTC::ReturnCode_t ConsoleOut::onReset(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleOut::onStateUpdate(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleOut::onRateChanged(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} @@ -217,5 +207,3 @@ extern "C" } } - - diff --git a/examples/ConsoleOut/src/ConsoleOutComp.cpp b/examples/ConsoleOut/src/ConsoleOutComp.cpp index 4c655a95b..157fbf27f 100644 --- a/examples/ConsoleOut/src/ConsoleOutComp.cpp +++ b/examples/ConsoleOut/src/ConsoleOutComp.cpp @@ -1,13 +1,11 @@ -// -*- C++ -*- +// -*- C++ -*- // /*! * @file ConsoleOutComp.cpp * @brief Standalone component - * @date $Date$ * * @author Noriaki Ando * - * $Id$ */ // diff --git a/examples/ConsoleOut/test/include/ConsoleOutTest/ConsoleOutTest.h b/examples/ConsoleOut/test/include/ConsoleOutTest/ConsoleOutTest.h index 0f1da0dd4..0ae685b15 100644 --- a/examples/ConsoleOut/test/include/ConsoleOutTest/ConsoleOutTest.h +++ b/examples/ConsoleOut/test/include/ConsoleOutTest/ConsoleOutTest.h @@ -1,13 +1,13 @@ -// -*- C++ -*- +// -*- C++ -*- +// /*! * @file ConsoleOutTest.h - * @brief Console output component - * @date $Date$ + * @brief Console output component (test code) * * @author Noriaki Ando * - * $Id$ */ +// #ifndef CONSOLEOUT_TEST__H #define CONSOLEOUT_TEST_H @@ -18,7 +18,6 @@ // Service implementation headers // -#include "BasicDataTypeSVC_impl.h" // @@ -116,7 +115,7 @@ class ConsoleOutTest * * */ - RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id) override; /*** * @@ -128,7 +127,7 @@ class ConsoleOutTest * * */ - RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; + // RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id) override; /*** * diff --git a/examples/ConsoleOut/test/src/ConsoleOutTest.cpp b/examples/ConsoleOut/test/src/ConsoleOutTest.cpp index b6c8d67fe..ec1643765 100644 --- a/examples/ConsoleOut/test/src/ConsoleOutTest.cpp +++ b/examples/ConsoleOut/test/src/ConsoleOutTest.cpp @@ -1,19 +1,23 @@ -// -*- C++ -*- +// -*- C++ -*- +// /*! * @file ConsoleOutTest.cpp - * @brief Console output component - * @date $Date$ + * @brief Console output component (test code) * * @author Noriaki Ando * - * $Id$ */ +// #include "ConsoleOutTest.h" // Module specification // +#if RTM_MAJOR_VERSION >= 2 static const char* const consoleout_spec[] = +#else +static const char* consoleout_spec[] = +#endif { "implementation_id", "ConsoleOutTest", "type_name", "ConsoleOutTest", @@ -82,72 +86,65 @@ RTC::ReturnCode_t ConsoleOutTest::onFinalize() } */ -/* -RTC::ReturnCode_t ConsoleOutTest::onStartup(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleOutTest::onShutdown(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleOutTest::onStartup(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -RTC::ReturnCode_t ConsoleOutTest::onActivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} +//RTC::ReturnCode_t ConsoleOutTest::onShutdown(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -RTC::ReturnCode_t ConsoleOutTest::onDeactivated(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} +//RTC::ReturnCode_t ConsoleOutTest::onActivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -RTC::ReturnCode_t ConsoleOutTest::onExecute(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} +//RTC::ReturnCode_t ConsoleOutTest::onDeactivated(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleOutTest::onAborting(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleOutTest::onError(RTC::UniqueId ec_id) +RTC::ReturnCode_t ConsoleOutTest::onExecute(RTC::UniqueId /*ec_id*/) { return RTC::RTC_OK; } -*/ -/* -RTC::ReturnCode_t ConsoleOutTest::onReset(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ -/* -RTC::ReturnCode_t ConsoleOutTest::onStateUpdate(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ +//RTC::ReturnCode_t ConsoleOutTest::onAborting(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleOutTest::onError(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleOutTest::onReset(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} -/* -RTC::ReturnCode_t ConsoleOutTest::onRateChanged(RTC::UniqueId ec_id) -{ - return RTC::RTC_OK; -} -*/ + +//RTC::ReturnCode_t ConsoleOutTest::onStateUpdate(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} + + +//RTC::ReturnCode_t ConsoleOutTest::onRateChanged(RTC::UniqueId /*ec_id*/) +//{ +// return RTC::RTC_OK; +//} bool ConsoleOutTest::runTest() @@ -167,6 +164,4 @@ extern "C" RTC::Delete); } -}; - - +} diff --git a/examples/ConsoleOut/test/src/ConsoleOutTestComp.cpp b/examples/ConsoleOut/test/src/ConsoleOutTestComp.cpp index 99d2e636e..2f578b2b7 100644 --- a/examples/ConsoleOut/test/src/ConsoleOutTestComp.cpp +++ b/examples/ConsoleOut/test/src/ConsoleOutTestComp.cpp @@ -1,13 +1,13 @@ -// -*- C++ -*- +// -*- C++ -*- +// /*! * @file ConsoleOutTestComp.cpp - * @brief Standalone component - * @date $Date$ + * @brief Standalone component (test code) * * @author Noriaki Ando * - * $Id$ */ +// #include #include diff --git a/examples/MyServiceConsumer/RTC.xml b/examples/MyServiceConsumer/RTC.xml index 9e5d4fb7b..f5d291516 100644 --- a/examples/MyServiceConsumer/RTC.xml +++ b/examples/MyServiceConsumer/RTC.xml @@ -1,6 +1,6 @@ - +