UA Server SDK C++ Bundle
1.4.3.291
|
Class implementing the UaObject interface for the ShelvedStateMachineType. More...
#include <opcua_shelvedstatemachinetype.h>
Inherits OpcUa::ShelvedStateMachineTypeBase.
Public Types | |
enum | ShelvedState { Unshelved, OneShotShelved, TimedShelved } |
This enumaration indicates the state of the shelved state machine. More... | |
Public Member Functions | |
ShelvedStateMachineType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class ShelvedStateMachineType. More... | |
ShelvedStateMachineType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class ShelvedStateMachineType. More... | |
ShelvedStateMachineType (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class ShelvedStateMachineType with all components. More... | |
virtual UaStatus | OneShotShelve (const ServiceContext &serviceContext) |
ShelvedStateMachineType method OneShotShelve. More... | |
virtual UaStatus | TimedShelve (const ServiceContext &serviceContext, OpcUa_Double ShelvingTime) |
ShelvedStateMachineType method TimedShelve. More... | |
virtual UaStatus | Unshelve (const ServiceContext &serviceContext) |
ShelvedStateMachineType method Unshelve. More... | |
void | setShelvedState (ShelvedState state) |
Sets the state of the exclusice limit state machine. | |
ShelvedState | getShelvedState () |
Returns the state of the exclusice limit state machine. | |
Static Public Member Functions | |
static void | createTypes () |
Create the type related static members of the class. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Protected Member Functions | |
virtual | ~ShelvedStateMachineType () |
Destruction. | |
Class implementing the UaObject interface for the ShelvedStateMachineType.
OPC UA Objects are used to represent systems, system components, real-world objects and software objects. They have the NodeClass Object. The detailed description of Objects and their attributes can be found in the general description of the Object node class.
The ShelvedStateMachineType defines a sub-state machine that represents an advanced Alarm filtering model.
The state model supports two types of Shelving: OneShotShelving and TimedShelving.Shelving is an Operator initiated activity.
In OneShotShelving, a user requests that an Alarm be Shelved for its current Active state. This type of Shelving is typically used when an Alarm is continually occurring on a boundary (i.e. a Condition is jumping between High Alarm and HighHigh Alarm, always in the Active state). The One Shot Shelving will automatically clear when an Alarm returns to an inactive state. Another use for this type of Shelving is for a plant area that is shut down i.e. a long running Alarm such as a low level Alarm for a tank that is not in use. When the tank starts operation again the Shelving state will automatically clear.
In TimedShelving, a user specifies that an Alarm be shelved for a fixed time period. This type of Shelving is quite often used to block nuisance Alarms. For example, an Alarm that occurs more than ten times in a minute may get shelved for a few minutes.
In all states, the Unshelve can be called to cause a transition to the Unshelve state; this includes Un-shelving an Alarm that is in the TimedShelve state before the time has expired and the OneShotShelve state without a transition to an inactive state.
All but two transitions are caused by Method calls. The “Time Expired” transition is simply a system generated transition that occurs when the time value defined as part of the “Timed Shelved Call” has expired. The “Any Transition Occurs” transition is also a system generated transition; this transition is generated when the Condition goes to an inactive state.
The ShelvedStateMachine includes a hierarchy of sub-states. It supports all transitions between Unshelved, OneShotShelved and TimedShelved.
UnshelveTime specifies the remaining time in milliseconds until the Alarm automatically transitions into the Un-shelved state. For the TimedShelved state this time is initialised with the ShelvingTime argument of the TimedShelve Method call. For the OneShotShelved state the UnshelveTime will be a constant set to the maximum Duration except if a MaxTimeShelved Property is provided.
This FiniteStateMachine supports three Active states; Unshelved, TimedShelved and OneShotShelved. It also supports six transitions.This FiniteStateMachine also supports three Methods; TimedShelve, OneShotShelve and Unshelve.
OpcUa::ShelvedStateMachineType::ShelvedStateMachineType | ( | const UaNodeId & | nodeId, |
UaObject * | pInstanceDeclarationObject, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class ShelvedStateMachineType.
This constructor is used if the object is created based on an instance declaration of an object type. Since the only difference between the instance declaration object and the instance object are the node id, the pointer to the instance declaration node is used to get the attribute values other than NodeId from the instance declaration node.
The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the object must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.
[in] | nodeId | NodeId of the new object |
[in] | pInstanceDeclarationObject | UaObject interface of the instance declaration node used to provide attribute values other than NodeId |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided |
OpcUa::ShelvedStateMachineType::ShelvedStateMachineType | ( | const UaNodeId & | nodeId, |
const UaString & | name, | ||
OpcUa_UInt16 | browseNameNameSpaceIndex, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Construction of the class ShelvedStateMachineType.
This constructor is used if the object is not created based on an instance declaration. It defines the name and node id of the object. Additional language specific names and other attribute values can be set with set methods provided by the class. The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the object must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.
[in] | nodeId | NodeId of the new object |
[in] | name | Name of the new object. Used as browse name and also as display name if no additional language specific names are set. |
[in] | browseNameNameSpaceIndex | Namespace index used for the browse name |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided |
OpcUa::ShelvedStateMachineType::ShelvedStateMachineType | ( | UaBase::Object * | pBaseNode, |
XmlUaNodeFactoryManager * | pFactory, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Constructs an instance of the class ShelvedStateMachineType with all components.
[in] | pBaseNode | The "tree" of nodes that specifies the attributes of the instance and its children |
[in] | pFactory | The factory to create the children |
[in] | pNodeConfig | Interface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space |
[in] | pSharedMutex | Shared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided |
|
virtual |
ShelvedStateMachineType method OneShotShelve.
OneShotShelve sets the AlarmCondition to the OneShotShelved state.
|
virtual |
ShelvedStateMachineType method TimedShelve.
TimedShelve sets the AlarmCondition to the TimedShelved state.
|
virtual |
ShelvedStateMachineType method Unshelve.
Unshelve sets the AlarmCondition to the Unshelved state.