C++ Based OPC UA Client/Server SDK  1.5.5.355
UaMonitoredItemData Class Reference

UaMonitoredItemData. More...

#include <uamonitoreditem.h>

Inherits UaMonitoredItem, and IOVariableCallback.

Public Member Functions

 UaMonitoredItemData (const UaNodeId &nodeId, VariableHandle *pVariableHandle, OpcUa_MonitoringMode MonitoringMode, OpcUa_Int32 ClientHandle, OpcUa_Double SamplingInterval, UaSubscription *pUaSubscription, OpcUa_UInt32 QueueSize, OpcUa_Boolean DiscardOldest, OpcUa_DataChangeTrigger dataChangeTrigger)
 construction More...
 
 ~UaMonitoredItemData ()
 destruction
 
MonitoredItemType type () const
 Get the type of monitored item.
 
OpcUa_Boolean hasChanged ()
 Check if the value or status of the item has changed. More...
 
void setMonitoringMode (OpcUa_MonitoringMode monitoringMode)
 Set the Monitoring Mode. More...
 
void setIOVariableHandle (OpcUa_UInt32 hIOVariable)
 Set the related IOVariable handle. More...
 
void setDiscardPolicy (OpcUa_Boolean discardOldest)
 Set the discard policy for the monitored item. More...
 
OpcUa_Boolean discardOldest () const
 Get the discard policy for the monitored item.
 
void setQueueSize (OpcUa_UInt32 queueSize)
 Set the queue size for the monitored item. More...
 
OpcUa_UInt32 queueSize ()
 Get the queue size of the monitored item.
 
void setAbsolutDeadband (OpcUa_Double absoluteDeadband)
 Set the absolute deadband for the monitored item. More...
 
void setDataChangeTrigger (OpcUa_DataChangeTrigger dataChangeTrigger)
 Set the data change trigger for the monitored item. More...
 
OpcUa_DataChangeTrigger dataChangeTrigger () const
 Get the data change trigger for the monitored item.
 
IOManagerpIOManager () const
 Get the related IOManager.
 
VariableHandlepVariableHandle () const
 Get the related VariableHandle.
 
UaDataValuegetChangedValue ()
 Get changed value from item and reset changed flag. More...
 
virtual void reset ()
 Deletes all queued datachanges and resets flags to the state of creation.
 
virtual void dataChange (const UaDataValue &dataValue)
 Signal a change in value or state. More...
 
virtual UaDataValue getLastValue ()
 Get last value send with dataChange.
 
virtual OpcUa_Int32 getRemainingQueueSize ()
 Get the number of free slots in the queue If no queue is provided, the return value is -1.
 
- Public Member Functions inherited from UaMonitoredItem
 UaMonitoredItem (const UaNodeId &nodeId, OpcUa_MonitoringMode MonitoringMode, OpcUa_Int32 ClientHandle, OpcUa_Double SamplingInterval, UaSubscription *pUaSubscription)
 construction More...
 
virtual ~UaMonitoredItem ()
 destruction
 
void setClientHandle (OpcUa_Int32 clientHandle)
 Set the client handle of the monitored item. More...
 
OpcUa_Int32 clientHandle () const
 Get the client handle of the monitored item. More...
 
OpcUa_MonitoringMode monitoringMode () const
 Get the monitoring mode of the monitored item. More...
 
void setSamplingInterval (OpcUa_Double samplingInterval)
 Set the sampling rate of the monitored item. More...
 
OpcUa_Double samplingInterval () const
 Get the sampling rate of the monitored item. More...
 
UaNodeId nodeId () const
 NodeId of the node monitored with this item. More...
 
void setLinks (std::list< OpcUa_UInt32 > *pLinks)
 Sets the triggering links of the monitored item. More...
 
std::list< OpcUa_UInt32 > * links ()
 Returns the triggering links of the monitored item. More...
 
OpcUa_Boolean wasTriggered () const
 Check if the item triggered. More...
 
void resetTriggeredStatus ()
 Sets the triggered status of the monitored item to false.
 
OpcUa_TimestampsToReturn timestampsToReturn () const
 Timestamps to return with a datavalue.
 
void setTimestampsToReturn (OpcUa_TimestampsToReturn timestampsToReturn)
 Sets which timestamps shall be returned with a data value.
 
- Public Member Functions inherited from IOVariableCallback
 IOVariableCallback ()
 Construction.
 
virtual ~IOVariableCallback ()
 Destruction.
 

Additional Inherited Members

- Public Types inherited from UaMonitoredItem
enum  MonitoredItemType { DATA, EVENT }
 MonitoredItem type enumeration. More...
 
- Protected Attributes inherited from UaMonitoredItem
UaSubscriptionm_pUaSubscription
 Parent subscription for the monitored item.
 

Detailed Description

UaMonitoredItemData.

Implements a UA monitored item for data changes. Derived from UaMonitoredItem and IOVariableCallback It is not possible to create shallow copies of this class. It is not possible to use the default constructor.

Constructor & Destructor Documentation

UaMonitoredItemData::UaMonitoredItemData ( const UaNodeId nodeId,
VariableHandle pVariableHandle,
OpcUa_MonitoringMode  MonitoringMode,
OpcUa_Int32  ClientHandle,
OpcUa_Double  SamplingInterval,
UaSubscription pUaSubscription,
OpcUa_UInt32  QueueSize,
OpcUa_Boolean  DiscardOldest,
OpcUa_DataChangeTrigger  dataChangeTrigger 
)

construction

Parameters
nodeIdThe Id of the given Node.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle.
MonitoringModethe mode for monitoring items.
ClientHandlea handle to the client.
SamplingIntervalthe value in MS for a Interval of a Variable
QueueSizethe size of the queue.
DiscardOldestdiscards the oldest.
pUaSubscriptionThe subscription of the given Node.
dataChangeTriggera trigger that indicates that data has changed.

Member Function Documentation

void UaMonitoredItemData::dataChange ( const UaDataValue dataValue)
virtual

Signal a change in value or state.

Parameters
dataValuethe requested Value for this operation.

Implements IOVariableCallback.

UaDataValue * UaMonitoredItemData::getChangedValue ( )

Get changed value from item and reset changed flag.

Returns
the changed value from item and reset changed flag.
OpcUa_Boolean UaMonitoredItemData::hasChanged ( )
virtual

Check if the value or status of the item has changed.

Returns
true if changed false if not.

Implements UaMonitoredItem.

void UaMonitoredItemData::setAbsolutDeadband ( OpcUa_Double  absoluteDeadband)

Set the absolute deadband for the monitored item.

Parameters
absoluteDeadbandthe absolute deadband for the monitored item.
void UaMonitoredItemData::setDataChangeTrigger ( OpcUa_DataChangeTrigger  dataChangeTrigger)

Set the data change trigger for the monitored item.

Parameters
dataChangeTriggerthe data change trigger for the monitored item.
void UaMonitoredItemData::setDiscardPolicy ( OpcUa_Boolean  discardOldest)

Set the discard policy for the monitored item.

Parameters
discardOldestdiscards the oldest.
void UaMonitoredItemData::setIOVariableHandle ( OpcUa_UInt32  hIOVariable)

Set the related IOVariable handle.

Parameters
hIOVariableThe handle of the variable in the IOManager created with beginStartMonitoring. The handle was passed to the SDK in the callback finishStartMonitoring.
void UaMonitoredItemData::setMonitoringMode ( OpcUa_MonitoringMode  monitoringMode)
virtual

Set the Monitoring Mode.

Parameters
monitoringModethe Monitoring Mode

Reimplemented from UaMonitoredItem.

void UaMonitoredItemData::setQueueSize ( OpcUa_UInt32  queueSize)

Set the queue size for the monitored item.

Parameters
queueSizethe size of the queue.

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