FW Profile - C1 Implementation
SmTrans_t Struct Reference

Structure representing a transition. More...

Data Fields

FwSmCounterS1_t dest
 the index of the destination of the transition
 
FwSmCounterU2_t id
 the identifier (the "name") of the transition
 
FwSmCounterS1_t iTrAction
 the index of the action associated to the transition
 
FwSmCounterS1_t iTrGuard
 the index of the guard associated to the transition
 

Detailed Description

Structure representing a transition.

A transition is characterized by:

  • the destination of the transition
  • the name of the transition
  • the action associated to the transition
  • the guard associated to the transition

The destination of the transition may be either a proper state, or the final pseudo-state, or a choice pseudo-state. The type of the transition destination is identified as follows:

  • a value of zero means that the destination is the final pseudo-state
  • a positive value means that the destination is a proper state and the value of dest is the identifier of the target state
  • a negative value means that the destination is a choice pseudo state and the value of -dest is the identifier of the choice pseudo-state

The name of a transition is an non-negative integer. The value of zero is reserved for the pre-defined "Execute" transition (see FW_TR_EXECUTE) and should not be used for user-defined transitions. The name of a transition is "don't care" in the case of transitions out of pseudo-states.

The transition action is an integer which identifies the location in the action array of the state machine descriptor (see FwSmDesc) where the action is stored as a function pointer. If no action is associated to the transition, a value of zero is used to point to the first element of the action array which holds a dummy action which returns without doing anything.

The guard is an integer which identifies the location in the guard array of the state machine descriptor (see FwSmDesc) where the guard is stored as a function pointer. If no guard is associated to the transition, a value of zero is used to point to the first element of the guard array which holds a dummy guard which always returns "true".

By convention, the implementation treats a transition as uninitialized if its trAction field is equal to -1.

Definition at line 195 of file FwSmPrivate.h.


The documentation for this struct was generated from the following file:
P&P Software GmbH, Copyright 2011, All Rights Reserved