UA Bundle SDK .NET  2.2.1.258
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Groups Pages
UnifiedAutomation.UaServer.MonitoredItem Class Reference

A monitored item for a subscription. More...

Public Member Functions

 MonitoredItem (RequestContext context, TimestampsToReturn timestampsToReturn, MonitoringMode monitoringMode, uint clientHandle, uint queueSize, bool discardOldest)
 Initializes a new instance of the MonitoredItem class. More...
 
MonitoringParameters GetMonitoringParameters ()
 Gets the monitoring parameters. More...
 
bool SetTriggered ()
 Sets a flag indicating that the item has been triggered and should publish. More...
 
MonitoringMode SetMonitoringMode (MonitoringMode monitoringMode)
 Changes the monitoring mode for the item. More...
 
bool Publish (RequestContext context, Queue< MonitoredItemNotification > notifications)
 Publishes all available data change notifications. More...
 
virtual bool Publish (RequestContext context, Queue< EventFieldList > notifications)
 Publishes all available event notifications. More...
 
void OnDataChanged (RequestContext context, MonitoredItemHandle itemHandle, DataValue dataValue, bool doNotBlockThread)
 Called when [data changed]. More...
 
void OnEvent (RequestContext context, MonitoredItemHandle itemHandle, GenericEvent e, bool doNotBlockThread)
 Called when [event changed]. More...
 
void RequeueLastValue ()
 Requeues the last value. More...
 
bool QueueEvent (RequestContext context, GenericEvent e, bool bypassFilter)
 Updates the queue with an event. More...
 
MonitoredItemCreateResult CreationComplete (MonitoredItemHandle itemHandle, WaitCallback callback, object callbackData, DataMonitoringResult result)
 Called when the monitored item has been created successfully. More...
 
MonitoredItemCreateResult CreationComplete (MonitoredItemHandle itemHandle, WaitCallback callback, object callbackData, EventMonitoringResult result)
 Called when the monitored item has been created successfully. More...
 
MonitoredItemModifyResult ModificationComplete (TimestampsToReturn timestampsToReturn, DataMonitoringResult result)
 Called when an item was successfully modified. More...
 
MonitoredItemModifyResult ModificationComplete (EventMonitoringResult result)
 Called when an item was successfully modified. More...
 

Static Public Member Functions

static bool ValueChanged (DataValue value, DataValue lastValue, DataChangeFilter filter, double range)
 Applies the filter to value to determine if the new value should be kept. More...
 

Protected Member Functions

virtual bool ApplyFilter (DataValue value)
 Applies the filter to value to determine if the new value should be kept. More...
 
void InitializeQueue ()
 Clears and re-initializes the queue if the monitoring parameters changed. More...
 

Static Protected Member Functions

static bool Equals (object value1, object value2, DeadbandType deadbandType, double deadband, double range)
 Checks if the two values are equal. More...
 
static bool ExceedsDeadband (object value1, object value2, DeadbandType deadbandType, double deadband, double range)
 Returns true if the deadband was exceeded. More...
 

Properties

uint Id [get]
 Gets the item id. More...
 
MonitoredItemHandle ItemHandle [get]
 Gets the item handle. More...
 
bool IsEventItem [get]
 A flag indicating that the item is monitoring events. More...
 
uint ClientHandle [get]
 Gets the client handle. More...
 
MonitoringMode MonitoringMode [get]
 Gets the monitoring mode. More...
 
bool IsReadyToPublish [get]
 Returns true if the item is ready to publish. More...
 
bool Deleted [get, set]
 Gets or sets a value indicating whether this MonitoredItem is deleted. More...
 
List< MonitoredItemTriggeredItems [get, set]
 Gets or sets the triggered items for the item. More...
 

Detailed Description

A monitored item for a subscription.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.MonitoredItem.MonitoredItem ( RequestContext  context,
TimestampsToReturn  timestampsToReturn,
MonitoringMode  monitoringMode,
uint  clientHandle,
uint  queueSize,
bool  discardOldest 
)
inline

Initializes a new instance of the MonitoredItem class.

Parameters
contextThe request context.
timestampsToReturnThe timestamps to return.
monitoringModeThe monitoring mode.
clientHandleThe client handle.
queueSizeSize of the queue.
discardOldestif set to true [discard oldest].

Member Function Documentation

virtual bool UnifiedAutomation.UaServer.MonitoredItem.ApplyFilter ( DataValue  value)
inlineprotectedvirtual

Applies the filter to value to determine if the new value should be kept.

MonitoredItemCreateResult UnifiedAutomation.UaServer.MonitoredItem.CreationComplete ( MonitoredItemHandle  itemHandle,
WaitCallback  callback,
object  callbackData,
DataMonitoringResult  result 
)
inline

Called when the monitored item has been created successfully.

Parameters
itemHandleThe item handle.
callbackThe callback.
callbackDataThe callback data.
resultThe result.
Returns
MonitoredItemCreateResult UnifiedAutomation.UaServer.MonitoredItem.CreationComplete ( MonitoredItemHandle  itemHandle,
WaitCallback  callback,
object  callbackData,
EventMonitoringResult  result 
)
inline

Called when the monitored item has been created successfully.

Parameters
itemHandleThe item handle.
callbackThe callback.
callbackDataThe callback data.
resultThe result.
Returns
static bool UnifiedAutomation.UaServer.MonitoredItem.Equals ( object  value1,
object  value2,
DeadbandType  deadbandType,
double  deadband,
double  range 
)
inlinestaticprotected

Checks if the two values are equal.

static bool UnifiedAutomation.UaServer.MonitoredItem.ExceedsDeadband ( object  value1,
object  value2,
DeadbandType  deadbandType,
double  deadband,
double  range 
)
inlinestaticprotected

Returns true if the deadband was exceeded.

MonitoringParameters UnifiedAutomation.UaServer.MonitoredItem.GetMonitoringParameters ( )
inline

Gets the monitoring parameters.

Returns
void UnifiedAutomation.UaServer.MonitoredItem.InitializeQueue ( )
inlineprotected

Clears and re-initializes the queue if the monitoring parameters changed.

MonitoredItemModifyResult UnifiedAutomation.UaServer.MonitoredItem.ModificationComplete ( TimestampsToReturn  timestampsToReturn,
DataMonitoringResult  result 
)
inline

Called when an item was successfully modified.

MonitoredItemModifyResult UnifiedAutomation.UaServer.MonitoredItem.ModificationComplete ( EventMonitoringResult  result)
inline

Called when an item was successfully modified.

void UnifiedAutomation.UaServer.MonitoredItem.OnDataChanged ( RequestContext  context,
MonitoredItemHandle  itemHandle,
DataValue  dataValue,
bool  doNotBlockThread 
)
inline

Called when [data changed].

Parameters
contextThe request context.
itemHandleThe item handle.
dataValueThe data value.
doNotBlockThreadif set to true then the current thread should not be blocked.
void UnifiedAutomation.UaServer.MonitoredItem.OnEvent ( RequestContext  context,
MonitoredItemHandle  itemHandle,
GenericEvent  e,
bool  doNotBlockThread 
)
inline

Called when [event changed].

Parameters
contextThe request context.
itemHandleThe item handle.
eThe event.
doNotBlockThreadif set to true then the current thread should not be blocked.
bool UnifiedAutomation.UaServer.MonitoredItem.Publish ( RequestContext  context,
Queue< MonitoredItemNotification notifications 
)
inline

Publishes all available data change notifications.

virtual bool UnifiedAutomation.UaServer.MonitoredItem.Publish ( RequestContext  context,
Queue< EventFieldList notifications 
)
inlinevirtual

Publishes all available event notifications.

bool UnifiedAutomation.UaServer.MonitoredItem.QueueEvent ( RequestContext  context,
GenericEvent  e,
bool  bypassFilter 
)
inline

Updates the queue with an event.

void UnifiedAutomation.UaServer.MonitoredItem.RequeueLastValue ( )
inline

Requeues the last value.

MonitoringMode UnifiedAutomation.UaServer.MonitoredItem.SetMonitoringMode ( MonitoringMode  monitoringMode)
inline

Changes the monitoring mode for the item.

bool UnifiedAutomation.UaServer.MonitoredItem.SetTriggered ( )
inline

Sets a flag indicating that the item has been triggered and should publish.

static bool UnifiedAutomation.UaServer.MonitoredItem.ValueChanged ( DataValue  value,
DataValue  lastValue,
DataChangeFilter  filter,
double  range 
)
inlinestatic

Applies the filter to value to determine if the new value should be kept.

Property Documentation

uint UnifiedAutomation.UaServer.MonitoredItem.ClientHandle
get

Gets the client handle.

bool UnifiedAutomation.UaServer.MonitoredItem.Deleted
getset

Gets or sets a value indicating whether this MonitoredItem is deleted.

true if deleted; otherwise, false.

uint UnifiedAutomation.UaServer.MonitoredItem.Id
get

Gets the item id.

bool UnifiedAutomation.UaServer.MonitoredItem.IsEventItem
get

A flag indicating that the item is monitoring events.

bool UnifiedAutomation.UaServer.MonitoredItem.IsReadyToPublish
get

Returns true if the item is ready to publish.

MonitoredItemHandle UnifiedAutomation.UaServer.MonitoredItem.ItemHandle
get

Gets the item handle.

MonitoringMode UnifiedAutomation.UaServer.MonitoredItem.MonitoringMode
get

Gets the monitoring mode.

List<MonitoredItem> UnifiedAutomation.UaServer.MonitoredItem.TriggeredItems
getset

Gets or sets the triggered items for the item.

The triggered items.

The caller must ensure access to the collection is thread safe.


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