diff --git a/build/helper/codegen_helper.py b/build/helper/codegen_helper.py index 86b83c476..1f1c01fd8 100644 --- a/build/helper/codegen_helper.py +++ b/build/helper/codegen_helper.py @@ -257,7 +257,7 @@ def get_ctype_variable_declaration_snippet(parameter, parameters, ivi_dance_step module_name = '_visatype' # Use _complextype.py file for complex parameter - if parameter['complex_type'] is not None: + if parameter.get('complex_array_representation') is not None: module_name = '_complextype' if parameter['is_string'] is True: @@ -368,7 +368,7 @@ def _get_ctype_variable_definition_snippet_for_scalar(parameter, parameters, ivi # Parameter denotes the size of another (the "corresponding") parameter. # Interleaved array length is going to be double the length of number of samples. # This is used for complex waveforms, where the real and imaginary parts are interleaved in the array. - if corresponding_buffer_parameters[0]['complex_type'] == 'interleaved': + if corresponding_buffer_parameters[0].get('complex_array_representation') == 'interleaved_real_number_array': definitions.append(parameter['ctypes_variable_name'] + ' = {0}.{1}(0 if {2} is None else len({2}) // 2) # case S160'.format(module_name, parameter['ctypes_type'], corresponding_buffer_parameters[0]['python_name'])) else: definitions.append(parameter['ctypes_variable_name'] + ' = {0}.{1}(0 if {2} is None else len({2})) # case S160'.format(module_name, parameter['ctypes_type'], corresponding_buffer_parameters[0]['python_name'])) @@ -435,7 +435,7 @@ def _get_ctype_variable_definition_snippet_for_buffers(parameter, parameters, iv definition = None if parameter['numpy'] is True and use_numpy_array is True: - if parameter['complex_type'] is None: + if parameter.get('complex_array_representation') is None: definition = '_get_ctypes_pointer_for_buffer(value={}) # case B510'.format(parameter['python_name']) else: definition = '_get_ctypes_pointer_for_buffer(value={}, library_type={}.{}) # case B510'.format(parameter['python_name'], module_name, parameter['ctypes_type']) diff --git a/build/helper/metadata_add_all.py b/build/helper/metadata_add_all.py index 0ff740cd3..a46d69c39 100644 --- a/build/helper/metadata_add_all.py +++ b/build/helper/metadata_add_all.py @@ -126,10 +126,10 @@ def _add_ctypes_type(parameter, config): parameter['ctypes_type_library_call'] = module_name + parameter['ctypes_type'] -def _add_complex_type(parameter): - '''Adds a complex_type parameter to the metadata for complex numbers''' - if 'complex_type' not in parameter: - parameter['complex_type'] = None +def _add_complex_array_representation(parameter): + '''Adds a complex_array_representation parameter to the metadata for complex numbers''' + if 'complex_array_representation' not in parameter: + parameter['complex_array_representation'] = None def _add_array_dimension(parameter): @@ -462,7 +462,7 @@ def add_all_function_metadata(functions, config): _add_python_type(p, config) _add_ctypes_variable_name(p) _add_ctypes_type(p, config) - _add_complex_type(p) + _add_complex_array_representation(p) _add_array_dimension(p) _add_numpy_info(p, functions[f]['parameters'], config) _add_default_value_name(p) diff --git a/build/helper/metadata_filters.py b/build/helper/metadata_filters.py index cceec8ffe..745184b0b 100644 --- a/build/helper/metadata_filters.py +++ b/build/helper/metadata_filters.py @@ -19,7 +19,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'fixed, passed-in, len', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.SESSION_METHOD_PASSTHROUGH_CALL: { 'skip_session_handle': True, @@ -34,7 +34,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'fixed, passed-in, len', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.SESSION_NUMPY_INTO_METHOD_DECLARATION: { 'skip_session_handle': True, @@ -49,7 +49,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'fixed, passed-in', 'python_api_list': False, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.INTERPRETER_NUMPY_INTO_METHOD_DECLARATION: { 'skip_session_handle': True, @@ -64,7 +64,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'fixed, passed-in', 'python_api_list': False, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.SESSION_METHOD_CALL: { 'skip_session_handle': True, @@ -79,7 +79,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'fixed, passed-in', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.DOCUMENTATION_SESSION_METHOD: { 'skip_session_handle': True, @@ -94,7 +94,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.LIBRARY_METHOD_DECLARATION: { 'skip_session_handle': False, @@ -109,7 +109,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.LIBRARY_METHOD_CALL: { 'skip_session_handle': False, @@ -124,7 +124,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.GRPC_REQUEST_PARAMETERS: { 'skip_session_handle': False, @@ -139,7 +139,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.CTYPES_ARGTYPES: { 'skip_session_handle': False, @@ -154,7 +154,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.INTERPRETER_METHOD_DECLARATION: { 'skip_session_handle': True, @@ -169,7 +169,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'fixed, passed-in, len', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.INPUT_PARAMETERS: { 'skip_session_handle': True, @@ -184,7 +184,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.LIBRARY_OUTPUT_PARAMETERS: { 'skip_session_handle': True, @@ -199,7 +199,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.API_OUTPUT_PARAMETERS: { 'skip_session_handle': True, @@ -214,7 +214,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': False, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.API_NUMPY_OUTPUT_PARAMETERS: { 'skip_session_handle': True, @@ -229,7 +229,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': False, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.GRPC_OUTPUT_PARAMETERS: { 'skip_session_handle': True, @@ -244,7 +244,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': False, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.NUMPY_PARAMETERS: { 'skip_session_handle': True, @@ -259,7 +259,7 @@ 'skip_all_except_numpy_parameters': True, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.IVI_DANCE_PARAMETER: { 'skip_session_handle': True, @@ -274,7 +274,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'ivi-dance, ivi-dance-with-a-twist', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.LEN_PARAMETER: { 'skip_session_handle': True, @@ -289,7 +289,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'len', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.INPUT_ENUM_PARAMETERS: { 'skip_session_handle': True, @@ -304,7 +304,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': False, + 'skip_all_except_complex_array_representation_parameters': False, }, ParameterUsageOptions.COMPLEX_NUMBER_PARAMETERS: { 'skip_session_handle': True, @@ -319,7 +319,7 @@ 'skip_all_except_numpy_parameters': False, 'mechanism': 'any', 'python_api_list': True, - 'skip_all_except_complex_type_parameters': True, + 'skip_all_except_complex_array_representation_parameters': True, }, } @@ -384,7 +384,7 @@ def filter_parameters(parameters, parameter_usage_options): skip = False if not options_to_use['python_api_list'] and not x['use_in_python_api']: skip = True - if options_to_use['skip_all_except_complex_type_parameters'] and x['complex_type'] is None: + if options_to_use['skip_all_except_complex_array_representation_parameters'] and x['complex_array_representation'] is None: skip = True if not skip: parameters_to_use.append(x) diff --git a/build/unit_tests/test_codegen_helper.py b/build/unit_tests/test_codegen_helper.py index 4b5f50466..e6b28ff27 100644 --- a/build/unit_tests/test_codegen_helper.py +++ b/build/unit_tests/test_codegen_helper.py @@ -41,7 +41,6 @@ 'size': {'mechanism': 'fixed', 'value': 1}, 'type': 'ViSession', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 1 @@ -70,7 +69,6 @@ 'size': {'mechanism': 'fixed', 'value': 1}, 'type': 'ViInt64', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 2 @@ -98,7 +96,6 @@ 'size': {'mechanism': 'fixed', 'value': 256}, 'type': 'ViString', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 3 @@ -127,7 +124,6 @@ 'size': {'mechanism': 'python-code', 'value': 'self.get_array_size_for_python_code()'}, 'type': 'custom_struct', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 4 @@ -153,7 +149,6 @@ 'size': {'mechanism': 'fixed', 'value': 1}, 'type': 'ViInt32', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 5 @@ -181,7 +176,6 @@ 'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'}, 'type': 'ViInt16', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 6 @@ -210,7 +204,6 @@ 'size': {'mechanism': 'fixed', 'value': 1}, 'type': 'ViInt16', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 7 @@ -238,7 +231,6 @@ 'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'}, 'type': 'ViInt64', 'numpy': True, - 'complex_type': None, 'numpy_type': 'int64', 'numpy_type_library_call': 'numpy.int64', 'use_in_python_api': True, @@ -260,7 +252,6 @@ 'interpreter_method_call_snippet': 'number_of_elements_python_code', 'name': 'numberOfElementsPythonCode', 'numpy': False, - 'complex_type': None, 'python_name': 'number_of_elements_python_code', 'python_name_with_default': 'number_of_elements_python_code', 'python_name_with_doc_default': 'number_of_elements_python_code', @@ -286,7 +277,6 @@ 'interpreter_method_call_snippet': 'input', 'name': 'input', 'numpy': False, - 'complex_type': None, 'python_name': 'input', 'python_name_with_default': 'input', 'python_name_with_doc_default': 'input', @@ -315,7 +305,6 @@ 'interpreter_method_call_snippet': 'input_array', 'name': 'inputArray', 'numpy': False, - 'complex_type': None, 'python_name': 'input_array', 'python_name_with_default': 'input_array=None', 'python_name_with_doc_default': 'input_array=None', @@ -341,7 +330,6 @@ 'interpreter_method_call_snippet': 'input_array_size', 'name': 'inputArraySize', 'numpy': False, - 'complex_type': None, 'python_name': 'input_array_size', 'python_name_with_default': 'input_array_size', 'python_name_with_doc_default': 'input_array_size', @@ -367,7 +355,6 @@ 'interpreter_method_call_snippet': 'string_size', 'name': 'stringSize', 'numpy': False, - 'complex_type': None, 'python_name': 'string_size', 'python_name_with_default': 'string_size', 'python_name_with_doc_default': 'string_size', @@ -393,7 +380,6 @@ 'interpreter_method_call_snippet': 'a_string', 'name': 'aString', 'numpy': False, - 'complex_type': None, 'python_name': 'a_string', 'python_name_with_default': 'a_string', 'python_name_with_doc_default': 'a_string', @@ -420,7 +406,6 @@ 'interpreter_method_call_snippet': 'timeout', 'name': 'Timeout', 'numpy': False, - 'complex_type': None, 'python_name': 'timeout', 'python_name_with_default': 'timeout=1.0', 'python_name_with_doc_default': 'timeout=1.0', @@ -449,7 +434,6 @@ 'interpreter_method_call_snippet': 'self._repeated_capability', 'name': 'channelList', 'numpy': False, - 'complex_type': None, 'original_type': 'ViChar[]', 'python_name': 'channel_list', 'python_name_with_default': 'channel_list', @@ -476,7 +460,6 @@ 'interpreter_method_call_snippet': 'a_string', 'name': 'aString', 'numpy': False, - 'complex_type': None, 'python_name': 'a_string', 'python_name_with_default': 'a_string', 'python_name_with_doc_default': 'a_string', @@ -509,7 +492,6 @@ 'size': {'mechanism': 'len', 'value': 'array_in'}, 'type': 'custom_struct', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 18 @@ -539,7 +521,6 @@ 'size': {'mechanism': 'fixed', 'value': 256}, 'type': 'ViInt16', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 19 @@ -559,7 +540,6 @@ 'interpreter_method_call_snippet': 'a_string_2', 'name': 'aString2', 'numpy': False, - 'complex_type': None, 'python_name': 'a_string_2', 'python_name_with_default': 'a_string_2', 'python_name_with_doc_default': 'a_string_2', @@ -585,7 +565,6 @@ 'interpreter_method_call_snippet': 'a_string_3', 'name': 'aStrin3g', 'numpy': False, - 'complex_type': None, 'python_name': 'a_string_3', 'python_name_with_default': 'a_string_3', 'python_name_with_doc_default': 'a_string_3', @@ -611,7 +590,6 @@ 'interpreter_method_call_snippet': 'a_string_twist', 'name': 'aStringTwist', 'numpy': False, - 'complex_type': None, 'python_name': 'a_string_twist', 'python_name_with_default': 'a_string_twist', 'python_name_with_doc_default': 'a_string_twist', @@ -646,7 +624,6 @@ 'size': {'mechanism': 'fixed', 'value': 1}, 'type': 'ViInt64', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, { # 23 @@ -666,7 +643,6 @@ 'interpreter_method_call_snippet': 'string_size_twist', 'name': 'stringSizeTwist', 'numpy': False, - 'complex_type': None, 'python_name': 'string_size_twist', 'python_name_with_default': 'string_size_twist', 'python_name_with_doc_default': 'string_size_twist', @@ -692,7 +668,6 @@ 'interpreter_method_call_snippet': 'a_buffer', 'name': 'aBufferArray', 'numpy': False, - 'complex_type': None, 'python_name': 'a_buffer_array', 'python_name_with_default': 'a_buffer_array', 'python_name_with_doc_default': 'a_buffer_array', @@ -720,7 +695,6 @@ 'interpreter_method_call_snippet': 'a_buffer', 'name': 'aBufferList', 'numpy': False, - 'complex_type': None, 'python_name': 'a_buffer_list', 'python_name_with_default': 'a_buffer_list', 'python_name_with_doc_default': 'a_buffer_list', @@ -748,7 +722,6 @@ 'interpreter_method_call_snippet': 'a_buffer', 'name': 'aBufferTwistArray', 'numpy': False, - 'complex_type': None, 'python_name': 'a_buffer_twist_array', 'python_name_with_default': 'a_buffer_twist_array', 'python_name_with_doc_default': 'a_buffer_twist_array', @@ -776,7 +749,6 @@ 'interpreter_method_call_snippet': 'a_buffer', 'name': 'aBufferTwistList', 'numpy': False, - 'complex_type': None, 'python_name': 'a_buffer_twist_list', 'python_name_with_default': 'a_buffer_twist_list', 'python_name_with_doc_default': 'a_buffer_twist_list', @@ -807,7 +779,6 @@ 'interpreter_method_call_snippet': 'input_array_2', 'name': 'inputArray2', 'numpy': False, - 'complex_type': None, 'python_name': 'input_array_2', 'python_name_with_default': 'input_array_2=None', 'python_name_with_doc_default': 'input_array_2=None', @@ -836,7 +807,6 @@ 'interpreter_method_call_snippet': 'input_array_2', 'name': 'inputArray2', 'numpy': False, - 'complex_type': None, 'python_api_converter_name': 'convert_to_nitclk_session_num_list', 'python_name': 'input_array_2', 'python_name_with_default': 'input_array_2=None', @@ -866,7 +836,6 @@ 'interpreter_method_call_snippet': 'input_array_3', 'name': 'inputArray3', 'numpy': False, - 'complex_type': None, 'python_api_converter_name': 'convert_to_nitclk_session_num_list', 'python_name': 'input_array_3', 'python_name_with_default': 'input_array_3=None', @@ -896,7 +865,6 @@ 'interpreter_method_call_snippet': 'input_array_3', 'name': 'inputArray4', 'numpy': False, - 'complex_type': None, 'python_api_converter_name': 'convert_to_nitclk_session_num_list', 'python_name': 'input_array_4', 'python_name_with_default': 'input_array_4=None', @@ -926,7 +894,6 @@ 'interpreter_method_call_snippet': 'input_array_3', 'name': 'inputArray4', 'numpy': False, - 'complex_type': None, 'python_api_converter_name': 'convert_to_nitclk_session_num_list', 'python_name': 'input_array_4', 'python_name_with_default': 'input_array_4=None', @@ -953,7 +920,6 @@ 'interpreter_method_call_snippet': 'a_string_enum', 'name': 'aStringEnum', 'numpy': False, - 'complex_type': None, 'python_name': 'a_string_enum', 'python_name_with_default': 'a_string_enum', 'python_name_with_doc_default': 'a_string_enum', @@ -981,7 +947,6 @@ 'interpreter_method_call_snippet': 'indices', 'name': 'indices', 'numpy': False, - 'complex_type': None, 'original_type': 'ViChar[]', 'python_api_converter_name': 'convert_repeated_capabilities_without_prefix', 'python_name': 'indices', @@ -1018,7 +983,6 @@ 'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'}, 'type': 'ViInt8', 'numpy': False, - 'complex_type': None, 'use_in_python_api': True, }, ] diff --git a/build/unit_tests/test_metadata_add_all.py b/build/unit_tests/test_metadata_add_all.py index b927cc226..83188140a 100644 --- a/build/unit_tests/test_metadata_add_all.py +++ b/build/unit_tests/test_metadata_add_all.py @@ -259,7 +259,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'vi=self._vi', 'use_in_python_api': True, 'python_name_or_default_for_init': 'vi', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -294,7 +294,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'name=name', 'use_in_python_api': True, 'python_name_or_default_for_init': 'name', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -332,7 +332,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'pin_data_buffer_size=pin_data_buffer_size', 'use_in_python_api': False, 'python_name_or_default_for_init': 'pin_data_buffer_size', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -370,7 +370,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'python_code_input=2 ** 14', 'use_in_python_api': True, 'python_name_or_default_for_init': 'python_code_input', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -408,7 +408,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'actual_num_pin_data=actual_num_pin_data', 'use_in_python_api': False, 'python_name_or_default_for_init': 'actual_num_pin_data', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -448,7 +448,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'expected_pin_states=expected_pin_states', 'use_in_python_api': True, 'python_name_or_default_for_init': 'expected_pin_states', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -486,7 +486,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'custom_type_input=custom_type_input._create_copy(grpc_types.CustomStruct)', 'use_in_python_api': True, 'python_name_or_default_for_init': 'custom_type_input', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -524,7 +524,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'custom_type_output=custom_type_output._create_copy(grpc_types.CustomStruct)', 'use_in_python_api': True, 'python_name_or_default_for_init': 'custom_type_output', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -562,7 +562,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'custom_type_without_struct_prefix_input=custom_type_without_struct_prefix_input._create_copy(grpc_types.CustomStruct)', 'use_in_python_api': True, 'python_name_or_default_for_init': 'custom_type_without_struct_prefix_input', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -600,7 +600,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'custom_type_without_struct_prefix_output=custom_type_without_struct_prefix_output._create_copy(grpc_types.CustomStruct)', 'use_in_python_api': True, 'python_name_or_default_for_init': 'custom_type_without_struct_prefix_output', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, ], @@ -649,7 +649,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'vi=self._vi', 'use_in_python_api': True, 'python_name_or_default_for_init': 'vi', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -687,7 +687,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'status=status', 'use_in_python_api': True, 'python_name_or_default_for_init': 'status', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -725,7 +725,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'data_buffer_size=data_buffer_size', 'use_in_python_api': False, 'python_name_or_default_for_init': 'data_buffer_size', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, { @@ -764,7 +764,7 @@ def _compare_dicts(actual, expected): 'grpc_request_snippet': 'data=data', 'use_in_python_api': True, 'python_name_or_default_for_init': 'data', - 'complex_type': None, + 'complex_array_representation': None, 'array_dimension': 1, }, ], diff --git a/generated/nifake/nifake/session.py b/generated/nifake/nifake/session.py index eb4627054..d082ac3c9 100644 --- a/generated/nifake/nifake/session.py +++ b/generated/nifake/nifake/session.py @@ -1711,10 +1711,10 @@ def write_waveform_numpy(self, waveform): def write_waveform_numpy_complex128(self, waveform_data_array): r'''write_waveform_numpy_complex128 - A method that writes a waveform of numpy complex128 numbers. + A method that writes a waveform of numpy complex128 samples. Args: - waveform_data_array (numpy.array(dtype=numpy.complex128)): Specifies the array of data to load into the waveform. Array should be numberOfSamples big. + waveform_data_array (numpy.array(dtype=numpy.complex128)): Specifies the array of data to load into the waveform. ''' import numpy @@ -1733,10 +1733,10 @@ def write_waveform_numpy_complex128(self, waveform_data_array): def write_waveform_numpy_complex64(self, waveform_data_array): r'''write_waveform_numpy_complex64 - A method that writes a waveform of numpy complex64 numbers. + A method that writes a waveform of numpy complex64 samples. Args: - waveform_data_array (numpy.array(dtype=numpy.complex64)): Specifies the array of data to load into the waveform. Array should be numberOfSamples big. + waveform_data_array (numpy.array(dtype=numpy.complex64)): Specifies the array of data to load into the waveform. ''' import numpy @@ -1755,10 +1755,10 @@ def write_waveform_numpy_complex64(self, waveform_data_array): def write_waveform_numpy_complex_interleaved_i16(self, waveform_data_array): r'''write_waveform_numpy_complex_interleaved_i16 - A method that writes a waveform of numpy complex i16 numbers. + A method that writes a waveform of numpy complex i16 samples. Args: - waveform_data_array (numpy.array(dtype=numpy.int16)): Specifies the array of data to load into the waveform. Array should be numberOfSamples big. + waveform_data_array (numpy.array(dtype=numpy.int16)): Specifies the array of data to load into the waveform. ''' import numpy diff --git a/src/nifake/metadata/attributes.py b/src/nifake/metadata/attributes.py index 92c59e145..00aebfe5f 100644 --- a/src/nifake/metadata/attributes.py +++ b/src/nifake/metadata/attributes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 24.8.0f100 +# This file is generated from NI-FAKE API metadata version 25.8.0d9999 attributes = { 1000000: { 'access': 'read-write', diff --git a/src/nifake/metadata/config.py b/src/nifake/metadata/config.py index cad911ac9..ea0920715 100644 --- a/src/nifake/metadata/config.py +++ b/src/nifake/metadata/config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 24.8.0f100 +# This file is generated from NI-FAKE API metadata version 25.8.0d9999 config = { - 'api_version': '24.8.0f100', + 'api_version': '25.8.0d9999', 'c_function_prefix': 'niFake_', 'close_function': 'close', 'context_manager_name': { diff --git a/src/nifake/metadata/enums.py b/src/nifake/metadata/enums.py index 0463980b5..418878fc0 100644 --- a/src/nifake/metadata/enums.py +++ b/src/nifake/metadata/enums.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 24.8.0f100 +# This file is generated from NI-FAKE API metadata version 25.8.0d9999 enums = { 'AltColor': { 'values': [ diff --git a/src/nifake/metadata/functions.py b/src/nifake/metadata/functions.py index 0b45a5fd6..1c932816b 100644 --- a/src/nifake/metadata/functions.py +++ b/src/nifake/metadata/functions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-FAKE API metadata version 25.5.0d9999 +# This file is generated from NI-FAKE API metadata version 25.8.0d9999 functions = { 'Abort': { 'codegen_method': 'public', @@ -2828,10 +2828,9 @@ 'WriteWaveformNumpyComplex64': { 'codegen_method': 'public', 'documentation': { - 'description': 'A function that writes a waveform of numpy complex64 numbers.' + 'description': 'A function that writes a waveform of numpy complex64 samples.' }, 'included_in_proto': False, - 'is_error_handling': False, 'method_templates': [ { 'documentation_filename': 'numpy_method', @@ -2862,10 +2861,10 @@ 'use_in_python_api': False }, { - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { - 'description': 'Specifies the array of data to load into the waveform. Array should be numberOfSamples big.' + 'description': 'Specifies the array of data to load into the waveform.' }, 'name': 'waveformDataArray', 'numpy': True, @@ -2874,8 +2873,7 @@ 'value': 'numberOfSamples' }, 'type': 'NIComplexNumberF32[]', - 'use_in_python_api': True, - 'use_numpy_array': True + 'use_in_python_api': True } ], 'returns': 'ViStatus' @@ -2883,7 +2881,7 @@ 'WriteWaveformNumpyComplex128': { 'codegen_method': 'public', 'documentation': { - 'description': 'A function that writes a waveform of numpy complex128 numbers.' + 'description': 'A function that writes a waveform of numpy complex128 samples.' }, 'included_in_proto': False, 'is_error_handling': False, @@ -2917,10 +2915,10 @@ 'use_in_python_api': False }, { - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { - 'description': 'Specifies the array of data to load into the waveform. Array should be numberOfSamples big.' + 'description': 'Specifies the array of data to load into the waveform.' }, 'name': 'waveformDataArray', 'numpy': True, @@ -2929,8 +2927,7 @@ 'value': 'numberOfSamples' }, 'type': 'NIComplexNumber[]', - 'use_in_python_api': True, - 'use_numpy_array': True + 'use_in_python_api': True } ], 'returns': 'ViStatus' @@ -2938,7 +2935,7 @@ 'WriteWaveformNumpyComplexInterleavedI16': { 'codegen_method': 'public', 'documentation': { - 'description': 'A function that writes a waveform of numpy complex i16 numbers.' + 'description': 'A function that writes a waveform of numpy complex i16 samples.' }, 'included_in_proto': False, 'is_error_handling': False, @@ -2972,10 +2969,10 @@ 'use_in_python_api': False }, { - 'complex_type': 'interleaved', + 'complex_array_representation': 'interleaved_real_number_array', 'direction': 'in', 'documentation': { - 'description': 'Specifies the array of data to load into the waveform. Array should be numberOfSamples big.' + 'description': 'Specifies the array of data to load into the waveform.' }, 'name': 'waveformDataArray', 'numpy': True, @@ -2984,8 +2981,7 @@ 'value': 'numberOfSamples' }, 'type': 'NIComplexI16[]', - 'use_in_python_api': True, - 'use_numpy_array': True + 'use_in_python_api': True } ], 'returns': 'ViStatus' @@ -3017,15 +3013,15 @@ 'use_in_python_api': True }, { - 'complex_type': 'numpy', + + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { - 'description': 'Specifies the 3D array of numpy complex numbers to write. ' + 'description': 'Specifies the 3D array of numpy complex numbers to write.' }, 'name': 'multidimensionalArray', 'type': 'NIComplexNumber[]', 'numpy': True, - 'use_numpy_array': True, 'use_in_python_api': True, 'array_dimension': 3 }, diff --git a/src/nirfsg/metadata/functions.py b/src/nirfsg/metadata/functions.py index 5b2edcbb0..e7940f49d 100644 --- a/src/nirfsg/metadata/functions.py +++ b/src/nirfsg/metadata/functions.py @@ -1520,7 +1520,7 @@ }, { 'array_dimension': 3, - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { 'description': 'Specifies the S-parameters for each frequency. S-parameters for each frequency are placed in the array in the following order: s11, s12, s21, s22.' @@ -2006,7 +2006,7 @@ }, { 'array_dimension': 3, - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { 'description': 'Specifies the S-parameters for each frequency. S-parameters for each frequency are placed in the array in the following order: s11, s12, s21, s22.' @@ -2080,7 +2080,7 @@ }, { 'array_dimension': 2, - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'out', 'documentation': { 'description': 'Returns an array of S-parameters. The S-parameters are returned in the following order: s11, s12, s21, s22.' @@ -2674,7 +2674,7 @@ }, { 'array_dimension': 2, - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'out', 'documentation': { 'description': 'Returns an array of S-parameters. The S-parameters are returned in the following order: s11, s12, s21, s22.' @@ -5335,7 +5335,7 @@ 'use_array': False }, { - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { 'description': 'Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the **size_in_samples** parameter in the nirfsg_AllocateArbWaveform function.' @@ -5410,7 +5410,7 @@ 'use_array': False }, { - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { 'description': 'Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the **size_in_samples** parameter in the nirfsg_AllocateArbWaveform function.' @@ -5485,7 +5485,7 @@ 'use_array': False }, { - 'complex_type': 'interleaved', + 'complex_array_representation': 'interleaved_real_number_array', 'direction': 'in', 'documentation': { 'description': 'Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the **size_in_samples** parameter in the nirfsg_AllocateArbWaveform function.' @@ -5541,7 +5541,7 @@ 'use_in_python_api': True }, { - 'complex_type': 'numpy', + 'complex_array_representation': 'complex_number_array', 'direction': 'in', 'documentation': { 'description': 'Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the **size_in_samples** parameter in the nirfsg_AllocateArbWaveform function.'