// ------------------------------------------------------------------
// Connectivity Suite - Generic Data API
// ------------------------------------------------------------------
// Conenctivity Suite Generic Read Interface
syntax = "proto3";
import "common_datatype.proto";
import "common_address.proto";
import "conn_suite_code.proto";
package siemens.connectivitysuite.genericdata.v1;
service GenericDataApi {
rpc ReadGeneric( ReadGenericRequest ) returns( ReadGenericResponse ) {}
rpc WriteGeneric( WriteGenericRequest ) returns( WriteGenericResponse ) {}
}
// Generic read interface
message ReadGenericRequest {
// Connection configuration
siemens.common.address.v1.Destination connection = 1;
// Datapoint configuration (address and datatype)
repeated siemens.common.address.v1.DatapointParameterSet datapoint_read_requests = 2;
}
message ReadGenericResponse {
// The order and number of the datapoints must be the same as in the request.
// The failed requests must be part of this response as well.
repeated DatapointReadResponse datapoints = 1;
}
message DatapointReadResponse {
oneof response {
// Value of the datapoint
DatapointValue value = 1;
// Error message if read request failed
GenericResponseResult reject_reason = 2;
}
}
message DatapointValue {
// datatype of the data in payload. This must be a Connectivity Suite datatype.
siemens.common.types.v1.DataType type = 1;
// timestamp of this group of datapoints
// 64 bit unsigned integer which represents the number
// of 100 nano-second [0.1 microsec] intervals since January 1, 1601 (UTC).
// (see Connectivity Suite type DT_TIMESTAMP)
fixed64 time = 2;
// quality code of of this datapoint
// details - see CS Data-API 'DataPointGroup.quality'
uint32 quality = 3;
// Raw-data value stream
// Serialisation algorithm - see CS Data-API 'DataPointGroup.payload'
bytes payload = 4;
}
// Generic write interface
message WriteGenericRequest {
// Connection configuration
siemens.common.address.v1.Destination connection = 1;
repeated DatapointWriteRequest datapoint_write_requests = 2;
}
message DatapointWriteRequest {
// Datapoint configuration (address and datatype)
siemens.common.address.v1.DatapointParameterSet datapoint_parameter_set = 1;
// Raw-data value stream
// Serialisation algorithm - see CS Data-API 'DataPointGroup.payload'
bytes payload = 2;
// datatype of the data in payload
siemens.common.types.v1.DataType type = 3;
}
message WriteGenericResponse {
// The order of the datapoints must be the same as in the request
repeated GenericResponseResult results = 1;
}
// Generic result message
message GenericResponseResult {
// Developer-facing human-readable message in English
string description = 1;
// Result Code for the request
siemens.connectivitysuite.code.v1.Code result_code = 2;
}