C# Класс Opc.Ua.Server.MonitoredItem

A handle that describes how to access a node/attribute via an i/o manager.
Наследование: IEventMonitoredItem, ISampledDataChangeMonitoredItem, ITriggeredMonitoredItem
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddValueToQueue void
ExceedsDeadband bool
GetEventFields EventFieldList
IncrementSampleTime void
Initialize void
SetOverflowBit ServiceResult

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

ApplyFilter() защищенный Метод

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
Результат bool

Equals() защищенный статический Метод

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
Результат bool

ExceedsDeadband() защищенный статический Метод

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
Результат bool

GetCreateResult() публичный Метод

Returns the result after creating the monitor item.
public GetCreateResult ( MonitoredItemCreateResult &result ) : ServiceResult
result MonitoredItemCreateResult
Результат ServiceResult

GetModifyResult() публичный Метод

Returns the result after modifying the monitor item.
public GetModifyResult ( MonitoredItemModifyResult &result ) : ServiceResult
result MonitoredItemModifyResult
Результат ServiceResult

GetReadValueId() публичный Метод

Returns a description of the item being monitored.
public GetReadValueId ( ) : ReadValueId
Результат ReadValueId

IEventMonitoredItem() публичный Метод

Changes the monitoring mode for the item.
public IEventMonitoredItem ( MonitoringMode monitoringMode ) : void
monitoringMode MonitoringMode
Результат void

ISampledDataChangeMonitoredItem() публичный Метод

Changes the monitoring mode for the item.
public ISampledDataChangeMonitoredItem ( MonitoringMode monitoringMode ) : void
monitoringMode MonitoringMode
Результат void

InitializeQueue() защищенный Метод

Clears and re-initializes the queue if the monitoring parameters changed.
protected InitializeQueue ( ) : void
Результат void

ModifyAttributes() публичный Метод

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
Результат ServiceResult

MonitoredItem() публичный Метод

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
Результат System

Publish() публичный Метод

Publishes all available event notifications.
public Publish ( OperationContext context, Queue notifications ) : bool
context OperationContext
notifications Queue
Результат bool

Publish() публичный Метод

Publishes all available data change notifications.
public Publish ( OperationContext context, Queue notifications, Queue diagnostics ) : bool
context OperationContext
notifications Queue
diagnostics Queue
Результат bool

Publish() защищенный Метод

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
Результат bool

QueueEvent() публичный Метод

Adds an event to the queue.
public QueueEvent ( EventFieldList fields ) : void
fields EventFieldList
Результат void

QueueEvent() публичный Метод

Adds an event to the queue.
public QueueEvent ( IFilterTarget instance ) : void
instance IFilterTarget
Результат void

QueueEvent() публичный Метод

Adds an event to the queue.
public QueueEvent ( IFilterTarget instance, bool bypassFilter ) : void
instance IFilterTarget
bypassFilter bool
Результат void

QueueValue() публичный Метод

Adds an event to the queue.
public QueueValue ( DataValue value, ServiceResult error ) : void
value DataValue
error ServiceResult
Результат void

QueueValue() публичный Метод

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
Результат void

SamplingIntervalExpired() публичный Метод

Used to check whether the item is ready to sample.
public SamplingIntervalExpired ( ) : bool
Результат bool

SetMonitoringMode() публичный Метод

Changes the monitoring mode for the item.
public SetMonitoringMode ( MonitoringMode monitoringMode ) : MonitoringMode
monitoringMode MonitoringMode
Результат MonitoringMode

SetSamplingError() публичный Метод

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
Результат void

SetSamplingInterval() публичный Метод

Updates the sampling interval for an item.
public SetSamplingInterval ( double samplingInterval ) : void
samplingInterval double
Результат void

SetSemanticsChanged() публичный Метод

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
Результат void

SetStructureChanged() публичный Метод

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
Результат void

SetTriggered() публичный Метод

Sets a flag indicating that the item has been triggered and should publish.
public SetTriggered ( ) : bool
Результат bool

ValueChanged() публичный статический Метод

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
Результат bool