State diagram mappings - class (C++ code)
For each generated Class that owns a State Diagram through a State Machine, ACS generates the following code elements.
Constructor operation
A private operation that initializes the Class.
The name of each constructor operation is as follows:
<class name>
Current State type
An enumeration type that lists each State on the State Diagram that is owned directly by the Class.
The name of each current state type is as follows:
Rts<state diagram name>_States
For each State that is owned directly by the Class' State Machine, ACS generates an enumeration literal. The name of each enumeration literal is as follows:
Rts<state diagram name>_States_<state name>
In addition, ACS generates an enumeration literal to indicate that the state machine is not active. The name of this enumeration literal is as follows:
Rts<state diagram name>_States_NotIn_<state diagram name>
Current state attribute
A private attribute that stores the current state of the Class.
The name of each current state attribute is as follows:
RtsCurrent_<state diagram name>
The current state attribute uses as its type, the current state type enumeration type that is generated for the Class.
Busy attribute
A private attribute that is used for locking the Class when it is busy.
The name of each busy attribute is as follows:
RtsBusy
Run to completion operation
A private operation that takes completion transitions from states that do not require further triggers. In addition, the run to completion operation tests change event expressions.
The run to completion operation is called each time an event or operation is injected into the state machine. The name of each run to completion operation is as follows:
RtsRunToCompletion
Destructor operation
A private operation that destroys the class. This operation can trigger a final transition.
The name of each destructor is as follows:
~<class name>
For state machine simulation purposes only, ACS generates the following operations.
Get attribute value operation
A public operation that is created to support state machine simulation.
The name of the Get Attribute Value operation is as follows:
RtsGetAttributeValue
|
If you use the Modeler Automation Interface to get the value of an attribute through the RtSGetAttributeValue operation, the call can return 'ART_DEFERRED'. This is because of the asynchronous nature of the active class system involved in the simulation. For simple systems that are not under heavy load, repeating the call again will typically result in the correct value being returned.
|
Inject event operation operation
A public operation that is created to support state machine simulation.
The name of the Inject Event Operation operation is as follows:
RtsInjectEventOperation
Set attribute value operation
A public operation that is created to support state machine simulation.
The name of the Set Attribute Value operation is as follows:
RtsSetAttributeValue