Skip to content

Commit affd8c5

Browse files
committed
Address PR feedback. Fix comments. Add fields on all waveforms except spectrum.
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
1 parent 99727e8 commit affd8c5

1 file changed

Lines changed: 73 additions & 4 deletions

File tree

ni/protobuf/types/waveform.proto

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ option ruby_package = "NI::Protobuf::Types";
2222
// A double-precision analog waveform with timing and extended properties.
2323
message DoubleAnalogWaveform {
2424
// The time of the first sample in y_data.
25+
// If unset, consumers should infer the value based on timestamp and time_offset,
26+
// unless those values are also unset.
2527
PrecisionTimestamp t0 = 1;
2628

2729
// The time interval in seconds between data points in the waveform.
@@ -35,21 +37,27 @@ message DoubleAnalogWaveform {
3537

3638
// A timestamp denoting some external stimulus like a trigger.
3739
// Should be specified such that t0 = timestamp + time_offset.
40+
// If unset, consumers should infer the value based on t0 and time_offset,
41+
// unless those values are also unset.
3842
PrecisionTimestamp timestamp = 5;
3943

40-
// The offset relative to timestamp when the first sample occurs.
44+
// The offset, in seconds, relative to timestamp when the first sample occurs.
4145
// Should be specified such that t0 = timestamp + time_offset.
46+
// If unset, consumers should infer the value based on t0 and timestamp,
47+
// unless those values are also unset.
4248
double time_offset = 6;
4349

4450
// The timestamps for each sample in y_data. The length of this field and y_data should match.
4551
// This is for use in cases where the waveform has irregular timing. This timestamps field
46-
// is mutually exclusive with t0/timestamp/time_offset.
52+
// is mutually exclusive with t0/timestamp/time_offset/dt.
4753
repeated PrecisionTimestamp timestamps = 7;
4854
}
4955

5056
// A 16-bit integer analog waveform with timing and extended properties.
5157
message I16AnalogWaveform {
5258
// The time of the first sample in y_data.
59+
// If unset, consumers should infer the value based on timestamp and time_offset,
60+
// unless those values are also unset.
5361
PrecisionTimestamp t0 = 1;
5462

5563
// The time interval in seconds between data points in the waveform.
@@ -66,21 +74,27 @@ message I16AnalogWaveform {
6674

6775
// A timestamp denoting some external stimulus like a trigger.
6876
// Should be specified such that t0 = timestamp + time_offset.
77+
// If unset, consumers should infer the value based on t0 and time_offset,
78+
// unless those values are also unset.
6979
PrecisionTimestamp timestamp = 6;
7080

71-
// The offset relative to timestamp when the first sample occurs.
81+
// The offset, in seconds, relative to timestamp when the first sample occurs.
7282
// Should be specified such that t0 = timestamp + time_offset.
83+
// If unset, consumers should infer the value based on t0 and timestamp,
84+
// unless those values are also unset.
7385
double time_offset = 7;
7486

7587
// The timestamps for each sample in y_data. The length of this field and y_data should match.
7688
// This is for use in cases where the waveform has irregular timing. This timestamps field
77-
// is mutually exclusive with t0/timestamp/time_offset.
89+
// is mutually exclusive with t0/timestamp/time_offset/dt.
7890
repeated PrecisionTimestamp timestamps = 8;
7991
}
8092

8193
// A double-precision complex waveform with timing and extended properties.
8294
message DoubleComplexWaveform {
8395
// The time of the first sample in y_data.
96+
// If unset, consumers should infer the value based on timestamp and time_offset,
97+
// unless those values are also unset.
8498
PrecisionTimestamp t0 = 1;
8599

86100
// The time interval in seconds between data points in the waveform.
@@ -94,11 +108,30 @@ message DoubleComplexWaveform {
94108

95109
// Attribute names and values. See WaveformAttributeValue for more details.
96110
map<string, WaveformAttributeValue> attributes = 4;
111+
112+
// A timestamp denoting some external stimulus like a trigger.
113+
// Should be specified such that t0 = timestamp + time_offset.
114+
// If unset, consumers should infer the value based on t0 and time_offset,
115+
// unless those values are also unset.
116+
PrecisionTimestamp timestamp = 5;
117+
118+
// The offset, in seconds, relative to timestamp when the first sample occurs.
119+
// Should be specified such that t0 = timestamp + time_offset.
120+
// If unset, consumers should infer the value based on t0 and timestamp,
121+
// unless those values are also unset.
122+
double time_offset = 6;
123+
124+
// The timestamps for each sample in y_data. The length of this field and y_data should match.
125+
// This is for use in cases where the waveform has irregular timing. This timestamps field
126+
// is mutually exclusive with t0/timestamp/time_offset/dt.
127+
repeated PrecisionTimestamp timestamps = 7;
97128
}
98129

99130
// A 16-bit integer complex waveform with timing and extended properties.
100131
message I16ComplexWaveform {
101132
// The time of the first sample in y_data.
133+
// If unset, consumers should infer the value based on timestamp and time_offset,
134+
// unless those values are also unset.
102135
PrecisionTimestamp t0 = 1;
103136

104137
// The time interval in seconds between data points in the waveform.
@@ -115,6 +148,23 @@ message I16ComplexWaveform {
115148

116149
// Optional scaling information used to convert raw data to scaled data.
117150
Scale scale = 5;
151+
152+
// A timestamp denoting some external stimulus like a trigger.
153+
// Should be specified such that t0 = timestamp + time_offset.
154+
// If unset, consumers should infer the value based on t0 and time_offset,
155+
// unless those values are also unset.
156+
PrecisionTimestamp timestamp = 6;
157+
158+
// The offset, in seconds, relative to timestamp when the first sample occurs.
159+
// Should be specified such that t0 = timestamp + time_offset.
160+
// If unset, consumers should infer the value based on t0 and timestamp,
161+
// unless those values are also unset.
162+
double time_offset = 7;
163+
164+
// The timestamps for each sample in y_data. The length of this field and y_data should match.
165+
// This is for use in cases where the waveform has irregular timing. This timestamps field
166+
// is mutually exclusive with t0/timestamp/time_offset/dt.
167+
repeated PrecisionTimestamp timestamps = 8;
118168
}
119169

120170
// A double-precision frequency spectrum with extended properties.
@@ -164,6 +214,8 @@ message WaveformAttributeValue {
164214
// A digital waveform as bytes with timing and extended properties.
165215
message DigitalWaveform {
166216
// The time of the first sample in y_data.
217+
// If unset, consumers should infer the value based on timestamp and time_offset,
218+
// unless those values are also unset.
167219
PrecisionTimestamp t0 = 1;
168220

169221
// The time interval in seconds between data points in the waveform.
@@ -180,6 +232,23 @@ message DigitalWaveform {
180232

181233
// Attribute names and values. See WaveformAttributeValue for more details.
182234
map<string, WaveformAttributeValue> attributes = 5;
235+
236+
// A timestamp denoting some external stimulus like a trigger.
237+
// Should be specified such that t0 = timestamp + time_offset.
238+
// If unset, consumers should infer the value based on t0 and time_offset,
239+
// unless those values are also unset.
240+
PrecisionTimestamp timestamp = 6;
241+
242+
// The offset, in seconds, relative to timestamp when the first sample occurs.
243+
// Should be specified such that t0 = timestamp + time_offset.
244+
// If unset, consumers should infer the value based on t0 and timestamp,
245+
// unless those values are also unset.
246+
double time_offset = 7;
247+
248+
// The timestamps for each sample in y_data. The length of this field and y_data should match.
249+
// This is for use in cases where the waveform has irregular timing. This timestamps field
250+
// is mutually exclusive with t0/timestamp/time_offset/dt.
251+
repeated PrecisionTimestamp timestamps = 8;
183252
}
184253

185254
// Scaling information for converting unscaled waveform data to scaled data.

0 commit comments

Comments
 (0)