Extensions.StateMachineProcedure

From emotive
Jump to navigation Jump to search

Classification

Name StateMachineProcedure
Short Description Description of a behavior model with states, transactions and actions
Class OTX Extension
Base Extension -
Pre-Conditions -
Specified by ISO 13209-4

Introduction

  • A finite-state machine (FSM) or simply a state machine, is conceived as an abstract machine that can be in one of a finite number of states. The machine is in only one state at a time; the state it is in at any given time is called the current state. It can change from one state to another when initiated by a triggering event or condition; this is called a transition. A particular FSM is defined by a list of its states, and the triggering condition for each transition.
  • Each state machine will have one mandatory state which is marked as the initial state (State I in Figure 96). It can have one optional state which is marked as the completed state. The initial state and the completed state will be different.
  • Every state has 1 to n triggers. Each trigger has 1 to n event sources. If an event source, specified inside the triggers of the current state fires an event, the wait state of the current state will be terminated.
  • If a trigger terminates its wait state, all transitions (in order of XML occurrence) which refer to this trigger will check their condition. The first transition whose condition is true or which has no condition will be executed. All further transitions will be ignored.
  • If a transition is active the optional flow of that transition will be executed first. Only then will the target state of the transition will be reached.
Figure 96 Principal State Machine
  • Every state has an entry and an exit flow, which both are optional. On entering a state its entry flow is processed once. If a transition becomes active, the following processing order is defined:
    • exit flow of the source state
    • flow of transition
    • entry flow of the target state.
  • This is also valid if the target state is identical to the source state (Loopback Transition).
Exclamation.png Important: It is possible, that two or more triggers become active at the same time. Via the order of XML occurrence of the transitions, the author can specify the transition priority.
Exclamation.png Important: A StateMachine is executed via a standalone ProcedureRealization. In state machines no layout information will be saved. A tool supplier is free to store layout information in Metadata. But Metadata will not contain runtime relevant information.

Data Types

An otx:NamedAndSpecified
State
Transition
Trigger
General
States
Transitions
TriggerRef
TriggerRefs
Triggers

Procedures

StateMachineProcedure
StateMachineProcedureRealisation

Checker rules

StateMachineProcedure_Chk001 Write-only state variables
StateMachineProcedure_Chk002 Mandatory target state
StateMachineProcedure_Chk003 No target state for completed state
StateMachineProcedure_Chk004 Mandatory trigger
StateMachineProcedure_Chk005 Mandatory transition
StateMachineProcedure_Chk006 Initial and completed state will be distinguished
StateMachineProcedure_Chk007 Correct nesting of initial state
StateMachineProcedure_Chk008 Correct nesting of completed state
StateMachineProcedure_Chk009 Correct nesting of transition target state
StateMachineProcedure_Chk010 Correct nesting of transition trigger references
StateMachineProcedure_Chk011 unreachable states