Skip to content

Reference

OpcNodeHistorian Members

Provides and maintains the history of the values of an OpcVariableNode in memory.

Reference

OpcNodeHistorian Members ​

Type
OpcNodeHistorian
Namespace
Opc.UaFx.Server
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Constructors ​

OpcNodeHistorian ​

3 overloads

OverloadDescription
OpcNodeHistorian(OpcNodeManager, OpcVariableNode)Initializes a new instance of the OpcNodeHistorian class using the owner and node specified.
OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int)Initializes a new instance of the OpcNodeHistorian class using the owner, node and capacity specified.
OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int, int)Initializes a new instance of the OpcNodeHistorian class using the owner, node, capacity and modifiedCapacity specified.

Exceptions (all overloads)

ExceptionCondition
ArgumentNullExceptionThe owner or node is a null reference (Nothing in Visual Basic).

OpcNodeHistorian(OpcNodeManager, OpcVariableNode) ​

Initializes a new instance of the OpcNodeHistorian class using the owner and node specified. The number of values kept in History and ModifiedHistory is not limited.

csharp
public OpcNodeHistorian(OpcNodeManager owner, OpcVariableNode node)
vbnet
Public Sub New(owner As OpcNodeManager, node As OpcVariableNode)

Parameters

NameTypeDescription
ownerOpcNodeManagerThe OpcNodeManager which provides the node.
nodeOpcVariableNodeThe OpcVariableNode whose history is maintained.

Remarks

The constructor adds HistoryReadOrWrite to the AccessLevel and UserAccessLevel of the node and sets its IsHistorizing to true.

OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int) ​

Initializes a new instance of the OpcNodeHistorian class using the owner, node and capacity specified. The number of values kept in ModifiedHistory is not limited.

csharp
public OpcNodeHistorian(
    OpcNodeManager owner,
    OpcVariableNode node,
    int capacity)
vbnet
Public Sub New(
    owner As OpcNodeManager,
    node As OpcVariableNode,
    capacity As Integer)

Parameters

NameTypeDescription
ownerOpcNodeManagerThe OpcNodeManager which provides the node.
nodeOpcVariableNodeThe OpcVariableNode whose history is maintained.
capacityInt32The maximum number of values kept in History: -1 (unlimited) or a positive number.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe capacity is 0 or less than -1.

Remarks

The constructor adds HistoryReadOrWrite to the AccessLevel and UserAccessLevel of the node and sets its IsHistorizing to true.

OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int, int) ​

Initializes a new instance of the OpcNodeHistorian class using the owner, node, capacity and modifiedCapacity specified.

csharp
public OpcNodeHistorian(
    OpcNodeManager owner,
    OpcVariableNode node,
    int capacity,
    int modifiedCapacity)
vbnet
Public Sub New(
    owner As OpcNodeManager,
    node As OpcVariableNode,
    capacity As Integer,
    modifiedCapacity As Integer)

Parameters

NameTypeDescription
ownerOpcNodeManagerThe OpcNodeManager which provides the node.
nodeOpcVariableNodeThe OpcVariableNode whose history is maintained.
capacityInt32The maximum number of values kept in History: -1 (unlimited) or a positive number.
modifiedCapacityInt32The maximum number of values kept in ModifiedHistory: -1 (unlimited) or a positive number.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe capacity or modifiedCapacity is 0 or less than -1.

Remarks

The constructor adds HistoryReadOrWrite to the AccessLevel and UserAccessLevel of the node and sets its IsHistorizing to true.

Properties ​

AutoUpdateHistory ​

Gets or sets a value indicating whether the historian adds the value of the Node to the History whenever the value of the node changes.

csharp
public bool AutoUpdateHistory { get; set; }
vbnet
Public Property AutoUpdateHistory As Boolean

Property value

Boolean

The value true to add the value of the node to the history on each change; otherwise the value false. The default value is false.

Remarks

The value is added when the changes of the node are applied (see BeforeApplyChanges) and the node has a Timestamp; a value at the same timestamp is replaced. The ModifiedHistory is not changed.

History ​

Gets the history of the values of the Node.

csharp
public OpcNodeHistory<OpcHistoryValue> History { get; }
vbnet
Public ReadOnly Property History As OpcNodeHistory(Of OpcHistoryValue)

Property value

OpcNodeHistory<OpcHistoryValue>

The OpcNodeHistory<T> with the values of the node.

ModifiedHistory ​

Gets the history of the modifications of the History through the history services.

csharp
public OpcModifiedNodeHistory ModifiedHistory { get; }
vbnet
Public ReadOnly Property ModifiedHistory As OpcModifiedNodeHistory

Property value

OpcModifiedNodeHistory

The OpcModifiedNodeHistory with one OpcModifiedHistoryValue per value created, replaced or deleted. For a replaced value it holds the value before the replacement. Its timestamp is the time of the modification.

Node ​

Gets the node whose history the historian maintains.

csharp
public OpcVariableNode Node { get; }
vbnet
Public ReadOnly Property Node As OpcVariableNode

Property value

OpcVariableNode

The OpcVariableNode whose history is maintained.

Implements

Node

Owner ​

Gets the node manager which provides the Node.

csharp
public OpcNodeManager Owner { get; }
vbnet
Public ReadOnly Property Owner As OpcNodeManager

Property value

OpcNodeManager

The OpcNodeManager which provides the node.

SyncRoot ​

Gets the object used to synchronize the access to the historian.

csharp
public object SyncRoot { get; }
vbnet
Public ReadOnly Property SyncRoot As Object

Property value

Object

The object which the historian locks while it reads or changes the history on behalf of the history services.

Methods ​

CreateHistory ​

csharp
public OpcStatusCollection CreateHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Public Function CreateHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
contextOpcContext
modificationInfoOpcHistoryModificationInfo
valuesOpcValueCollection

Returns

OpcStatusCollection

Exceptions

ExceptionCondition
ArgumentNullException

Implements

CreateHistory

DeleteHistory ​

3 overloads

OverloadDescription
DeleteHistory(OpcContext, OpcHistoryModificationInfo, IEnumerable<DateTime>)
DeleteHistory(OpcContext, OpcHistoryModificationInfo, OpcValueCollection)
DeleteHistory(OpcContext, OpcHistoryModificationInfo, DateTime?, DateTime?, OpcDeleteHistoryOptions)

Exceptions (all overloads)

ExceptionCondition
ArgumentNullException

DeleteHistory(OpcContext, OpcHistoryModificationInfo, IEnumerable<DateTime>) ​

csharp
public OpcStatusCollection DeleteHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    IEnumerable<DateTime> times)
vbnet
Public Function DeleteHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    times As IEnumerable(Of Date)) As OpcStatusCollection

Parameters

NameTypeDescription
contextOpcContext
modificationInfoOpcHistoryModificationInfo
timesIEnumerable<DateTime>

Returns

OpcStatusCollection

Implements

DeleteHistory

DeleteHistory(OpcContext, OpcHistoryModificationInfo, OpcValueCollection) ​

csharp
public OpcStatusCollection DeleteHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Public Function DeleteHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
contextOpcContext
modificationInfoOpcHistoryModificationInfo
valuesOpcValueCollection

Returns

OpcStatusCollection

Implements

DeleteHistory

DeleteHistory(OpcContext, OpcHistoryModificationInfo, DateTime?, DateTime?, OpcDeleteHistoryOptions) ​

csharp
public OpcStatusCollection DeleteHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    DateTime? startTime,
    DateTime? endTime,
    OpcDeleteHistoryOptions options)
vbnet
Public Function DeleteHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    startTime As Date?,
    endTime As Date?,
    options As OpcDeleteHistoryOptions) As OpcStatusCollection

Parameters

NameTypeDescription
contextOpcContext
modificationInfoOpcHistoryModificationInfo
startTimeNullable<DateTime>
endTimeNullable<DateTime>
optionsOpcDeleteHistoryOptions

Returns

OpcStatusCollection

Implements

DeleteHistory

ReadHistory ​

since v2.51

csharp
public IEnumerable<OpcHistoryValue> ReadHistory(
    OpcContext context,
    DateTime? startTime,
    DateTime? endTime,
    bool timeFlowsBackward,
    uint? maxCount,
    OpcReadHistoryOptions options)
vbnet
Public Function ReadHistory(
    context As OpcContext,
    startTime As Date?,
    endTime As Date?,
    timeFlowsBackward As Boolean,
    maxCount As UInteger?,
    options As OpcReadHistoryOptions) As IEnumerable(Of OpcHistoryValue)

Parameters

NameTypeDescription
contextOpcContext
startTimeNullable<DateTime>
endTimeNullable<DateTime>
timeFlowsBackwardBoolean
maxCountNullable<UInt32>
optionsOpcReadHistoryOptions

Returns

IEnumerable<OpcHistoryValue>

Implements

ReadHistory

ReplaceHistory ​

csharp
public OpcStatusCollection ReplaceHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Public Function ReplaceHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
contextOpcContext
modificationInfoOpcHistoryModificationInfo
valuesOpcValueCollection

Returns

OpcStatusCollection

Exceptions

ExceptionCondition
ArgumentNullException

Implements

ReplaceHistory

UpdateHistory ​

csharp
public OpcStatusCollection UpdateHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
vbnet
Public Function UpdateHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection

Parameters

NameTypeDescription
contextOpcContext
modificationInfoOpcHistoryModificationInfo
valuesOpcValueCollection

Returns

OpcStatusCollection

Exceptions

ExceptionCondition
ArgumentNullException

Implements

UpdateHistory