OpenRTM-aist 2.0.2
|
Static FSM framework based on Macho. More...
#include <rtm/RTObject.h>
#include <rtm/Macho.h>
#include <rtm/RingBuffer.h>
#include <rtm/EventBase.h>
Go to the source code of this file.
Classes | |
class | RTC::Machine< TOP > |
class | RTC::Link< C, P > |
Namespaces | |
namespace | RTC |
RT-Component. | |
Macros | |
#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>