nitypes.scalar.Scalar
- class nitypes.scalar.Scalar(value: TScalar_co, units: str = '')
Bases:
Generic[TScalar_co]A scalar data class, which encapsulates scalar data and units information.
Constructing
To construct a scalar data object, use the
Scalarclass:>>> Scalar(False) nitypes.scalar.Scalar(value=False, units='') >>> Scalar(0) nitypes.scalar.Scalar(value=0, units='') >>> Scalar(5.0, 'volts') nitypes.scalar.Scalar(value=5.0, units='volts') >>> Scalar("value", "volts") nitypes.scalar.Scalar(value='value', units='volts')
Class members
- __slots__ = ['_value', '_extended_properties']
- property value: TScalar_co
The scalar value.
- Return type:
TScalar_co
- property extended_properties: nitypes.waveform.ExtendedPropertyDictionary
The extended properties for the scalar.
Note
Data stored in the extended properties dictionary may not be encrypted when you send it over the network or write it to a TDMS file.
- Return type:
- Parameters:
value (TScalar_co)
units (str)