OpenRTM-aist 2.1.0
|
Static FSM framework based on Macho [詳解]
#include <rtm/RTObject.h>
#include <rtm/Macho.h>
#include <rtm/RingBuffer.h>
#include <rtm/EventBase.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
Copyright (C) 2017 National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.
$Id$
#define FSM_INIT_VALUE | ( | S | ) |
#define FSM_STATE | ( | S | ) |
#define FSM_SUBSTATE | ( | STATE, | |
SUPERSTATE | |||
) |
#define FSM_TOPSTATE | ( | 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>