Files
histsdk/src/AVEVA.Historian.Client/Grpc/Protos/HistoryService.proto
T
Joseph Doherty 1e9a87fce9 Add 2023 R2 gRPC transport (RemoteGrpc) reusing native byte payloads
Stands up HistorianTransport.RemoteGrpc end-to-end for the read path,
built on the recovered 2023 R2 gRPC contract (gRPC-Web/HTTP-1.1, port
32565, gzip). The opaque protobuf `bytes` fields carry the SAME native
binary payloads as the 2020 WCF/MDAS path, so the proven serializers and
parsers are reused unchanged.

- Grpc/Protos/*.proto: 6 protoc-validated contracts recovered from
  embedded FileDescriptors (authoritative, not guessed).
- Grpc/HistorianGrpcChannelFactory: GrpcWebHandler/HTTP-1.1 channel,
  ResolvePort/ResolveAddress, optional TLS + gzip.
- Grpc/HistorianGrpcReadOrchestrator: mirrors the WCF read chain over
  gRPC; auth uses HistoryService.ExchangeKey (the gRPC ValCl op).
- Wcf/HistorianNativeHandshake: transport-agnostic Open2 request builder
  + SSPI/Negotiate token loop + response decode, shared by WCF and gRPC.
- Op map (2020 -> gRPC): ValCl->ExchangeKey, Open2->OpenConnection,
  StartQuery2->StartQuery, GetNextQueryResultBuffer2->GetNextQueryResultBuffer.
- HistorianClientOptions: DefaultGrpcPort=32565, GrpcUseTls.
- csproj: Google.Protobuf, Grpc.Net.Client(.Web), Grpc.Tools codegen.

Not yet live-verified against a 2023 R2 server: ExchangeKey is the first
thing to revisit if a live server rejects the handshake; the inner byte
payloads are the proven 2020 protocol. Gated live test via
HISTORIAN_GRPC_HOST. 188 unit tests green; build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 14:27:47 -04:00

210 lines
4.8 KiB
Protocol Buffer

// Recovered from HistoryService.proto (AVEVA Historian SDK 2023 R2, Archestra.Grpc.Contract).
// Reconstructed from the embedded protobuf FileDescriptor; field numbers are authoritative.
syntax = "proto3";
import "Status.proto";
option csharp_namespace = "ArchestrA.Grpc.Contract.History";
message CreateTagResponse {
bool bSuccess = 1;
bytes tagid = 2;
}
message GetInterfaceVersionRequest {
}
message GetInterfaceVersionResponse {
uint32 uiError = 1;
uint32 uiVersion = 2;
}
message OpenConnectionRequest {
bytes btConnectionRequest = 1;
}
message OpenConnectionResponse {
.Status status = 1;
bytes btConnectionResponse = 2;
}
message CloseConnectionRequest {
string strHandle = 1;
}
message CloseConnectionResponse {
.Status status = 1;
}
message UpdateClientStatusRequest {
string strHandle = 1;
bytes btClientStatus = 2;
}
message UpdateClientStatusResponse {
.Status status = 1;
bytes btServerStatus = 2;
}
message RegisterTagsRequest {
string strHandle = 1;
bytes btTagInfos = 2;
}
message RegisterTagsResponse {
.Status status = 1;
bytes btTagStatus = 2;
}
message EnsureTagsRequest {
string strHandle = 1;
bytes btTagInfos = 2;
uint32 elementCount = 3;
}
message EnsureTagsResponse {
.Status status = 1;
bytes btTagStatus = 2;
}
message AddStreamValuesRequest {
string strHandle = 1;
bytes btValues = 2;
}
message AddStreamValuesResponse {
.Status status = 1;
}
message TagExtendedProperty {
enum TagExtendedPropertyDataType {
String = 0;
Int16 = 1;
Int32 = 2;
Int64 = 3;
Double = 4;
Boolean = 5;
DateTimeOffset = 6;
Guid = 7;
Geography = 8;
Geometry = 9;
}
string PropertyName = 1;
.TagExtendedProperty.TagExtendedPropertyDataType type = 2;
bytes value = 3;
bool Facetable = 4;
bool Searchable = 5;
bool SubstringSearchable = 6;
}
message TagExtendedPropertyGroup {
string tagname = 1;
repeated .TagExtendedProperty TagExtendedProperties = 2;
}
message AddTagExtendedPropertyRequest {
string strHandle = 1;
repeated .TagExtendedPropertyGroup TagExtendedPropertyGroups = 2;
}
message AddTagExtendedPropertyResponse {
.Status status = 1;
}
message ExchangeKeyRequest {
string strHandle = 1;
bytes btInput = 2;
}
message ExchangeKeyResponse {
.Status status = 1;
bytes btOutput = 2;
}
message StartJobRequest {
string strHandle = 1;
bytes btInput = 2;
}
message StartJobResponse {
.Status status = 1;
string strJobid = 2;
}
message GetJobStatusRequest {
string strHandle = 1;
string strJobid = 2;
}
message GetJobStatusResponse {
.Status status = 1;
bytes btJobStatus = 2;
}
message AddTagExtendedPropertiesRequest {
string strHandle = 1;
bytes btTeps = 2;
}
message AddTagExtendedPropertiesResponse {
.Status status = 1;
}
message DeleteTagExtendedPropertiesRequest {
string strHandle = 1;
bytes btInput = 2;
}
message DeleteTagExtendedPropertiesResponse {
.Status status = 1;
}
message DeleteTagsRequest {
uint32 uiHandle = 1;
bytes btTagnames = 2;
}
message DeleteTagsResponse {
.Status status = 1;
bytes btDeleteTagStatus = 2;
}
message AddTagLocalizedPropertiesRequest {
string strHandle = 1;
bytes btInput = 2;
}
message AddTagLocalizedPropertiesResponse {
.Status status = 1;
}
message DeleteTagLocalizedPropertiesRequest {
string strHandle = 1;
bytes btInput = 2;
}
message DeleteTagLocalizedPropertiesResponse {
.Status status = 1;
}
service HistoryService {
rpc GetInterfaceVersion (.GetInterfaceVersionRequest) returns (.GetInterfaceVersionResponse);
rpc ExchangeKey (.ExchangeKeyRequest) returns (.ExchangeKeyResponse);
rpc OpenConnection (.OpenConnectionRequest) returns (.OpenConnectionResponse);
rpc CloseConnection (.CloseConnectionRequest) returns (.CloseConnectionResponse);
rpc UpdateClientStatus (.UpdateClientStatusRequest) returns (.UpdateClientStatusResponse);
rpc RegisterTags (.RegisterTagsRequest) returns (.RegisterTagsResponse);
rpc EnsureTags (.EnsureTagsRequest) returns (.EnsureTagsResponse);
rpc AddStreamValues (.AddStreamValuesRequest) returns (.AddStreamValuesResponse);
rpc AddTagExtendedPropertyGroups (.AddTagExtendedPropertyRequest) returns (.AddTagExtendedPropertyResponse);
rpc AddTagExtendedProperties (.AddTagExtendedPropertiesRequest) returns (.AddTagExtendedPropertiesResponse);
rpc StartJob (.StartJobRequest) returns (.StartJobResponse);
rpc GetJobStatus (.GetJobStatusRequest) returns (.GetJobStatusResponse);
rpc DeleteTagExtendedProperties (.DeleteTagExtendedPropertiesRequest) returns (.DeleteTagExtendedPropertiesResponse);
rpc DeleteTags (.DeleteTagsRequest) returns (.DeleteTagsResponse);
rpc AddTagLocalizedProperties (.AddTagLocalizedPropertiesRequest) returns (.AddTagLocalizedPropertiesResponse);
rpc DeleteTagLocalizedProperties (.DeleteTagLocalizedPropertiesRequest) returns (.DeleteTagLocalizedPropertiesResponse);
}