Reference
OpcHistoryValue Members
Represents a value of the history of a node.
Reference
OpcHistoryValue Members
- Type
- OpcHistoryValue
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Inherits members from OpcValue.
Constructors
OpcHistoryValue
| Overload | Description |
|---|---|
| OpcHistoryValue( | Initializes a new instance of the OpcHistoryValue class using the value and timestamp specified. |
| OpcHistoryValue( | Initializes a new instance of the OpcHistoryValue class using the value, timestamp and status specified. |
| OpcHistoryValue( | Initializes a new instance of the OpcHistoryValue class using the value, timestamp and statusCode specified. |
OpcHistoryValue(object, DateTime)
Initializes a new instance of the OpcHistoryValue class using the value and timestamp specified.
public OpcHistoryValue(object value, DateTime timestamp)Public Sub New(value As Object, timestamp As Date)Parameters
| Name | Type | Description |
|---|---|---|
value | Object | The value. |
timestamp | DateTime | The time of the value, which is used as the source and the server timestamp. |
OpcHistoryValue(object, DateTime, OpcStatus)
Initializes a new instance of the OpcHistoryValue class using the value, timestamp and status specified.
public OpcHistoryValue(object value, DateTime timestamp, OpcStatus status)Public Sub New(value As Object, timestamp As Date, status As OpcStatus)Parameters
| Name | Type | Description |
|---|---|---|
value | Object | The value. |
timestamp | DateTime | The time of the value, which is used as the source and the server timestamp. |
status | OpcStatus | The status of the value. |
OpcHistoryValue(object, DateTime, OpcStatusCode)
Initializes a new instance of the OpcHistoryValue class using the value, timestamp and statusCode specified.
[CLSCompliant(false)]
public OpcHistoryValue(
object value,
DateTime timestamp,
OpcStatusCode statusCode)<CLSCompliant(False)>
Public Sub New(value As Object, timestamp As Date, statusCode As OpcStatusCode)Parameters
| Name | Type | Description |
|---|---|---|
value | Object | The value. |
timestamp | DateTime | The time of the value, which is used as the source timestamp. |
statusCode | OpcStatusCode | The status code of the value. |
Remarks
Unlike the other constructors, this constructor sets the source timestamp only; the server timestamp remains unset.
Properties
Timestamp
Gets the time of the value, by which the history is ordered.
public virtual DateTime Timestamp { get; }Public Overridable ReadOnly Property Timestamp As DateProperty value
The ServerTimestamp or, if it is not set, the SourceTimestamp; MinValue if neither is set.
Methods
CompareTo
Compares the current OpcHistoryValue with another OpcHistoryValue.
public int CompareTo(OpcHistoryValue other)Public Function CompareTo(other As OpcHistoryValue) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | OpcHistoryValue | The OpcHistoryValue to compare with this OpcHistoryValue. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).
Create
| Overload | Description |
|---|---|
| Create( | Creates an OpcHistoryValue from the value specified. |
| Create< | Creates an OpcHistoryValue from the value of a variable node. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | The value is a null reference ( |
Create(OpcValue)
Creates an OpcHistoryValue from the value specified.
public static OpcHistoryValue Create(OpcValue value)Public Shared Function Create(value As OpcValue) As OpcHistoryValueParameters
| Name | Type | Description |
|---|---|---|
value | OpcValue | The value providing the data of the history value. |
Returns
An OpcHistoryValue holding the data of the value.
Remarks
The history value uses a copy of the data of the value, so that a change of one value does not change the other.
Create<T>(OpcVariableValue<T>)
Creates an OpcHistoryValue from the value of a variable node.
public static OpcHistoryValue Create<T>(OpcVariableValue<T> value)Public Shared Function Create(Of T)(
value As OpcVariableValue(Of T)) As OpcHistoryValueType parameters
| Name | Description |
|---|---|
T | The type of the value. |
Parameters
| Name | Type | Description |
|---|---|---|
value | OpcVariableValue< | The value of the variable node. |
Returns
An OpcHistoryValue using the value, the status and the timestamp of the value, or the current time (UTC) if it has no timestamp.
CreateModified
| Overload | Description |
|---|---|
| CreateModified( | Creates an OpcmodificationType specified at the current time ( |
| CreateModified( | Creates an OpcmodificationType by the userName specified at the current time ( |
| CreateModified( | Creates an OpcmodificationType by the userName at the timestamp specified. |
| CreateModified( | Creates an Opcvalue and a modification of the modificationType by the userName at the timestamp specified. |
| CreateModified( | Creates an OpcmodificationInfo specified. |
| CreateModified( | Creates an OpcmodificationInfo and the value specified. |
CreateModified(OpcHistoryModificationType)
Creates an OpcModifiedHistoryValue from this value using a modification of the modificationType specified at the current time (UTC).
public OpcModifiedHistoryValue CreateModified(
OpcHistoryModificationType modificationType)Public Function CreateModified(
modificationType As OpcHistoryModificationType) As OpcModifiedHistoryValueParameters
| Name | Type | Description |
|---|---|---|
modificationType | Opc | The kind of the modification. |
Returns
An OpcModifiedHistoryValue holding the data of this value.
Remarks
The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.
CreateModified(OpcHistoryModificationType, string)
Creates an OpcModifiedHistoryValue from this value using a modification of the modificationType by the userName specified at the current time (UTC).
public OpcModifiedHistoryValue CreateModified(
OpcHistoryModificationType modificationType,
string userName)Public Function CreateModified(
modificationType As OpcHistoryModificationType,
userName As String) As OpcModifiedHistoryValueParameters
| Name | Type | Description |
|---|---|---|
modificationType | Opc | The kind of the modification. |
userName | String | The name of the user who made the modification. |
Returns
An OpcModifiedHistoryValue holding the data of this value.
Remarks
The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.
CreateModified(OpcHistoryModificationType, string, DateTime)
Creates an OpcModifiedHistoryValue from this value using a modification of the modificationType by the userName at the timestamp specified.
public OpcModifiedHistoryValue CreateModified(
OpcHistoryModificationType modificationType,
string userName,
DateTime timestamp)Public Function CreateModified(
modificationType As OpcHistoryModificationType,
userName As String,
timestamp As Date) As OpcModifiedHistoryValueParameters
| Name | Type | Description |
|---|---|---|
modificationType | Opc | The kind of the modification. |
userName | String | The name of the user who made the modification. |
timestamp | DateTime | The time of the modification. |
Returns
An OpcModifiedHistoryValue holding the data of this value.
Remarks
The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.
CreateModified(OpcHistoryModificationType, string, DateTime, object)
Creates an OpcModifiedHistoryValue from this value using the value and a modification of the modificationType by the userName at the timestamp specified.
public OpcModifiedHistoryValue CreateModified(
OpcHistoryModificationType modificationType,
string userName,
DateTime timestamp,
object value)Public Function CreateModified(
modificationType As OpcHistoryModificationType,
userName As String,
timestamp As Date,
value As Object) As OpcModifiedHistoryValueParameters
| Name | Type | Description |
|---|---|---|
modificationType | Opc | The kind of the modification. |
userName | String | The name of the user who made the modification. |
timestamp | DateTime | The time of the modification. |
value | Object | The value of the modified value. |
Returns
An OpcModifiedHistoryValue holding a copy of the data of this value with the value specified.
Remarks
The status and the timestamps of the modified value are those of this value. This value remains unchanged.
CreateModified(OpcHistoryModificationInfo)
Creates an OpcModifiedHistoryValue from this value using the modificationInfo specified.
public OpcModifiedHistoryValue CreateModified(
OpcHistoryModificationInfo modificationInfo)Public Function CreateModified(
modificationInfo As OpcHistoryModificationInfo) As OpcModifiedHistoryValueParameters
| Name | Type | Description |
|---|---|---|
modificationInfo | Opc | The information about the modification. |
Returns
An OpcModifiedHistoryValue holding the data of this value.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The modificationInfo is a null reference ( |
Remarks
The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.
CreateModified(OpcHistoryModificationInfo, object)
Creates an OpcModifiedHistoryValue from this value using the modificationInfo and the value specified.
public OpcModifiedHistoryValue CreateModified(
OpcHistoryModificationInfo modificationInfo,
object value)Public Function CreateModified(
modificationInfo As OpcHistoryModificationInfo,
value As Object) As OpcModifiedHistoryValueParameters
| Name | Type | Description |
|---|---|---|
modificationInfo | Opc | The information about the modification. |
value | Object | The value of the modified value. |
Returns
An OpcModifiedHistoryValue holding a copy of the data of this value with the value specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The modificationInfo is a null reference ( |
Remarks
The status and the timestamps of the modified value are those of this value. This value remains unchanged.
Equals
| Overload | Description |
|---|---|
| Equals( | Determines whether the specified other is equal to this OpcHistoryValue. |
| Equals( | Determines whether the specified other is equal to this OpcHistoryValue. |
Equals(object)
Determines whether the specified other is equal to this OpcHistoryValue.
public override bool Equals(object other)Public Overrides Function Equals(other As Object) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcHistoryValue to compare to the current OpcHistoryValue. |
Returns
The value true if the specified OpcHistoryValue is equal to the current OpcHistoryValue; otherwise the value false.
Overrides
Equals(OpcHistoryValue)
Determines whether the specified other is equal to this OpcHistoryValue.
public bool Equals(OpcHistoryValue other)Public Function Equals(other As OpcHistoryValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | OpcHistoryValue | The OpcHistoryValue to compare to the current OpcHistoryValue. |
Returns
The value true if the specified OpcHistoryValue is equal to the current OpcHistoryValue; otherwise the value false.
GetHashCode
Retrieves a hash code for this OpcHistoryValue.
public override int GetHashCode()Public Overrides Function GetHashCode() As IntegerReturns
An int that contains the hash code for the OpcHistoryValue.
Overrides
ToString
| Overload | Description |
|---|---|
| ToString() | Returns a string that represents the history value. |
| ToString( | Returns a string that represents the history value using the format and formatProvider specified. |
ToString()
Returns a string that represents the history value.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string containing the Timestamp and the string representation of the value.
Overrides
ToString(string, IFormatProvider)
Returns a string that represents the history value using the format and formatProvider specified.
public override string ToString(string format, IFormatProvider formatProvider)Public Overrides Function ToString(
format As String,
formatProvider As IFormatProvider) As StringParameters
| Name | Type | Description |
|---|---|---|
format | String | The format to use for the value. |
formatProvider | IFormatProvider | The provider to use to format the value. |
Returns
A string containing the Timestamp and the formatted value.
Overrides
Operators
Equality
Returns a value indicating whether two instance of OpcHistoryValue are equal.
public static bool operator ==(OpcHistoryValue left, OpcHistoryValue right)Public Shared Operator =(
left As OpcHistoryValue,
right As OpcHistoryValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcHistoryValue | The first OpcHistoryValue to compare. |
right | OpcHistoryValue | The second OpcHistoryValue to compare. |
Returns
The value true if left and right are equal; otherwise the value false.
GreaterThan
Determines whether the first specified OpcHistoryValue object is greater than the second specified OpcHistoryValue object.
public static bool operator >(OpcHistoryValue left, OpcHistoryValue right)Public Shared Operator >(
left As OpcHistoryValue,
right As OpcHistoryValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcHistoryValue | The first OpcHistoryValue object. |
right | OpcHistoryValue | The second OpcHistoryValue object. |
Returns
The value true if left is greater than right; otherwise, false.
GreaterThanOrEqual
Determines whether the first specified OpcHistoryValue object is greater than or equal to the second specified OpcHistoryValue object.
public static bool operator >=(OpcHistoryValue left, OpcHistoryValue right)Public Shared Operator >=(
left As OpcHistoryValue,
right As OpcHistoryValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcHistoryValue | The first OpcHistoryValue object. |
right | OpcHistoryValue | The second OpcHistoryValue object. |
Returns
The value true if left is greater than or equal to right; otherwise, false.
Inequality
Returns a value indicating whether two instances of OpcHistoryValue are not equal.
public static bool operator !=(OpcHistoryValue left, OpcHistoryValue right)Public Shared Operator <>(
left As OpcHistoryValue,
right As OpcHistoryValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcHistoryValue | The first OpcHistoryValue to compare. |
right | OpcHistoryValue | The second OpcHistoryValue to compare. |
Returns
The value true if left and right are not equal; otherwise the value false.
LessThan
Determines whether the first specified OpcHistoryValue object is less than the second specified OpcHistoryValue object.
public static bool operator <(OpcHistoryValue left, OpcHistoryValue right)Public Shared Operator <(
left As OpcHistoryValue,
right As OpcHistoryValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcHistoryValue | The first OpcHistoryValue object. |
right | OpcHistoryValue | The second OpcHistoryValue object. |
Returns
The value true if left is less than right; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The left is a null reference ( |
LessThanOrEqual
Determines whether the first specified OpcHistoryValue object is less than or equal to the second OpcHistoryValue object.
public static bool operator <=(OpcHistoryValue left, OpcHistoryValue right)Public Shared Operator <=(
left As OpcHistoryValue,
right As OpcHistoryValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcHistoryValue | The first OpcHistoryValue object. |
right | OpcHistoryValue | The second OpcHistoryValue object. |
Returns
The value true if left is less than or equal to right; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The left is a null reference ( |

