From 0d445369e0ee334d1a28040c8d1962b031b16102 Mon Sep 17 00:00:00 2001 From: Utkarsh Tyagi Date: Thu, 13 Nov 2025 18:58:24 +0530 Subject: [PATCH 1/3] cleanup for exisiting grpc enums plus addition of grpc enum entries where required --- src/nirfsg/metadata/functions.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/nirfsg/metadata/functions.py b/src/nirfsg/metadata/functions.py index 6fe04d2fc..58e23c082 100644 --- a/src/nirfsg/metadata/functions.py +++ b/src/nirfsg/metadata/functions.py @@ -237,7 +237,6 @@ 'description': 'Pass the value that you want to verify as a valid value for the attribute.', 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' }, - 'grpc_enum': 'NiRFSGInt32AttributeValues', 'name': 'value', 'type': 'ViInt32', 'use_array': False, @@ -298,7 +297,6 @@ 'description': 'Pass the value that you want to verify as a valid value for the attribute.', 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' }, - 'grpc_enum': 'NiRFSGInt64AttributeValues', 'name': 'value', 'type': 'ViInt64', 'use_array': False, @@ -359,7 +357,6 @@ 'description': 'Pass the value that you want to verify as a valid value for the attribute.', 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' }, - 'grpc_enum': 'NiRFSGReal64AttributeValues', 'name': 'value', 'type': 'ViReal64', 'use_array': False, @@ -480,7 +477,6 @@ 'description': 'Pass the value that you want to verify as a valid value for the attribute. The value must be a NULL-terminated string.', 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' }, - 'grpc_mapped_enum': 'NiRFSGStringAttributeValuesMapped', 'name': 'value', 'type': 'ViConstString', 'use_array': False, @@ -1026,6 +1022,7 @@ }, 'is_repeated_capability': True, 'name': 'triggerId', + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -1037,6 +1034,7 @@ 'description': 'Specifies the source terminal for the digital edge Script Trigger. NI-RFSG sets the NIRFSG_ATTR_DIGITAL_EDGE_SCRIPT_TRIGGER_SOURCE attribute to this value.' }, 'name': 'source', + 'grpc_enum': 'TriggerSource', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -1089,6 +1087,7 @@ 'description': 'Specifies the source terminal for the digital edge trigger. NI-RFSG sets the NIRFSG_ATTR_DIGITAL_EDGE_START_TRIGGER_SOURCE attribute to this value.' }, 'name': 'source', + 'grpc_enum': 'TriggerSource', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -1141,6 +1140,7 @@ }, 'is_repeated_capability': True, 'name': 'triggerId', + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -1419,6 +1419,7 @@ }, 'is_repeated_capability': True, 'name': 'triggerId', + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -1810,6 +1811,7 @@ }, 'is_repeated_capability': True, 'name': 'triggerId', + 'grpc_enum': 'DigitalEdgeScriptTriggerIdentifier', 'repeated_capability_type': 'script_triggers', 'type': 'ViConstString', 'use_array': False, @@ -2046,7 +2048,6 @@ ] }, 'enum': 'SparameterOrientation', - 'grpc_enum': None, 'name': 'sparameterOrientation', 'type': 'ViInt32', 'use_array': False, @@ -2958,7 +2959,6 @@ 'description': 'Specifies from which stand-alone module to retrieve the last successful self-calibration date and time.' }, 'enum': 'Module', - 'grpc_enum': None, 'name': 'module', 'type': 'ViInt32' }, @@ -3039,7 +3039,6 @@ 'description': 'Specifies from which stand-alone module to retrieve the last successful self-calibration date and time.' }, 'enum': 'Module', - 'grpc_enum': None, 'name': 'module', 'type': 'ViInt32', 'use_array': False, @@ -3306,6 +3305,7 @@ ] }, 'name': 'signalIdentifier', + 'grpc_enum': 'SignalIdentifier', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -4592,6 +4592,7 @@ ] }, 'name': 'triggerIdentifier', + 'grpc_enum': 'SignalIdentifier', 'type': 'ViConstString', 'use_array': False, 'use_in_python_api': True @@ -4789,7 +4790,6 @@ 'description': 'Specifies the value to which you want to set the attribute.', 'note': 'Some values may not be valid. The allowed values depend on the current settings of the instrument session.' }, - 'grpc_enum': 'NiRFSGInt32AttributeValues', 'name': 'value', 'type': 'ViInt32', 'use_array': False, @@ -4849,7 +4849,6 @@ 'documentation': { 'description': 'Pass the value to which you want to set the attribute.\n\n
\nSome values may not be valid. The allowed values depend on the current settings of the instrument session.\n
' }, - 'grpc_enum': 'NiRFSGInt64AttributeValues', 'name': 'value', 'type': 'ViInt64', 'use_array': False, @@ -4910,7 +4909,6 @@ 'description': 'Pass the value to which you want to set the attribute.', 'note': 'Some values may not be valid. The allowed values depend on the current settings of the instrument session.' }, - 'grpc_enum': 'NiRFSGReal64AttributeValues', 'name': 'value', 'type': 'ViReal64', 'use_array': False, @@ -5031,7 +5029,6 @@ 'description': 'Pass the value to which you want to set the attribute.', 'note': 'Some values may not be valid. The allowed values depend on the current settings of the instrument session.' }, - 'grpc_mapped_enum': 'NiRFSGStringAttributeValuesMapped', 'name': 'value', 'type': 'ViConstString', 'use_array': False, From 00aad10ab499caacdc54ffbd3c849a59622418d4 Mon Sep 17 00:00:00 2001 From: Utkarsh Tyagi Date: Fri, 14 Nov 2025 12:34:40 +0530 Subject: [PATCH 2/3] reverted none removal --- src/nirfsg/metadata/functions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nirfsg/metadata/functions.py b/src/nirfsg/metadata/functions.py index 58e23c082..19904ce72 100644 --- a/src/nirfsg/metadata/functions.py +++ b/src/nirfsg/metadata/functions.py @@ -2048,6 +2048,7 @@ ] }, 'enum': 'SparameterOrientation', + 'grpc_enum': None, 'name': 'sparameterOrientation', 'type': 'ViInt32', 'use_array': False, @@ -2959,6 +2960,7 @@ 'description': 'Specifies from which stand-alone module to retrieve the last successful self-calibration date and time.' }, 'enum': 'Module', + 'grpc_enum': None, 'name': 'module', 'type': 'ViInt32' }, @@ -3039,6 +3041,7 @@ 'description': 'Specifies from which stand-alone module to retrieve the last successful self-calibration date and time.' }, 'enum': 'Module', + 'grpc_enum': None, 'name': 'module', 'type': 'ViInt32', 'use_array': False, From 21f3d922a15cebd5c82ee017c3a1c701273526ec Mon Sep 17 00:00:00 2001 From: Rahul R Date: Thu, 12 Feb 2026 05:22:28 +0000 Subject: [PATCH 3/3] Remocing CheckAttribute Apis as its decricated from nirfsg nimi-python --- src/nirfsg/metadata/functions.py | 360 ------------------------------- 1 file changed, 360 deletions(-) diff --git a/src/nirfsg/metadata/functions.py b/src/nirfsg/metadata/functions.py index 4c081fb91..64416372f 100644 --- a/src/nirfsg/metadata/functions.py +++ b/src/nirfsg/metadata/functions.py @@ -125,366 +125,6 @@ ], 'returns': 'ViStatus' }, - 'CheckAttributeViBoolean': { - 'codegen_method': 'public', - 'documentation': { - 'description': '\nChecks the validity of a value you specify for a ViBoolean attribute.' - }, - 'included_in_proto': True, - 'method_templates': [ - { - 'documentation_filename': 'default_method', - 'library_interpreter_filename': 'default_method', - 'method_python_name_suffix': '', - 'session_filename': 'default_method' - } - ], - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - 'description': 'Identifies your instrument session. The ViSession handle is obtained from the nirfsg_Init function or the nirfsg_InitWithOptions function and identifies a particular instrument session.' - }, - 'name': 'vi', - 'type': 'ViSession', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Specifies the waveform name and the marker name.\n\nExample:\n\n"waveform::waveform0/marker0"' - }, - 'name': 'channelName', - 'type': 'ViConstString', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the ID of an attribute.' - }, - 'name': 'attribute', - 'grpc_name': 'attribute_id', - 'type': 'ViAttr', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the value that you want to verify as a valid value for the attribute.', - 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' - }, - 'name': 'value', - 'type': 'ViBoolean', - 'use_array': False, - 'use_in_python_api': True - } - ], - 'returns': 'ViStatus' - }, - 'CheckAttributeViInt32': { - 'codegen_method': 'public', - 'documentation': { - 'description': '\nChecks the validity of a value you specify for a ViInt32 attribute.' - }, - 'included_in_proto': True, - 'method_templates': [ - { - 'documentation_filename': 'default_method', - 'library_interpreter_filename': 'default_method', - 'method_python_name_suffix': '', - 'session_filename': 'default_method' - } - ], - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - 'description': 'Identifies your instrument session. The ViSession handle is obtained from the nirfsg_Init function or the nirfsg_InitWithOptions function and identifies a particular instrument session.' - }, - 'name': 'vi', - 'type': 'ViSession', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Specifies the waveform name and the marker name.\n\nExample:\n\n"waveform::waveform0/marker0"' - }, - 'name': 'channelName', - 'type': 'ViConstString', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the ID of an attribute.' - }, - 'name': 'attribute', - 'grpc_name': 'attribute_id', - 'type': 'ViAttr', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the value that you want to verify as a valid value for the attribute.', - 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' - }, - 'name': 'value', - 'type': 'ViInt32', - 'use_array': False, - 'use_in_python_api': True - } - ], - 'returns': 'ViStatus' - }, - 'CheckAttributeViInt64': { - 'codegen_method': 'public', - 'documentation': { - 'description': '\nChecks the validity of a value you specify for a ViInt64 attribute.' - }, - 'included_in_proto': True, - 'method_templates': [ - { - 'documentation_filename': 'default_method', - 'library_interpreter_filename': 'default_method', - 'method_python_name_suffix': '', - 'session_filename': 'default_method' - } - ], - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - 'description': 'Identifies your instrument session. The ViSession handle is obtained from the nirfsg_Init function or the nirfsg_InitWithOptions function and identifies a particular instrument session.' - }, - 'name': 'vi', - 'type': 'ViSession', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Specifies the waveform name and the marker name.\n\nExample:\n\n"waveform::waveform0/marker0"' - }, - 'name': 'channelName', - 'type': 'ViConstString', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the ID of an attribute.' - }, - 'name': 'attribute', - 'grpc_name': 'attribute_id', - 'type': 'ViAttr', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the value that you want to verify as a valid value for the attribute.', - 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' - }, - 'name': 'value', - 'type': 'ViInt64', - 'use_array': False, - 'use_in_python_api': True - } - ], - 'returns': 'ViStatus' - }, - 'CheckAttributeViReal64': { - 'codegen_method': 'public', - 'documentation': { - 'description': '\nChecks the validity of a value you specify for a ViReal64 attribute.' - }, - 'included_in_proto': True, - 'method_templates': [ - { - 'documentation_filename': 'default_method', - 'library_interpreter_filename': 'default_method', - 'method_python_name_suffix': '', - 'session_filename': 'default_method' - } - ], - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - 'description': 'Identifies your instrument session. The ViSession handle is obtained from the nirfsg_Init function or the nirfsg_InitWithOptions function and identifies a particular instrument session.' - }, - 'name': 'vi', - 'type': 'ViSession', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Specifies the waveform name and the marker name.\n\nExample:\n\n"waveform::waveform0/marker0"' - }, - 'name': 'channelName', - 'type': 'ViConstString', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the ID of an attribute.' - }, - 'name': 'attribute', - 'grpc_name': 'attribute_id', - 'type': 'ViAttr', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the value that you want to verify as a valid value for the attribute.', - 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' - }, - 'name': 'value', - 'type': 'ViReal64', - 'use_array': False, - 'use_in_python_api': True - } - ], - 'returns': 'ViStatus' - }, - 'CheckAttributeViSession': { - 'codegen_method': 'public', - 'documentation': { - 'description': '\nChecks the validity of a value you specify for a ViSession attribute.' - }, - 'included_in_proto': True, - 'method_templates': [ - { - 'documentation_filename': 'default_method', - 'library_interpreter_filename': 'default_method', - 'method_python_name_suffix': '', - 'session_filename': 'default_method' - } - ], - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - 'description': 'Identifies your instrument session. The ViSession handle is obtained from the nirfsg_Init function or the nirfsg_InitWithOptions function and identifies a particular instrument session.' - }, - 'name': 'vi', - 'type': 'ViSession', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Specifies the waveform name and the marker name.\n\nExample:\n\n"waveform::waveform0/marker0"' - }, - 'name': 'channelName', - 'type': 'ViConstString', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the ID of an attribute.' - }, - 'name': 'attribute', - 'grpc_name': 'attribute_id', - 'type': 'ViAttr', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the value that you want to verify as a valid value for the attribute.', - 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' - }, - 'name': 'value', - 'type': 'ViSession', - 'use_array': False, - 'use_in_python_api': True - } - ], - 'returns': 'ViStatus' - }, - 'CheckAttributeViString': { - 'codegen_method': 'public', - 'documentation': { - 'description': '\nChecks the validity of a value you specify for a ViString attribute.' - }, - 'included_in_proto': True, - 'method_templates': [ - { - 'documentation_filename': 'default_method', - 'library_interpreter_filename': 'default_method', - 'method_python_name_suffix': '', - 'session_filename': 'default_method' - } - ], - 'parameters': [ - { - 'direction': 'in', - 'documentation': { - 'description': 'Identifies your instrument session. The ViSession handle is obtained from the nirfsg_Init function or the nirfsg_InitWithOptions function and identifies a particular instrument session.' - }, - 'name': 'vi', - 'type': 'ViSession', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Specifies the waveform name and the marker name.\n\nExample:\n\n"waveform::waveform0/marker0"' - }, - 'name': 'channelName', - 'type': 'ViConstString', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the ID of an attribute.' - }, - 'name': 'attribute', - 'grpc_name': 'attribute_id', - 'type': 'ViAttr', - 'use_array': False, - 'use_in_python_api': True - }, - { - 'direction': 'in', - 'documentation': { - 'description': 'Pass the value that you want to verify as a valid value for the attribute. The value must be a NULL-terminated string.', - 'note': 'Some of the values might not be valid depending on the current settings of the instrument session.' - }, - 'name': 'value', - 'type': 'ViConstString', - 'use_array': False, - 'use_in_python_api': True - } - ], - 'returns': 'ViStatus' - }, 'CheckGenerationStatus': { 'codegen_method': 'public', 'documentation': {