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
| Overload | Description |
|---|---|
| OpcNodeHistorian( | Initializes a new instance of the OpcNodeHistorian class using the owner and node specified. |
| OpcNodeHistorian( | Initializes a new instance of the OpcNodeHistorian class using the owner, node and capacity specified. |
| OpcNodeHistorian( | Initializes a new instance of the OpcNodeHistorian class using the owner, node, capacity and modifiedCapacity specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | The owner or node is a null reference ( |
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.
public OpcNodeHistorian(OpcNodeManager owner, OpcVariableNode node)Public Sub New(owner As OpcNodeManager, node As OpcVariableNode)Parameters
| Name | Type | Description |
|---|---|---|
owner | OpcNodeManager | The OpcNodeManager which provides the node. |
node | OpcVariableNode | The 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.
public OpcNodeHistorian(
OpcNodeManager owner,
OpcVariableNode node,
int capacity)Public Sub New(
owner As OpcNodeManager,
node As OpcVariableNode,
capacity As Integer)Parameters
| Name | Type | Description |
|---|---|---|
owner | OpcNodeManager | The OpcNodeManager which provides the node. |
node | OpcVariableNode | The OpcVariableNode whose history is maintained. |
capacity | Int32 | The maximum number of values kept in History: -1 ( |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The 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.
public OpcNodeHistorian(
OpcNodeManager owner,
OpcVariableNode node,
int capacity,
int modifiedCapacity)Public Sub New(
owner As OpcNodeManager,
node As OpcVariableNode,
capacity As Integer,
modifiedCapacity As Integer)Parameters
| Name | Type | Description |
|---|---|---|
owner | OpcNodeManager | The OpcNodeManager which provides the node. |
node | OpcVariableNode | The OpcVariableNode whose history is maintained. |
capacity | Int32 | The maximum number of values kept in History: -1 ( |
modifiedCapacity | Int32 | The maximum number of values kept in ModifiedHistory: -1 ( |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The 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.
public bool AutoUpdateHistory { get; set; }Public Property AutoUpdateHistory As BooleanProperty value
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.
public OpcNodeHistory<OpcHistoryValue> History { get; }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.
public OpcModifiedNodeHistory ModifiedHistory { get; }Public ReadOnly Property ModifiedHistory As OpcModifiedNodeHistoryProperty value
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.
public OpcVariableNode Node { get; }Public ReadOnly Property Node As OpcVariableNodeProperty value
The OpcVariableNode whose history is maintained.
Implements
Owner
Gets the node manager which provides the Node.
public OpcNodeManager Owner { get; }Public ReadOnly Property Owner As OpcNodeManagerProperty value
The OpcNodeManager which provides the node.
SyncRoot
Gets the object used to synchronize the access to the historian.
public object SyncRoot { get; }Public ReadOnly Property SyncRoot As ObjectProperty value
The object which the historian locks while it reads or changes the history on behalf of the history services.
Methods
CreateHistory
public OpcStatusCollection CreateHistory(
OpcContext context,
OpcHistoryModificationInfo modificationInfo,
OpcValueCollection values)Public Function CreateHistory(
context As OpcContext,
modificationInfo As OpcHistoryModificationInfo,
values As OpcValueCollection) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
modificationInfo | Opc | |
values | Opc |
Returns
Exceptions
| Exception | Condition |
|---|---|
| Argument |
Implements
DeleteHistory
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument |
DeleteHistory(OpcContext, OpcHistoryModificationInfo, IEnumerable<DateTime>)
public OpcStatusCollection DeleteHistory(
OpcContext context,
OpcHistoryModificationInfo modificationInfo,
IEnumerable<DateTime> times)Public Function DeleteHistory(
context As OpcContext,
modificationInfo As OpcHistoryModificationInfo,
times As IEnumerable(Of Date)) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
modificationInfo | Opc | |
times | IEnumerable<DateTime> |
Returns
Implements
DeleteHistory(OpcContext, OpcHistoryModificationInfo, OpcValueCollection)
public OpcStatusCollection DeleteHistory(
OpcContext context,
OpcHistoryModificationInfo modificationInfo,
OpcValueCollection values)Public Function DeleteHistory(
context As OpcContext,
modificationInfo As OpcHistoryModificationInfo,
values As OpcValueCollection) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
modificationInfo | Opc | |
values | Opc |
Returns
Implements
DeleteHistory(OpcContext, OpcHistoryModificationInfo, DateTime?, DateTime?, OpcDeleteHistoryOptions)
public OpcStatusCollection DeleteHistory(
OpcContext context,
OpcHistoryModificationInfo modificationInfo,
DateTime? startTime,
DateTime? endTime,
OpcDeleteHistoryOptions options)Public Function DeleteHistory(
context As OpcContext,
modificationInfo As OpcHistoryModificationInfo,
startTime As Date?,
endTime As Date?,
options As OpcDeleteHistoryOptions) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
modificationInfo | Opc | |
startTime | Nullable<DateTime> | |
endTime | Nullable<DateTime> | |
options | Opc |
Returns
Implements
ReadHistory
public IEnumerable<OpcHistoryValue> ReadHistory(
OpcContext context,
DateTime? startTime,
DateTime? endTime,
bool timeFlowsBackward,
uint? maxCount,
OpcReadHistoryOptions options)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
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
startTime | Nullable<DateTime> | |
endTime | Nullable<DateTime> | |
time | Boolean | |
maxCount | Nullable<UInt32> | |
options | Opc |
Returns
Implements
ReplaceHistory
public OpcStatusCollection ReplaceHistory(
OpcContext context,
OpcHistoryModificationInfo modificationInfo,
OpcValueCollection values)Public Function ReplaceHistory(
context As OpcContext,
modificationInfo As OpcHistoryModificationInfo,
values As OpcValueCollection) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
modificationInfo | Opc | |
values | Opc |
Returns
Exceptions
| Exception | Condition |
|---|---|
| Argument |
Implements
UpdateHistory
public OpcStatusCollection UpdateHistory(
OpcContext context,
OpcHistoryModificationInfo modificationInfo,
OpcValueCollection values)Public Function UpdateHistory(
context As OpcContext,
modificationInfo As OpcHistoryModificationInfo,
values As OpcValueCollection) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | |
modificationInfo | Opc | |
values | Opc |
Returns
Exceptions
| Exception | Condition |
|---|---|
| Argument |
Implements

