C# Class Opc.Ua.Sample.MonitoredItemQueue

Provides a queue for data changes.
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
MonitoredItemQueue ( ) : System

Creates an empty queue.

Publish ( DataValue &value, ServiceResult &error ) : bool

Publishes the oldest value in the queue.

QueueValue ( DataValue value, ServiceResult error ) : void

Adds the value to the queue.

SetQueueSize ( uint queueSize, bool discardOldest, DiagnosticsMasks diagnosticsMasks ) : void

Sets the queue size.

SetSamplingInterval ( double samplingInterval ) : void

Sets the sampling interval used when queuing values.

Private Methods

Method Description
Dequeue ( DataValue &value, ServiceResult &error ) : bool

Removes a value and an error from the queue.

Enqueue ( DataValue value, ServiceResult error ) : void

Adds the value to the queue. Discards values if the queue is full.

SetOverflowBit ( DataValue &value, ServiceResult &error ) : void

Sets the overflow bit in the value and error.

Method Details

MonitoredItemQueue() public method

Creates an empty queue.
public MonitoredItemQueue ( ) : System
return System

Publish() public method

Publishes the oldest value in the queue.
public Publish ( DataValue &value, ServiceResult &error ) : bool
value DataValue The value.
error ServiceResult The error associated with the value.
return bool

QueueValue() public method

Adds the value to the queue.
public QueueValue ( DataValue value, ServiceResult error ) : void
value DataValue The value to queue.
error ServiceResult The error to queue.
return void

SetQueueSize() public method

Sets the queue size.
public SetQueueSize ( uint queueSize, bool discardOldest, DiagnosticsMasks diagnosticsMasks ) : void
queueSize uint The new queue size.
discardOldest bool Whether to discard the oldest values if the queue overflows.
diagnosticsMasks DiagnosticsMasks Specifies which diagnostics which should be kept in the queue.
return void

SetSamplingInterval() public method

Sets the sampling interval used when queuing values.
public SetSamplingInterval ( double samplingInterval ) : void
samplingInterval double The new sampling interval.
return void