C# Class Opc.Ua.Server.MonitoredItem

A handle that describes how to access a node/attribute via an i/o manager.
Inheritance: IEventMonitoredItem, ISampledDataChangeMonitoredItem, ITriggeredMonitoredItem
Afficher le fichier Open project: OPCFoundation/UA-.NET Class Usage Examples

Private Properties

Свойство Type Description
AddValueToQueue void
ExceedsDeadband bool
GetEventFields EventFieldList
IncrementSampleTime void
Initialize void
SetOverflowBit ServiceResult

Méthodes publiques

Méthode Description
GetCreateResult ( MonitoredItemCreateResult &result ) : ServiceResult

Returns the result after creating the monitor item.

GetModifyResult ( MonitoredItemModifyResult &result ) : ServiceResult

Returns the result after modifying the monitor item.

GetReadValueId ( ) : ReadValueId

Returns a description of the item being monitored.

IEventMonitoredItem ( MonitoringMode monitoringMode ) : void

Changes the monitoring mode for the item.

ISampledDataChangeMonitoredItem ( MonitoringMode monitoringMode ) : void

Changes the monitoring mode for the item.

ModifyAttributes ( DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, uint clientHandle, MonitoringFilter originalFilter, MonitoringFilter filterToUse, Range range, double samplingInterval, uint queueSize, bool discardOldest ) : ServiceResult

Modifies the attributes for monitored item.

MonitoredItem ( IServerInternal server, INodeManager nodeManager, object mangerHandle, uint subscriptionId, uint id, Session session, ReadValueId itemToMonitor, DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, MonitoringMode monitoringMode, uint clientHandle, MonitoringFilter originalFilter, MonitoringFilter filterToUse, Range range, double samplingInterval, uint queueSize, bool discardOldest, double sourceSamplingInterval ) : System

Initializes the object with its node type.

Publish ( OperationContext context, Queue notifications ) : bool

Publishes all available event notifications.

Publish ( OperationContext context, Queue notifications, Queue diagnostics ) : bool

Publishes all available data change notifications.

QueueEvent ( EventFieldList fields ) : void

Adds an event to the queue.

QueueEvent ( IFilterTarget instance ) : void

Adds an event to the queue.

QueueEvent ( IFilterTarget instance, bool bypassFilter ) : void

Adds an event to the queue.

QueueValue ( DataValue value, ServiceResult error ) : void

Adds an event to the queue.

QueueValue ( DataValue value, ServiceResult error, bool bypassFilter ) : void

Updates the queue with a data value or an error.

SamplingIntervalExpired ( ) : bool

Used to check whether the item is ready to sample.

SetMonitoringMode ( MonitoringMode monitoringMode ) : MonitoringMode

Changes the monitoring mode for the item.

SetSamplingError ( ServiceResult error ) : void

Sets an error that occured in the sampling group.

The sampling group or node manager that owns the item may call this to indicate that a fatal error occurred which means the item will no longer receive any data updates. This error state can be cleared by calling this method and passing in ServiceResult.Good.

SetSamplingInterval ( double samplingInterval ) : void

Updates the sampling interval for an item.

SetSemanticsChanged ( ) : void

Sets a flag indicating that the semantics for the monitored node have changed.

The StatusCode for next value reported by the monitored item will have the SemanticsChanged bit set.

SetStructureChanged ( ) : void

Sets a flag indicating that the structure of the monitored node has changed.

The StatusCode for next value reported by the monitored item will have the StructureChanged bit set.

SetTriggered ( ) : bool

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

ValueChanged ( DataValue value, ServiceResult error, DataValue lastValue, ServiceResult lastError, DataChangeFilter filter, double range ) : bool

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

Méthodes protégées

Méthode Description
ApplyFilter ( DataValue value, ServiceResult error ) : bool

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

Equals ( object value1, object value2, DeadbandType deadbandType, double deadband, double range ) : bool

Checks if the two values are equal.

ExceedsDeadband ( object value1, object value2, DeadbandType deadbandType, double deadband, double range ) : bool

Returns true if the deadband was exceeded.

InitializeQueue ( ) : void

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

Publish ( OperationContext context, Queue notifications, Queue diagnostics, DataValue value, ServiceResult error ) : bool

Publishes a single data change notifications.

Private Methods

Méthode Description
AddValueToQueue ( DataValue value, ServiceResult error ) : void

Adds a value to the queue.

ExceedsDeadband ( double value1, double value2, DeadbandType deadbandType, double deadband, double range ) : bool

Returns true if the deadband was exceeded.

GetEventFields ( FilterContext context, EventFilter filter, IFilterTarget instance ) : EventFieldList

Fetches the event fields from the event.

IncrementSampleTime ( ) : void

Increments the sample time to the next interval.

Initialize ( ) : void

Sets private members to default values.

SetOverflowBit ( object value, ServiceResult error ) : ServiceResult

Sets the overflow bit.

Method Details

ApplyFilter() protected méthode

Applies the filter to value to determine if the new value should be kept.
protected ApplyFilter ( DataValue value, ServiceResult error ) : bool
value DataValue
error ServiceResult
Résultat bool

Equals() protected static méthode

Checks if the two values are equal.
protected static Equals ( object value1, object value2, DeadbandType deadbandType, double deadband, double range ) : bool
value1 object
value2 object
deadbandType DeadbandType
deadband double
range double
Résultat bool

ExceedsDeadband() protected static méthode

Returns true if the deadband was exceeded.
protected static ExceedsDeadband ( object value1, object value2, DeadbandType deadbandType, double deadband, double range ) : bool
value1 object
value2 object
deadbandType DeadbandType
deadband double
range double
Résultat bool

GetCreateResult() public méthode

Returns the result after creating the monitor item.
public GetCreateResult ( MonitoredItemCreateResult &result ) : ServiceResult
result MonitoredItemCreateResult
Résultat ServiceResult

GetModifyResult() public méthode

Returns the result after modifying the monitor item.
public GetModifyResult ( MonitoredItemModifyResult &result ) : ServiceResult
result MonitoredItemModifyResult
Résultat ServiceResult

GetReadValueId() public méthode

Returns a description of the item being monitored.
public GetReadValueId ( ) : ReadValueId
Résultat ReadValueId

IEventMonitoredItem() public méthode

Changes the monitoring mode for the item.
public IEventMonitoredItem ( MonitoringMode monitoringMode ) : void
monitoringMode MonitoringMode
Résultat void

ISampledDataChangeMonitoredItem() public méthode

Changes the monitoring mode for the item.
public ISampledDataChangeMonitoredItem ( MonitoringMode monitoringMode ) : void
monitoringMode MonitoringMode
Résultat void

InitializeQueue() protected méthode

Clears and re-initializes the queue if the monitoring parameters changed.
protected InitializeQueue ( ) : void
Résultat void

ModifyAttributes() public méthode

Modifies the attributes for monitored item.
public ModifyAttributes ( DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, uint clientHandle, MonitoringFilter originalFilter, MonitoringFilter filterToUse, Range range, double samplingInterval, uint queueSize, bool discardOldest ) : ServiceResult
diagnosticsMasks DiagnosticsMasks
timestampsToReturn TimestampsToReturn
clientHandle uint
originalFilter MonitoringFilter
filterToUse MonitoringFilter
range Range
samplingInterval double
queueSize uint
discardOldest bool
Résultat ServiceResult

MonitoredItem() public méthode

Initializes the object with its node type.
public MonitoredItem ( IServerInternal server, INodeManager nodeManager, object mangerHandle, uint subscriptionId, uint id, Session session, ReadValueId itemToMonitor, DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, MonitoringMode monitoringMode, uint clientHandle, MonitoringFilter originalFilter, MonitoringFilter filterToUse, Range range, double samplingInterval, uint queueSize, bool discardOldest, double sourceSamplingInterval ) : System
server IServerInternal
nodeManager INodeManager
mangerHandle object
subscriptionId uint
id uint
session Session
itemToMonitor ReadValueId
diagnosticsMasks DiagnosticsMasks
timestampsToReturn TimestampsToReturn
monitoringMode MonitoringMode
clientHandle uint
originalFilter MonitoringFilter
filterToUse MonitoringFilter
range Range
samplingInterval double
queueSize uint
discardOldest bool
sourceSamplingInterval double
Résultat System

Publish() public méthode

Publishes all available event notifications.
public Publish ( OperationContext context, Queue notifications ) : bool
context OperationContext
notifications Queue
Résultat bool

Publish() public méthode

Publishes all available data change notifications.
public Publish ( OperationContext context, Queue notifications, Queue diagnostics ) : bool
context OperationContext
notifications Queue
diagnostics Queue
Résultat bool

Publish() protected méthode

Publishes a single data change notifications.
protected Publish ( OperationContext context, Queue notifications, Queue diagnostics, DataValue value, ServiceResult error ) : bool
context OperationContext
notifications Queue
diagnostics Queue
value DataValue
error ServiceResult
Résultat bool

QueueEvent() public méthode

Adds an event to the queue.
public QueueEvent ( EventFieldList fields ) : void
fields EventFieldList
Résultat void

QueueEvent() public méthode

Adds an event to the queue.
public QueueEvent ( IFilterTarget instance ) : void
instance IFilterTarget
Résultat void

QueueEvent() public méthode

Adds an event to the queue.
public QueueEvent ( IFilterTarget instance, bool bypassFilter ) : void
instance IFilterTarget
bypassFilter bool
Résultat void

QueueValue() public méthode

Adds an event to the queue.
public QueueValue ( DataValue value, ServiceResult error ) : void
value DataValue
error ServiceResult
Résultat void

QueueValue() public méthode

Updates the queue with a data value or an error.
public QueueValue ( DataValue value, ServiceResult error, bool bypassFilter ) : void
value DataValue
error ServiceResult
bypassFilter bool
Résultat void

SamplingIntervalExpired() public méthode

Used to check whether the item is ready to sample.
public SamplingIntervalExpired ( ) : bool
Résultat bool

SetMonitoringMode() public méthode

Changes the monitoring mode for the item.
public SetMonitoringMode ( MonitoringMode monitoringMode ) : MonitoringMode
monitoringMode MonitoringMode
Résultat MonitoringMode

SetSamplingError() public méthode

Sets an error that occured in the sampling group.
The sampling group or node manager that owns the item may call this to indicate that a fatal error occurred which means the item will no longer receive any data updates. This error state can be cleared by calling this method and passing in ServiceResult.Good.
public SetSamplingError ( ServiceResult error ) : void
error ServiceResult
Résultat void

SetSamplingInterval() public méthode

Updates the sampling interval for an item.
public SetSamplingInterval ( double samplingInterval ) : void
samplingInterval double
Résultat void

SetSemanticsChanged() public méthode

Sets a flag indicating that the semantics for the monitored node have changed.
The StatusCode for next value reported by the monitored item will have the SemanticsChanged bit set.
public SetSemanticsChanged ( ) : void
Résultat void

SetStructureChanged() public méthode

Sets a flag indicating that the structure of the monitored node has changed.
The StatusCode for next value reported by the monitored item will have the StructureChanged bit set.
public SetStructureChanged ( ) : void
Résultat void

SetTriggered() public méthode

Sets a flag indicating that the item has been triggered and should publish.
public SetTriggered ( ) : bool
Résultat bool

ValueChanged() public static méthode

Applies the filter to value to determine if the new value should be kept.
public static ValueChanged ( DataValue value, ServiceResult error, DataValue lastValue, ServiceResult lastError, DataChangeFilter filter, double range ) : bool
value DataValue
error ServiceResult
lastValue DataValue
lastError ServiceResult
filter DataChangeFilter
range double
Résultat bool