Skip to content

Commit f643b29

Browse files
committed
Updated gRPC enum to resolve 'TypeError: 'float' object cannot be interpreted as an integer' in 'SetAttributeVi' methods
1 parent e03f722 commit f643b29

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/nirfsg/metadata/functions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4095,6 +4095,7 @@
40954095
'description': 'Specifies the value to which you want to set the attribute.',
40964096
'note': 'Some values may not be valid. The allowed values depend on the current settings of the instrument session.'
40974097
},
4098+
'grpc_enum': 'NiRFSGInt32AttributeValues',
40984099
'name': 'value',
40994100
'type': 'ViInt32',
41004101
'use_array': False,
@@ -4214,6 +4215,8 @@
42144215
'description': 'Pass the value to which you want to set the attribute.',
42154216
'note': 'Some values may not be valid. The allowed values depend on the current settings of the instrument session.'
42164217
},
4218+
'grpc_enum': 'NiRFSGReal64AttributeValues',
4219+
'grpc_name': 'value_raw',
42174220
'name': 'value',
42184221
'type': 'ViReal64',
42194222
'use_array': False,
@@ -4334,6 +4337,7 @@
43344337
'description': 'Pass the value to which you want to set the attribute.',
43354338
'note': 'Some values may not be valid. The allowed values depend on the current settings of the instrument session.'
43364339
},
4340+
'grpc_mapped_enum': 'NiRFSGStringAttributeValuesMapped',
43374341
'name': 'value',
43384342
'type': 'ViConstString',
43394343
'use_array': False,

src/nirfsg/system_tests/test_system_nirfsg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def test_set_get_deembedding_sparameters(self, rfsg_device_session):
555555
sparameter_tables = np.array([[[1 + 1j, 2 + 2j], [3 + 3j, 4 + 4j]], [[5 + 5j, 6 + 6j], [7 + 7j, 8 + 8j]], [[9 + 9j, 10 + 10j], [11 + 11j, 12 + 12j]]], dtype=np.complex128)
556556
expected_sparameter_table = np.array([[5 + 5j, 6 + 6j], [7 + 7j, 8 + 8j]], dtype=np.complex128)
557557
rfsg_device_session.create_deembedding_sparameter_table_array('', 'myTable1', frequencies, sparameter_tables, nirfsg.SparameterOrientation.PORT2_TOWARDS_DUT)
558-
rfsg_device_session.configure_rf(2e9, -5.0)
558+
rfsg_device_session.frequency = 2e9
559559
returned_sparameter_table = rfsg_device_session.get_deembedding_sparameters()
560560
assert returned_sparameter_table.all() == expected_sparameter_table.all()
561561

0 commit comments

Comments
 (0)