Class implementing the UaObject interface for the ConditionType. More...

#include <opcua_conditiontype.h>

Inheritance diagram for OpcUa::ConditionType:
Collaboration diagram for OpcUa::ConditionType:

List of all members.

Public Member Functions

 ConditionType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, const UaNodeId &sourceNode, const UaString &sourceName, UaMutexRefCounted *pSharedMutex=NULL)
 ConditionType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, const UaNodeId &sourceNode, const UaString &sourceName, UaMutexRefCounted *pSharedMutex=NULL)
void addEnabledStateLocale (const UaLocalizedText &falseName, const UaLocalizedText &trueName)
virtual UaNodeId getConditionNodeId ()
virtual UaNodeId getConditionBranchNodeId ()
virtual OpcUa_Boolean getConditionRetain ()
OpcUa_UInt32 getBranchCount ()
ConditionTypeDatagetBranch (const UaNodeId &branchNodeId)
ConditionTypeDatagetBranchByEventId (const UaByteString &eventId, UaByteString &userEventId)
void getAllBranches (UaPointerArray< ConditionTypeData > &branchArray)
OpcUa_StatusCode deleteBranch (const UaNodeId &branchNodeId)
UaStatus triggerBranchEvent (ConditionTypeData *pConditionTypeData, const UaDateTime &time, const UaDateTime &receiveTime, const UaByteString &eventId)

Static Public Member Functions

static void createTypes ()
static void clearStaticMembers ()

Protected Member Functions

virtual ~ConditionType ()

Detailed Description

Class implementing the UaObject interface for the ConditionType.

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.


Constructor & Destructor Documentation

OpcUa::ConditionType::~ConditionType (  ) [protected, virtual]

Destruction

OpcUa::ConditionType::ConditionType ( const UaNodeId nodeId,
UaObject pInstanceDeclarationObject,
NodeManagerConfig pNodeConfig,
const UaNodeId sourceNode,
const UaString sourceName,
UaMutexRefCounted pSharedMutex = NULL 
)

Construction of the class ConditionType. 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 availablity 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.

Parameters:
[in]nodeIdNodeId of the new object
[in]pInstanceDeclarationObjectUaObject interface of the instance declaration node used to provide attribute values other than NodeId
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
[in]sourceNodeNodeId of the source node used for this condition object. Can be null if the source is not a node in the address space
[in]sourceNameName of the source used for this condition object
[in]pSharedMutexShared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided
OpcUa::ConditionType::ConditionType ( const UaNodeId nodeId,
const UaString name,
OpcUa_UInt16  browseNameNameSpaceIndex,
NodeManagerConfig pNodeConfig,
const UaNodeId sourceNode,
const UaString sourceName,
UaMutexRefCounted pSharedMutex = NULL 
)

Construction of the class ConditionType. 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 availablity 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.

Parameters:
[in]nodeIdNodeId of the new object
[in]nameName of the new object. Used as browse name and also as display name if no additional language specific names are set.
[in]browseNameNameSpaceIndexNamespace index used for the browse name
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
[in]sourceNodeNodeId of the source node used for this condition object. Can be null if the source is not a node in the address space
[in]sourceNameName of the source used for this condition object
[in]pSharedMutexShared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided

Member Function Documentation

void OpcUa::ConditionType::addEnabledStateLocale ( const UaLocalizedText falseName,
const UaLocalizedText trueName 
)

Add Enabled state strings for additional locale

OpcUa_StatusCode OpcUa::ConditionType::deleteBranch ( const UaNodeId branchNodeId )

Deletes the branch identified by the branch NodeId

Returns:
Result code for the call.
Parameters:
[in]branchNodeIdNodeId of the branch to delete.
void OpcUa::ConditionType::getAllBranches ( UaPointerArray< ConditionTypeData > &  branchArray )

Returns an array of the available branches.

Parameters:
[out]branchArrayArray of branches represented by an array of event data pointers.
ConditionTypeData * OpcUa::ConditionType::getBranch ( const UaNodeId branchNodeId )

Returns a pointer to the branch event data based on the passe branch NodeId

Returns:
The event data object pointer for the branch. NULL if the branch can not be found.
Parameters:
[in]branchNodeIdNodeId of the branch to return.
ConditionTypeData * OpcUa::ConditionType::getBranchByEventId ( const UaByteString eventId,
UaByteString userEventId 
)

Returns a pointer to the branch event data based on the passe EventId. The function extracts also the user eventId provided in ConditionType::triggerBranchEvent().

Returns:
The event data object pointer for the branch. NULL if the branch can not be found.
Parameters:
[in]eventIdEventId provided by the client in an Acknowledge, AddComment or Confirm call.
[out]userEventIdExtracted user event data provided in ConditionType::triggerBranchEvent().
OpcUa_UInt32 OpcUa::ConditionType::getBranchCount (  )

Returns the number of active branches

Returns:
The count of condition branches.
UaNodeId OpcUa::ConditionType::getConditionBranchNodeId (  ) [virtual]

Returns the condition branch NodeId for the condition object. This is used by the SDK to detect if the condition event data is from a branch.

Reimplemented from UaEventData.

UaNodeId OpcUa::ConditionType::getConditionNodeId (  ) [virtual]

Returns the condition NodeId for the condition object. This is used by the SDK to detect if the event data is from a condition event.

Reimplemented from UaEventData.

OpcUa_Boolean OpcUa::ConditionType::getConditionRetain (  ) [virtual]

Returns the Retain flag for the condition object. This is used by the SDK to detect if the condition event data indicates an interesting state.

Reimplemented from UaEventData.

UaStatus OpcUa::ConditionType::triggerBranchEvent ( ConditionTypeData pConditionTypeData,
const UaDateTime time,
const UaDateTime receiveTime,
const UaByteString userEventId 
)

Send event with event field data of the passed condition branch to the subscribed clients After setting the changed states of the condition branch this method is used to trigger the event notification that contains the snapshot of the new state of the condition branch.

Returns:
Result code for the call.
Parameters:
[in]pConditionTypeDataEvent data of the condition branch to send a snapshot of the branch to the client(s).
[in]timeTime provides the time the Event occurred. This value is set as close to the event generator as possible. It often comes from the underlying system or device.
[in]receiveTimeReceiveTime provides the time the OPC UA Server received the Event from the underlying device or another Server.
[in]userEventIdThe server is responsible for generating a unique EventId for every event sent to the client. The SDK uses this parameter userEventId as part of the EventId but adds a unique part and the BranchId. The EventId is provided by the client in calls back to the server like in an alarm acknowledgement. The user specific part can be extracted from the EventId provided by the client by using ConditionType::getBranchByEventId()

The documentation for this class was generated from the following files:
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/opcua_conditiontype.h
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/opcua_conditiontype.cpp