diff --git a/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.py b/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.py index e5f6d7eb..798575fb 100644 --- a/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.py +++ b/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.py @@ -14,7 +14,7 @@ from ni.protobuf.types import precision_timestamp_pb2 as ni_dot_protobuf_dot_types_dot_precision__timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n ni/protobuf/types/waveform.proto\x12\x11ni.protobuf.types\x1a+ni/protobuf/types/precision_timestamp.proto\"\x90\x02\n\x14\x44oubleAnalogWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x01\x12K\n\nattributes\x18\x04 \x03(\x0b\x32\x37.ni.protobuf.types.DoubleAnalogWaveform.AttributesEntry\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\xb3\x02\n\x11I16AnalogWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x11\x12H\n\nattributes\x18\x04 \x03(\x0b\x32\x34.ni.protobuf.types.I16AnalogWaveform.AttributesEntry\x12\'\n\x05scale\x18\x05 \x01(\x0b\x32\x18.ni.protobuf.types.Scale\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\x92\x02\n\x15\x44oubleComplexWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x01\x12L\n\nattributes\x18\x04 \x03(\x0b\x32\x38.ni.protobuf.types.DoubleComplexWaveform.AttributesEntry\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\xb5\x02\n\x12I16ComplexWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x11\x12I\n\nattributes\x18\x04 \x03(\x0b\x32\x35.ni.protobuf.types.I16ComplexWaveform.AttributesEntry\x12\'\n\x05scale\x18\x05 \x01(\x0b\x32\x18.ni.protobuf.types.Scale\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\xf9\x01\n\x0e\x44oubleSpectrum\x12\x17\n\x0fstart_frequency\x18\x01 \x01(\x01\x12\x1b\n\x13\x66requency_increment\x18\x02 \x01(\x01\x12\x0c\n\x04\x64\x61ta\x18\x03 \x03(\x01\x12\x45\n\nattributes\x18\x04 \x03(\x0b\x32\x31.ni.protobuf.types.DoubleSpectrum.AttributesEntry\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\x84\x01\n\x16WaveformAttributeValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x02 \x01(\x05H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x42\x0b\n\tattribute\"\x9c\x02\n\x0f\x44igitalWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x14\n\x0csignal_count\x18\x03 \x01(\x05\x12\x0e\n\x06y_data\x18\x04 \x01(\x0c\x12\x46\n\nattributes\x18\x05 \x03(\x0b\x32\x32.ni.protobuf.types.DigitalWaveform.AttributesEntry\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"G\n\x05Scale\x12\x36\n\x0clinear_scale\x18\x01 \x01(\x0b\x32\x1e.ni.protobuf.types.LinearScaleH\x00\x42\x06\n\x04mode\"+\n\x0bLinearScale\x12\x0c\n\x04gain\x18\x01 \x01(\x01\x12\x0e\n\x06offset\x18\x02 \x01(\x01\x42\x85\x01\n\x15\x63om.ni.protobuf.typesB\rWaveformProtoP\x01Z\x05types\xa2\x02\x04NIPT\xaa\x02\"NationalInstruments.Protobuf.Types\xca\x02\x11NI\\PROTOBUF\\TYPES\xea\x02\x13NI::Protobuf::Typesb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n ni/protobuf/types/waveform.proto\x12\x11ni.protobuf.types\x1a+ni/protobuf/types/precision_timestamp.proto\"\x9a\x03\n\x14\x44oubleAnalogWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x01\x12K\n\nattributes\x18\x04 \x03(\x0b\x32\x37.ni.protobuf.types.DoubleAnalogWaveform.AttributesEntry\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\x13\n\x0btime_offset\x18\x06 \x01(\x01\x12\x39\n\ntimestamps\x18\x07 \x03(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\xbd\x03\n\x11I16AnalogWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x11\x12H\n\nattributes\x18\x04 \x03(\x0b\x32\x34.ni.protobuf.types.I16AnalogWaveform.AttributesEntry\x12\'\n\x05scale\x18\x05 \x01(\x0b\x32\x18.ni.protobuf.types.Scale\x12\x38\n\ttimestamp\x18\x06 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\x13\n\x0btime_offset\x18\x07 \x01(\x01\x12\x39\n\ntimestamps\x18\x08 \x03(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\x9c\x03\n\x15\x44oubleComplexWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x01\x12L\n\nattributes\x18\x04 \x03(\x0b\x32\x38.ni.protobuf.types.DoubleComplexWaveform.AttributesEntry\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\x13\n\x0btime_offset\x18\x06 \x01(\x01\x12\x39\n\ntimestamps\x18\x07 \x03(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\xbf\x03\n\x12I16ComplexWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x0e\n\x06y_data\x18\x03 \x03(\x11\x12I\n\nattributes\x18\x04 \x03(\x0b\x32\x35.ni.protobuf.types.I16ComplexWaveform.AttributesEntry\x12\'\n\x05scale\x18\x05 \x01(\x0b\x32\x18.ni.protobuf.types.Scale\x12\x38\n\ttimestamp\x18\x06 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\x13\n\x0btime_offset\x18\x07 \x01(\x01\x12\x39\n\ntimestamps\x18\x08 \x03(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\xf9\x01\n\x0e\x44oubleSpectrum\x12\x17\n\x0fstart_frequency\x18\x01 \x01(\x01\x12\x1b\n\x13\x66requency_increment\x18\x02 \x01(\x01\x12\x0c\n\x04\x64\x61ta\x18\x03 \x03(\x01\x12\x45\n\nattributes\x18\x04 \x03(\x0b\x32\x31.ni.protobuf.types.DoubleSpectrum.AttributesEntry\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"\x84\x01\n\x16WaveformAttributeValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x02 \x01(\x05H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x42\x0b\n\tattribute\"\xa6\x03\n\x0f\x44igitalWaveform\x12\x31\n\x02t0\x18\x01 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\n\n\x02\x64t\x18\x02 \x01(\x01\x12\x14\n\x0csignal_count\x18\x03 \x01(\x05\x12\x0e\n\x06y_data\x18\x04 \x01(\x0c\x12\x46\n\nattributes\x18\x05 \x03(\x0b\x32\x32.ni.protobuf.types.DigitalWaveform.AttributesEntry\x12\x38\n\ttimestamp\x18\x06 \x01(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x12\x13\n\x0btime_offset\x18\x07 \x01(\x01\x12\x39\n\ntimestamps\x18\x08 \x03(\x0b\x32%.ni.protobuf.types.PrecisionTimestamp\x1a\\\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ni.protobuf.types.WaveformAttributeValue:\x02\x38\x01\"G\n\x05Scale\x12\x36\n\x0clinear_scale\x18\x01 \x01(\x0b\x32\x1e.ni.protobuf.types.LinearScaleH\x00\x42\x06\n\x04mode\"+\n\x0bLinearScale\x12\x0c\n\x04gain\x18\x01 \x01(\x01\x12\x0e\n\x06offset\x18\x02 \x01(\x01\x42\x85\x01\n\x15\x63om.ni.protobuf.typesB\rWaveformProtoP\x01Z\x05types\xa2\x02\x04NIPT\xaa\x02\"NationalInstruments.Protobuf.Types\xca\x02\x11NI\\PROTOBUF\\TYPES\xea\x02\x13NI::Protobuf::Typesb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ni.protobuf.types.waveform_pb2', globals()) @@ -35,33 +35,33 @@ _DIGITALWAVEFORM_ATTRIBUTESENTRY._options = None _DIGITALWAVEFORM_ATTRIBUTESENTRY._serialized_options = b'8\001' _DOUBLEANALOGWAVEFORM._serialized_start=101 - _DOUBLEANALOGWAVEFORM._serialized_end=373 - _DOUBLEANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_start=281 - _DOUBLEANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_end=373 - _I16ANALOGWAVEFORM._serialized_start=376 - _I16ANALOGWAVEFORM._serialized_end=683 - _I16ANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_start=281 - _I16ANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_end=373 - _DOUBLECOMPLEXWAVEFORM._serialized_start=686 - _DOUBLECOMPLEXWAVEFORM._serialized_end=960 - _DOUBLECOMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_start=281 - _DOUBLECOMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_end=373 - _I16COMPLEXWAVEFORM._serialized_start=963 - _I16COMPLEXWAVEFORM._serialized_end=1272 - _I16COMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_start=281 - _I16COMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_end=373 - _DOUBLESPECTRUM._serialized_start=1275 - _DOUBLESPECTRUM._serialized_end=1524 - _DOUBLESPECTRUM_ATTRIBUTESENTRY._serialized_start=281 - _DOUBLESPECTRUM_ATTRIBUTESENTRY._serialized_end=373 - _WAVEFORMATTRIBUTEVALUE._serialized_start=1527 - _WAVEFORMATTRIBUTEVALUE._serialized_end=1659 - _DIGITALWAVEFORM._serialized_start=1662 - _DIGITALWAVEFORM._serialized_end=1946 - _DIGITALWAVEFORM_ATTRIBUTESENTRY._serialized_start=281 - _DIGITALWAVEFORM_ATTRIBUTESENTRY._serialized_end=373 - _SCALE._serialized_start=1948 - _SCALE._serialized_end=2019 - _LINEARSCALE._serialized_start=2021 - _LINEARSCALE._serialized_end=2064 + _DOUBLEANALOGWAVEFORM._serialized_end=511 + _DOUBLEANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_start=419 + _DOUBLEANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_end=511 + _I16ANALOGWAVEFORM._serialized_start=514 + _I16ANALOGWAVEFORM._serialized_end=959 + _I16ANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_start=419 + _I16ANALOGWAVEFORM_ATTRIBUTESENTRY._serialized_end=511 + _DOUBLECOMPLEXWAVEFORM._serialized_start=962 + _DOUBLECOMPLEXWAVEFORM._serialized_end=1374 + _DOUBLECOMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_start=419 + _DOUBLECOMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_end=511 + _I16COMPLEXWAVEFORM._serialized_start=1377 + _I16COMPLEXWAVEFORM._serialized_end=1824 + _I16COMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_start=419 + _I16COMPLEXWAVEFORM_ATTRIBUTESENTRY._serialized_end=511 + _DOUBLESPECTRUM._serialized_start=1827 + _DOUBLESPECTRUM._serialized_end=2076 + _DOUBLESPECTRUM_ATTRIBUTESENTRY._serialized_start=419 + _DOUBLESPECTRUM_ATTRIBUTESENTRY._serialized_end=511 + _WAVEFORMATTRIBUTEVALUE._serialized_start=2079 + _WAVEFORMATTRIBUTEVALUE._serialized_end=2211 + _DIGITALWAVEFORM._serialized_start=2214 + _DIGITALWAVEFORM._serialized_end=2636 + _DIGITALWAVEFORM_ATTRIBUTESENTRY._serialized_start=419 + _DIGITALWAVEFORM_ATTRIBUTESENTRY._serialized_end=511 + _SCALE._serialized_start=2638 + _SCALE._serialized_end=2709 + _LINEARSCALE._serialized_start=2711 + _LINEARSCALE._serialized_end=2754 # @@protoc_insertion_point(module_scope) diff --git a/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.pyi b/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.pyi index a770cab3..7cb04608 100644 --- a/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.pyi +++ b/packages/ni.protobuf.types/src/ni/protobuf/types/waveform_pb2.pyi @@ -43,11 +43,24 @@ class DoubleAnalogWaveform(google.protobuf.message.Message): DT_FIELD_NUMBER: builtins.int Y_DATA_FIELD_NUMBER: builtins.int ATTRIBUTES_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_NUMBER: builtins.int + TIME_OFFSET_FIELD_NUMBER: builtins.int + TIMESTAMPS_FIELD_NUMBER: builtins.int dt: builtins.float """The time interval in seconds between data points in the waveform.""" + time_offset: builtins.float + """The offset, in seconds, relative to timestamp when the first sample occurs. + + When setting time_offset, either both t0 and timestamp should remain unset + or both should be set such that t0 = timestamp + time_offset. + """ @property def t0(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: - """The time of the first sample in y_data.""" + """The time of the first sample in y_data. + + Leave t0 unset only when the start time is unknown or when the waveform + has irregular timing and the timestamps field is used instead. + """ @property def y_data(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: @@ -57,6 +70,24 @@ class DoubleAnalogWaveform(google.protobuf.message.Message): def attributes(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___WaveformAttributeValue]: """Attribute names and values. See WaveformAttributeValue for more details.""" + @property + def timestamp(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: + """A timestamp denoting some external stimulus like a trigger. + + When setting timestamp, you should also always set t0 and time_offset such + that t0 = timestamp + time_offset. If timestamp is unset, it is inferred + that timestamp is the same as t0. + """ + + @property + def timestamps(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp]: + """The timestamps for each sample in y_data. + + The length of this field and y_data should match. This is for use in cases where + the waveform has irregular timing. This timestamps field is mutually exclusive + with t0/timestamp/time_offset/dt. + """ + def __init__( self, *, @@ -64,9 +95,12 @@ class DoubleAnalogWaveform(google.protobuf.message.Message): dt: builtins.float = ..., y_data: collections.abc.Iterable[builtins.float] | None = ..., attributes: collections.abc.Mapping[builtins.str, global___WaveformAttributeValue] | None = ..., + timestamp: ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp | None = ..., + time_offset: builtins.float = ..., + timestamps: collections.abc.Iterable[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["t0", b"t0"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "t0", b"t0", "y_data", b"y_data"]) -> None: ... + def HasField(self, field_name: typing.Literal["t0", b"t0", "timestamp", b"timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "t0", b"t0", "time_offset", b"time_offset", "timestamp", b"timestamp", "timestamps", b"timestamps", "y_data", b"y_data"]) -> None: ... global___DoubleAnalogWaveform = DoubleAnalogWaveform @@ -99,11 +133,24 @@ class I16AnalogWaveform(google.protobuf.message.Message): Y_DATA_FIELD_NUMBER: builtins.int ATTRIBUTES_FIELD_NUMBER: builtins.int SCALE_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_NUMBER: builtins.int + TIME_OFFSET_FIELD_NUMBER: builtins.int + TIMESTAMPS_FIELD_NUMBER: builtins.int dt: builtins.float """The time interval in seconds between data points in the waveform.""" + time_offset: builtins.float + """The offset, in seconds, relative to timestamp when the first sample occurs. + + When setting time_offset, either both t0 and timestamp should remain unset + or both should be set such that t0 = timestamp + time_offset. + """ @property def t0(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: - """The time of the first sample in y_data.""" + """The time of the first sample in y_data. + + Leave t0 unset only when the start time is unknown or when the waveform + has irregular timing and the timestamps field is used instead. + """ @property def y_data(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: @@ -117,6 +164,24 @@ class I16AnalogWaveform(google.protobuf.message.Message): def scale(self) -> global___Scale: """Optional scaling information used to convert raw data to scaled data.""" + @property + def timestamp(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: + """A timestamp denoting some external stimulus like a trigger. + + When setting timestamp, you should also always set t0 and time_offset such + that t0 = timestamp + time_offset. If timestamp is unset, it is inferred + that timestamp is the same as t0. + """ + + @property + def timestamps(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp]: + """The timestamps for each sample in y_data. + + The length of this field and y_data should match. This is for use in cases where + the waveform has irregular timing. This timestamps field is mutually exclusive + with t0/timestamp/time_offset/dt. + """ + def __init__( self, *, @@ -125,9 +190,12 @@ class I16AnalogWaveform(google.protobuf.message.Message): y_data: collections.abc.Iterable[builtins.int] | None = ..., attributes: collections.abc.Mapping[builtins.str, global___WaveformAttributeValue] | None = ..., scale: global___Scale | None = ..., + timestamp: ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp | None = ..., + time_offset: builtins.float = ..., + timestamps: collections.abc.Iterable[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["scale", b"scale", "t0", b"t0"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "scale", b"scale", "t0", b"t0", "y_data", b"y_data"]) -> None: ... + def HasField(self, field_name: typing.Literal["scale", b"scale", "t0", b"t0", "timestamp", b"timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "scale", b"scale", "t0", b"t0", "time_offset", b"time_offset", "timestamp", b"timestamp", "timestamps", b"timestamps", "y_data", b"y_data"]) -> None: ... global___I16AnalogWaveform = I16AnalogWaveform @@ -159,11 +227,24 @@ class DoubleComplexWaveform(google.protobuf.message.Message): DT_FIELD_NUMBER: builtins.int Y_DATA_FIELD_NUMBER: builtins.int ATTRIBUTES_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_NUMBER: builtins.int + TIME_OFFSET_FIELD_NUMBER: builtins.int + TIMESTAMPS_FIELD_NUMBER: builtins.int dt: builtins.float """The time interval in seconds between data points in the waveform.""" + time_offset: builtins.float + """The offset, in seconds, relative to timestamp when the first sample occurs. + + When setting time_offset, either both t0 and timestamp should remain unset + or both should be set such that t0 = timestamp + time_offset. + """ @property def t0(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: - """The time of the first sample in y_data.""" + """The time of the first sample in y_data. + + Leave t0 unset only when the start time is unknown or when the waveform + has irregular timing and the timestamps field is used instead. + """ @property def y_data(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: @@ -177,6 +258,24 @@ class DoubleComplexWaveform(google.protobuf.message.Message): def attributes(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___WaveformAttributeValue]: """Attribute names and values. See WaveformAttributeValue for more details.""" + @property + def timestamp(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: + """A timestamp denoting some external stimulus like a trigger. + + When setting timestamp, you should also always set t0 and time_offset such + that t0 = timestamp + time_offset. If timestamp is unset, it is inferred + that timestamp is the same as t0. + """ + + @property + def timestamps(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp]: + """The timestamps for each sample in y_data. + + The length of this field and y_data should match. This is for use in cases where + the waveform has irregular timing. This timestamps field is mutually exclusive + with t0/timestamp/time_offset/dt. + """ + def __init__( self, *, @@ -184,9 +283,12 @@ class DoubleComplexWaveform(google.protobuf.message.Message): dt: builtins.float = ..., y_data: collections.abc.Iterable[builtins.float] | None = ..., attributes: collections.abc.Mapping[builtins.str, global___WaveformAttributeValue] | None = ..., + timestamp: ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp | None = ..., + time_offset: builtins.float = ..., + timestamps: collections.abc.Iterable[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["t0", b"t0"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "t0", b"t0", "y_data", b"y_data"]) -> None: ... + def HasField(self, field_name: typing.Literal["t0", b"t0", "timestamp", b"timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "t0", b"t0", "time_offset", b"time_offset", "timestamp", b"timestamp", "timestamps", b"timestamps", "y_data", b"y_data"]) -> None: ... global___DoubleComplexWaveform = DoubleComplexWaveform @@ -219,11 +321,24 @@ class I16ComplexWaveform(google.protobuf.message.Message): Y_DATA_FIELD_NUMBER: builtins.int ATTRIBUTES_FIELD_NUMBER: builtins.int SCALE_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_NUMBER: builtins.int + TIME_OFFSET_FIELD_NUMBER: builtins.int + TIMESTAMPS_FIELD_NUMBER: builtins.int dt: builtins.float """The time interval in seconds between data points in the waveform.""" + time_offset: builtins.float + """The offset, in seconds, relative to timestamp when the first sample occurs. + + When setting time_offset, either both t0 and timestamp should remain unset + or both should be set such that t0 = timestamp + time_offset. + """ @property def t0(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: - """The time of the first sample in y_data.""" + """The time of the first sample in y_data. + + Leave t0 unset only when the start time is unknown or when the waveform + has irregular timing and the timestamps field is used instead. + """ @property def y_data(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: @@ -241,6 +356,24 @@ class I16ComplexWaveform(google.protobuf.message.Message): def scale(self) -> global___Scale: """Optional scaling information used to convert raw data to scaled data.""" + @property + def timestamp(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: + """A timestamp denoting some external stimulus like a trigger. + + When setting timestamp, you should also always set t0 and time_offset such + that t0 = timestamp + time_offset. If timestamp is unset, it is inferred + that timestamp is the same as t0. + """ + + @property + def timestamps(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp]: + """The timestamps for each sample in y_data. + + The length of this field and y_data should match. This is for use in cases where + the waveform has irregular timing. This timestamps field is mutually exclusive + with t0/timestamp/time_offset/dt. + """ + def __init__( self, *, @@ -249,9 +382,12 @@ class I16ComplexWaveform(google.protobuf.message.Message): y_data: collections.abc.Iterable[builtins.int] | None = ..., attributes: collections.abc.Mapping[builtins.str, global___WaveformAttributeValue] | None = ..., scale: global___Scale | None = ..., + timestamp: ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp | None = ..., + time_offset: builtins.float = ..., + timestamps: collections.abc.Iterable[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["scale", b"scale", "t0", b"t0"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "scale", b"scale", "t0", b"t0", "y_data", b"y_data"]) -> None: ... + def HasField(self, field_name: typing.Literal["scale", b"scale", "t0", b"t0", "timestamp", b"timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "scale", b"scale", "t0", b"t0", "time_offset", b"time_offset", "timestamp", b"timestamp", "timestamps", b"timestamps", "y_data", b"y_data"]) -> None: ... global___I16ComplexWaveform = I16ComplexWaveform @@ -379,6 +515,9 @@ class DigitalWaveform(google.protobuf.message.Message): SIGNAL_COUNT_FIELD_NUMBER: builtins.int Y_DATA_FIELD_NUMBER: builtins.int ATTRIBUTES_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_NUMBER: builtins.int + TIME_OFFSET_FIELD_NUMBER: builtins.int + TIMESTAMPS_FIELD_NUMBER: builtins.int dt: builtins.float """The time interval in seconds between data points in the waveform.""" signal_count: builtins.int @@ -389,14 +528,42 @@ class DigitalWaveform(google.protobuf.message.Message): This data is a flattened array of bytes that are ordered such that each signal_count bytes represents a sample. """ + time_offset: builtins.float + """The offset, in seconds, relative to timestamp when the first sample occurs. + + When setting time_offset, either both t0 and timestamp should remain unset + or both should be set such that t0 = timestamp + time_offset. + """ @property def t0(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: - """The time of the first sample in y_data.""" + """The time of the first sample in y_data. + + Leave t0 unset only when the start time is unknown or when the waveform + has irregular timing and the timestamps field is used instead. + """ @property def attributes(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___WaveformAttributeValue]: """Attribute names and values. See WaveformAttributeValue for more details.""" + @property + def timestamp(self) -> ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp: + """A timestamp denoting some external stimulus like a trigger. + + When setting timestamp, you should also always set t0 and time_offset such + that t0 = timestamp + time_offset. If timestamp is unset, it is inferred + that timestamp is the same as t0. + """ + + @property + def timestamps(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp]: + """The timestamps for each sample in y_data. + + The length of this field and y_data should match. This is for use in cases where + the waveform has irregular timing. This timestamps field is mutually exclusive + with t0/timestamp/time_offset/dt. + """ + def __init__( self, *, @@ -405,9 +572,12 @@ class DigitalWaveform(google.protobuf.message.Message): signal_count: builtins.int = ..., y_data: builtins.bytes = ..., attributes: collections.abc.Mapping[builtins.str, global___WaveformAttributeValue] | None = ..., + timestamp: ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp | None = ..., + time_offset: builtins.float = ..., + timestamps: collections.abc.Iterable[ni.protobuf.types.precision_timestamp_pb2.PrecisionTimestamp] | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["t0", b"t0"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "signal_count", b"signal_count", "t0", b"t0", "y_data", b"y_data"]) -> None: ... + def HasField(self, field_name: typing.Literal["t0", b"t0", "timestamp", b"timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "dt", b"dt", "signal_count", b"signal_count", "t0", b"t0", "time_offset", b"time_offset", "timestamp", b"timestamp", "timestamps", b"timestamps", "y_data", b"y_data"]) -> None: ... global___DigitalWaveform = DigitalWaveform diff --git a/third_party/ni-apis b/third_party/ni-apis index 85046c40..20f5ab82 160000 --- a/third_party/ni-apis +++ b/third_party/ni-apis @@ -1 +1 @@ -Subproject commit 85046c4057888c647921e544b5403d99f640bb8d +Subproject commit 20f5ab82ffbf0bb37558381c9d06c422568f8932