ni_measurementlink_service._internal.parameter.metadata
Contains classes that represents metadata.
Module Contents
Classes
Class that represents the metadata of parameters. |
Functions
|
Validate and raise exception if the default value does not match the type info. |
|
Gets the value for the "ni/enum.values" annotation if it exists. |
- class ni_measurementlink_service._internal.parameter.metadata.ParameterMetadata[source]
Bases:
NamedTupleClass that represents the metadata of parameters.
- type: google.protobuf.type_pb2.Field.Kind.ValueType
The datatype of the parameter represented by the gRPC field enum.
- repeated: bool
Indicates whether the parameter is a scalar or 1D array.
True for 1D array and false for scalar.
- default_value: Any
The default value of the parameter.
- ni_measurementlink_service._internal.parameter.metadata.validate_default_value_type(parameter_metadata)[source]
Validate and raise exception if the default value does not match the type info.
- Parameters:
parameter_metadata (ParameterMetadata) – Parameter metadata
- Raises:
TypeError – If default value does not match the Datatype.
- Return type:
None
- ni_measurementlink_service._internal.parameter.metadata.get_enum_values_annotation(parameter_metadata)[source]
Gets the value for the “ni/enum.values” annotation if it exists.
- Parameters:
parameter_metadata (ParameterMetadata) – Parameter metadata
- Returns:
The value of “ni/enum.values” annotation
- Return type: