[openrtm-commit:03013] r3141 - in trunk/OpenRTM-aist/src/ext/sdo: extended_fsm logger
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 12月 13日 (水) 15:34:49 JST
Author: n-ando
Date: 2017-12-13 15:34:49 +0900 (Wed, 13 Dec 2017)
New Revision: 3141
Modified:
trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.cpp
trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.h
trunk/OpenRTM-aist/src/ext/sdo/logger/LoggerConsumer.h
Log:
[compat,encoding] Encoding of some files have been changed.
Modified: trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.cpp 2017-12-13 00:24:11 UTC (rev 3140)
+++ trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.cpp 2017-12-13 06:34:49 UTC (rev 3141)
@@ -1,326 +1,326 @@
-// -*- C++ -*-
-/*!
- * @file ExtendedFsmServiceProvider.h
- * @brief Component observer SDO service consumer implementation
- * @date $Date$
- * @author Noriaki Ando <n-ando at aist.go.jp>
- *
- * Copyright (C) 2016
- * Noriaki Ando
- * Robot Innovation Research Center,
- * National Institute of
- * Advanced Industrial Science and Technology (AIST), Japan
- * All rights reserved.
- *
- * $Id$
- *
- */
-
-#include <coil/stringutil.h>
-#include <rtm/Typename.h>
-#include <rtm/idl/ExtendedFsmServiceStub.h>
-#include "ExtendedFsmServiceProvider.h"
-#include <iostream>
-
-namespace RTC
-{
- /*!
- * @if jp
- * @brief ctor of ExtendedFsmServiceProvider
- * @else
- * @brief ctor of ExtendedFsmServiceProvider
- * @endif
- */
- ExtendedFsmServiceProvider::ExtendedFsmServiceProvider()
- : m_rtobj(NULL)
- {
- std::cout << "ExtendedFsmServiceProvider()" << std::endl;
-
- // dummy code
- m_fsmStructure.name = CORBA::string_dup("dummy_name");
- m_fsmStructure.structure = CORBA::string_dup(
- "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\""
- " version=\"1.0\""
- " initial=\"airline-ticket\">"
- " <state id=\"state0\">"
- " <datamodel>"
- " <data id=\"data0\">"
- " </data>"
- " </datamodel>"
- " <transition event=\"toggle\" target=\"state1\" />"
- " </state>"
- " <state id=\"state1\">"
- " <datamodel>"
- " <data id=\"data1\">"
- " </data>"
- " </datamodel>"
- " <transition event=\"toggle\" target=\"state0\" />"
- " </state>"
- " </scxml>"
- );
- m_fsmStructure.event_profiles.length(1);
- FsmEventProfile event0;
- event0.name = CORBA::string_dup("toggle");
- event0.data_type = CORBA::string_dup("TimedShort");
- m_fsmStructure.event_profiles[0] = event0;
- NVUtil::appendStringValue(m_fsmStructure.properties,
- "fsm_structure.format",
- "scxml");
- std::cout << m_fsmStructure.structure << std::endl;
- }
-
- /*!
- * @if jp
- * @brief dtor
- * @else
- * @brief dtor
- * @endif
- */
- ExtendedFsmServiceProvider::~ExtendedFsmServiceProvider()
- {
- }
-
- /*!
- * @if jp
- * @brief ú»
- * @else
- * @brief Initialization
- * @endif
- */
- bool
- ExtendedFsmServiceProvider::init(RTObject_impl& rtobj,
- const SDOPackage::ServiceProfile& profile)
- {
- m_rtobj = &rtobj;
- m_profile = profile;
- // coil::Properties prop;
- // NVUtil::copyToProperties(prop, profile.properties);
- return true;
- }
-
- /*!
- * @if jp
- * @brief Äú»
- * @else
- * @brief Re-initialization
- * @endif
- */
- bool
- ExtendedFsmServiceProvider::reinit(const SDOPackage::ServiceProfile& profile)
- {
- m_profile= profile;
- // coil::Properties prop;
- // NVUtil::copyToProperties(prop, profile.properties);
- return true;
- }
-
- /*!
- * @if jp
- * @brief ServiceProfile ðæ¾·é
- * @else
- * @brief getting ServiceProfile
- * @endif
- */
- const SDOPackage::ServiceProfile&
- ExtendedFsmServiceProvider::getProfile() const
- {
- return m_profile;
- }
-
- /*!
- * @if jp
- * @brief I¹
- * @else
- * @brief Finalization
- * @endif
- */
- void ExtendedFsmServiceProvider::finalize()
- {
- }
-
- //============================================================
- // CORBA operations
- //
- // string get_current_state();
- // ReturnCode_t set_fsm_structure(in FsmStructure fsm_structure);
- // ReturnCode_t get_fsm_structure(out FsmStructure fsm_structure);
- //============================================================
-
- /*!
- * @if jp
- * @brief FSMÌ»ÝÌóÔðæ¾
- * @else
- * @brief Get Current FSM State
- * @endif
- */
- char* ExtendedFsmServiceProvider::get_current_state()
- {
- return CORBA::string_dup(m_fsmState.c_str());
- }
-
- /*!
- * @if jp
- * @brief FSMÌ\¢ðÝè·é
- * @else
- * @brief Set FSM Structure
- * @endif
- */
- ReturnCode_t ExtendedFsmServiceProvider::
- set_fsm_structure(const ::RTC::FsmStructure& fsm_structure)
- {
- m_fsmStructure = fsm_structure;
- return RTC::RTC_OK;
- }
-
-
- /*!
- * @if jp
- * @brief FSMÌ\¢ðæ¾·é
- * @else
- * @brief Set FSM Structure
- * @endif
- */
- ReturnCode_t ExtendedFsmServiceProvider::
- get_fsm_structure(::RTC::FsmStructure_out fsm_structure)
- {
- fsm_structure = new FsmStructure(m_fsmStructure);
- return RTC::RTC_OK;
- }
-
-
- //============================================================
- // protected functions
-
- /*!
- * @if jp
- * @brief RTObjectÖÌXiÚ±
- * @else
- * @brief Connectiong listeners to RTObject
- * @endif
- */
- void ExtendedFsmServiceProvider::setListeners(coil::Properties& prop)
- {
- }
-
- //============================================================
- // RTC Heartbeat related functions
-
- /*!
- * @if jp
- * @brief n[gr[gðIuU[oÉ`¦é
- * @else
- * @brief Sending a heartbeart signal to observer
- * @endif
- */
- void ExtendedFsmServiceProvider::changeStatus(std::string state)
- {
- m_fsmState = state;
- }
-
- /*!
- * @if jp
- * @brief n[gr[gðIuU[oÉ`¦é
- * @else
- * @brief Sending a heartbeart signal to observer
- * @endif
- */
- void ExtendedFsmServiceProvider::changeStructure(std::string fsm_structure)
- {
- m_fsmStructure.structure = fsm_structure.c_str();
- }
-
- //============================================================
- // FSM status related functions
- /*!
- * @if jp
- * @brief RTCóÔÏ»XiÌÝè
- * @else
- * @brief Setting RTC status listeners
- * @endif
- */
- void ExtendedFsmServiceProvider::setFSMStatusListeners()
- {
- // TODO: here should be inmplemented after FSM API defined.
- }
-
- /*!
- * @if jp
- * @brief RTCóÔÏ»XiÌð
- * @else
- * @brief Unsetting RTC status listeners
- * @endif
- */
- void ExtendedFsmServiceProvider::unsetFSMStatusListeners()
- {
- // TODO: here should be inmplemented after FSM API defined.
- }
-
- //============================================================
- // FsmProfile related functions
- /*!
- * @if jp
- * @brief FsmProfileóÔÏ»XiÌÝè
- * @else
- * @brief Setting FsmProfile listener
- * @endif
- */
- void ExtendedFsmServiceProvider::setFSMProfileListeners()
- {
- }
-
- /*!
- * @if jp
- * @brief FsmProfileóÔÏ»XiÌð
- * @else
- * @brief Unsetting FsmProfile listener
- * @endif
- */
- void ExtendedFsmServiceProvider::unsetFSMProfileListeners()
- {
- }
-
- //============================================================
- // FsmStructure related functions
- /*!
- * @if jp
- * @brief FsmStructureóÔÏ»XiÌÝè
- * @else
- * @brief Setting FsmStructure listener
- * @endif
- */
- void ExtendedFsmServiceProvider::setFSMStructureListeners()
- {
- }
-
- /*!
- * @if jp
- * @brief FsmStructureóÔÏ»XiÌð
- * @else
- * @brief Unsetting FsmStructure listener
- * @endif
- */
- void ExtendedFsmServiceProvider::unsetFSMStructureListeners()
- {
- }
-
-}; // namespace RTC
-
-extern "C"
-{
- void ExtendedFsmServiceProviderInit()
- {
- RTC::SdoServiceProviderFactory& factory
- = RTC::SdoServiceProviderFactory::instance();
-#ifndef ORB_IS_RTORB
- factory.addFactory(CORBA_Util::toRepositoryId<RTC::ExtendedFsmService>(),
-#else
- factory.addFactory(CORBA_Util::
- toRepositoryIdOfObject<RTC::ExtendedFsmService>(),
-#endif
- ::coil::Creator< ::RTC::SdoServiceProviderBase,
- ::RTC::ExtendedFsmServiceProvider>,
- ::coil::Destructor< ::RTC::SdoServiceProviderBase,
- ::RTC::ExtendedFsmServiceProvider>);
- std::cout << "Init()" << std::endl;
- }
-};
+// -*- C++ -*-
+/*!
+ * @file ExtendedFsmServiceProvider.h
+ * @brief Component observer SDO service consumer implementation
+ * @date $Date$
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2016
+ * Noriaki Ando
+ * Robot Innovation Research Center,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ * $Id$
+ *
+ */
+
+#include <coil/stringutil.h>
+#include <rtm/Typename.h>
+#include <rtm/idl/ExtendedFsmServiceStub.h>
+#include "ExtendedFsmServiceProvider.h"
+#include <iostream>
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @brief ctor of ExtendedFsmServiceProvider
+ * @else
+ * @brief ctor of ExtendedFsmServiceProvider
+ * @endif
+ */
+ ExtendedFsmServiceProvider::ExtendedFsmServiceProvider()
+ : m_rtobj(NULL)
+ {
+ std::cout << "ExtendedFsmServiceProvider()" << std::endl;
+
+ // dummy code
+ m_fsmStructure.name = CORBA::string_dup("dummy_name");
+ m_fsmStructure.structure = CORBA::string_dup(
+ "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\""
+ " version=\"1.0\""
+ " initial=\"airline-ticket\">"
+ " <state id=\"state0\">"
+ " <datamodel>"
+ " <data id=\"data0\">"
+ " </data>"
+ " </datamodel>"
+ " <transition event=\"toggle\" target=\"state1\" />"
+ " </state>"
+ " <state id=\"state1\">"
+ " <datamodel>"
+ " <data id=\"data1\">"
+ " </data>"
+ " </datamodel>"
+ " <transition event=\"toggle\" target=\"state0\" />"
+ " </state>"
+ " </scxml>"
+ );
+ m_fsmStructure.event_profiles.length(1);
+ FsmEventProfile event0;
+ event0.name = CORBA::string_dup("toggle");
+ event0.data_type = CORBA::string_dup("TimedShort");
+ m_fsmStructure.event_profiles[0] = event0;
+ NVUtil::appendStringValue(m_fsmStructure.properties,
+ "fsm_structure.format",
+ "scxml");
+ std::cout << m_fsmStructure.structure << std::endl;
+ }
+
+ /*!
+ * @if jp
+ * @brief dtor
+ * @else
+ * @brief dtor
+ * @endif
+ */
+ ExtendedFsmServiceProvider::~ExtendedFsmServiceProvider()
+ {
+ }
+
+ /*!
+ * @if jp
+ * @brief ½é´ü²½
+ * @else
+ * @brief Initialization
+ * @endif
+ */
+ bool
+ ExtendedFsmServiceProvider::init(RTObject_impl& rtobj,
+ const SDOPackage::ServiceProfile& profile)
+ {
+ m_rtobj = &rtobj;
+ m_profile = profile;
+ // coil::Properties prop;
+ // NVUtil::copyToProperties(prop, profile.properties);
+ return true;
+ }
+
+ /*!
+ * @if jp
+ * @brief ºÆ½é´ü²½
+ * @else
+ * @brief Re-initialization
+ * @endif
+ */
+ bool
+ ExtendedFsmServiceProvider::reinit(const SDOPackage::ServiceProfile& profile)
+ {
+ m_profile= profile;
+ // coil::Properties prop;
+ // NVUtil::copyToProperties(prop, profile.properties);
+ return true;
+ }
+
+ /*!
+ * @if jp
+ * @brief ServiceProfile ¤ò¼èÆÀ¤¹¤ë
+ * @else
+ * @brief getting ServiceProfile
+ * @endif
+ */
+ const SDOPackage::ServiceProfile&
+ ExtendedFsmServiceProvider::getProfile() const
+ {
+ return m_profile;
+ }
+
+ /*!
+ * @if jp
+ * @brief ½ªÎ»½èÍý
+ * @else
+ * @brief Finalization
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::finalize()
+ {
+ }
+
+ //============================================================
+ // CORBA operations
+ //
+ // string get_current_state();
+ // ReturnCode_t set_fsm_structure(in FsmStructure fsm_structure);
+ // ReturnCode_t get_fsm_structure(out FsmStructure fsm_structure);
+ //============================================================
+
+ /*!
+ * @if jp
+ * @brief FSM¤Î¸½ºß¤Î¾õÂÖ¤ò¼èÆÀ
+ * @else
+ * @brief Get Current FSM State
+ * @endif
+ */
+ char* ExtendedFsmServiceProvider::get_current_state()
+ {
+ return CORBA::string_dup(m_fsmState.c_str());
+ }
+
+ /*!
+ * @if jp
+ * @brief FSM¤Î¹½Â¤¤òÀßÄꤹ¤ë
+ * @else
+ * @brief Set FSM Structure
+ * @endif
+ */
+ ReturnCode_t ExtendedFsmServiceProvider::
+ set_fsm_structure(const ::RTC::FsmStructure& fsm_structure)
+ {
+ m_fsmStructure = fsm_structure;
+ return RTC::RTC_OK;
+ }
+
+
+ /*!
+ * @if jp
+ * @brief FSM¤Î¹½Â¤¤ò¼èÆÀ¤¹¤ë
+ * @else
+ * @brief Set FSM Structure
+ * @endif
+ */
+ ReturnCode_t ExtendedFsmServiceProvider::
+ get_fsm_structure(::RTC::FsmStructure_out fsm_structure)
+ {
+ fsm_structure = new FsmStructure(m_fsmStructure);
+ return RTC::RTC_OK;
+ }
+
+
+ //============================================================
+ // protected functions
+
+ /*!
+ * @if jp
+ * @brief RTObject¤Ø¤Î¥ê¥¹¥ÊÀܳ½èÍý
+ * @else
+ * @brief Connectiong listeners to RTObject
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::setListeners(coil::Properties& prop)
+ {
+ }
+
+ //============================================================
+ // RTC Heartbeat related functions
+
+ /*!
+ * @if jp
+ * @brief ¥Ï¡¼¥È¥Ó¡¼¥È¤ò¥ª¥Ö¥¶¡¼¥Ð¤ËÅÁ¤¨¤ë
+ * @else
+ * @brief Sending a heartbeart signal to observer
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::changeStatus(std::string state)
+ {
+ m_fsmState = state;
+ }
+
+ /*!
+ * @if jp
+ * @brief ¥Ï¡¼¥È¥Ó¡¼¥È¤ò¥ª¥Ö¥¶¡¼¥Ð¤ËÅÁ¤¨¤ë
+ * @else
+ * @brief Sending a heartbeart signal to observer
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::changeStructure(std::string fsm_structure)
+ {
+ m_fsmStructure.structure = fsm_structure.c_str();
+ }
+
+ //============================================================
+ // FSM status related functions
+ /*!
+ * @if jp
+ * @brief RTC¾õÂÖÊѲ½¥ê¥¹¥Ê¤ÎÀßÄê½èÍý
+ * @else
+ * @brief Setting RTC status listeners
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::setFSMStatusListeners()
+ {
+ // TODO: here should be inmplemented after FSM API defined.
+ }
+
+ /*!
+ * @if jp
+ * @brief RTC¾õÂÖÊѲ½¥ê¥¹¥Ê¤Î²ò½ü½èÍý
+ * @else
+ * @brief Unsetting RTC status listeners
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::unsetFSMStatusListeners()
+ {
+ // TODO: here should be inmplemented after FSM API defined.
+ }
+
+ //============================================================
+ // FsmProfile related functions
+ /*!
+ * @if jp
+ * @brief FsmProfile¾õÂÖÊѲ½¥ê¥¹¥Ê¤ÎÀßÄê
+ * @else
+ * @brief Setting FsmProfile listener
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::setFSMProfileListeners()
+ {
+ }
+
+ /*!
+ * @if jp
+ * @brief FsmProfile¾õÂÖÊѲ½¥ê¥¹¥Ê¤Î²ò½ü
+ * @else
+ * @brief Unsetting FsmProfile listener
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::unsetFSMProfileListeners()
+ {
+ }
+
+ //============================================================
+ // FsmStructure related functions
+ /*!
+ * @if jp
+ * @brief FsmStructure¾õÂÖÊѲ½¥ê¥¹¥Ê¤ÎÀßÄê
+ * @else
+ * @brief Setting FsmStructure listener
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::setFSMStructureListeners()
+ {
+ }
+
+ /*!
+ * @if jp
+ * @brief FsmStructure¾õÂÖÊѲ½¥ê¥¹¥Ê¤Î²ò½ü
+ * @else
+ * @brief Unsetting FsmStructure listener
+ * @endif
+ */
+ void ExtendedFsmServiceProvider::unsetFSMStructureListeners()
+ {
+ }
+
+}; // namespace RTC
+
+extern "C"
+{
+ void ExtendedFsmServiceProviderInit()
+ {
+ RTC::SdoServiceProviderFactory& factory
+ = RTC::SdoServiceProviderFactory::instance();
+#ifndef ORB_IS_RTORB
+ factory.addFactory(CORBA_Util::toRepositoryId<RTC::ExtendedFsmService>(),
+#else
+ factory.addFactory(CORBA_Util::
+ toRepositoryIdOfObject<RTC::ExtendedFsmService>(),
+#endif
+ ::coil::Creator< ::RTC::SdoServiceProviderBase,
+ ::RTC::ExtendedFsmServiceProvider>,
+ ::coil::Destructor< ::RTC::SdoServiceProviderBase,
+ ::RTC::ExtendedFsmServiceProvider>);
+ std::cout << "Init()" << std::endl;
+ }
+};
Modified: trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.h
===================================================================
--- trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.h 2017-12-13 00:24:11 UTC (rev 3140)
+++ trunk/OpenRTM-aist/src/ext/sdo/extended_fsm/ExtendedFsmServiceProvider.h 2017-12-13 06:34:49 UTC (rev 3141)
@@ -1,310 +1,310 @@
-// -*- C++ -*-
-/*!
- * @file ExtendedFsmServiceProvider.h
- * @brief Component observer SDO service consumer implementation
- * @date $Date$
- * @author Noriaki Ando <n-ando at aist.go.jp>
- *
- * Copyright (C) 2016
- * Noriaki Ando
- * Intelligent Systems Research Institute,
- * National Institute of
- * Advanced Industrial Science and Technology (AIST), Japan
- * All rights reserved.
- *
- * $Id$
- *
- */
-
-
-#ifndef RTC_EXTENDEDFSMSERVICEPROVIDER_H
-#define RTC_EXTENDEDFSMSERVICEPROVIDER_H
-
-#include <coil/Mutex.h>
-#include <coil/Factory.h>
-#include <coil/stringutil.h>
-#include <rtm/SdoServiceProviderBase.h>
-#include <rtm/ComponentActionListener.h>
-#include <rtm/idl/SDOPackageStub.h>
-#include <rtm/idl/ExtendedFsmServiceSkel.h>
-
-namespace RTC
-{
-
- /*!
- * @if jp
- * @else
- * @endif
- */
- class ExtendedFsmServiceProvider
- : public virtual POA_RTC::ExtendedFsmService,
- public SdoServiceProviderBase
- {
- public:
- /*!
- * @if jp
- * @brief ctor of ExtendedFsmServiceProvider
- * @else
- * @brief ctor of ExtendedFsmServiceProvider
- * @endif
- */
- ExtendedFsmServiceProvider();
-
- /*!
- * @if jp
- * @brief dtor
- * @else
- * @brief dtor
- * @endif
- */
- virtual ~ExtendedFsmServiceProvider();
-
- /*!
- * @if jp
- * @brief ú»
- * @else
- * @brief Initialization
- * @endif
- */
- virtual bool init(RTObject_impl& rtobj,
- const SDOPackage::ServiceProfile& profile);
-
- /*!
- * @if jp
- * @brief Äú»
- * @else
- * @brief Re-initialization
- * @endif
- */
- virtual bool reinit(const SDOPackage::ServiceProfile& profile);
-
- /*!
- * @if jp
- * @brief ServiceProfile ðæ¾·é
- * @else
- * @brief getting ServiceProfile
- * @endif
- */
- virtual const SDOPackage::ServiceProfile& getProfile() const;
-
- /*!
- * @if jp
- * @brief I¹
- * @else
- * @brief Finalization
- * @endif
- */
- virtual void finalize();
-
- //============================================================
- // CORBA operations
- //
- // string get_current_state();
- // ReturnCode_t set_fsm_structure(in FsmStructure fsm_structure);
- // ReturnCode_t get_fsm_structure(out FsmStructure fsm_structure);
- //============================================================
-
- /*!
- * @if jp
- * @brief FSMÌ»ÝÌóÔðæ¾
- *
- * ±ÌIy[VÍFSMR|[lgÌFSMÌ»ÝÌóÔðÔ·B
- * (FSM4RTC spec. p.20)
- *
- * @return »ÝÌóÔð\·¶ñ
- *
- * @else
- * @brief Get Current FSM State
- *
- * This operation returns the current state of an FSM in the
- * target FSM component. (FSM4RTC spec. p.20)
- *
- * @return A string which represent the current status
- *
- * @endif
- */
- virtual char* get_current_state();
- /*!
- * @if jp
- * @brief FSMÌ\¢ðÝè·é
- *
- * ±ÌIy[VÍÎÛÌR|[lgÉεÄAFSMÌ\¢ðÛ
- * ·é FsmStruccture ðÝè·éBÎÛR|[lgÍ
- * fsm_structure É^¦çê½lðîÉóÔJÚ[ÌFSM\¢ðÄ
- * Ýè·éB±ÌIy[Vª¢ÀÌêÍAUNSUPPORTED ðÔ·B
- *
- * @param fsm_structure FSMÌ\¢ð\·FsmStructure\¢ÌB
- * @return RTC_OK ³íI¹
- * RTC_ERROR »Ì¼ÌG[
- * BAD_PARAMETER s³Èp[^
- * UNSUPPORTED ¢T|[g
- *
- * @else
- * @brief Set FSM Structure
- *
- * This operation sets an FsmStructure to the target
- * component. Then the target component reconfigures its FSM
- * structure such as transition rules according to the values of
- * the given fsm_structure. RTCs may return UNSUPPORTED if this
- * operation is not implemented.
- *
- * @param fsm_structure FsmStructure structure which represents
- * FSM structure
- * @return RTC_OK normal return
- * RTC_ERROR other error
- * BAD_PARAMETER invalid parameter
- * UNSUPPORTED unsupported or not implemented
- *
- * @endif
- */
- virtual ReturnCode_t
- set_fsm_structure(const ::RTC::FsmStructure& fsm_structure);
- /*!
- * @if jp
- * @brief FSMÌ\¢ðæ¾·é
- *
- * ±ÌIy[VÍÎÛÌR|[lgÉεÄA»Ý۵Ģ
- * éFSMÌ\¢ðæ¾·éBExtendedFsmService \¢ÌÍtB[h
- * name (FSM̼Ì), structure (FSMÌ\¢) AEventProfile ÈÇðÔ
- * ·Bstructure ÌtH[}bgÍAtB[h properties àÉi[³
- * ê½L[ "fsm_structure.format" Éwè³êéB±ÌIy[V
- * ª¢ÀÌêÍAUNSUPPORTED ðÔ·B
- *
- * ref: SCXML https://www.w3.org/TR/scxml/
- *
- * @param fsm_structure FSMÌ\¢ð\·FsmStructure\¢ÌB
- * @return RTC_OK ³íI¹
- * RTC_ERROR »Ì¼ÌG[
- * BAD_PARAMETER s³Èp[^
- * UNSUPPORTED ¢T|[g
- *
- * @else
- * @brief Set FSM Structure
- *
- * This operation returns the structure of an FSM in the target
- * FSM component. ExtendedFsmService returns the name, structure
- * with format specified by fsm_structure.format and
- * EventProfiles. RTCs may return UNSUPPORTED if this operation is
- * not implemented.
- *
- * @param fsm_structure FsmStructure structure which represents
- * FSM structure
- * @return RTC_OK normal return
- * RTC_ERROR other error
- * BAD_PARAMETER invalid parameter
- * UNSUPPORTED unsupported or not implemented
- *
- * @endif
- */
- virtual ReturnCode_t
- get_fsm_structure(::RTC::FsmStructure_out fsm_structure);
-
-
-
- protected:
- /*!
- * @if jp
- * @brief RTObjectÖÌXiÚ±
- * @else
- * @brief Connectiong listeners to RTObject
- * @endif
- */
- void setListeners(coil::Properties& prop);
-
- /*!
- * @if jp
- * @brief FSMóÔJÚ
- * @else
- * @brief FSM status change
- * @endif
- */
- void changeStatus(std::string state);
-
- /*!
- * @if jp
- * @brief n[gr[gðð·é
- * @else
- * @brief Unsetting heartbeat
- * @endif
- */
- void changeStructure(std::string fsm_structure);
-
- //============================================================
- // FSM status related functions
- /*!
- * @if jp
- * @brief FSMóÔÏ»XiÌÝè
- * @else
- * @brief Setting FSM status listeners
- * @endif
- */
- void setFSMStatusListeners();
-
- /*!
- * @if jp
- * @brief FSMóÔÏ»XiÌð
- * @else
- * @brief Unsetting FSM status listeners
- * @endif
- */
- void unsetFSMStatusListeners();
-
- //============================================================
- // FsmProfile related functions
- /*!
- * @if jp
- * @brief FsmProfileóÔÏ»XiÌÝè
- * @else
- * @brief Setting FsmProfile listener
- * @endif
- */
- void setFSMProfileListeners();
-
- /*!
- * @if jp
- * @brief FsmProfileóÔÏ»XiÌð
- * @else
- * @brief Unsetting FsmProfile listener
- * @endif
- */
- void unsetFSMProfileListeners();
-
- //============================================================
- // FsmStructure related functions
- /*!
- * @if jp
- * @brief FsmStructureóÔÏ»XiÌÝè
- * @else
- * @brief Setting FsmStructure listener
- * @endif
- */
- void setFSMStructureListeners();
-
- /*!
- * @if jp
- * @brief FsmStructureóÔÏ»XiÌð
- * @else
- * @brief Unsetting FsmStructure listener
- * @endif
- */
- void unsetFSMStructureListeners();
-
- private:
- RTC::RTObject_impl* m_rtobj;
- SDOPackage::ServiceProfile m_profile;
- coil::Properties m_properties;
- FsmStructure m_fsmStructure;
- std::string m_fsmState;
-
- };
-
-}; // namespace RTC
-
-extern "C"
-{
- DLL_EXPORT void ExtendedFsmServiceProviderInit();
-};
-
-#endif // RTC_EXTENDEDFSMSERVICEPROVIDER_H
-
-
+// -*- C++ -*-
+/*!
+ * @file ExtendedFsmServiceProvider.h
+ * @brief Component observer SDO service consumer implementation
+ * @date $Date$
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2016
+ * Noriaki Ando
+ * Intelligent Systems Research Institute,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ * $Id$
+ *
+ */
+
+
+#ifndef RTC_EXTENDEDFSMSERVICEPROVIDER_H
+#define RTC_EXTENDEDFSMSERVICEPROVIDER_H
+
+#include <coil/Mutex.h>
+#include <coil/Factory.h>
+#include <coil/stringutil.h>
+#include <rtm/SdoServiceProviderBase.h>
+#include <rtm/ComponentActionListener.h>
+#include <rtm/idl/SDOPackageStub.h>
+#include <rtm/idl/ExtendedFsmServiceSkel.h>
+
+namespace RTC
+{
+
+ /*!
+ * @if jp
+ * @else
+ * @endif
+ */
+ class ExtendedFsmServiceProvider
+ : public virtual POA_RTC::ExtendedFsmService,
+ public SdoServiceProviderBase
+ {
+ public:
+ /*!
+ * @if jp
+ * @brief ctor of ExtendedFsmServiceProvider
+ * @else
+ * @brief ctor of ExtendedFsmServiceProvider
+ * @endif
+ */
+ ExtendedFsmServiceProvider();
+
+ /*!
+ * @if jp
+ * @brief dtor
+ * @else
+ * @brief dtor
+ * @endif
+ */
+ virtual ~ExtendedFsmServiceProvider();
+
+ /*!
+ * @if jp
+ * @brief ½é´ü²½
+ * @else
+ * @brief Initialization
+ * @endif
+ */
+ virtual bool init(RTObject_impl& rtobj,
+ const SDOPackage::ServiceProfile& profile);
+
+ /*!
+ * @if jp
+ * @brief ºÆ½é´ü²½
+ * @else
+ * @brief Re-initialization
+ * @endif
+ */
+ virtual bool reinit(const SDOPackage::ServiceProfile& profile);
+
+ /*!
+ * @if jp
+ * @brief ServiceProfile ¤ò¼èÆÀ¤¹¤ë
+ * @else
+ * @brief getting ServiceProfile
+ * @endif
+ */
+ virtual const SDOPackage::ServiceProfile& getProfile() const;
+
+ /*!
+ * @if jp
+ * @brief ½ªÎ»½èÍý
+ * @else
+ * @brief Finalization
+ * @endif
+ */
+ virtual void finalize();
+
+ //============================================================
+ // CORBA operations
+ //
+ // string get_current_state();
+ // ReturnCode_t set_fsm_structure(in FsmStructure fsm_structure);
+ // ReturnCode_t get_fsm_structure(out FsmStructure fsm_structure);
+ //============================================================
+
+ /*!
+ * @if jp
+ * @brief FSM¤Î¸½ºß¤Î¾õÂÖ¤ò¼èÆÀ
+ *
+ * ¤³¤Î¥ª¥Ú¥ì¡¼¥·¥ç¥ó¤ÏFSM¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎFSM¤Î¸½ºß¤Î¾õÂÖ¤òÊÖ¤¹¡£
+ * (FSM4RTC spec. p.20)
+ *
+ * @return ¸½ºß¤Î¾õÂÖ¤òɽ¤¹Ê¸»úÎó
+ *
+ * @else
+ * @brief Get Current FSM State
+ *
+ * This operation returns the current state of an FSM in the
+ * target FSM component. (FSM4RTC spec. p.20)
+ *
+ * @return A string which represent the current status
+ *
+ * @endif
+ */
+ virtual char* get_current_state();
+ /*!
+ * @if jp
+ * @brief FSM¤Î¹½Â¤¤òÀßÄꤹ¤ë
+ *
+ * ¤³¤Î¥ª¥Ú¥ì¡¼¥·¥ç¥ó¤ÏÂоݤΥ³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÂФ·¤Æ¡¢FSM¤Î¹½Â¤¤òÊÝ
+ * »ý¤¹¤ë FsmStruccture ¤òÀßÄꤹ¤ë¡£Âоݥ³¥ó¥Ý¡¼¥Í¥ó¥È¤Ï
+ * fsm_structure ¤ËÍ¿¤¨¤é¤ì¤¿Ãͤò´ð¤Ë¾õÂÖÁ«°Ü¥ë¡¼¥ëÅù¤ÎFSM¹½Â¤¤òºÆ
+ * ÀßÄꤹ¤ë¡£¤³¤Î¥ª¥Ú¥ì¡¼¥·¥ç¥ó¤¬Ì¤¼ÂÁõ¤Î¾ì¹ç¤Ï¡¢UNSUPPORTED ¤òÊÖ¤¹¡£
+ *
+ * @param fsm_structure FSM¤Î¹½Â¤¤òɽ¤¹FsmStructure¹½Â¤ÂΡ£
+ * @return RTC_OK Àµ¾ï½ªÎ»
+ * RTC_ERROR ¤½¤Î¾¤Î¥¨¥é¡¼
+ * BAD_PARAMETER ÉÔÀµ¤Ê¥Ñ¥é¥á¡¼¥¿
+ * UNSUPPORTED ̤¥µ¥Ý¡¼¥È
+ *
+ * @else
+ * @brief Set FSM Structure
+ *
+ * This operation sets an FsmStructure to the target
+ * component. Then the target component reconfigures its FSM
+ * structure such as transition rules according to the values of
+ * the given fsm_structure. RTCs may return UNSUPPORTED if this
+ * operation is not implemented.
+ *
+ * @param fsm_structure FsmStructure structure which represents
+ * FSM structure
+ * @return RTC_OK normal return
+ * RTC_ERROR other error
+ * BAD_PARAMETER invalid parameter
+ * UNSUPPORTED unsupported or not implemented
+ *
+ * @endif
+ */
+ virtual ReturnCode_t
+ set_fsm_structure(const ::RTC::FsmStructure& fsm_structure);
+ /*!
+ * @if jp
+ * @brief FSM¤Î¹½Â¤¤ò¼èÆÀ¤¹¤ë
+ *
+ * ¤³¤Î¥ª¥Ú¥ì¡¼¥·¥ç¥ó¤ÏÂоݤΥ³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÂФ·¤Æ¡¢¸½ºßÊÝ»ý¤·¤Æ¤¤
+ * ¤ëFSM¤Î¹½Â¤¤ò¼èÆÀ¤¹¤ë¡£ExtendedFsmService ¹½Â¤ÂΤϥե£¡¼¥ë¥É
+ * name (FSM¤Î̾¾Î), structure (FSM¤Î¹½Â¤) ¡¢EventProfile ¤Ê¤É¤òÊÖ
+ * ¤¹¡£structure ¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï¡¢¥Õ¥£¡¼¥ë¥É properties Æâ¤Ë³ÊǼ¤µ
+ * ¤ì¤¿¥¡¼ "fsm_structure.format" ¤Ë»ØÄꤵ¤ì¤ë¡£¤³¤Î¥ª¥Ú¥ì¡¼¥·¥ç¥ó
+ * ¤¬Ì¤¼ÂÁõ¤Î¾ì¹ç¤Ï¡¢UNSUPPORTED ¤òÊÖ¤¹¡£
+ *
+ * ref: SCXML https://www.w3.org/TR/scxml/
+ *
+ * @param fsm_structure FSM¤Î¹½Â¤¤òɽ¤¹FsmStructure¹½Â¤ÂΡ£
+ * @return RTC_OK Àµ¾ï½ªÎ»
+ * RTC_ERROR ¤½¤Î¾¤Î¥¨¥é¡¼
+ * BAD_PARAMETER ÉÔÀµ¤Ê¥Ñ¥é¥á¡¼¥¿
+ * UNSUPPORTED ̤¥µ¥Ý¡¼¥È
+ *
+ * @else
+ * @brief Set FSM Structure
+ *
+ * This operation returns the structure of an FSM in the target
+ * FSM component. ExtendedFsmService returns the name, structure
+ * with format specified by fsm_structure.format and
+ * EventProfiles. RTCs may return UNSUPPORTED if this operation is
+ * not implemented.
+ *
+ * @param fsm_structure FsmStructure structure which represents
+ * FSM structure
+ * @return RTC_OK normal return
+ * RTC_ERROR other error
+ * BAD_PARAMETER invalid parameter
+ * UNSUPPORTED unsupported or not implemented
+ *
+ * @endif
+ */
+ virtual ReturnCode_t
+ get_fsm_structure(::RTC::FsmStructure_out fsm_structure);
+
+
+
+ protected:
+ /*!
+ * @if jp
+ * @brief RTObject¤Ø¤Î¥ê¥¹¥ÊÀܳ½èÍý
+ * @else
+ * @brief Connectiong listeners to RTObject
+ * @endif
+ */
+ void setListeners(coil::Properties& prop);
+
+ /*!
+ * @if jp
+ * @brief FSM¾õÂÖÁ«°Ü
+ * @else
+ * @brief FSM status change
+ * @endif
+ */
+ void changeStatus(std::string state);
+
+ /*!
+ * @if jp
+ * @brief ¥Ï¡¼¥È¥Ó¡¼¥È¤ò²ò½ü¤¹¤ë
+ * @else
+ * @brief Unsetting heartbeat
+ * @endif
+ */
+ void changeStructure(std::string fsm_structure);
+
+ //============================================================
+ // FSM status related functions
+ /*!
+ * @if jp
+ * @brief FSM¾õÂÖÊѲ½¥ê¥¹¥Ê¤ÎÀßÄê½èÍý
+ * @else
+ * @brief Setting FSM status listeners
+ * @endif
+ */
+ void setFSMStatusListeners();
+
+ /*!
+ * @if jp
+ * @brief FSM¾õÂÖÊѲ½¥ê¥¹¥Ê¤Î²ò½ü½èÍý
+ * @else
+ * @brief Unsetting FSM status listeners
+ * @endif
+ */
+ void unsetFSMStatusListeners();
+
+ //============================================================
+ // FsmProfile related functions
+ /*!
+ * @if jp
+ * @brief FsmProfile¾õÂÖÊѲ½¥ê¥¹¥Ê¤ÎÀßÄê
+ * @else
+ * @brief Setting FsmProfile listener
+ * @endif
+ */
+ void setFSMProfileListeners();
+
+ /*!
+ * @if jp
+ * @brief FsmProfile¾õÂÖÊѲ½¥ê¥¹¥Ê¤Î²ò½ü
+ * @else
+ * @brief Unsetting FsmProfile listener
+ * @endif
+ */
+ void unsetFSMProfileListeners();
+
+ //============================================================
+ // FsmStructure related functions
+ /*!
+ * @if jp
+ * @brief FsmStructure¾õÂÖÊѲ½¥ê¥¹¥Ê¤ÎÀßÄê
+ * @else
+ * @brief Setting FsmStructure listener
+ * @endif
+ */
+ void setFSMStructureListeners();
+
+ /*!
+ * @if jp
+ * @brief FsmStructure¾õÂÖÊѲ½¥ê¥¹¥Ê¤Î²ò½ü
+ * @else
+ * @brief Unsetting FsmStructure listener
+ * @endif
+ */
+ void unsetFSMStructureListeners();
+
+ private:
+ RTC::RTObject_impl* m_rtobj;
+ SDOPackage::ServiceProfile m_profile;
+ coil::Properties m_properties;
+ FsmStructure m_fsmStructure;
+ std::string m_fsmState;
+
+ };
+
+}; // namespace RTC
+
+extern "C"
+{
+ DLL_EXPORT void ExtendedFsmServiceProviderInit();
+};
+
+#endif // RTC_EXTENDEDFSMSERVICEPROVIDER_H
+
+
Modified: trunk/OpenRTM-aist/src/ext/sdo/logger/LoggerConsumer.h
===================================================================
--- trunk/OpenRTM-aist/src/ext/sdo/logger/LoggerConsumer.h 2017-12-13 00:24:11 UTC (rev 3140)
+++ trunk/OpenRTM-aist/src/ext/sdo/logger/LoggerConsumer.h 2017-12-13 06:34:49 UTC (rev 3141)
@@ -1,115 +1,115 @@
-// -*- C++ -*-
-/*!
- * @file LoggerConsumer.h
- * @brief Component observer SDO service consumer implementation
- * @date $Date$
- * @author Noriaki Ando <n-ando at aist.go.jp>
- *
- * Copyright (C) 2011
- * Noriaki Ando
- * Intelligent Systems Research Institute,
- * National Institute of
- * Advanced Industrial Science and Technology (AIST), Japan
- * All rights reserved.
- *
- * $Id: SdoConfiguration.cpp 1971 2010-06-03 08:46:40Z n-ando $
- *
- */
-
-
-#ifndef RTC_LOGGERCONSUMER_H
-#define RTC_LOGGERCONSUMER_H
-
-#include <coil/Mutex.h>
-#include <coil/Factory.h>
-#include <coil/stringutil.h>
-#include <rtm/SdoServiceConsumerBase.h>
-#include <rtm/CorbaConsumer.h>
-#include <rtm/idl/SDOPackageStub.h>
-
-#include "LoggerStub.h"
-
-namespace RTC
-{
-
- /*!
- * @if jp
- * @else
- * @endif
- */
- class LoggerConsumer
- : public SdoServiceConsumerBase
- {
- public:
- /*!
- * @if jp
- * @brief ctor of LoggerConsumer
- * @else
- * @brief ctor of LoggerConsumer
- * @endif
- */
- LoggerConsumer();
-
- /*!
- * @if jp
- * @brief dtor
- * @else
- * @brief dtor
- * @endif
- */
- virtual ~LoggerConsumer();
-
- /*!
- * @if jp
- * @brief ú»
- * @else
- * @brief Initialization
- * @endif
- */
- virtual bool init(RTObject_impl& rtobj,
- const SDOPackage::ServiceProfile& profile);
-
- /*!
- * @if jp
- * @brief Äú»
- * @else
- * @brief Re-initialization
- * @endif
- */
- virtual bool reinit(const SDOPackage::ServiceProfile& profile);
-
- /*!
- * @if jp
- * @brief ServiceProfile ðæ¾·é
- * @else
- * @brief getting ServiceProfile
- * @endif
- */
- virtual const SDOPackage::ServiceProfile& getProfile() const;
-
- /*!
- * @if jp
- * @brief I¹
- * @else
- * @brief Finalization
- * @endif
- */
- virtual void finalize();
-
- protected:
-
- RTC::RTObject_impl* m_rtobj;
- SDOPackage::ServiceProfile m_profile;
- CorbaConsumer<OpenRTM::Logger> m_logger;
- };
-
-}; // namespace RTC
-
-extern "C"
-{
- DLL_EXPORT void LoggerConsumerInit();
-};
-
-#endif // RTC_LOGGERCONSUMER_H
-
-
+// -*- C++ -*-
+/*!
+ * @file LoggerConsumer.h
+ * @brief Component observer SDO service consumer implementation
+ * @date $Date$
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2011
+ * Noriaki Ando
+ * Intelligent Systems Research Institute,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ * $Id: SdoConfiguration.cpp 1971 2010-06-03 08:46:40Z n-ando $
+ *
+ */
+
+
+#ifndef RTC_LOGGERCONSUMER_H
+#define RTC_LOGGERCONSUMER_H
+
+#include <coil/Mutex.h>
+#include <coil/Factory.h>
+#include <coil/stringutil.h>
+#include <rtm/SdoServiceConsumerBase.h>
+#include <rtm/CorbaConsumer.h>
+#include <rtm/idl/SDOPackageStub.h>
+
+#include "LoggerStub.h"
+
+namespace RTC
+{
+
+ /*!
+ * @if jp
+ * @else
+ * @endif
+ */
+ class LoggerConsumer
+ : public SdoServiceConsumerBase
+ {
+ public:
+ /*!
+ * @if jp
+ * @brief ctor of LoggerConsumer
+ * @else
+ * @brief ctor of LoggerConsumer
+ * @endif
+ */
+ LoggerConsumer();
+
+ /*!
+ * @if jp
+ * @brief dtor
+ * @else
+ * @brief dtor
+ * @endif
+ */
+ virtual ~LoggerConsumer();
+
+ /*!
+ * @if jp
+ * @brief ½é´ü²½
+ * @else
+ * @brief Initialization
+ * @endif
+ */
+ virtual bool init(RTObject_impl& rtobj,
+ const SDOPackage::ServiceProfile& profile);
+
+ /*!
+ * @if jp
+ * @brief ºÆ½é´ü²½
+ * @else
+ * @brief Re-initialization
+ * @endif
+ */
+ virtual bool reinit(const SDOPackage::ServiceProfile& profile);
+
+ /*!
+ * @if jp
+ * @brief ServiceProfile ¤ò¼èÆÀ¤¹¤ë
+ * @else
+ * @brief getting ServiceProfile
+ * @endif
+ */
+ virtual const SDOPackage::ServiceProfile& getProfile() const;
+
+ /*!
+ * @if jp
+ * @brief ½ªÎ»½èÍý
+ * @else
+ * @brief Finalization
+ * @endif
+ */
+ virtual void finalize();
+
+ protected:
+
+ RTC::RTObject_impl* m_rtobj;
+ SDOPackage::ServiceProfile m_profile;
+ CorbaConsumer<OpenRTM::Logger> m_logger;
+ };
+
+}; // namespace RTC
+
+extern "C"
+{
+ DLL_EXPORT void LoggerConsumerInit();
+};
+
+#endif // RTC_LOGGERCONSUMER_H
+
+
More information about the openrtm-commit
mailing list