OpenRTM-aist 2.0.2
読み取り中…
検索中…
一致する文字列を見つけられません
StaticFSM.h ファイル

Static FSM framework based on Macho [詳解]

#include <rtm/RTObject.h>
#include <rtm/Macho.h>
#include <rtm/RingBuffer.h>
#include <rtm/EventBase.h>
StaticFSM.h の依存先関係図:
被依存関係図:

[ソースコード]

クラス

class  RTC::Machine< TOP >
 
class  RTC::Link< C, P >
 

名前空間

namespace  RTC
 RTコンポーネント
 

マクロ定義

#define FSM_TOPSTATE(TOP)
 State machine definition macros
 
#define FSM_SUBSTATE(STATE, SUPERSTATE)
 Macho's SUBSTATE macro for RTC::Link
 
#define FSM_STATE(S)
 Macho's STATE macro for RTC::Link
 
#define FSM_INIT_VALUE(S)
 

詳解

Static FSM framework based on Macho

日付
$Date$
著者
Noriaki Ando n-and.nosp@m.o@ai.nosp@m.st.go.nosp@m..jp

Copyright (C) 2017 National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.

$Id$

マクロ定義詳解

◆ FSM_INIT_VALUE

#define FSM_INIT_VALUE ( S)
値:
template<> \
Definition Macho.h:1648
Definition Macho.h:618

◆ FSM_STATE

#define FSM_STATE ( S)
値:
public: \
using SELF = S; \
S(::Macho::_StateInstance & instance) \
: ::RTC::Link<S, SUPER>(instance) \
{ \
using MustDeriveFromLink = ::CheckSameType<::RTC::Link<S, SUPER>, \
LINK>::Check; \
static_assert(static_cast<MustDeriveFromLink*>(nullptr)==nullptr, \
"dummy assert for suppress warning"); \
} \
~S() override {} \
static const char * _state_name() { return #S; } \
Box & box() { return *static_cast<Box *>(_box()); } \
friend class ::_VS8_Bug_101615
Definition Macho.h:629
Definition Macho.h:214

Macho's STATE macro for RTC::Link

◆ FSM_SUBSTATE

#define FSM_SUBSTATE ( STATE,
SUPERSTATE )
値:
struct STATE \
: public ::RTC::Link< STATE, SUPERSTATE >
#define STATE(S)
Definition Macho.h:236

Macho's SUBSTATE macro for RTC::Link

◆ FSM_TOPSTATE

#define FSM_TOPSTATE ( TOP)
値:
struct TOP \
: public ::RTC::Link< TOP, ::Macho::TopBase< TOP > >

State machine definition macros

FSM basic structure

namespace <FSM name> { FSM_TOPSTATE(Top) { struct Box { Box() : <initializer> {} : <some operations> : }; FSM_STATE(Top); : virtual void event_operations() {}; : private: virtual RTC::ReturnCode_t onInit(); virtual RTC::ReturnCode_t onEntry(); virtual RTC::ReturnCode_t onExit(); };

FSM_SUBSTATE(OtherState, Top) { FSM_STATE(OtherState); virtual void event_operation(); private: virtual RTC::ReturnCode_t onEntry(); virtual RTC::ReturnCode_t onExit(); };

FSM_SUBSTATE(OtherState2, Top) : other states

}; // end of <FSM name>

Macho's TOPSTATE macro for RTC::Link