Skip to content

Commit 9039fdf

Browse files
authored
Data Store Service - Add ReadMeasurementValue and ReadConditionValue RPCs (#152)
* Add ReadData RPC to DataStoreService * Update service documentation * Review feedback - Rename from ReadData to ReadValue * Review feedback - Split ReadValue into ReadMeasurementValue and ReadConditionValue. Return the unpacked value message type from these methods. * Removing unnecessary imports. Rearranging RPCs and messages. Signed-off-by: Hunter Kennon hunter.kennon@emerson.com
1 parent de7e7d3 commit 9039fdf

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

ni/measurements/data/v1/data_store_service.proto

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ option php_namespace = "NI\\Measurements\\Data\\V1";
1919
option ruby_package = "NI::Measurements::Data::V1";
2020

2121
// This service provides endpoints for the publishing of measurements.
22-
// This includes associating measurements with the conditions associated with the measurement and
23-
// querying for the published measurements with OData queries.
22+
// This includes associating measurements with the conditions associated with the measurement,
23+
// querying for the published measurements with OData queries, and reading back these published values.
2424
service DataStoreService {
2525

2626
// Creates a test result object for publishing measurements. Once a test result is created,
@@ -68,6 +68,11 @@ service DataStoreService {
6868
// Queries measurements using OData query syntax.
6969
// See https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview.
7070
rpc QueryMeasurements(QueryMeasurementsRequest) returns (QueryMeasurementsResponse);
71+
72+
// Reads the value corresponding to the specified condition.
73+
rpc ReadConditionValue(ReadConditionValueRequest) returns (ReadConditionValueResponse);
74+
// Reads the value corresponding to the specified measurement.
75+
rpc ReadMeasurementValue(ReadMeasurementValueRequest) returns (ReadMeasurementValueResponse);
7176
}
7277

7378
message CreateTestResultRequest {
@@ -342,3 +347,34 @@ message QueryMeasurementsResponse {
342347
// retrieving the measurement, as well as the metadata associated with the measurement.
343348
repeated PublishedMeasurement published_measurements = 1;
344349
}
350+
351+
message ReadConditionValueRequest {
352+
// The id of the condition to read.
353+
string condition_id = 1;
354+
}
355+
356+
message ReadConditionValueResponse {
357+
// The value of the specified condition.
358+
oneof value {
359+
ni.protobuf.types.Vector vector = 1;
360+
}
361+
}
362+
363+
message ReadMeasurementValueRequest {
364+
// The id of the measurement to read.
365+
string measurement_id = 1;
366+
}
367+
368+
message ReadMeasurementValueResponse {
369+
// The value of the specified measurement.
370+
oneof value {
371+
ni.protobuf.types.Vector vector = 1;
372+
ni.protobuf.types.DoubleAnalogWaveform double_analog_waveform = 2;
373+
ni.protobuf.types.DoubleXYData x_y_data = 3;
374+
ni.protobuf.types.I16AnalogWaveform i16_analog_waveform = 4;
375+
ni.protobuf.types.DoubleComplexWaveform double_complex_waveform = 5;
376+
ni.protobuf.types.I16ComplexWaveform i16_complex_waveform = 6;
377+
ni.protobuf.types.DoubleSpectrum double_spectrum = 7;
378+
ni.protobuf.types.DigitalWaveform digital_waveform = 8;
379+
}
380+
}

0 commit comments

Comments
 (0)