mcx::drive::Cia402FsmBase
4 minute read
mcx::drive::Cia402FsmBase
Inherits from mcx::state_machine::State< Cia402FsmBase >
Inherited by mcx::drive::Fault, mcx::drive::NotReadyToSwitchOn, mcx::drive::OperationEnable, mcx::drive::QuickStopActive, mcx::drive::SwitchOn, mcx::drive::SwitchOnDisabled, mcx::drive::Transition
Public Functions
Name | |
---|---|
Cia402FsmBase(Cia402FsmData & data) | |
~Cia402FsmBase() override =default | |
virtual void | registerUserEvents() override |
virtual state_machine::EventStatus | shutdown(int state_id) |
virtual state_machine::EventStatus | switchOn(int state_id) |
virtual state_machine::EventStatus | disableVoltage(int state_id) |
virtual state_machine::EventStatus | quickStop(int state_id) |
virtual state_machine::EventStatus | disableOperation(int state_id) |
virtual state_machine::EventStatus | enableOperation(int state_id) |
virtual state_machine::EventStatus | resetting(int state_id) |
virtual state_machine::EventStatus | gotoOff() |
virtual state_machine::EventStatus | gotoDisengage() |
virtual state_machine::EventStatus | gotoEngage() |
virtual state_machine::EventStatus | gotoQuickStop() |
virtual state_machine::EventStatus | gotoModeAction() |
virtual state_machine::EventStatus | faultAcknowledge() |
virtual state_machine::EventStatus | switchMode(DriveMode drive_mode, const std::string & machine_name) |
virtual state_machine::EventStatus | warning_(const mcx::state_machine::Error & error) override |
virtual state_machine::EventStatus | forcedDisengaged_(const mcx::state_machine::Error & error) override |
virtual state_machine::EventStatus | shutdown_(const mcx::state_machine::Error & error) override |
virtual state_machine::EventStatus | emergencyStop_(const mcx::state_machine::Error & error) override |
Protected Attributes
Name | |
---|---|
Cia402FsmData & | fsm_data_ |
Additional inherited members
Public Functions inherited from mcx::state_machine::State< Cia402FsmBase >
Name | |
---|---|
template <class STATE ,class MACHINE > void |
create(MACHINE * newMachine, const STATE & state, int id, ErrorHandleBase * errorHandle) |
void | addErrorsHelper(ErrorGroup * stateErrors, const ErrorGroup & errorsToAdd) |
void | enableErrorsHelper(ErrorGroup * stateErrors, const ErrorGroup & refErrors, const ErrorGroup & errorsToAdd) |
void | disableErrorsHelper(ErrorGroup * stateErrors, const ErrorGroup & errorsToAdd) |
void | addErrors(const ErrorGroup & codes, signal_monitor::MonitorAction newAction) |
template <class MACHINE > void |
setMachine(MACHINE * newMachine) |
template <class MACHINE > MACHINE * |
getMachine() |
State() | |
virtual | ~State() |
double | getDtSec() const |
int | id() |
void | clearEventQueue(bool highPriority =true, bool lowPriority =true) |
SUPER_STATE * | setActiveState(int state_id) |
template <class NEWSTATE > NEWSTATE * |
setActiveState() |
template <class NEWSTATE > NEWSTATE * |
setActiveState(const NEWSTATE & state) |
template <typename… STATES> bool |
isStateActive() |
bool | isStateActive(int id) |
void | addEvent(const Event0< SUPER_STATE > & event, double timeoutSec =EVENT_DEFAULT_TIMEOUT_SEC, EventPriority priority =HIGH_PRIORITY_EVENT) |
void | addEvent(const Event1< SUPER_STATE > & event, double timeoutSec =EVENT_DEFAULT_TIMEOUT_SEC, EventPriority priority =HIGH_PRIORITY_EVENT) |
void | addEvent(const Event2< SUPER_STATE > & event, double timeoutSec =EVENT_DEFAULT_TIMEOUT_SEC, EventPriority priority =HIGH_PRIORITY_EVENT) |
void | addEvent(const Event3< SUPER_STATE > & event, double timeoutSec =EVENT_DEFAULT_TIMEOUT_SEC, EventPriority priority =HIGH_PRIORITY_EVENT) |
double | getActiveTimeoutSec() |
virtual const char * | stateName() const |
virtual const char * | eventName(Event< SUPER_STATE > * event) |
virtual EventStatus | acknowledgeErrors() |
bool | clearErrorMonitor(bool warnings_only =false) |
ErrorHandleBase * | getErrorMonitor() |
EventStatus | warning(const Error & error) |
EventStatus | forcedDisengaged(const Error & error) |
EventStatus | emergencyStop(const Error & error) |
EventStatus | delayEvent() |
virtual EventStatus | terminateEvent() |
void | errorMonitorAction() |
virtual void | enter() |
virtual void | enter(int prev_state_id) |
virtual void | leave() |
virtual void | leave(int next_state_id) |
virtual void | iterate(double dt_sec) |
template <class STATE > int |
id(id_caller< STATE > ) |
Protected Functions inherited from mcx::state_machine::State< Cia402FsmBase >
Name | |
---|---|
void | addToEventList(const event_name & event) |
void | addEventName(const Event0< SUPER_STATE > & event, const std::string & eventName) |
void | addEventName(const Event1< SUPER_STATE > & event, const std::string & eventName) |
void | addEventName(const Event2< SUPER_STATE > & event, const std::string & eventName) |
void | addEventName(const Event3< SUPER_STATE > & event, const std::string & eventName) |
Public Functions Documentation
function Cia402FsmBase
explicit Cia402FsmBase(
Cia402FsmData & data
)
function ~Cia402FsmBase
~Cia402FsmBase() override =default
function registerUserEvents
virtual void registerUserEvents() override
Reimplements: mcx::state_machine::State::registerUserEvents
function shutdown
virtual state_machine::EventStatus shutdown(
int state_id
)
Reimplemented by: mcx::drive::Transition::shutdown
function switchOn
virtual state_machine::EventStatus switchOn(
int state_id
)
Reimplemented by: mcx::drive::Transition::switchOn
function disableVoltage
virtual state_machine::EventStatus disableVoltage(
int state_id
)
Reimplemented by: mcx::drive::Transition::disableVoltage
function quickStop
virtual state_machine::EventStatus quickStop(
int state_id
)
Reimplemented by: mcx::drive::Transition::quickStop
function disableOperation
virtual state_machine::EventStatus disableOperation(
int state_id
)
Reimplemented by: mcx::drive::Transition::disableOperation
function enableOperation
virtual state_machine::EventStatus enableOperation(
int state_id
)
Reimplemented by: mcx::drive::Transition::enableOperation
function resetting
virtual state_machine::EventStatus resetting(
int state_id
)
Reimplemented by: mcx::drive::Transition::resetting
function gotoOff
virtual state_machine::EventStatus gotoOff()
Reimplemented by: mcx::drive::SwitchOn::gotoOff, mcx::drive::OperationEnable::gotoOff, mcx::drive::QuickStopActive::gotoOff
function gotoDisengage
virtual state_machine::EventStatus gotoDisengage()
Reimplemented by: mcx::drive::SwitchOnDisabled::gotoDisengage, mcx::drive::OperationEnable::gotoDisengage, mcx::drive::QuickStopActive::gotoDisengage
function gotoEngage
virtual state_machine::EventStatus gotoEngage()
Reimplemented by: mcx::drive::SwitchOnDisabled::gotoEngage, mcx::drive::SwitchOn::gotoEngage, mcx::drive::OperationEnable::gotoEngage, mcx::drive::QuickStopActive::gotoEngage
function gotoQuickStop
virtual state_machine::EventStatus gotoQuickStop()
Reimplemented by: mcx::drive::OperationEnable::gotoQuickStop
function gotoModeAction
virtual state_machine::EventStatus gotoModeAction()
Reimplemented by: mcx::drive::OperationEnable::gotoModeAction
function faultAcknowledge
virtual state_machine::EventStatus faultAcknowledge()
Reimplemented by: mcx::drive::NotReadyToSwitchOn::faultAcknowledge, mcx::drive::Fault::faultAcknowledge
function switchMode
virtual state_machine::EventStatus switchMode(
DriveMode drive_mode,
const std::string & machine_name
)
function warning_
virtual state_machine::EventStatus warning_(
const mcx::state_machine::Error & error
) override
Reimplements: mcx::state_machine::State::warning_
function forcedDisengaged_
virtual state_machine::EventStatus forcedDisengaged_(
const mcx::state_machine::Error & error
) override
Reimplements: mcx::state_machine::State::forcedDisengaged_
function shutdown_
virtual state_machine::EventStatus shutdown_(
const mcx::state_machine::Error & error
) override
Reimplements: mcx::state_machine::State::shutdown_
function emergencyStop_
virtual state_machine::EventStatus emergencyStop_(
const mcx::state_machine::Error & error
) override
Reimplements: mcx::state_machine::State::emergencyStop_
Protected Attributes Documentation
variable fsm_data_
Cia402FsmData & fsm_data_;
Updated on 2022-04-05 at 16:21:26 +0200