4da5287d01
Execute HCAL roadmap R1.2 (GetRuntimeParameterAsync) end-to-end, and in doing so
discover that the "string-handle wall" blocking R1.1/R1.4/R1.5/R1.6 was a handle
FORMAT bug, not a missing native session/filter registration.
R1.2 (shipped, live-verified):
- Captured native GetRuntimeParameter -> WCF op aa/Stat/GETRP (string-handle op,
GETHI's shape), via scripts/Capture-RuntimeParam.ps1 + instrument-wcf-{write,read}message.
- HistorianRuntimeParameterProtocol serializes pRequestBuff (54 67 01 00 + uint
nameCount + per-name uint charCount + UTF-16) and parses pResponseBuff (version +
uint resultCount + CRetVariant 0x43 VT_BSTR + uint16 len + uint16 charCount + UTF-16).
- IStatusServiceContract2.GetRuntimeParameter (GETRP) op; HistorianWcfStatusClient
passes the Open2 storage-session GUID as the string handle, UPPERCASE.
- Public HistorianClient.GetRuntimeParameterAsync(name) via the dialect.
- Golden WcfRuntimeParameterProtocolTests + gated live test; returns HistorianVersion.
String-handle wall RESOLVED (proven, public APIs deferred):
- The Open2 storage GUID works as the string handle when sent UPPERCASE
(ToString("D").ToUpperInvariant()); earlier "blocked" probes used lowercase.
- Live-probed GETHI (R1.4) -> returns data; ExeC (R1.1) -> Retr.GetV prime -> ExeC ->
GetR returns a BinaryFormatter-serialized .NET DataTable. Gated
StringHandleProbeDiagnosticTests + scripts/Capture-ExecSql.ps1 + exec-sql harness scenario.
- Docs flipped: wcf-string-handle-wall.md RESOLVED banner; roadmap R1.1/R1.4 reachable,
R1.5/R1.6 likely; wcf-status-localhost.md GETRP section.
- R1.1/R1.4 public APIs NOT shipped: ExeC needs a GetR paging loop + a BinaryFormatter-
stream parser (BinaryFormatter is removed from .NET 10); GETHI full-info struct needs
its own capture.
223 unit tests pass; gated live tests green against the local 2020 Historian.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B6mcaT2PjRFKcogzp9UkfC
48 lines
1.7 KiB
C#
48 lines
1.7 KiB
C#
using System.Runtime.InteropServices;
|
|
using System.ServiceModel;
|
|
|
|
namespace AVEVA.Historian.Client.Wcf.Contracts;
|
|
|
|
[ServiceContract(Name = HistorianWcfServiceNames.Status, Namespace = HistorianWcfServiceNames.Namespace)]
|
|
internal interface IStatusServiceContract2 : IStatusServiceContract
|
|
{
|
|
[OperationContract]
|
|
uint GetTimeZoneNames(uint clientHandle, ref uint sequence, out uint bufferSize, out byte[] buffer);
|
|
|
|
[OperationContract]
|
|
uint IsLicenseFeatureEnabled(uint clientHandle, int feature, out bool isEnabled);
|
|
|
|
[OperationContract]
|
|
[return: MarshalAs(UnmanagedType.U1)]
|
|
bool GetSystemParameter(
|
|
uint clientHandle,
|
|
string parameterName,
|
|
out string parameterValue,
|
|
out uint errorSize,
|
|
out byte[] errorBuffer);
|
|
|
|
[OperationContract(Name = "GETHI")]
|
|
[return: MarshalAs(UnmanagedType.U1)]
|
|
bool GetHistorianInfo(
|
|
string handle,
|
|
[MessageParameter(Name = "pRequestBuff")] byte[] requestBuffer,
|
|
[MessageParameter(Name = "pResponseBuff")] out byte[] responseBuffer,
|
|
out byte[] errorBuffer);
|
|
|
|
[OperationContract(Name = "GETRP")]
|
|
[return: MarshalAs(UnmanagedType.U1)]
|
|
bool GetRuntimeParameter(
|
|
string handle,
|
|
[MessageParameter(Name = "pRequestBuff")] byte[] requestBuffer,
|
|
[MessageParameter(Name = "pResponseBuff")] out byte[] responseBuffer,
|
|
out byte[] errorBuffer);
|
|
|
|
[OperationContract(Name = "PNGS")]
|
|
[return: MarshalAs(UnmanagedType.U1)]
|
|
bool PingServer(string handle, string pipeName, uint timeout, ref byte[] errorBuffer);
|
|
|
|
[OperationContract(Name = "PNGP")]
|
|
[return: MarshalAs(UnmanagedType.U1)]
|
|
bool PingPipe(string handle, string pipeName, ref byte[] errorBuffer);
|
|
}
|