diff --git a/experimental_epsilon/src/Declaration.egl b/experimental_epsilon/src/Declaration.egl index c346029..5d3eabe 100644 --- a/experimental_epsilon/src/Declaration.egl +++ b/experimental_epsilon/src/Declaration.egl @@ -6,11 +6,10 @@ class [%=sm.name%] : public [%=sm.name%]Base { public: static const StatePtr kInitialState; -[% for (region in sm.regions) { +[%var region = sm.regions.first; var regionTemplate : Template = TemplateFactory.load("DeclarationRegion.egl"); regionTemplate.populate("region", region); regionTemplate.populate("sm", sm); %] [%=regionTemplate.process()%] -[%}%] }; diff --git a/experimental_epsilon/src/Instance.egl b/experimental_epsilon/src/Instance.egl index 931bb54..f8266d3 100644 --- a/experimental_epsilon/src/Instance.egl +++ b/experimental_epsilon/src/Instance.egl @@ -1,9 +1,23 @@ // Statemachine [%=sm.name%] instance -[% for (region in sm.regions) { - var regionTemplate : Template = TemplateFactory.load("DeclarationRegion.egl"); +// Override the following defines according to your needs if you are not using cpp_event_framework: + +#ifndef IoArHandlerMain_GET_INSTANCE_EVENT_ID +#define IoArHandlerMain_GET_INSTANCE_EVENT_ID(event_instance) event_instance->Id() +#endif + +#ifndef IoArHandlerMain_GET_STATIC_EVENT_ID +#define IoArHandlerMain_GET_STATIC_EVENT_ID(event_name) event_name::kId +#endif + +[% + var region = sm.regions.first; + var intitalstate = region.subvertices.select(s|(s.type.name == "Pseudostate") and (s.kind.name == "initial")).first; + + var regionTemplate : Template = TemplateFactory.load("InstanceRegion.egl"); regionTemplate.populate("region", region); regionTemplate.populate("sm", sm); %] - [%=regionTemplate.process()%] -[%}%] +// Initial state +const [%=sm.name%]::StatePtr [%=sm.name%]::kInitialState = &[%=sm.name%]::k[%=intitalstate.outgoing.first.target.name%]; +[%=regionTemplate.process()%] diff --git a/experimental_epsilon/src/InstanceHandler.egl b/experimental_epsilon/src/InstanceHandler.egl new file mode 100644 index 0000000..617763e --- /dev/null +++ b/experimental_epsilon/src/InstanceHandler.egl @@ -0,0 +1 @@ +!HANDLER! [%=state.name%] \ No newline at end of file diff --git a/experimental_epsilon/src/InstanceRegion.egl b/experimental_epsilon/src/InstanceRegion.egl new file mode 100644 index 0000000..a866585 --- /dev/null +++ b/experimental_epsilon/src/InstanceRegion.egl @@ -0,0 +1,8 @@ +[% for (state in region.subvertices.select(s|s.type.name == "State")) { + var stateTemplate : Template = TemplateFactory.load("InstanceState.egl"); + stateTemplate.populate("state", state); + stateTemplate.populate("sm", sm); +%] + +[%=stateTemplate.process()%] +[%}%] diff --git a/experimental_epsilon/src/InstanceState.egl b/experimental_epsilon/src/InstanceState.egl new file mode 100644 index 0000000..a80ce54 --- /dev/null +++ b/experimental_epsilon/src/InstanceState.egl @@ -0,0 +1,53 @@ +[% + var regionTemplate : Template = TemplateFactory.load("InstanceRegion.egl"); + var transitionTemplate : Template = TemplateFactory.load("InstanceTransition.egl"); + var handlerTemplate : Template = TemplateFactory.load("InstanceHandler.egl"); + handlerTemplate.populate("state", state); + handlerTemplate.populate("sm", sm); + + var parent = "nullptr"; + if (state.container.state != null) { + parent = "&k" + state.container.state.name; + } + + var initial = "nullptr"; + if (not state.regions.empty) { + var region = state.regions.first; + var initial_state = region.subvertices.select(s|(s.type.name == "Pseudostate") and ((s.kind.name == "initial") or (s.kind.name == "shallowHistory"))).first; + if (initial_state != null) { + initial = "&k" + initial_state.outgoing.first.target.name; + } + } + + var entry = "nullptr"; + if (state.entry != null) { + entry = "&" + sm.name + "::Impl::" + state.entry.name; + } + + var exit = "nullptr"; + if (state.exit != null) { + entry = "&" + sm.name + "::Impl::" + state.exit.name; + } +%] +// State [%=state.name%] +const [%=sm.name%]::State [%=sm.name%]::k[%=state.name%]("[%=state.name%]", + &[%=state.name%]Handler, // Handler + [%=parent%], // Parent + [%=initial%], // Initial + [%=entry%], // Entry + [%=exit%]); // Exit +[% for (outgoing_transition in state.outgoing) { + transitionTemplate.populate("start_transition", outgoing_transition); + transitionTemplate.populate("transition", outgoing_transition); + transitionTemplate.populate("state", state); + transitionTemplate.populate("sm", sm); +%] +[%=transitionTemplate.process()%] +[%}%] +[%=handlerTemplate.process()%] +[% for (sub_region in state.regions) { + regionTemplate.populate("region", sub_region); + regionTemplate.populate("sm", sm); +%] +[%=regionTemplate.process()%] +[%}%] diff --git a/experimental_epsilon/src/InstanceTransition.egl b/experimental_epsilon/src/InstanceTransition.egl new file mode 100644 index 0000000..15190d3 --- /dev/null +++ b/experimental_epsilon/src/InstanceTransition.egl @@ -0,0 +1 @@ +!TRANSITION! [%=start_transition.target.name%] \ No newline at end of file diff --git a/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx b/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx index 50de7a3..4b1b1a5 100644 --- a/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx +++ b/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx @@ -48,20 +48,40 @@ class IoArHandlerMain : public IoArHandlerMainBase static const Transition::ActionType kOpenToOpenByS_PNS_CheckModuleDiffActions[]; static const Transition kOpenToOpenByS_PNS_CheckModuleDiff; + // State WaitApplicationReady + static Transition WaitApplicationReadyHandler(ImplPtr impl, Event event); + static const State kWaitApplicationReady; + // Transition SPnpbAppTimeout: WaitApplicationReady -> WaitApplicationReadyCnf + static const Transition::ActionType kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeoutActions[]; + static const Transition kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeout; + // Transition SPnpbAppTimeout: WaitApplicationReady -> WaitApplicationReady + static const Transition::ActionType kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeoutActions[]; + static const Transition kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeout; + + // State Parameterizing + static Transition ParameterizingHandler(ImplPtr impl, Event event); + static const State kParameterizing; + // Transition S_PNS_ParamEndInd: Parameterizing -> WaitApplicationReady + static const Transition::ActionType kParameterizingToWaitApplicationReadyByS_PNS_ParamEndIndActions[]; + static const Transition kParameterizingToWaitApplicationReadyByS_PNS_ParamEndInd; + // Transition S_PNS_ParamEndInd: Parameterizing -> WaitApplicationReadyCnf + static const Transition::ActionType kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndIndActions[]; + static const Transition kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndInd; + + // State WaitApplicationReadyCnf + static Transition WaitApplicationReadyCnfHandler(ImplPtr impl, Event event); + static const State kWaitApplicationReadyCnf; + // Transition S_PNS_ApplicationReady_cnf: WaitApplicationReadyCnf -> ApplicationReady + static const Transition::ActionType kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnfActions[]; + static const Transition kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnf; + // Transition S_PNS_ApplicationReady_cnf: WaitApplicationReadyCnf -> WaitApplicationReadyCnf + static const Transition::ActionType kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnfActions[]; + static const Transition kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnf; + // State ApplicationReady static Transition ApplicationReadyHandler(ImplPtr impl, Event event); static const State kApplicationReady; - // State Ready - static Transition ReadyHandler(ImplPtr impl, Event event); - static const State kReady; - // Transition S_PNS_DynReconfPull: Ready -> DrWaitPullCnf - static const Transition::ActionType kReadyToDrWaitPullCnfByS_PNS_DynReconfPullActions[]; - static const Transition kReadyToDrWaitPullCnfByS_PNS_DynReconfPull; - // Transition S_PNS_DynReconfPlug: Ready -> DrWaitPlugCnf - static const Transition::ActionType kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlugActions[]; - static const Transition kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlug; - // State DynamicReconfigurationRunning static Transition DynamicReconfigurationRunningHandler(ImplPtr impl, Event event); static const State kDynamicReconfigurationRunning; @@ -69,6 +89,13 @@ class IoArHandlerMain : public IoArHandlerMainBase static const Transition::ActionType kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconfActions[]; static const Transition kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconf; + // State DrWaitApplicationReadyCnfPlugSubmodule + static Transition DrWaitApplicationReadyCnfPlugSubmoduleHandler(ImplPtr impl, Event event); + static const State kDrWaitApplicationReadyCnfPlugSubmodule; + // Transition S_PNS_PlugApplicationReady_cnf: DrWaitApplicationReadyCnfPlugSubmodule -> Ready + static const Transition::ActionType kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnfActions[]; + static const Transition kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnf; + // State DrWaitApplicationReadyPlugSubmodule static Transition DrWaitApplicationReadyPlugSubmoduleHandler(ImplPtr impl, Event event); static const State kDrWaitApplicationReadyPlugSubmodule; @@ -79,20 +106,6 @@ class IoArHandlerMain : public IoArHandlerMainBase static const Transition::ActionType kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyPlugSubmoduleBySPnpbAppTimeoutActions[]; static const Transition kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyPlugSubmoduleBySPnpbAppTimeout; - // State DrWaitPullCnf - static Transition DrWaitPullCnfHandler(ImplPtr impl, Event event); - static const State kDrWaitPullCnf; - // Transition S_PNS_PullSubmodule_cnf: DrWaitPullCnf -> Ready - static const Transition::ActionType kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnfActions[]; - static const Transition kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnf; - - // State DrWaitApplicationReadyCnfPlugSubmodule - static Transition DrWaitApplicationReadyCnfPlugSubmoduleHandler(ImplPtr impl, Event event); - static const State kDrWaitApplicationReadyCnfPlugSubmodule; - // Transition S_PNS_PlugApplicationReady_cnf: DrWaitApplicationReadyCnfPlugSubmodule -> Ready - static const Transition::ActionType kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnfActions[]; - static const Transition kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnf; - // State DrWaitPlugCnf static Transition DrWaitPlugCnfHandler(ImplPtr impl, Event event); static const State kDrWaitPlugCnf; @@ -100,6 +113,13 @@ class IoArHandlerMain : public IoArHandlerMainBase static const Transition::ActionType kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnfActions[]; static const Transition kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnf; + // State DrWaitPullCnf + static Transition DrWaitPullCnfHandler(ImplPtr impl, Event event); + static const State kDrWaitPullCnf; + // Transition S_PNS_PullSubmodule_cnf: DrWaitPullCnf -> Ready + static const Transition::ActionType kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnfActions[]; + static const Transition kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnf; + // State DrPlugPrmSequence static Transition DrPlugPrmSequenceHandler(ImplPtr impl, Event event); static const State kDrPlugPrmSequence; @@ -107,33 +127,13 @@ class IoArHandlerMain : public IoArHandlerMainBase static const Transition::ActionType kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndIndActions[]; static const Transition kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndInd; - // State Parameterizing - static Transition ParameterizingHandler(ImplPtr impl, Event event); - static const State kParameterizing; - // Transition S_PNS_ParamEndInd: Parameterizing -> WaitApplicationReady - static const Transition::ActionType kParameterizingToWaitApplicationReadyByS_PNS_ParamEndIndActions[]; - static const Transition kParameterizingToWaitApplicationReadyByS_PNS_ParamEndInd; - // Transition S_PNS_ParamEndInd: Parameterizing -> WaitApplicationReadyCnf - static const Transition::ActionType kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndIndActions[]; - static const Transition kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndInd; - - // State WaitApplicationReadyCnf - static Transition WaitApplicationReadyCnfHandler(ImplPtr impl, Event event); - static const State kWaitApplicationReadyCnf; - // Transition S_PNS_ApplicationReady_cnf: WaitApplicationReadyCnf -> ApplicationReady - static const Transition::ActionType kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnfActions[]; - static const Transition kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnf; - // Transition S_PNS_ApplicationReady_cnf: WaitApplicationReadyCnf -> WaitApplicationReadyCnf - static const Transition::ActionType kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnfActions[]; - static const Transition kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnf; - - // State WaitApplicationReady - static Transition WaitApplicationReadyHandler(ImplPtr impl, Event event); - static const State kWaitApplicationReady; - // Transition SPnpbAppTimeout: WaitApplicationReady -> WaitApplicationReadyCnf - static const Transition::ActionType kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeoutActions[]; - static const Transition kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeout; - // Transition SPnpbAppTimeout: WaitApplicationReady -> WaitApplicationReady - static const Transition::ActionType kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeoutActions[]; - static const Transition kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeout; + // State Ready + static Transition ReadyHandler(ImplPtr impl, Event event); + static const State kReady; + // Transition S_PNS_DynReconfPull: Ready -> DrWaitPullCnf + static const Transition::ActionType kReadyToDrWaitPullCnfByS_PNS_DynReconfPullActions[]; + static const Transition kReadyToDrWaitPullCnfByS_PNS_DynReconfPull; + // Transition S_PNS_DynReconfPlug: Ready -> DrWaitPlugCnf + static const Transition::ActionType kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlugActions[]; + static const Transition kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlug; }; diff --git a/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx b/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx index 6b0d721..dbfe6b5 100644 --- a/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx +++ b/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx @@ -1,132 +1,154 @@ // Statemachine IoArHandlerMain instance +// Override the following defines according to your needs if you are not using cpp_event_framework: + +#ifndef IoArHandlerMain_GET_INSTANCE_EVENT_ID +#define IoArHandlerMain_GET_INSTANCE_EVENT_ID(event_instance) event_instance->Id() +#endif + +#ifndef IoArHandlerMain_GET_STATIC_EVENT_ID +#define IoArHandlerMain_GET_STATIC_EVENT_ID(event_name) event_name::kId +#endif + +// Initial state +const IoArHandlerMain::StatePtr IoArHandlerMain::kInitialState = &IoArHandlerMain::kClosed; // State Closed -static Transition ClosedHandler(ImplPtr impl, Event event); -static const State kClosed; -// Transition S_PNS_ArOpend_ind: Closed -> Open -static const Transition::ActionType kClosedToOpenByS_PNS_ArOpend_indActions[]; -static const Transition kClosedToOpenByS_PNS_ArOpend_ind; -// Transition S_PNS_SwitchoverRequestPrimary: Closed -> Closed -static const Transition::ActionType kClosedToClosedByS_PNS_SwitchoverRequestPrimaryActions[]; -static const Transition kClosedToClosedByS_PNS_SwitchoverRequestPrimary; -// Transition S_PNS_SwitchoverRequestBackup: Closed -> Closed -static const Transition::ActionType kClosedToClosedByS_PNS_SwitchoverRequestBackupActions[]; -static const Transition kClosedToClosedByS_PNS_SwitchoverRequestBackup; -// Transition S_PNS_ReadReq: Closed -> Closed -static const Transition::ActionType kClosedToClosedByS_PNS_ReadReqActions[]; -static const Transition kClosedToClosedByS_PNS_ReadReq; -// Transition S_PNS_WriteReq: Closed -> Closed -static const Transition::ActionType kClosedToClosedByS_PNS_WriteReqActions[]; -static const Transition kClosedToClosedByS_PNS_WriteReq; +const IoArHandlerMain::State IoArHandlerMain::kClosed("Closed", +&ClosedHandler, // Handler +nullptr, // Parent +nullptr, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! Open +!TRANSITION! Closed +!TRANSITION! Closed +!TRANSITION! Closed +!TRANSITION! Closed +!HANDLER! Closed // State Open -static Transition OpenHandler(ImplPtr impl, Event event); -static const State kOpen; -// Transition S_PNS_SwitchoverRequestPrimary: Open -> Open -static const Transition::ActionType kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions[]; -static const Transition kOpenToOpenByS_PNS_SwitchoverRequestPrimary; -// Transition S_PNS_SwitchoverRequestBackup: Open -> Open -static const Transition::ActionType kOpenToOpenByS_PNS_SwitchoverRequestBackupActions[]; -static const Transition kOpenToOpenByS_PNS_SwitchoverRequestBackup; -// Transition S_PNS_WriteReq: Open -> Open -static const Transition::ActionType kOpenToOpenByS_PNS_WriteReqActions[]; -static const Transition kOpenToOpenByS_PNS_WriteReq; -// Transition S_PNS_ReadReq: Open -> Open -static const Transition::ActionType kOpenToOpenByS_PNS_ReadReqActions[]; -static const Transition kOpenToOpenByS_PNS_ReadReq; -// Transition S_PNS_ArClosed_ind: Open -> Closed -static const Transition::ActionType kOpenToClosedByS_PNS_ArClosed_indActions[]; -static const Transition kOpenToClosedByS_PNS_ArClosed_ind; -// Transition S_PNS_CheckModuleDiff: Open -> Open -static const Transition::ActionType kOpenToOpenByS_PNS_CheckModuleDiffActions[]; -static const Transition kOpenToOpenByS_PNS_CheckModuleDiff; +const IoArHandlerMain::State IoArHandlerMain::kOpen("Open", +&OpenHandler, // Handler +nullptr, // Parent +&kParameterizing, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! Open +!TRANSITION! Open +!TRANSITION! Open +!TRANSITION! Open +!TRANSITION! Closed +!TRANSITION! Open +!HANDLER! Open -// State ApplicationReady -static Transition ApplicationReadyHandler(ImplPtr impl, Event event); -static const State kApplicationReady; +// State WaitApplicationReady +const IoArHandlerMain::State IoArHandlerMain::kWaitApplicationReady("WaitApplicationReady", +&WaitApplicationReadyHandler, // Handler +&kOpen, // Parent +nullptr, // Initial +&IoArHandlerMain::Impl::StopWaitApplicationReadyTimer, // Entry +nullptr); // Exit +!TRANSITION! +!HANDLER! WaitApplicationReady -// State Ready -static Transition ReadyHandler(ImplPtr impl, Event event); -static const State kReady; -// Transition S_PNS_DynReconfPull: Ready -> DrWaitPullCnf -static const Transition::ActionType kReadyToDrWaitPullCnfByS_PNS_DynReconfPullActions[]; -static const Transition kReadyToDrWaitPullCnfByS_PNS_DynReconfPull; -// Transition S_PNS_DynReconfPlug: Ready -> DrWaitPlugCnf -static const Transition::ActionType kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlugActions[]; -static const Transition kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlug; +// State Parameterizing +const IoArHandlerMain::State IoArHandlerMain::kParameterizing("Parameterizing", +&ParameterizingHandler, // Handler +&kOpen, // Parent +nullptr, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! +!HANDLER! Parameterizing -// State DynamicReconfigurationRunning -static Transition DynamicReconfigurationRunningHandler(ImplPtr impl, Event event); -static const State kDynamicReconfigurationRunning; -// Transition SPnioAppTimeoutDynReconf: DynamicReconfigurationRunning -> DynamicReconfigurationRunning -static const Transition::ActionType kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconfActions[]; -static const Transition kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconf; +// State WaitApplicationReadyCnf +const IoArHandlerMain::State IoArHandlerMain::kWaitApplicationReadyCnf("WaitApplicationReadyCnf", +&WaitApplicationReadyCnfHandler, // Handler +&kOpen, // Parent +nullptr, // Initial +&IoArHandlerMain::Impl::SendApplicationReady, // Entry +nullptr); // Exit +!TRANSITION! ApplicationReady +!TRANSITION! WaitApplicationReadyCnf +!HANDLER! WaitApplicationReadyCnf -// State DrWaitApplicationReadyPlugSubmodule -static Transition DrWaitApplicationReadyPlugSubmoduleHandler(ImplPtr impl, Event event); -static const State kDrWaitApplicationReadyPlugSubmodule; -// Transition SPnpbAppTimeout: DrWaitApplicationReadyPlugSubmodule -> DrWaitApplicationReadyCnfPlugSubmodule -static const Transition::ActionType kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyCnfPlugSubmoduleBySPnpbAppTimeoutActions[]; -static const Transition kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyCnfPlugSubmoduleBySPnpbAppTimeout; -// Transition SPnpbAppTimeout: DrWaitApplicationReadyPlugSubmodule -> DrWaitApplicationReadyPlugSubmodule -static const Transition::ActionType kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyPlugSubmoduleBySPnpbAppTimeoutActions[]; -static const Transition kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyPlugSubmoduleBySPnpbAppTimeout; +// State ApplicationReady +const IoArHandlerMain::State IoArHandlerMain::kApplicationReady("ApplicationReady", +&ApplicationReadyHandler, // Handler +&kOpen, // Parent +&kReady, // Initial +nullptr, // Entry +nullptr); // Exit +!HANDLER! ApplicationReady -// State DrWaitPullCnf -static Transition DrWaitPullCnfHandler(ImplPtr impl, Event event); -static const State kDrWaitPullCnf; -// Transition S_PNS_PullSubmodule_cnf: DrWaitPullCnf -> Ready -static const Transition::ActionType kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnfActions[]; -static const Transition kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnf; +// State DynamicReconfigurationRunning +const IoArHandlerMain::State IoArHandlerMain::kDynamicReconfigurationRunning("DynamicReconfigurationRunning", +&DynamicReconfigurationRunningHandler, // Handler +&kApplicationReady, // Parent +&kDrWaitPlugCnf, // Initial +&IoArHandlerMain::Impl::StopDynReconfTimer, // Entry +nullptr); // Exit +!TRANSITION! DynamicReconfigurationRunning +!HANDLER! DynamicReconfigurationRunning // State DrWaitApplicationReadyCnfPlugSubmodule -static Transition DrWaitApplicationReadyCnfPlugSubmoduleHandler(ImplPtr impl, Event event); -static const State kDrWaitApplicationReadyCnfPlugSubmodule; -// Transition S_PNS_PlugApplicationReady_cnf: DrWaitApplicationReadyCnfPlugSubmodule -> Ready -static const Transition::ActionType kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnfActions[]; -static const Transition kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnf; +const IoArHandlerMain::State IoArHandlerMain::kDrWaitApplicationReadyCnfPlugSubmodule("DrWaitApplicationReadyCnfPlugSubmodule", +&DrWaitApplicationReadyCnfPlugSubmoduleHandler, // Handler +&kDynamicReconfigurationRunning, // Parent +nullptr, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! Ready +!HANDLER! DrWaitApplicationReadyCnfPlugSubmodule -// State DrWaitPlugCnf -static Transition DrWaitPlugCnfHandler(ImplPtr impl, Event event); -static const State kDrWaitPlugCnf; -// Transition S_PNS_PlugSubmodule_cnf: DrWaitPlugCnf -> DrPlugPrmSequence -static const Transition::ActionType kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnfActions[]; -static const Transition kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnf; +// State DrWaitApplicationReadyPlugSubmodule +const IoArHandlerMain::State IoArHandlerMain::kDrWaitApplicationReadyPlugSubmodule("DrWaitApplicationReadyPlugSubmodule", +&DrWaitApplicationReadyPlugSubmoduleHandler, // Handler +&kDynamicReconfigurationRunning, // Parent +nullptr, // Initial +&IoArHandlerMain::Impl::StopWaitApplicationReadyTimer, // Entry +nullptr); // Exit +!TRANSITION! +!HANDLER! DrWaitApplicationReadyPlugSubmodule -// State DrPlugPrmSequence -static Transition DrPlugPrmSequenceHandler(ImplPtr impl, Event event); -static const State kDrPlugPrmSequence; -// Transition S_PNS_PlugParamEndInd: DrPlugPrmSequence -> DrWaitApplicationReadyPlugSubmodule -static const Transition::ActionType kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndIndActions[]; -static const Transition kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndInd; +// State DrWaitPlugCnf +const IoArHandlerMain::State IoArHandlerMain::kDrWaitPlugCnf("DrWaitPlugCnf", +&DrWaitPlugCnfHandler, // Handler +&kDynamicReconfigurationRunning, // Parent +nullptr, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! DrPlugPrmSequence +!HANDLER! DrWaitPlugCnf -// State Parameterizing -static Transition ParameterizingHandler(ImplPtr impl, Event event); -static const State kParameterizing; -// Transition S_PNS_ParamEndInd: Parameterizing -> WaitApplicationReady -static const Transition::ActionType kParameterizingToWaitApplicationReadyByS_PNS_ParamEndIndActions[]; -static const Transition kParameterizingToWaitApplicationReadyByS_PNS_ParamEndInd; -// Transition S_PNS_ParamEndInd: Parameterizing -> WaitApplicationReadyCnf -static const Transition::ActionType kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndIndActions[]; -static const Transition kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndInd; +// State DrWaitPullCnf +const IoArHandlerMain::State IoArHandlerMain::kDrWaitPullCnf("DrWaitPullCnf", +&DrWaitPullCnfHandler, // Handler +&kDynamicReconfigurationRunning, // Parent +nullptr, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! Ready +!HANDLER! DrWaitPullCnf -// State WaitApplicationReadyCnf -static Transition WaitApplicationReadyCnfHandler(ImplPtr impl, Event event); -static const State kWaitApplicationReadyCnf; -// Transition S_PNS_ApplicationReady_cnf: WaitApplicationReadyCnf -> ApplicationReady -static const Transition::ActionType kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnfActions[]; -static const Transition kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnf; -// Transition S_PNS_ApplicationReady_cnf: WaitApplicationReadyCnf -> WaitApplicationReadyCnf -static const Transition::ActionType kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnfActions[]; -static const Transition kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnf; +// State DrPlugPrmSequence +const IoArHandlerMain::State IoArHandlerMain::kDrPlugPrmSequence("DrPlugPrmSequence", +&DrPlugPrmSequenceHandler, // Handler +&kDynamicReconfigurationRunning, // Parent +nullptr, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! DrWaitApplicationReadyPlugSubmodule +!HANDLER! DrPlugPrmSequence -// State WaitApplicationReady -static Transition WaitApplicationReadyHandler(ImplPtr impl, Event event); -static const State kWaitApplicationReady; -// Transition SPnpbAppTimeout: WaitApplicationReady -> WaitApplicationReadyCnf -static const Transition::ActionType kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeoutActions[]; -static const Transition kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeout; -// Transition SPnpbAppTimeout: WaitApplicationReady -> WaitApplicationReady -static const Transition::ActionType kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeoutActions[]; -static const Transition kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeout; +// State Ready +const IoArHandlerMain::State IoArHandlerMain::kReady("Ready", +&ReadyHandler, // Handler +&kApplicationReady, // Parent +nullptr, // Initial +nullptr, // Entry +nullptr); // Exit +!TRANSITION! DrWaitPullCnf +!TRANSITION! DrWaitPlugCnf +!HANDLER! Ready