b3907efa6e
Re-review at 7286d320. -014 (Medium): ReadAtTimeAsync didn't classify StartQuery failures,
so a connection-class failure left a dead connection, re-failed every timestamp, and returned
Success=true with all-Bad (no failover); now resets+fails over via a shared classifier + tests.
-015: refresh stale named-pipe comments to TCP (no wire change). -013 (silent cap truncation,
ties OpcUaServer-002/Core.Abstractions-009) deferred cross-module. NOTE: the SDK-touching tests
are net48 + native aahClientManaged and run only on Windows; macOS verifies build + the SDK-free
subset only.
36 lines
1.6 KiB
C#
36 lines
1.6 KiB
C#
using System;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Backend
|
|
{
|
|
/// <summary>
|
|
/// OPC-UA-free representation of a single historical data point. The sidecar serialises
|
|
/// these onto the TCP wire (<c>HistorianSampleDto</c>) for the .NET 10
|
|
/// <c>WonderwareHistorianClient</c>, which maps quality and value into OPC UA
|
|
/// <c>DataValue</c> on its side. Raw OPC DA quality byte is preserved so the client
|
|
/// can reuse the same quality mapper it already uses for live reads.
|
|
/// </summary>
|
|
public sealed class HistorianSample
|
|
{
|
|
/// <summary>Gets or sets the historical data value.</summary>
|
|
public object? Value { get; set; }
|
|
|
|
/// <summary>Gets or sets the raw OPC DA quality byte from the historian SDK (low 8 bits of OpcQuality).</summary>
|
|
public byte Quality { get; set; }
|
|
|
|
/// <summary>Gets or sets the UTC timestamp of the historical sample.</summary>
|
|
public DateTime TimestampUtc { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Result of <see cref="IHistorianDataSource.ReadAggregateAsync"/>. When <see cref="Value"/> is
|
|
/// null the aggregate is unavailable for that bucket — the client maps to <c>BadNoData</c>.
|
|
/// </summary>
|
|
public sealed class HistorianAggregateSample
|
|
{
|
|
/// <summary>Gets or sets the aggregate value, or null if unavailable.</summary>
|
|
public double? Value { get; set; }
|
|
/// <summary>Gets or sets the UTC timestamp of the aggregate sample.</summary>
|
|
public DateTime TimestampUtc { get; set; }
|
|
}
|
|
}
|