From 32a1e82b371b20cbc1bb057570ef68ffcf0b5cbb Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Dec 2023 22:51:38 +0100 Subject: [PATCH] Work on eclipse epsilon --- experimental_epsilon/src/Declaration.egl | 11 ++- .../src/DeclarationRegion.egl | 4 +- experimental_epsilon/src/DeclarationState.egl | 35 +++++--- .../src/DeclarationTransition.egl | 18 ++-- experimental_epsilon/src/InstanceHandler.egl | 10 ++- .../src/InstanceHandlerTransition.egl | 37 ++++---- experimental_epsilon/src/InstanceRegion.egl | 4 +- experimental_epsilon/src/InstanceState.egl | 40 +++++---- .../src/InstanceTransition.egl | 1 - .../src/InstanceTransitionVariable.egl | 33 +++++++ experimental_epsilon/src/Operations.egl | 24 ++++- experimental_epsilon/src/Program.egx | 12 +++ .../src/gen/IoArHandlerMainDeclaration.hxx | 37 ++++---- .../src/gen/IoArHandlerMainInstance.hxx | 90 ++++++++++++++----- 14 files changed, 245 insertions(+), 111 deletions(-) delete mode 100644 experimental_epsilon/src/InstanceTransition.egl create mode 100644 experimental_epsilon/src/InstanceTransitionVariable.egl diff --git a/experimental_epsilon/src/Declaration.egl b/experimental_epsilon/src/Declaration.egl index 5d3eabe..b6f8296 100644 --- a/experimental_epsilon/src/Declaration.egl +++ b/experimental_epsilon/src/Declaration.egl @@ -1,3 +1,7 @@ +[% + var regionTemplate : Template = TemplateFactory.load("DeclarationRegion.egl"); +%] + // Statemachine [%=sm.name%] declaration #pragma once @@ -6,10 +10,9 @@ class [%=sm.name%] : public [%=sm.name%]Base { public: static const StatePtr kInitialState; -[%var region = sm.regions.first; - var regionTemplate : Template = TemplateFactory.load("DeclarationRegion.egl"); - regionTemplate.populate("region", region); +[% + regionTemplate.populate("region", sm.regions.first); regionTemplate.populate("sm", sm); %] - [%=regionTemplate.process()%] +[%=regionTemplate.process()%] }; diff --git a/experimental_epsilon/src/DeclarationRegion.egl b/experimental_epsilon/src/DeclarationRegion.egl index 60eb90c..c8d3837 100644 --- a/experimental_epsilon/src/DeclarationRegion.egl +++ b/experimental_epsilon/src/DeclarationRegion.egl @@ -9,4 +9,6 @@ %] [%=stateTemplate.process()%] -[%}%] +[% + } +%] diff --git a/experimental_epsilon/src/DeclarationState.egl b/experimental_epsilon/src/DeclarationState.egl index 02b1a15..dbd113a 100644 --- a/experimental_epsilon/src/DeclarationState.egl +++ b/experimental_epsilon/src/DeclarationState.egl @@ -1,21 +1,30 @@ -[% import "Operations.egl"; %] +[% + import "Operations.egl"; + + var regionTemplate : Template = TemplateFactory.load("DeclarationRegion.egl"); + var transitionTemplate : Template = TemplateFactory.load("DeclarationTransition.egl"); +%] // State [%=state.name%] static Transition [%=state.name%]Handler(ImplPtr impl, Event event); static const State k[%=state.name%]; -[% for (outgoing_transition in state.getOutgoingTransitions()) { - var transitionTemplate : Template = TemplateFactory.load("DeclarationTransition.egl"); - transitionTemplate.populate("start_transition", outgoing_transition); - transitionTemplate.populate("transition", outgoing_transition); - transitionTemplate.populate("state", state); - transitionTemplate.populate("sm", sm); +[% + for (outgoing_transition in state.getOutgoingTransitions()) { + transitionTemplate.populate("start_transition", outgoing_transition); + transitionTemplate.populate("transition", outgoing_transition); + transitionTemplate.populate("state", state); + transitionTemplate.populate("sm", sm); %] [%=transitionTemplate.process()%] -[%}%] -[% for (sub_region in state.regions) { - var regionTemplate : Template = TemplateFactory.load("DeclarationRegion.egl"); - regionTemplate.populate("region", sub_region); - regionTemplate.populate("sm", sm); +[% + } +%] +[% + for (sub_region in state.regions) { + regionTemplate.populate("region", sub_region); + regionTemplate.populate("sm", sm); %] [%=regionTemplate.process()%] -[%}%] +[% + } +%] diff --git a/experimental_epsilon/src/DeclarationTransition.egl b/experimental_epsilon/src/DeclarationTransition.egl index 1f452c1..82d5e9d 100644 --- a/experimental_epsilon/src/DeclarationTransition.egl +++ b/experimental_epsilon/src/DeclarationTransition.egl @@ -5,13 +5,17 @@ // Transition [%=start_transition.trigger.first.event.name%]: [%=start_transition.source.name%] -> [%=transition.target.name%] static const Transition::ActionType [%=transition.getVariableName(start_transition)%]Actions[]; static const Transition [%=transition.getVariableName(start_transition)%]; -[%} else if (transition.target.isChoiceState()) { - for (choice_transition in transition.target.getOutgoingTransitions()) { +[% + } else if (transition.target.isChoiceState()) { var transitionTemplate : Template = TemplateFactory.load("DeclarationTransition.egl"); - transitionTemplate.populate("start_transition", start_transition); - transitionTemplate.populate("transition", choice_transition); - transitionTemplate.populate("state", state); - transitionTemplate.populate("sm", sm); + for (choice_transition in transition.target.getOutgoingTransitions()) { + transitionTemplate.populate("start_transition", start_transition); + transitionTemplate.populate("transition", choice_transition); + transitionTemplate.populate("state", state); + transitionTemplate.populate("sm", sm); %] [%=transitionTemplate.process()%] -[%}}%] +[% + } + } +%] diff --git a/experimental_epsilon/src/InstanceHandler.egl b/experimental_epsilon/src/InstanceHandler.egl index a42b577..e25fe5f 100644 --- a/experimental_epsilon/src/InstanceHandler.egl +++ b/experimental_epsilon/src/InstanceHandler.egl @@ -15,16 +15,18 @@ switch([%=sm.name%]_GET_INSTANCE_EVENT_ID(event)) { - [% for (an_event in all_events) {%] +[% + for (an_event in all_events) { +%] case [%=sm.name%]_GET_STATIC_EVENT_ID([%=an_event%]): - [% - var all_transitions = state.outgoing.select(t | t.trigger.first.event.name == an_event).sortBy(t | t.guardIsElse()); +[% + var all_transitions = state.getOutgoingTransitions().select(t | t.trigger.first.event.name == an_event); for (transition in all_transitions) { transitionTemplate.populate("start_transition", transition); transitionTemplate.populate("transition", transition); transitionTemplate.populate("state", state); transitionTemplate.populate("sm", sm); - %] +%] [%=transitionTemplate.process()%] [% } diff --git a/experimental_epsilon/src/InstanceHandlerTransition.egl b/experimental_epsilon/src/InstanceHandlerTransition.egl index a74cdae..3299462 100644 --- a/experimental_epsilon/src/InstanceHandlerTransition.egl +++ b/experimental_epsilon/src/InstanceHandlerTransition.egl @@ -1,13 +1,13 @@ [% import "Operations.egl"; - var transitionTemplate : Template = TemplateFactory.load("InstanceHandlerTransition.egl"); - if (transition.target.isState()) { if (transition.guardIsElse()) { %] return [%=transition.getVariableName(start_transition)%]; -[% } else { %] +[% + } else { +%] if (impl->[%=transition.guard.name%](event)) { return [%=transition.getVariableName(start_transition)%]; @@ -15,29 +15,26 @@ if (impl->[%=transition.guard.name%](event)) [% } } else if (transition.target.isChoiceState()) { - if (not transition.guardIsElse()) { + if (transition.hasGuard()) { %] if (impl->[%=transition.guard.name%](event)) { -[% for (choice_transition in transition.target.getOutgoingTransitions()) { - transitionTemplate.populate("start_transition", transition); - transitionTemplate.populate("transition", choice_transition); - transitionTemplate.populate("state", state); - transitionTemplate.populate("sm", sm); +[% + } + var transitionTemplate : Template = TemplateFactory.load("InstanceHandlerTransition.egl"); + for (choice_transition in transition.target.getOutgoingTransitions()) { + transitionTemplate.populate("start_transition", transition); + transitionTemplate.populate("transition", choice_transition); + transitionTemplate.populate("state", state); + transitionTemplate.populate("sm", sm); %] [%=transitionTemplate.process()%] -} -[% } - } else { - for (choice_transition in transition.target.getOutgoingTransitions()) { - transitionTemplate.populate("start_transition", transition); - transitionTemplate.populate("transition", choice_transition); - transitionTemplate.populate("state", state); - transitionTemplate.populate("sm", sm); +[% + } + if (transition.hasGuard()) { %] -[%=transitionTemplate.process()%] +} [% - } - } + } } %] diff --git a/experimental_epsilon/src/InstanceRegion.egl b/experimental_epsilon/src/InstanceRegion.egl index c94fd71..6a61f3c 100644 --- a/experimental_epsilon/src/InstanceRegion.egl +++ b/experimental_epsilon/src/InstanceRegion.egl @@ -9,4 +9,6 @@ %] [%=stateTemplate.process()%] -[%}%] +[% + } +%] diff --git a/experimental_epsilon/src/InstanceState.egl b/experimental_epsilon/src/InstanceState.egl index e83469b..ca7b305 100644 --- a/experimental_epsilon/src/InstanceState.egl +++ b/experimental_epsilon/src/InstanceState.egl @@ -2,7 +2,7 @@ import "Operations.egl"; var regionTemplate : Template = TemplateFactory.load("InstanceRegion.egl"); - var transitionTemplate : Template = TemplateFactory.load("InstanceTransition.egl"); + var transitionVariableTemplate : Template = TemplateFactory.load("InstanceTransitionVariable.egl"); var handlerTemplate : Template = TemplateFactory.load("InstanceHandler.egl"); handlerTemplate.populate("state", state); handlerTemplate.populate("sm", sm); @@ -14,10 +14,9 @@ var initial = "nullptr"; if (not state.regions.empty) { - var region = state.regions.first; - var initial_state = region.getInitialState(); + var initial_state = state.regions.first.getInitialState(); if (initial_state != null) { - initial = "&k" + initial_state.outgoing.first.target.name; + initial = "&k" + initial_state.outgoing.first.target.name; } } @@ -32,24 +31,33 @@ } %] // State [%=state.name%] -const [%=sm.name%]::State [%=sm.name%]::k[%=state.name%]("[%=state.name%]", +const [%=state.getStateType(sm)%] [%=sm.name%]::k[%=state.name%]("[%=state.name%]", &[%=state.name%]Handler, // Handler [%=parent%], // Parent [%=initial%], // Initial [%=entry%], // Entry [%=exit%]); // Exit -[% for (outgoing_transition in state.getOutgoingTransitions()) { - transitionTemplate.populate("start_transition", outgoing_transition); - transitionTemplate.populate("transition", outgoing_transition); - transitionTemplate.populate("state", state); - transitionTemplate.populate("sm", sm); + +[% + for (outgoing_transition in state.getOutgoingTransitions()) { + transitionVariableTemplate.populate("actions", new List()); + transitionVariableTemplate.populate("start_transition", outgoing_transition); + transitionVariableTemplate.populate("transition", outgoing_transition); + transitionVariableTemplate.populate("state", state); + transitionVariableTemplate.populate("sm", sm); +%] +[%=transitionVariableTemplate.process()%] +[% + } %] -[%=transitionTemplate.process()%] -[%}%] + [%=handlerTemplate.process()%] -[% for (sub_region in state.regions) { - regionTemplate.populate("region", sub_region); - regionTemplate.populate("sm", sm); +[% + 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 deleted file mode 100644 index 15190d3..0000000 --- a/experimental_epsilon/src/InstanceTransition.egl +++ /dev/null @@ -1 +0,0 @@ -!TRANSITION! [%=start_transition.target.name%] \ No newline at end of file diff --git a/experimental_epsilon/src/InstanceTransitionVariable.egl b/experimental_epsilon/src/InstanceTransitionVariable.egl new file mode 100644 index 0000000..6e8996b --- /dev/null +++ b/experimental_epsilon/src/InstanceTransitionVariable.egl @@ -0,0 +1,33 @@ +[% + import "Operations.egl"; + + var transitionVariableTemplate : Template = TemplateFactory.load("InstanceTransitionVariable.egl"); + + if (transition.effect != null) { + actions.add("&" + sm.name + "::Impl::" + transition.effect.name); + } + + if (transition.target.isState()) { + if (not actions.isEmpty()) { +%] +const [%=sm.name%]::Transition::ActionType [%=sm.name%]::[%=transition.getVariableName(start_transition)%]Actions[] = {[%=actions.concat(", ")%]}; +const [%=sm.name%]::Transition [%=sm.name%]::[%=transition.getVariableName(start_transition)%]([%=transition.target.getVariableName()%], [%=transition.getVariableName(start_transition)%]Actions); +[% + } else { +%] +const [%=sm.name%]::Transition [%=sm.name%]::[%=transition.getVariableName(start_transition)%]([%=transition.target.getVariableName()%]); +[% + } + } else if (transition.target.isChoiceState()) { + for (outgoing_transition in transition.target.getOutgoingTransitions()) { + transitionVariableTemplate.populate("actions", actions); + transitionVariableTemplate.populate("start_transition", start_transition); + transitionVariableTemplate.populate("transition", outgoing_transition); + transitionVariableTemplate.populate("state", state); + transitionVariableTemplate.populate("sm", sm); +%] +[%=transitionVariableTemplate.process()%] +[% + } + } +%] \ No newline at end of file diff --git a/experimental_epsilon/src/Operations.egl b/experimental_epsilon/src/Operations.egl index 25df198..f6ef419 100644 --- a/experimental_epsilon/src/Operations.egl +++ b/experimental_epsilon/src/Operations.egl @@ -4,7 +4,7 @@ } operation Vertex isChoiceState() : Boolean { - return (self.type.name = "Pseudostate") and (self.kind.name = "choice"); + return (self.type.name = "Pseudostate") and (self.kind = PseudostateKind#choice); } operation Vertex isState() : Boolean { @@ -15,15 +15,33 @@ return (self.guard = null) or (self.guard.name = 'else'); } + operation Transition hasGuard() : Boolean { + return (self.guard != null) and (self.guard.name != 'else'); + } + + operation State getVariableName() : String { + return "k" + self.name; + } + operation Transition getVariableName(start_transition : Transition) : String { return "k" + start_transition.source.name + "To" + self.target.name + "By"+ start_transition.trigger.first.event.name; } operation Region getInitialState() : Pseudostate { - return self.subvertices.select(s|(s.type.name == "Pseudostate") and ((s.kind.name == "initial") or (s.kind.name == "shallowHistory"))).first; + return self.subvertices.select(s|(s.type.name = "Pseudostate") and ((s.kind = PseudostateKind#initial) or (s.kind = PseudostateKind#shallowHistory))).first; } operation Region getStates() : List { - return self.subvertices.select(s|s.type.name == "State").sortBy(s | s.name); + return self.subvertices.select(s|s.type.name = "State").sortBy(s | s.name); } + + operation Vertex getStateType(sm : StateMachine) : String { + if (not self.regions.isEmpty()) { + var initial = self.regions.first.getInitialState(); + if ((initial != null) and (initial.kind = PseudostateKind#shallowHistory)) { + return sm.name + "::HistoryState"; + } + } + return sm.name + "::State"; + } %] diff --git a/experimental_epsilon/src/Program.egx b/experimental_epsilon/src/Program.egx index b20be72..aed90fd 100644 --- a/experimental_epsilon/src/Program.egx +++ b/experimental_epsilon/src/Program.egx @@ -1,15 +1,27 @@ rule StatemachineDeclaration transform sm : UML!StateMachine { + pre { + var java = new Native("org.eclipse.epsilon.egl.formatter.language.JavaFormatter"); + } + template : "Declaration.egl" + formatter : java + target : "gen/" + sm.name + "Declaration.hxx" } rule StatemachineInstance transform sm : UML!StateMachine { + pre { + var java = new Native("org.eclipse.epsilon.egl.formatter.language.JavaFormatter"); + } + template : "Instance.egl" + formatter : java + target : "gen/" + sm.name + "Instance.hxx" } diff --git a/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx b/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx index 54e36d2..eb8c35c 100644 --- a/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx +++ b/experimental_epsilon/src/gen/IoArHandlerMainDeclaration.hxx @@ -1,3 +1,4 @@ + // Statemachine IoArHandlerMain declaration #pragma once @@ -11,21 +12,21 @@ class IoArHandlerMain : public IoArHandlerMainBase // State Closed static Transition ClosedHandler(ImplPtr impl, Event event); static const State kClosed; + // Transition S_PNS_WriteReq: Closed -> Closed + static const Transition::ActionType kClosedToClosedByS_PNS_WriteReqActions[]; + static const Transition kClosedToClosedByS_PNS_WriteReq; + // 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_ReadReq: Closed -> Closed + static const Transition::ActionType kClosedToClosedByS_PNS_ReadReqActions[]; + static const Transition kClosedToClosedByS_PNS_ReadReq; // 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_ArOpend_ind: Closed -> Open - static const Transition::ActionType kClosedToOpenByS_PNS_ArOpend_indActions[]; - static const Transition kClosedToOpenByS_PNS_ArOpend_ind; - // Transition S_PNS_WriteReq: Closed -> Closed - static const Transition::ActionType kClosedToClosedByS_PNS_WriteReqActions[]; - static const Transition kClosedToClosedByS_PNS_WriteReq; // State Open @@ -34,18 +35,18 @@ class IoArHandlerMain : public IoArHandlerMainBase // 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_SwitchoverRequestPrimary: Open -> Open - static const Transition::ActionType kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions[]; - static const Transition kOpenToOpenByS_PNS_SwitchoverRequestPrimary; - // Transition S_PNS_WriteReq: Open -> Open - static const Transition::ActionType kOpenToOpenByS_PNS_WriteReqActions[]; - static const Transition kOpenToOpenByS_PNS_WriteReq; // Transition S_PNS_SwitchoverRequestBackup: Open -> Open static const Transition::ActionType kOpenToOpenByS_PNS_SwitchoverRequestBackupActions[]; static const Transition kOpenToOpenByS_PNS_SwitchoverRequestBackup; + // Transition S_PNS_SwitchoverRequestPrimary: Open -> Open + static const Transition::ActionType kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions[]; + static const Transition kOpenToOpenByS_PNS_SwitchoverRequestPrimary; // Transition S_PNS_ReadReq: Open -> Open static const Transition::ActionType kOpenToOpenByS_PNS_ReadReqActions[]; static const Transition kOpenToOpenByS_PNS_ReadReq; + // Transition S_PNS_WriteReq: Open -> Open + static const Transition::ActionType kOpenToOpenByS_PNS_WriteReqActions[]; + static const Transition kOpenToOpenByS_PNS_WriteReq; // Transition S_PNS_CheckModuleDiff: Open -> Open static const Transition::ActionType kOpenToOpenByS_PNS_CheckModuleDiffActions[]; static const Transition kOpenToOpenByS_PNS_CheckModuleDiff; @@ -110,12 +111,12 @@ class IoArHandlerMain : public IoArHandlerMainBase // State Ready static Transition ReadyHandler(ImplPtr impl, Event event); static const State kReady; - // Transition S_PNS_DynReconfPlug: Ready -> DrWaitPlugCnf - static const Transition::ActionType kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlugActions[]; - static const Transition kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlug; // 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 diff --git a/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx b/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx index f070462..49ae5ae 100644 --- a/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx +++ b/experimental_epsilon/src/gen/IoArHandlerMainInstance.hxx @@ -20,11 +20,13 @@ nullptr, // Parent nullptr, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! Closed -!TRANSITION! Closed -!TRANSITION! Closed -!TRANSITION! Open -!TRANSITION! Closed + +const IoArHandlerMain::Transition IoArHandlerMain::kClosedToClosedByS_PNS_WriteReq(kClosed); +const IoArHandlerMain::Transition IoArHandlerMain::kClosedToOpenByS_PNS_ArOpend_ind(kOpen); +const IoArHandlerMain::Transition IoArHandlerMain::kClosedToClosedByS_PNS_ReadReq(kClosed); +const IoArHandlerMain::Transition IoArHandlerMain::kClosedToClosedByS_PNS_SwitchoverRequestPrimary(kClosed); +const IoArHandlerMain::Transition IoArHandlerMain::kClosedToClosedByS_PNS_SwitchoverRequestBackup(kClosed); + IoArHandlerMain::Transition IoArHandlerMain::ClosedHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -53,12 +55,20 @@ nullptr, // Parent &kParameterizing, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! Closed -!TRANSITION! Open -!TRANSITION! Open -!TRANSITION! Open -!TRANSITION! Open -!TRANSITION! Open + +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToClosedByS_PNS_ArClosed_indActions[] = {&IoArHandlerMain::Impl::ArClosed}; +const IoArHandlerMain::Transition IoArHandlerMain::kOpenToClosedByS_PNS_ArClosed_ind(kClosed, kOpenToClosedByS_PNS_ArClosed_indActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestBackupActions[] = {&IoArHandlerMain::Impl::BackupSwitchover}; +const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestBackup(kOpen, kOpenToOpenByS_PNS_SwitchoverRequestBackupActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions[] = {&IoArHandlerMain::Impl::PrimarySwitchover}; +const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_SwitchoverRequestPrimary(kOpen, kOpenToOpenByS_PNS_SwitchoverRequestPrimaryActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_ReadReqActions[] = {&IoArHandlerMain::Impl::Read}; +const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_ReadReq(kOpen, kOpenToOpenByS_PNS_ReadReqActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_WriteReqActions[] = {&IoArHandlerMain::Impl::Write}; +const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_WriteReq(kOpen, kOpenToOpenByS_PNS_WriteReqActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kOpenToOpenByS_PNS_CheckModuleDiffActions[] = {&IoArHandlerMain::Impl::CheckModuleDiff}; +const IoArHandlerMain::Transition IoArHandlerMain::kOpenToOpenByS_PNS_CheckModuleDiff(kOpen, kOpenToOpenByS_PNS_CheckModuleDiffActions); + IoArHandlerMain::Transition IoArHandlerMain::OpenHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -89,6 +99,8 @@ const IoArHandlerMain::State IoArHandlerMain::kApplicationReady("ApplicationRead &kReady, // Initial nullptr, // Entry nullptr); // Exit + + IoArHandlerMain::Transition IoArHandlerMain::ApplicationReadyHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -107,7 +119,10 @@ const IoArHandlerMain::State IoArHandlerMain::kDynamicReconfigurationRunning("Dy &kDrWaitPlugCnf, // Initial &IoArHandlerMain::Impl::StopDynReconfTimer, // Entry nullptr); // Exit -!TRANSITION! DynamicReconfigurationRunning + +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconfActions[] = {&IoArHandlerMain::Impl::DynReconfTimeoutAbortArSet}; +const IoArHandlerMain::Transition IoArHandlerMain::kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconf(kDynamicReconfigurationRunning, kDynamicReconfigurationRunningToDynamicReconfigurationRunningBySPnioAppTimeoutDynReconfActions); + IoArHandlerMain::Transition IoArHandlerMain::DynamicReconfigurationRunningHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -128,7 +143,10 @@ const IoArHandlerMain::State IoArHandlerMain::kDrPlugPrmSequence("DrPlugPrmSeque nullptr, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! DrWaitApplicationReadyPlugSubmodule + +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndIndActions[] = {&IoArHandlerMain::Impl::ApplyConfiguration}; +const IoArHandlerMain::Transition IoArHandlerMain::kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndInd(kDrWaitApplicationReadyPlugSubmodule, kDrPlugPrmSequenceToDrWaitApplicationReadyPlugSubmoduleByS_PNS_PlugParamEndIndActions); + IoArHandlerMain::Transition IoArHandlerMain::DrPlugPrmSequenceHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -149,7 +167,10 @@ const IoArHandlerMain::State IoArHandlerMain::kDrWaitApplicationReadyCnfPlugSubm nullptr, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! Ready + +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnfActions[] = {&IoArHandlerMain::Impl::DrPullDone}; +const IoArHandlerMain::Transition IoArHandlerMain::kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnf(kReady, kDrWaitApplicationReadyCnfPlugSubmoduleToReadyByS_PNS_PlugApplicationReady_cnfActions); + IoArHandlerMain::Transition IoArHandlerMain::DrWaitApplicationReadyCnfPlugSubmoduleHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -170,7 +191,10 @@ const IoArHandlerMain::State IoArHandlerMain::kDrWaitApplicationReadyPlugSubmodu nullptr, // Initial &IoArHandlerMain::Impl::StopWaitApplicationReadyTimer, // Entry nullptr); // Exit -!TRANSITION! + +const IoArHandlerMain::Transition IoArHandlerMain::kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyCnfPlugSubmoduleBySPnpbAppTimeout(kDrWaitApplicationReadyCnfPlugSubmodule); +const IoArHandlerMain::Transition IoArHandlerMain::kDrWaitApplicationReadyPlugSubmoduleToDrWaitApplicationReadyPlugSubmoduleBySPnpbAppTimeout(kDrWaitApplicationReadyPlugSubmodule); + IoArHandlerMain::Transition IoArHandlerMain::DrWaitApplicationReadyPlugSubmoduleHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -195,7 +219,9 @@ const IoArHandlerMain::State IoArHandlerMain::kDrWaitPlugCnf("DrWaitPlugCnf", nullptr, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! DrPlugPrmSequence + +const IoArHandlerMain::Transition IoArHandlerMain::kDrWaitPlugCnfToDrPlugPrmSequenceByS_PNS_PlugSubmodule_cnf(kDrPlugPrmSequence); + IoArHandlerMain::Transition IoArHandlerMain::DrWaitPlugCnfHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -216,7 +242,10 @@ const IoArHandlerMain::State IoArHandlerMain::kDrWaitPullCnf("DrWaitPullCnf", nullptr, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! Ready + +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnfActions[] = {&IoArHandlerMain::Impl::DrPullDone}; +const IoArHandlerMain::Transition IoArHandlerMain::kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnf(kReady, kDrWaitPullCnfToReadyByS_PNS_PullSubmodule_cnfActions); + IoArHandlerMain::Transition IoArHandlerMain::DrWaitPullCnfHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -237,8 +266,12 @@ const IoArHandlerMain::State IoArHandlerMain::kReady("Ready", nullptr, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! DrWaitPlugCnf -!TRANSITION! DrWaitPullCnf + +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kReadyToDrWaitPullCnfByS_PNS_DynReconfPullActions[] = {&IoArHandlerMain::Impl::DrPull}; +const IoArHandlerMain::Transition IoArHandlerMain::kReadyToDrWaitPullCnfByS_PNS_DynReconfPull(kDrWaitPullCnf, kReadyToDrWaitPullCnfByS_PNS_DynReconfPullActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlugActions[] = {&IoArHandlerMain::Impl::DrPlug}; +const IoArHandlerMain::Transition IoArHandlerMain::kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlug(kDrWaitPlugCnf, kReadyToDrWaitPlugCnfByS_PNS_DynReconfPlugActions); + IoArHandlerMain::Transition IoArHandlerMain::ReadyHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -261,7 +294,12 @@ const IoArHandlerMain::State IoArHandlerMain::kParameterizing("Parameterizing", nullptr, // Initial nullptr, // Entry nullptr); // Exit -!TRANSITION! + +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kParameterizingToWaitApplicationReadyByS_PNS_ParamEndIndActions[] = {&IoArHandlerMain::Impl::ApplyConfiguration}; +const IoArHandlerMain::Transition IoArHandlerMain::kParameterizingToWaitApplicationReadyByS_PNS_ParamEndInd(kWaitApplicationReady, kParameterizingToWaitApplicationReadyByS_PNS_ParamEndIndActions); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndIndActions[] = {&IoArHandlerMain::Impl::ApplyConfiguration}; +const IoArHandlerMain::Transition IoArHandlerMain::kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndInd(kWaitApplicationReadyCnf, kParameterizingToWaitApplicationReadyCnfByS_PNS_ParamEndIndActions); + IoArHandlerMain::Transition IoArHandlerMain::ParameterizingHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -286,7 +324,10 @@ const IoArHandlerMain::State IoArHandlerMain::kWaitApplicationReady("WaitApplica nullptr, // Initial &IoArHandlerMain::Impl::StopWaitApplicationReadyTimer, // Entry nullptr); // Exit -!TRANSITION! + +const IoArHandlerMain::Transition IoArHandlerMain::kWaitApplicationReadyToWaitApplicationReadyCnfBySPnpbAppTimeout(kWaitApplicationReadyCnf); +const IoArHandlerMain::Transition IoArHandlerMain::kWaitApplicationReadyToWaitApplicationReadyBySPnpbAppTimeout(kWaitApplicationReady); + IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here @@ -311,8 +352,11 @@ const IoArHandlerMain::State IoArHandlerMain::kWaitApplicationReadyCnf("WaitAppl nullptr, // Initial &IoArHandlerMain::Impl::SendApplicationReady, // Entry nullptr); // Exit -!TRANSITION! ApplicationReady -!TRANSITION! WaitApplicationReadyCnf + +const IoArHandlerMain::Transition IoArHandlerMain::kWaitApplicationReadyCnfToApplicationReadyByS_PNS_ApplicationReady_cnf(kApplicationReady); +const IoArHandlerMain::Transition::ActionType IoArHandlerMain::kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnfActions[] = {&IoArHandlerMain::Impl::AbortAr}; +const IoArHandlerMain::Transition IoArHandlerMain::kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnf(kWaitApplicationReadyCnf, kWaitApplicationReadyCnfToWaitApplicationReadyCnfByS_PNS_ApplicationReady_cnfActions); + IoArHandlerMain::Transition IoArHandlerMain::WaitApplicationReadyCnfHandler(ImplPtr impl, Event event) { (void)impl; // impl parameter is unused when there is no guard function being called in here