ni_measurementlink_service
releases/1.4
  • API Reference
ni_measurementlink_service
  • ni_measurementlink_service._internal.parameter.metadata
  • Edit on GitHub

ni_measurementlink_service._internal.parameter.metadata

Contains classes that represents metadata.

Module Contents

Classes

ParameterMetadata

Class that represents the metadata of parameters.

Functions

validate_default_value_type(parameter_metadata)

Validate and raise exception if the default value does not match the type info.

get_enum_values_annotation(parameter_metadata)

Gets the value for the "ni/enum.values" annotation if it exists.

class ni_measurementlink_service._internal.parameter.metadata.ParameterMetadata[source]

Bases: NamedTuple

Class that represents the metadata of parameters.

display_name: str

The display name of the parameter.

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.

annotations: Dict[str, str]

Represents a set of annotations on the type.

message_type: str = ''

The gRPC full name of the message type.

Required when ‘type’ is Kind.TypeMessage. Ignored for any other ‘type’.

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:

str


© Copyright 2024, National Instruments. Revision 2ba12c60.

Built with Sphinx using a theme provided by Read the Docs.