Skip to content

Commit 4f9170b

Browse files
committed
Update field comments
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
1 parent affd8c5 commit 4f9170b

1 file changed

Lines changed: 70 additions & 55 deletions

File tree

ni/protobuf/types/waveform.proto

Lines changed: 70 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ 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.
25+
//
26+
// Leave t0 unset only when the start time is unknown or when the waveform
27+
// has irregular timing and the timestamps field is used instead.
2728
PrecisionTimestamp t0 = 1;
2829

2930
// The time interval in seconds between data points in the waveform.
@@ -36,28 +37,31 @@ message DoubleAnalogWaveform {
3637
map<string, WaveformAttributeValue> attributes = 4;
3738

3839
// A timestamp denoting some external stimulus like a trigger.
39-
// 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.
40+
//
41+
// When setting timestamp, you should also always set t0 and time_offset such
42+
// that t0 = timestamp + time_offset.
4243
PrecisionTimestamp timestamp = 5;
4344

4445
// The offset, in seconds, relative to timestamp when the first sample occurs.
45-
// 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.
46+
//
47+
// When setting time_offset, either both t0 and timestamp should remain unset
48+
// or both should be set such that t0 = timestamp + time_offset.
4849
double time_offset = 6;
4950

50-
// The timestamps for each sample in y_data. The length of this field and y_data should match.
51-
// This is for use in cases where the waveform has irregular timing. This timestamps field
52-
// is mutually exclusive with t0/timestamp/time_offset/dt.
51+
// The timestamps for each sample in y_data.
52+
//
53+
// The length of this field and y_data should match. This is for use in cases where
54+
// the waveform has irregular timing. This timestamps field is mutually exclusive
55+
// with t0/timestamp/time_offset/dt.
5356
repeated PrecisionTimestamp timestamps = 7;
5457
}
5558

5659
// A 16-bit integer analog waveform with timing and extended properties.
5760
message I16AnalogWaveform {
5861
// 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.
62+
//
63+
// Leave t0 unset only when the start time is unknown or when the waveform
64+
// has irregular timing and the timestamps field is used instead.
6165
PrecisionTimestamp t0 = 1;
6266

6367
// The time interval in seconds between data points in the waveform.
@@ -73,28 +77,31 @@ message I16AnalogWaveform {
7377
Scale scale = 5;
7478

7579
// A timestamp denoting some external stimulus like a trigger.
76-
// 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.
80+
//
81+
// When setting timestamp, you should also always set t0 and time_offset such
82+
// that t0 = timestamp + time_offset.
7983
PrecisionTimestamp timestamp = 6;
8084

8185
// The offset, in seconds, relative to timestamp when the first sample occurs.
82-
// 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.
86+
//
87+
// When setting time_offset, either both t0 and timestamp should remain unset
88+
// or both should be set such that t0 = timestamp + time_offset.
8589
double time_offset = 7;
8690

87-
// The timestamps for each sample in y_data. The length of this field and y_data should match.
88-
// This is for use in cases where the waveform has irregular timing. This timestamps field
89-
// is mutually exclusive with t0/timestamp/time_offset/dt.
91+
// The timestamps for each sample in y_data.
92+
//
93+
// The length of this field and y_data should match. This is for use in cases where
94+
// the waveform has irregular timing. This timestamps field is mutually exclusive
95+
// with t0/timestamp/time_offset/dt.
9096
repeated PrecisionTimestamp timestamps = 8;
9197
}
9298

9399
// A double-precision complex waveform with timing and extended properties.
94100
message DoubleComplexWaveform {
95101
// 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.
102+
//
103+
// Leave t0 unset only when the start time is unknown or when the waveform
104+
// has irregular timing and the timestamps field is used instead.
98105
PrecisionTimestamp t0 = 1;
99106

100107
// The time interval in seconds between data points in the waveform.
@@ -110,28 +117,31 @@ message DoubleComplexWaveform {
110117
map<string, WaveformAttributeValue> attributes = 4;
111118

112119
// 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.
120+
//
121+
// When setting timestamp, you should also always set t0 and time_offset such
122+
// that t0 = timestamp + time_offset.
116123
PrecisionTimestamp timestamp = 5;
117124

118125
// 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.
126+
//
127+
// When setting time_offset, either both t0 and timestamp should remain unset
128+
// or both should be set such that t0 = timestamp + time_offset.
122129
double time_offset = 6;
123130

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.
131+
// The timestamps for each sample in y_data.
132+
//
133+
// The length of this field and y_data should match. This is for use in cases where
134+
// the waveform has irregular timing. This timestamps field is mutually exclusive
135+
// with t0/timestamp/time_offset/dt.
127136
repeated PrecisionTimestamp timestamps = 7;
128137
}
129138

130139
// A 16-bit integer complex waveform with timing and extended properties.
131140
message I16ComplexWaveform {
132141
// 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.
142+
//
143+
// Leave t0 unset only when the start time is unknown or when the waveform
144+
// has irregular timing and the timestamps field is used instead.
135145
PrecisionTimestamp t0 = 1;
136146

137147
// The time interval in seconds between data points in the waveform.
@@ -150,20 +160,22 @@ message I16ComplexWaveform {
150160
Scale scale = 5;
151161

152162
// 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.
163+
//
164+
// When setting timestamp, you should also always set t0 and time_offset such
165+
// that t0 = timestamp + time_offset.
156166
PrecisionTimestamp timestamp = 6;
157167

158168
// 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.
169+
//
170+
// When setting time_offset, either both t0 and timestamp should remain unset
171+
// or both should be set such that t0 = timestamp + time_offset.
162172
double time_offset = 7;
163173

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.
174+
// The timestamps for each sample in y_data.
175+
//
176+
// The length of this field and y_data should match. This is for use in cases where
177+
// the waveform has irregular timing. This timestamps field is mutually exclusive
178+
// with t0/timestamp/time_offset/dt.
167179
repeated PrecisionTimestamp timestamps = 8;
168180
}
169181

@@ -214,8 +226,9 @@ message WaveformAttributeValue {
214226
// A digital waveform as bytes with timing and extended properties.
215227
message DigitalWaveform {
216228
// 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.
229+
//
230+
// Leave t0 unset only when the start time is unknown or when the waveform
231+
// has irregular timing and the timestamps field is used instead.
219232
PrecisionTimestamp t0 = 1;
220233

221234
// The time interval in seconds between data points in the waveform.
@@ -234,20 +247,22 @@ message DigitalWaveform {
234247
map<string, WaveformAttributeValue> attributes = 5;
235248

236249
// 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.
250+
//
251+
// When setting timestamp, you should also always set t0 and time_offset such
252+
// that t0 = timestamp + time_offset.
240253
PrecisionTimestamp timestamp = 6;
241254

242255
// 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.
256+
//
257+
// When setting time_offset, either both t0 and timestamp should remain unset
258+
// or both should be set such that t0 = timestamp + time_offset.
246259
double time_offset = 7;
247260

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.
261+
// The timestamps for each sample in y_data.
262+
//
263+
// The length of this field and y_data should match. This is for use in cases where
264+
// the waveform has irregular timing. This timestamps field is mutually exclusive
265+
// with t0/timestamp/time_offset/dt.
251266
repeated PrecisionTimestamp timestamps = 8;
252267
}
253268

0 commit comments

Comments
 (0)