The var_metadata_convert.py
module#
Summary#
Raised if a custom metadata item includes an unsupported value type. |
Given a gRPC reference datapin metadata message, produce an equivalent |
|
Given a gRPC Boolean datapin metadata message, produce an equivalent |
|
Given a gRPC Boolean array datapin metadata message, produce an |
|
Fill out a gRPC message representing reference datapin metadata. |
|
Fill out a gRPC message representing an |
|
Fill out a gRPC message representing real metadata. |
|
Create an |
|
Create an |
|
Fill out a gRPC message representing integer metadata. |
|
Create an |
|
Create an |
|
Fill out a gRPC message representing string metadata. |
|
Create an |
|
Create an |
|
Given a gRPC file datapin metadata message, produce an equivalent |
|
Given a gRPC file array datapin metadata message, produce an equivalent |
|
Fill out a gRPC message representing an |
|
Use a generic method to convert any type of variable m.Metadata. |
Description#
Defines functions for converting between ACVI metadata and gRPC messages.
Module detail#
- var_metadata_convert.convert_grpc_reference_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.ReferenceVariableMetadata) ansys.modelcenter.workflow.grpc_modelcenter.reference_datapin_metadata.ReferenceDatapinMetadata #
Given a gRPC reference datapin metadata message, produce an equivalent
ReferenceDatapinMetadata
object.
- var_metadata_convert.convert_grpc_boolean_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.BooleanVariableMetadata) ansys.tools.variableinterop.BooleanMetadata #
Given a gRPC Boolean datapin metadata message, produce an equivalent
atvi.BooleanMetadata
object.
- var_metadata_convert.convert_grpc_boolean_array_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.BooleanVariableMetadata) ansys.tools.variableinterop.BooleanArrayMetadata #
Given a gRPC Boolean array datapin metadata message, produce an equivalent
atvi.BooleanArrayMetadata
object.
- var_metadata_convert.fill_reference_metadata_message(source: ansys.modelcenter.workflow.grpc_modelcenter.reference_datapin_metadata.ReferenceDatapinMetadata, target: ansys.api.modelcenter.v0.variable_value_messages_pb2.ReferenceVariableMetadata) None #
Fill out a gRPC message representing reference datapin metadata.
- var_metadata_convert.fill_boolean_metadata_message(source: ansys.tools.variableinterop.BooleanMetadata, target: ansys.api.modelcenter.v0.variable_value_messages_pb2.BooleanVariableMetadata) None #
Fill out a gRPC message representing an
atvi.BooleanMetadata
object.The subordinate metadata types are also filled out.
- var_metadata_convert.fill_real_metadata_message(source: ansys.tools.variableinterop.RealMetadata, target: ansys.api.modelcenter.v0.variable_value_messages_pb2.DoubleVariableMetadata) None #
Fill out a gRPC message representing real metadata.
All subordinate metadata fields are filled out by this method.
- var_metadata_convert.convert_grpc_real_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.DoubleVariableMetadata) ansys.tools.variableinterop.RealMetadata #
Create an
atvi.RealMetadata
object for a real datapin from a gRPC message.
- var_metadata_convert.convert_grpc_real_array_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.DoubleVariableMetadata) ansys.tools.variableinterop.RealArrayMetadata #
Create an
atvi.RealArrayMetadata
object for a real array datapin from a gRPC message.
- var_metadata_convert.fill_integer_metadata_message(source: ansys.tools.variableinterop.IntegerMetadata, target: ansys.api.modelcenter.v0.variable_value_messages_pb2.IntegerVariableMetadata) None #
Fill out a gRPC message representing integer metadata.
All subordinate metadata fields are filled out by this method.
- var_metadata_convert.convert_grpc_integer_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.IntegerVariableMetadata) ansys.tools.variableinterop.IntegerMetadata #
Create an
atvi.IntegerMetadata
object for an integer datapin from a gRPC message.
- var_metadata_convert.convert_grpc_integer_array_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.IntegerVariableMetadata) ansys.tools.variableinterop.IntegerArrayMetadata #
Create an
atvi.IntegerArrayMetadata
object for an integer array datapin from a gRPC message.
- var_metadata_convert.fill_string_metadata_message(source: ansys.tools.variableinterop.StringMetadata, target: ansys.api.modelcenter.v0.variable_value_messages_pb2.StringVariableMetadata) None #
Fill out a gRPC message representing string metadata.
All subordinate metadata fields are filled out by this method.
- var_metadata_convert.convert_grpc_string_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.StringVariableMetadata) ansys.tools.variableinterop.StringMetadata #
Create an
atvi.StringMetadata
object for a string datapin from a gRPC message.
- var_metadata_convert.convert_grpc_string_array_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.StringVariableMetadata) ansys.tools.variableinterop.StringArrayMetadata #
Create an
atvi.StringArrayMetadata
object for a string array datapin from a gRPC message.
- var_metadata_convert.convert_grpc_file_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.FileVariableMetadata) ansys.tools.variableinterop.FileMetadata #
Given a gRPC file datapin metadata message, produce an equivalent
atvi.FileMetadata
object.
- var_metadata_convert.convert_grpc_file_array_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.FileVariableMetadata) ansys.tools.variableinterop.FileArrayMetadata #
Given a gRPC file array datapin metadata message, produce an equivalent
atvi.FileMetadata
object.
- var_metadata_convert.fill_file_metadata_message(source: ansys.tools.variableinterop.FileMetadata, target: ansys.api.modelcenter.v0.variable_value_messages_pb2.FileVariableMetadata) None #
Fill out a gRPC message representing an
atvi.FileMetadata
object.The subordinate metadata types are also filled out.
- var_metadata_convert.convert_grpc_metadata(source: ansys.api.modelcenter.v0.variable_value_messages_pb2.FileVariableMetadata | ansys.api.modelcenter.v0.variable_value_messages_pb2.StringVariableMetadata | ansys.api.modelcenter.v0.variable_value_messages_pb2.BooleanVariableMetadata | ansys.api.modelcenter.v0.variable_value_messages_pb2.DoubleVariableMetadata | ansys.api.modelcenter.v0.variable_value_messages_pb2.IntegerVariableMetadata, is_array: bool = False) ansys.tools.variableinterop.CommonVariableMetadata #
Use a generic method to convert any type of variable m.Metadata.
- Parameters:
- source
FileVariableMetadata
|StringVariableMetadata
|BooleanVariableMetadata
| - DoubleVariableMetadata | IntegerVariableMetadata
gRPC representation of a datapin metadata.
- is_arraybool,
optional
Whether the metadata i for an array datapin.
- source
- Returns:
atvi.CommonVariableMetadata
Equivalent ATVI metadata object.