Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

Finite State Machine

The FiniteStateMachineType is the base ObjectType for StateMachines that explicitly define the possible States and Transitions. Once the States are defined subtypes shall not add new States (see B.4.18). The States of the machine are represented with instances of the StateType ObjectType.

EachState shall have a BrowseName which is unique within the StateMachine and shall have a StateNumber which shall also be unique across all States defined in the StateMachine.

Be aware that States in a SubStateMachine may have the same StateNumber or BrowseName as States in the parent machine. A concrete subtype of FiniteStateMachineType shall define at least one State.

A StateMachine may define one State which is an instance of the InitialStateType. This State is the State that the machine goes into when it is activated.

The Transitions that may occur are represented with instances of the TransitionType.

Each Transition shall have a BrowseName which is unique within the StateMachine and may have a TransitionNumber which shall also be unique across all Transitions defined in the StateMachine.

The initial State for a Transition is a StateType Object which is the target of a FromState Reference. The final State for a Transition is a StateType Object which is the target of a ToState Reference. The FromState and ToState References shall always be specified. A Transition may produce an Event. The Event is indicated by a HasEffect Reference to a subtype of BaseEventType. The StateMachineType shall have GeneratesEvent References to the targets of a HasEffect Reference for each of its Transitions. A FiniteStateMachineType may define Methods that cause a transition to occur. These Methods are targets of HasCause References for each of the Transitions that may be triggered by the Method. The Executable Attribute for a Method is used to indicate whether the current State of the machine allows the Method to be called.

A FiniteStateMachineType may have sub-state-machines which are represented as instances of StateMachineType ObjectTypes. Each State shall have a HasSubStateMachine Reference to the StateMachineType Object which represents the child States. The SubStateMachine is not active if the parent State is not active. In this case the CurrentState and LastTransition Variables of the SubStateMachine shall have a status equal to BadStateNotActive (see Table B.17).

Hierarchy

Index

Properties

Readonly browseName

browseName: QualifiedName

currentState

currentStateNode

currentStateNode: UAState

Readonly hasMethods

hasMethods: boolean

Readonly initialState

initialState: UAInitialState

Readonly isAbstract

isAbstract: boolean

Optional lastTransition

Readonly nodeClass

nodeClass: ObjectType

Readonly nodeId

nodeId: NodeId

Optional nodeVersion

nodeVersion: UAVariableT<string, String>

NodeVersion (Optional) String The NodeVersion Property is used to indicate the version of a Node. The NodeVersion Property is updated each time a Reference is added or deleted to the Node the Property belongs to. Attribute value changes do not cause the NodeVersion to change. Clients may read the NodeVersion Property or subscribe to it to determine when the structure of a Node has changed.

Optional onFirstBrowseAction

onFirstBrowseAction: () => Promise<void>

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

Readonly states

states: UAState[]

Readonly subtypeOf

subtypeOf: NodeId

Readonly subtypeOfObj

subtypeOfObj: UAObjectType

Readonly transitions

transitions: UATransitionEx[]

Accessors

accessRestrictions

addressSpace

  • Returns IAddressSpace

description

  • Returns LocalizedText

displayName

  • Returns LocalizedText[]

modellingRule

  • Returns ModellingRuleType

namespace

  • Returns INamespace

namespaceIndex

  • get namespaceIndex(): number
  • Returns number

namespaceUri

  • get namespaceUri(): string
  • Returns string

parentNodeId

  • Returns NodeId

rolePermissions

  • Returns RolePermissionType[]

Methods

addReference

allReferences

browseNode

browseNodeByTargetName

findReference

  • find the the references that are strictly of type reference.

    The isForward boolean flag specifies the direction of the references to be looked for.

    Forward direction is implied if omitted.

    • will throw an exception if more than one reference exists with the referenceType.
    • will return null if no reference exists.

    Parameters

    Returns UAReference

findReferences

  • find all the references that are strictly of type reference. The isForward boolean flag specifies the direction of the references to be looked for.

    Forward direction is implied if omitted.

    Parameters

    Returns UAReference[]

findReferencesAsObject

  • find all the nodes that are referenced by references strictly of type reference.

    The isForward boolean flag specifies the direction of the references to be looked for.

    Forward direction is implied if omitted.

    • will throw an exception if more than one reference exists with the referenceType.
    • will return null if no reference exists.

    Parameters

    Returns BaseNode[]

findReferencesEx

  • find all the references that are of type reference or a sub type of reference, in the direction specified by browseDirection

    • BrowseDirection.Forward direction is implied if browseDirection flags is omitted.

    Parameters

    Returns UAReference[]

findReferencesExAsObject

  • find all the nodes that are referenced by references of type reference or a sub type of reference, in the direction specified by browseDirection

    • BrowseDirection.Forward direction is implied if browseDirection flags is omitted.

    Parameters

    Returns BaseNode[]

findTransitionNode

fullName

  • fullName(): string
  • return a complete name of this object by pre-pending name of its parent(s) to its own name

    Returns string

getAccessRestrictions

  • get effective accessRestrictions if (inherited is true) and node has no accessRestrictions, then default accessRestriction from namespace is returned if (inherited is false) and node has no accessRestrictions, then AccessRestrictionsFlag.None is returned

    Parameters

    • inherited: boolean

    Returns AccessRestrictionsFlag

getAggregates

getChildByName

getComponentByName

getComponents

getCurrentState

  • getCurrentState(): string
  • return the current state as string

    Returns string

getDisplayName

  • getDisplayName(locale?: string): string
  • Parameters

    • Optional locale: string

      the locale of the text to return (e.g. en-EN)

    Returns string

getEventSourceOfs

  • return a array of the objects for which this node is an EventSource nodes = HasEventSource => self

    Returns BaseNode[]

getEventSources

  • return a array with the event source of this object. self = HasEventSource => nodes

    Returns BaseNode[]

getMethodById

getMethodByName

getMethods

getNotifiers

getProperties

getPropertyByName

getRolePermissions

getStateByName

  • getStateByName(name: string): UAState
  • return the state Node by Name

    Parameters

    • name: string

    Returns UAState

getStates

  • return all state nodes associated with this state machine

    Returns UAState[]

getTransitions

  • return all state to state transition node associated with this state machine

    Returns UATransitionEx[]

install_extra_properties

  • install_extra_properties(): void

instantiate

isSupertypeOf

isValidTransition

  • returns true if there is a valid transition from currentStateNode to toStateNode

    Parameters

    Returns boolean

readAttribute

removeReference

setAccessRestrictions

setRolePermissions

setState

  • change the current state

    note:

    • a transition from currentState to toState node must exists
    • a TransitionEventType event will be raised

    Parameters

    Returns void

writeAttribute

Generated using TypeDoc