C++ Based OPC UA Client/Server SDK
1.5.5.355
|
Generated base class for a ShelvedStateMachineType. More...
#include <opcua_shelvedstatemachinetypebase.h>
Inherits OpcUa::FiniteStateMachineType.
Inherited by OpcUa::ShelvedStateMachineType.
Public Member Functions | |
ShelvedStateMachineTypeBase (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an ShelvedStateMachineType object using an instance declaration node as base. | |
ShelvedStateMachineTypeBase (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an ShelvedStateMachineType object. | |
ShelvedStateMachineTypeBase (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class ShelvedStateMachineTypeBase with all components. More... | |
virtual UaNodeId | typeDefinitionId () const |
Returns the type definition NodeId for the ShelvedStateMachineType. | |
virtual UaStatus | beginCall (MethodManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 callbackHandle, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments) |
Call method of an UA object. More... | |
virtual UaStatus | call (const ServiceContext &serviceContext, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments, UaVariantArray &outputArguments, UaStatusCodeArray &inputArgumentResults, UaDiagnosticInfos &inputArgumentDiag) |
Synchronous version of the MethodManager method call executed in a worker thread. | |
virtual UaStatus | OneShotShelve (const ServiceContext &serviceContext)=0 |
Sets the AlarmCondition to the OneShotShelved state. More... | |
virtual UaStatus | TimedShelve (const ServiceContext &serviceContext, OpcUa_Double ShelvingTime)=0 |
Sets the AlarmCondition to the TimedShelved state. More... | |
virtual UaStatus | Unshelve (const ServiceContext &serviceContext)=0 |
Unshelve sets the AlarmCondition to the Unshelved state. More... | |
virtual void | setUnshelveTime (OpcUa_Double UnshelveTime) |
Sets the UnshelveTime value. More... | |
virtual OpcUa_Double | getUnshelveTime () const |
Returns the value of UnshelveTime. More... | |
virtual OpcUa::PropertyType * | getUnshelveTimeNode () |
Returns the UnshelveTime node. More... | |
virtual OpcUa::BaseMethod * | getOneShotShelve () |
Returns the OneShotShelve node. | |
virtual OpcUa::BaseMethod * | getTimedShelve () |
Returns the TimedShelve node. | |
virtual OpcUa::BaseMethod * | getUnshelve () |
Returns the Unshelve node. | |
virtual void | useAccessInfoFromType () |
Applys the NodeAccessInfo set at the ShelvedStateMachineTypeBase and its children. More... | |
void | useAccessInfoFromInstance (ShelvedStateMachineTypeBase *pInstance) |
Uses the NodeAccessInfo of pOther and its children. More... | |
Public Member Functions inherited from OpcUa::FiniteStateMachineType | |
FiniteStateMachineType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class FiniteStateMachineType. More... | |
FiniteStateMachineType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class FiniteStateMachineType. More... | |
FiniteStateMachineType (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Constructs an instance of the class FiniteStateMachineType with all components. More... | |
virtual void | setCurrentState (const UaLocalizedText ¤tState) |
Sets the CurrentState. More... | |
virtual UaLocalizedText | getCurrentState (Session *pSession) |
Gets the CurrentState. More... | |
virtual void | setLastTransition (const UaLocalizedText &lastTransition) |
Sets the LastTransition. More... | |
virtual UaLocalizedText | getLastTransition (Session *pSession) |
Gets the LastTransition. More... | |
virtual OpcUa::FiniteStateVariableType * | getCurrentStateNode () |
Returns the CurrentState node. More... | |
virtual OpcUa::FiniteTransitionVariableType * | getLastTransitionNode () |
Returns the LastTransition node. More... | |
void | useAccessInfoFromInstance (FiniteStateMachineType *pInstance) |
Uses the NodeAccessInfo of pOther and its children. More... | |
Public Member Functions inherited from OpcUa::BaseObjectType | |
BaseObjectType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class BaseObjectType. More... | |
BaseObjectType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL) | |
Construction of the class BaseObjectType. More... | |
UaReferenceLists * | getUaReferenceLists () const |
Get the UaReferenceLists interface for the node. More... | |
virtual UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
Discover the references of a specified node of a view. More... | |
UaNodeId | nodeId () const |
Get the NodeId of the current Node. More... | |
virtual UaQualifiedName | browseName () const |
Get the browseName of the current Node. More... | |
virtual UaLocalizedText | displayName (Session *pSession) const |
Get the displayName as LocalizedText of the current Node. More... | |
virtual OpcUa_Boolean | isDescriptionSupported () const |
Check if Node is DescriptionSupported. More... | |
virtual UaLocalizedText | description (Session *pSession) const |
Get the description as LocalizedText of the current Node. More... | |
virtual OpcUa_Boolean | isWriteMaskSupported () const |
Check if Node is WriteMaskSupported. More... | |
virtual OpcUa_UInt32 | writeMask () const |
Get the writeMask of the current Node. More... | |
virtual OpcUa_Boolean | isUserWriteMaskSupported () const |
Check if Node is UserWriteMaskSupported. More... | |
virtual OpcUa_UInt32 | userWriteMask (Session *pSession) const |
Check if Node has a userWriteMask. More... | |
UaNode * | getUaNode () const |
Get the UaNode interface pointer of this node. More... | |
virtual OpcUa_Byte | eventNotifier () const |
Returns the EventNotifier for the BaseObjectType. More... | |
virtual MethodManager * | getMethodManager (UaMethod *pMethod) const |
Returns the method manager interface for the BaseObjectType instance. More... | |
virtual void | setUserData (UserDataBase *pUserData) |
Method to set user data stored in this class. More... | |
virtual UserDataBase * | getUserData () const |
Method to get the user data stored in this class. More... | |
virtual void | setBrowseName (const UaQualifiedName &browseName) |
Sets the browse name attribute value. More... | |
virtual void | setDisplayName (const UaLocalizedText &displayName) |
Sets the display name attribute value. More... | |
virtual void | setDescription (const UaLocalizedText &description) |
Sets the description attribute value. More... | |
virtual void | setWriteMask (OpcUa_UInt32 writeMask) |
Sets the write mask attribute value. More... | |
virtual void | setEventNotifier (OpcUa_Byte eventNotifier) |
Sets the eventNotifier attribute value. More... | |
virtual void | setModellingRuleId (const UaNodeId &modellingRuleId) |
Set NodeId of the modeling rule for this node. More... | |
virtual UaNodeId | modellingRuleId () const |
Get NodeId of the modeling rule for this node. More... | |
void | setMethodManager (MethodManager *pMethodManager) |
Allows a class aggregating the object to implement the MethodManager for this object. More... | |
virtual UaStatus | setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean checkWriteMask) |
Sets the value of an attribute of the Node. More... | |
Public Member Functions inherited from MethodManager | |
MethodManager () | |
construction | |
virtual | ~MethodManager () |
destruction | |
Public Member Functions inherited from UaObject | |
UaObject () | |
Construction of the UaObject. More... | |
OpcUa_NodeClass | nodeClass () const |
Get the node class of the Node. More... | |
virtual void | getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, UaDataValue &uaDataValue) |
Gets the value of an attribute of the Node. More... | |
Public Member Functions inherited from UaNode | |
UaNode () | |
Construction of the UaNode. More... | |
virtual UaNodeId | getKey () const |
Get the key of the node used for the hash table. More... | |
const NodeAccessInfo * | getAccessInfo () const |
Returns the access info for this node. More... | |
void | useAccessInfoFrom (const UaNode *pOther) |
Set the NodeAccessInfo from another node to this node. More... | |
void | setAccessInfo (NodeAccessInfo *pAccessInfo) |
Set the NodeAccessInfo for this node. More... | |
void | attachAccessInfo (NodeAccessInfo *pAccessInfo) |
Set the NodeAccessInfo for this node. More... | |
Public Member Functions inherited from ChainEntry | |
ChainEntry () | |
construction | |
ChainEntry * | find (const UaNodeId &key, ChainEntry **ppPrevious) |
finds the right entry in the chain. More... | |
void | add (ChainEntry *pNewEntry) |
adds a new entry to the list. More... | |
void | prepend (ChainEntry *pNewEntry) |
prepends a new entry to the list. More... | |
ChainEntry * | remove (const UaNodeId &key, ChainEntry **ppNext) |
removes an entry from the list. More... | |
ChainEntry * | getNext () const |
Check if there is a chain. More... | |
virtual void | setInvalid () |
Set the entry to invalid. More... | |
void | clearChain () |
Clear the chain when the hashtable is cleared. | |
Public Member Functions inherited from ReferenceCounter | |
ReferenceCounter () | |
construction | |
virtual | ~ReferenceCounter () |
destruction | |
Public Member Functions inherited from UaReferenceLists | |
UaReferenceLists () | |
Constructs the reference lists object. | |
virtual | ~UaReferenceLists () |
Destroys the reference lists object. | |
virtual UaStatus | browseReferences (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
Discover the references of a specified node of a view. More... | |
virtual UaStatus | translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets) |
Find a node based on an element of an relative path. More... | |
virtual const UaReference * | pTargetNodes () const |
Returns the list of references to target nodes. More... | |
virtual const UaReference * | pSourceNodes () const |
Returns the list of references to source nodes. More... | |
virtual UaNode * | getTargetNodeByBrowseName (const UaQualifiedName &browseName) const |
Searches a target node with the passed browse name and returns the UaNode interface if found. More... | |
virtual void | addTargetNode (UaReference *pReference) |
Add a reference to a target node where this node is the source node. More... | |
virtual void | addSourceNode (UaReference *pReference) |
Adds a reference to a source node where this node is the target node. More... | |
virtual UaStatus | removeSourceNode (UaReference *pReferenceToRemove) |
Remove a reference to a source node where this node is the target node. More... | |
virtual bool | removeSourceReference (UaReference *pReferenceToRemove) |
Remove the passed reference to a source node. More... | |
virtual UaStatus | removeTargetNode (UaNode *pTargetNode, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional) |
Remove a reference to a target node where this node is the source node. More... | |
virtual UaStatus | removeTargetNode (const UaNodeId &targetNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional) |
Remove a reference to a target node where this node is the source node. More... | |
virtual bool | removeTargetReference (UaReference *pReferenceToRemove) |
Remove the passed reference to a target node. More... | |
virtual UaStatus | removeCrossNodeManagerRef (NodeManager *pNodeManager) |
Remove references to another NodeManager. More... | |
virtual UaStatus | invalidateSourceReferences (OpcUa_Boolean deleteSourceReferences) |
Set all references from SourceNodes to this Node invalid. More... | |
virtual UaStatus | invalidateTargetReferences (OpcUa_Boolean deleteTargetReferences) |
Set all references to TargetNode of this node invalid. More... | |
virtual UaStatus | deleteAllChildren (NodeManagerConfig *pNodeManagerConfig) |
Deletes all child nodes. More... | |
Static Public Member Functions | |
static void | createTypes () |
Create the related type nodes. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Static Public Member Functions inherited from OpcUa::FiniteStateMachineType | |
static void | createTypes () |
Create the related type nodes. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Static Public Member Functions inherited from OpcUa::BaseObjectType | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
Protected Member Functions | |
virtual | ~ShelvedStateMachineTypeBase () |
Destruction. | |
Protected Member Functions inherited from OpcUa::FiniteStateMachineType | |
virtual | ~FiniteStateMachineType () |
Destruction. | |
Protected Member Functions inherited from OpcUa::BaseObjectType | |
virtual | ~BaseObjectType () |
Destruction of the BaseObjectType. More... | |
Protected Member Functions inherited from UaObject | |
virtual | ~UaObject () |
Destruction of the UaObject. More... | |
Protected Member Functions inherited from UaNode | |
virtual | ~UaNode () |
Destruction of the UaNode. More... | |
Protected Member Functions inherited from ChainEntry | |
virtual | ~ChainEntry () |
destruction | |
Additional Inherited Members | |
Protected Attributes inherited from UaReferenceLists | |
UaReference * | m_pTargetNodes |
List of references to target nodes where this node is the source node. More... | |
UaReference * | m_pLastTargetNode |
Last references in the list of references to the target nodes. More... | |
UaReference * | m_pSourceNodes |
List of references to source nodes where this node is the target node. More... | |
Generated base class for a ShelvedStateMachineType.
This class contains the generated base code for the object type ShelvedStateMachineType representing an OPC UA ObjectType. This class is used to create the object type and to create and represent instances of the object type in the server address space.
Object members of the ShelvedStateMachineType:
Browse Name | TypeDefinition | Modelling Rule | See Also |
---|---|---|---|
OneShotShelved | StateType | None | |
OneShotShelvedToTimedShelved | TransitionType | None | |
OneShotShelvedToUnshelved | TransitionType | None | |
TimedShelved | StateType | None | |
TimedShelvedToOneShotShelved | TransitionType | None | |
TimedShelvedToUnshelved | TransitionType | None | |
Unshelved | StateType | None | |
UnshelvedToOneShotShelved | TransitionType | None | |
UnshelvedToTimedShelved | TransitionType | None |
Variable members of the ShelvedStateMachineType:
Browse Name | DataType | TypeDefinition | Modelling Rule | See Also |
---|---|---|---|---|
UnshelveTime | Duration | PropertyType | Mandatory | getUnshelveTime, setUnshelveTime |
Defines a substate machine that represents an advanced Alarm filtering model.
The state model supports two types of Shelving: OneShotShelving and TimedShelving.The illustration includes the allowed transitions between the various substates. 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.
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 substates. It supports all transitions between Unshelved, OneShotShelved and TimedShelved.
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.
See also ShelvedStateMachineType for a documentation of the complete Information Model.
OpcUa::ShelvedStateMachineTypeBase::ShelvedStateMachineTypeBase | ( | UaBase::Object * | pBaseNode, |
XmlUaNodeFactoryManager * | pFactory, | ||
NodeManagerConfig * | pNodeConfig, | ||
UaMutexRefCounted * | pSharedMutex = NULL |
||
) |
Constructs an instance of the class ShelvedStateMachineTypeBase 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 |
Call method of an UA object.
Implementation of the MethodManager interface method beginCall.
Reimplemented from OpcUa::BaseObjectType.
|
virtual |
Returns the value of UnshelveTime.
Specifies the remaining time in milliseconds until the Alarm automatically transitions into the Unshelved 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.
|
virtual |
Returns the UnshelveTime node.
Specifies the remaining time in milliseconds until the Alarm automatically transitions into the Unshelved 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.
|
pure virtual |
Sets the AlarmCondition to the OneShotShelved state.
Normally, the MethodId found in the Shelving child of the Condition instance and the NodeId of the Shelving object as the ObjectId are passed to the Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall also allow Clients to call the OneShotShelve method by specifying ConditionId as the ObjectId. The method cannot be called with an ObjectId of the ShelvedStateMachineType Node.
Method Result Codes
ResultCode | Description |
---|---|
Bad_ConditionAlreadyShelved | The Alarm is already in a shelved state. The Alarm is already in OneShotShelved state. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
Implemented in OpcUa::ShelvedStateMachineType.
|
virtual |
Sets the UnshelveTime value.
Specifies the remaining time in milliseconds until the Alarm automatically transitions into the Unshelved 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.
|
pure virtual |
Sets the AlarmCondition to the TimedShelved state.
Normally, the MethodId found in the Shelving child of the Condition instance and the NodeId of the Shelving object as the ObjectId are passed to the Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall also allow Clients to call the TimedShelve method by specifying ConditionId as the ObjectId. The method cannot be called with an ObjectId of the ShelvedStateMachineType Node.
Method Result Codes
ResultCode | Description |
---|---|
Bad_ConditionAlreadyShelved | The Alarm is already in a shelved state. The Alarm is already in TimedShelved state and the system does not allow a reset of the shelved timer. |
Bad_ShelvingTimeOutOfRange | The provided Shelving time is outside the range allowed by the Server for Shelving. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
[in] | ShelvingTime | If not 0, this parameter specifies a fixed time for which the Alarm is to be shelved.. Specifies a fixed time for which the Alarm is to be shelved. The Server may refuse the provided duration. If a MaxTimeShelved Property exist on the Alarm than the Shelving time shall be less than or equal to the value of this Property. |
Implemented in OpcUa::ShelvedStateMachineType.
|
pure virtual |
Unshelve sets the AlarmCondition to the Unshelved state.
Normally, the MethodId found in the Shelving child of the Condition instance and the NodeId of the Shelving object as the ObjectId are passed to the Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall also allow Clients to call the Unshelve method by specifying ConditionId as the ObjectId. The method cannot be called with an ObjectId of the ShelvedStateMachineType Node.
Method Result Codes:
ResultCode | Description |
---|---|
Bad_ConditionNotShelved | The Alarm is not in the requested shelved state. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
Implemented in OpcUa::ShelvedStateMachineType.
void OpcUa::ShelvedStateMachineTypeBase::useAccessInfoFromInstance | ( | ShelvedStateMachineTypeBase * | pOther | ) |
Uses the NodeAccessInfo of pOther and its children.
|
virtual |
Applys the NodeAccessInfo set at the ShelvedStateMachineTypeBase and its children.
Reimplemented from OpcUa::FiniteStateMachineType.