Annex B (normative) StateMachines ToC Previous Next

B.5 Examples of StateMachines in the AddressSpace ToC Previous Next

B.5.2 StateMachineType with a sub-machine using inheritance ToC Previous Next

readme_files/image018.png Figure B.8 – Example of a StateMachineType with a SubStateMachine using inheritance

Figure B.8 gives an example of a StateMachineType having a SubStateMachine for its “State1”. For simplicity no effects and causes are shown, as well as type information for the States or ModellingRules.

The “MyStateMachineType” contains an Object “MySubMachine” of type “AnotherStateMachineType” representing a SubStateMachine. The “State1” references this Object with a HasSubStateMachine Reference, thus it is a SubStateMachine of “State1”. Since “MySubMachine” is an Object of type “AnotherStateMachineType” it has a Variable representing the current State. Since it is used as an InstanceDeclaration, no value is assigned to this Variable.

An Object of “MyStateMachineType”, called “MyStateMachine” has Variables for the current State, but also has an Object “MySubMachine” and a Variable representing the current state of the SubStateMachine. Since the SubStateMachine is only used when “MyStateMachine” is in “State1”, a client would receive a Bad_StateNotActive StatusCode when reading the SubStateMachine CurrentState Variable if “MyStateMachine” is in a different State.

Previous Next