.NET Based OPC UA Client/Server SDK
3.3.1.531
|
Defines the state machine used by AlarmTypes that handle multiple mutually exclusive limits. More...
Inherits UnifiedAutomation.UaServer.FiniteStateMachineModel.
Public Types | |
enum | State : uint { State.HighHigh = 1, State.High = 2, State.Low = 3, State.LowLow = 4 } |
The enumeration representing the possible states of the state machine. More... | |
enum | Transition : uint { Transition.HighHighToHigh = 12, Transition.HighToHighHigh = 21, Transition.LowLowToLow = 43, Transition.LowToLowLow = 34 } |
The enumeration representing the possible transitions of the state machine. More... | |
Public Member Functions | |||
ExclusiveLimitStateMachineModel () | |||
Initializes a new instance of the ExclusiveLimitStateMachineModel class. More... | |||
ExclusiveLimitStateMachineModel (ExclusiveLimitStateMachineModel template, DummyArgument dummy=null) | |||
Initializes a new instance of the ExclusiveLimitStateMachineModel class. More... | |||
void | RaiseSwitchedEvent (State?oldState, State?state, Transition?transition) | ||
Raises the Switched event. More... | |||
virtual void | SwitchToState (State?state, Transition?transition=null) | ||
Switch to the given state. More... | |||
Public Member Functions inherited from UnifiedAutomation.UaServer.FiniteStateMachineModel | |||
FiniteStateMachineModel () | |||
Initializes a new instance of the FiniteStateMachineModel class. More... | |||
FiniteStateMachineModel (FiniteStateMachineModel template, DummyArgument dummy=null) | |||
Initializes a new instance of the FiniteStateMachineModel class. More... | |||
Public Member Functions inherited from UnifiedAutomation.UaServer.StateMachineModel | |||
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.
| |||
void | SetStatusCode (string propertyName, StatusCode statusCode) | ||
Sets the status code of the given property. More... | |||
Static Public Member Functions | |
static IEnumerable< Transition > | GetTransitions (State oldState, State newState) |
A sequence of all possible transition for the given states. More... | |
static LocalizedText | GetLocalizedText (State state) |
Retrieves a LocalizedText for the given state value. More... | |
static QualifiedName | GetName (State state) |
Retrieves a QualifiedName for the given state value. More... | |
static NodeId | GetNodeId (State state) |
Retrieves the NodeId for the given state value. More... | |
static LocalizedText | GetLocalizedText (Transition transition) |
Retrieves a LocalizedText for the given transition value. More... | |
static QualifiedName | GetName (Transition transition) |
Retrieves a QualifiedName for the given transition value. More... | |
static NodeId | GetNodeId (Transition transition) |
Retrieves the NodeId for the given transition value. More... | |
Protected Attributes | |
State | m_state |
The current state of the state machine. More... | |
Transition | m_transition |
The last transition of the state machine. More... | |
Properties | |
State | InternalState [get, protected set] |
The FiniteStateMachineModel.CurrentState as the enumeration value. More... | |
Transition | InternalTransition [get, protected set] |
The FiniteStateMachineModel.LastTransition as the enumeration value. More... | |
Properties inherited from UnifiedAutomation.UaServer.FiniteStateMachineModel | |
NodeId[] | AvailableStates [get, set] |
Gets or sets the AvailableStates More... | |
NodeId[] | AvailableTransitions [get, set] |
Gets or sets the AvailableTransitions More... | |
new FiniteStateVariableModel | CurrentState [get, set] |
Stores the current state of an instance of the FiniteStateMachineType. More... | |
new FiniteTransitionVariableModel | LastTransition [get, set] |
Stores the last transition which occurred in an instance of the FiniteStateMachineType. More... | |
Properties inherited from UnifiedAutomation.UaServer.StateMachineModel | |
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... | |
Events | |
EventHandler < StateMachineEventArgs< State?, Transition?> > | Switched |
Occurs when the SwitchToState method was called. 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... | |
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... | |
Defines the state machine used by AlarmTypes that handle multiple mutually exclusive limits.
It is created by extending the FiniteStateMachineType.
The ExclusiveLimitStateMachine defines the sub state machine that represents the actual level of a multilevel Alarm when it is in the Active state. The sub state machine defined here includes High, Low, HighHigh and LowLow states. This model also includes in its transition state a series of transitions to and from a parent state, the inactive state. This state machine as it is defined shall be used as a sub state machine for a state machine which has an Active state. This Active state could be part of a “level” Alarm or “deviation” Alarm or any other Alarm state machine.
The LowLow, Low, High, HighHigh are typical for many industries. Vendors can introduce substate models that include additional limits; they may also omit limits in an instance.
The enumeration representing the possible transitions of the state machine.
UnifiedAutomation.UaServer.ExclusiveLimitStateMachineModel.ExclusiveLimitStateMachineModel | ( | ) |
Initializes a new instance of the ExclusiveLimitStateMachineModel class.
UnifiedAutomation.UaServer.ExclusiveLimitStateMachineModel.ExclusiveLimitStateMachineModel | ( | ExclusiveLimitStateMachineModel | template, |
DummyArgument | dummy = null |
||
) |
Initializes a new instance of the ExclusiveLimitStateMachineModel class.
template | The template. |
dummy | Dummy argument to enable writing own constructors that are called by the generated code. |
|
static |
Retrieves a LocalizedText for the given state value.
state | The state to get the text. |
|
static |
Retrieves a LocalizedText for the given transition value.
transition | The transition to get the text. |
|
static |
Retrieves a QualifiedName for the given state value.
state | The state to get the name. |
|
static |
Retrieves a QualifiedName for the given transition value.
transition | The transition to get the name. |
|
static |
Retrieves the NodeId for the given state value.
state | The state to get the NodeId. |
|
static |
Retrieves the NodeId for the given transition value.
transition | The transition to get the NodeId. |
|
static |
A sequence of all possible transition for the given states.
oldState | The From state. |
newState | The To state. |
void UnifiedAutomation.UaServer.ExclusiveLimitStateMachineModel.RaiseSwitchedEvent | ( | State? | oldState, |
State? | state, | ||
Transition? | transition | ||
) |
Raises the Switched event.
|
virtual |
Switch to the given state.
state | The state. |
transition | The transition. |
If the transition value is null
the method will take the first transition that is possible. If there is no possible transition or if a transition was passed that is not possible for the old and new state combination, null
will be assigned to the InternalTransition and FiniteStateMachineModel.LastTransition properties. It is up to the caller to avoid such situations.
A null
value for the state will be translated to the specification conform status code StatusCodes.BadStateNotActive.
|
protected |
The current state of the state machine.
|
protected |
The last transition of the state machine.
|
getprotected set |
The FiniteStateMachineModel.CurrentState as the enumeration value.
|
getprotected set |
The FiniteStateMachineModel.LastTransition as the enumeration value.
EventHandler<StateMachineEventArgs<State?, Transition?> > UnifiedAutomation.UaServer.ExclusiveLimitStateMachineModel.Switched |
Occurs when the SwitchToState method was called.
Note, the event is also emitted when the state stays the same.