.NET Based OPC UA Client/Server SDK  3.3.0.530
UnifiedAutomation.UaServer.StateMachineModel Class Reference

The base ObjectType for all StateMachineTypes. More...

Inherits UnifiedAutomation.UaServer.BaseObjectModel.

Inherited by UnifiedAutomation.UaServer.FiniteStateMachineModel.

Public Member Functions

 StateMachineModel ()
 Initializes a new instance of the StateMachineModel class. More...
 
 StateMachineModel (StateMachineModel template, DummyArgument dummy=null)
 Initializes a new instance of the StateMachineModel class. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.BaseObjectModel
 BaseObjectModel ()
 Initializes a new instance of the BaseObjectModel class. More...
 
 BaseObjectModel (BaseObjectModel template, DummyArgument dummy=null)
 Initializes a new instance of the BaseObjectModel class. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase
virtual ModelHandle GetModelHandle (StringTable namespaceUris, object instance)
 Gets the metadata handle. More...
 
virtual DataValue GetValue (IMapperContext context, ModelMapping mapping)
 Gets the value associated with the mapping. More...
 
virtual bool SetValue (IMapperContext context, ModelMapping mapping, DataValue value)
 Sets the value associated with the mapping. More...
 
StatusCode GetStatusCode (string propertyName)
 Retrieve the status code for the given property. If no status code was explicitly set, StatusCodes.Good will be returned.
Parameters
propertyNameThe property name.
Returns
The status code of the property.

 
void SetStatusCode (string propertyName, StatusCode statusCode)
 Sets the status code of the given property. More...
 

Properties

StateVariableModel CurrentState [get, set]
 Stores the current state of an instance of the StateMachineType. More...
 
TransitionVariableModel LastTransition [get, set]
 Stores the last transition which occurred in an instance of the StateMachineType. More...
 
- Properties inherited from UnifiedAutomation.UaServer.ModelControllerBase
ModelHandle ModelHandle [get, set]
 Gets or sets the metadata handle. More...
 
object UserData [get, set]
 Gets or sets the user data. More...
 
- Properties inherited from UnifiedAutomation.UaServer.INotifyStatusCodeInfo
bool HasStatusCodes [get]
 true if no property has an explicit set status code. Hence when all status codes are implicit StatusCodes.Good. More...
 

Additional Inherited Members

- Public Attributes inherited from UnifiedAutomation.UaServer.ModelControllerBase
bool HasStatusCodes => m_statusCodes != null && m_statusCodes.Count > 0
 
- Protected Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase
void RaisePropertyChangedEvent ([CallerMemberName] string propertyName=null)
 Raises an property change event. More...
 
void RaisePropertyChangeRequestedEvent< T > (T value, [CallerMemberName] string propertyName=null)
 Called when the value of a property is supposed to be changed. More...
 
bool SetField< T > (ref T field, T value, [CallerMemberName] string propertyName=null)
 Sets the backing field to the new value, and triggers a property change event, if the value has changed. More...
 
- Events inherited from UnifiedAutomation.UaServer.ModelControllerBase
PropertyChangedEventHandler PropertyChanged
 Occurs when a property value changes. More...
 
EventHandler
< PropertyChangeRequestedEventArgs
PropertyChangeRequested
 The event is emitted just before the value will be changed, and gives the observer the opportunity to reject or adjust (e.g. clamp) the property change by setting the PropertyChangeRequestedEventArgs.StatusCode and PropertyChangeRequestedEventArgs.Value properties. More...
 
EventHandler
< StatusCodeChangedEventArgs
StatusCodeChanged
 
- Events inherited from UnifiedAutomation.UaServer.INotifyPropertyChangeRequested
EventHandler
< PropertyChangeRequestedEventArgs
PropertyChangeRequested
 The property change request event. More...
 
- Events inherited from UnifiedAutomation.UaServer.INotifyStatusCodeInfo
EventHandler
< StatusCodeChangedEventArgs
StatusCodeChanged
 Occurs if the status code of a property was changed. More...
 

Detailed Description

The base ObjectType for all StateMachineTypes.

It defines a single Variable which represents the current state of the machine. An instance of this ObjectType shall generate an Event whenever a significant state change occurs. The Server decides which state changes are significant. Servers shall use the GeneratesEvent ReferenceType to indicate which Event(s) could be produced by the state machine.

Subtypes may add methods which affect the state of the machine. The Executable attribute is used to indicate whether the method is valid given the current state of the machine. The generation of AuditEvents for methods is defined in Part 4 of the OPC UA Specification. A state machine may not be active. In this case, the CurrentState and LastTransition variables shall have a status equal to Bad_StateNotActive.

Subtypes may add components which are instances of StateMachineTypes. These components are considered to be sub-states of the state machine. Sub-state machines are only active when the parent machine is in an appropriate state.

Events produced by sub-state machines may be suppressed by the parent machine. In some cases, the parent machine will produce a single Event that reflects changes in multiple sub-state machines.

UnifiedAutomation.UaServer.FiniteStateMachineModel is subtype of StateMachineType that provides a mechanism to explicitly define the states and transitions. A Server should use this mechanism if it knows what the possible states are and the state machine is not trivial.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.StateMachineModel.StateMachineModel ( )

Initializes a new instance of the StateMachineModel class.

UnifiedAutomation.UaServer.StateMachineModel.StateMachineModel ( StateMachineModel  template,
DummyArgument  dummy = null 
)

Initializes a new instance of the StateMachineModel class.

Parameters
templateThe template.
dummyDummy argument to enable writing own constructors that are called by the generated code.

Property Documentation

StateVariableModel UnifiedAutomation.UaServer.StateMachineModel.CurrentState
getset

Stores the current state of an instance of the StateMachineType.

CurrentState provides a human readable name for the current state which may not be suitable for use in application control logic. Applications should use the Id property of CurrentState if they need a unique identifier for the state.

TransitionVariableModel UnifiedAutomation.UaServer.StateMachineModel.LastTransition
getset

Stores the last transition which occurred in an instance of the StateMachineType.

LastTransition provides a human readable name for the last transition which may not be suitable for use in application control logic. Applications should use the Id property of LastTransition if they need a unique identifier for the transition.


The documentation for this class was generated from the following file: