Skip to content

Commit 7c50184

Browse files
committed
Matching the NiRFSG Metadata
1 parent 4d3bfe4 commit 7c50184

File tree

6 files changed

+0
-140
lines changed

6 files changed

+0
-140
lines changed

docs/nirfsg/class.rst

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,44 +1803,6 @@ get_max_settable_power
18031803

18041804

18051805

1806-
get_script
1807-
----------
1808-
1809-
.. py:currentmodule:: nirfsg.Session
1810-
1811-
.. py:method:: get_script(script_name)
1812-
1813-
TBD
1814-
1815-
1816-
1817-
1818-
1819-
:param script_name:
1820-
1821-
1822-
1823-
1824-
1825-
:type script_name: str
1826-
1827-
:rtype: tuple (script, actual_buffer_size)
1828-
1829-
WHERE
1830-
1831-
script (str):
1832-
1833-
1834-
1835-
1836-
1837-
actual_buffer_size (int):
1838-
1839-
1840-
1841-
1842-
1843-
18441806
get_self_calibration_last_date_and_time
18451807
---------------------------------------
18461808

generated/nirfsg/nirfsg/_library.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def __init__(self, ctypes_library):
7272
self.niRFSG_GetError_cfunc = None
7373
self.niRFSG_GetExternalCalibrationLastDateAndTime_cfunc = None
7474
self.niRFSG_GetMaxSettablePower_cfunc = None
75-
self.niRFSG_GetScript_cfunc = None
7675
self.niRFSG_GetSelfCalibrationDateAndTime_cfunc = None
7776
self.niRFSG_GetSelfCalibrationTemperature_cfunc = None
7877
self.niRFSG_GetTerminalName_cfunc = None
@@ -540,14 +539,6 @@ def niRFSG_GetMaxSettablePower(self, vi, value): # noqa: N802
540539
self.niRFSG_GetMaxSettablePower_cfunc.restype = ViStatus # noqa: F405
541540
return self.niRFSG_GetMaxSettablePower_cfunc(vi, value)
542541

543-
def niRFSG_GetScript(self, vi, script_name, script, buffer_size, actual_buffer_size): # noqa: N802
544-
with self._func_lock:
545-
if self.niRFSG_GetScript_cfunc is None:
546-
self.niRFSG_GetScript_cfunc = self._get_library_function('niRFSG_GetScript')
547-
self.niRFSG_GetScript_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViInt32)] # noqa: F405
548-
self.niRFSG_GetScript_cfunc.restype = ViStatus # noqa: F405
549-
return self.niRFSG_GetScript_cfunc(vi, script_name, script, buffer_size, actual_buffer_size)
550-
551542
def niRFSG_GetSelfCalibrationDateAndTime(self, vi, module, year, month, day, hour, minute, second): # noqa: N802
552543
with self._func_lock:
553544
if self.niRFSG_GetSelfCalibrationDateAndTime_cfunc is None:

generated/nirfsg/nirfsg/_library_interpreter.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -535,20 +535,6 @@ def get_max_settable_power(self): # noqa: N802
535535
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
536536
return float(value_ctype.value)
537537

538-
def get_script(self, script_name): # noqa: N802
539-
vi_ctype = _visatype.ViSession(self._vi) # case S110
540-
script_name_ctype = ctypes.create_string_buffer(script_name.encode(self._encoding)) # case C020
541-
script_ctype = None # case C050
542-
buffer_size_ctype = _visatype.ViInt32() # case S170
543-
actual_buffer_size_ctype = _visatype.ViInt32() # case S220
544-
error_code = self._library.niRFSG_GetScript(vi_ctype, script_name_ctype, script_ctype, buffer_size_ctype, None if actual_buffer_size_ctype is None else (ctypes.pointer(actual_buffer_size_ctype)))
545-
errors.handle_error(self, error_code, ignore_warnings=True, is_error_handling=False)
546-
buffer_size_ctype = _visatype.ViInt32(error_code) # case S180
547-
script_ctype = (_visatype.ViChar * buffer_size_ctype.value)() # case C060
548-
error_code = self._library.niRFSG_GetScript(vi_ctype, script_name_ctype, script_ctype, buffer_size_ctype, None if actual_buffer_size_ctype is None else (ctypes.pointer(actual_buffer_size_ctype)))
549-
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
550-
return script_ctype.value.decode(self._encoding), int(actual_buffer_size_ctype.value)
551-
552538
def get_self_calibration_date_and_time(self, module): # noqa: N802
553539
vi_ctype = _visatype.ViSession(self._vi) # case S110
554540
module_ctype = _visatype.ViInt32(module.value) # case S130

generated/nirfsg/nirfsg/session.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7477,25 +7477,6 @@ def get_max_settable_power(self):
74777477
value = self._interpreter.get_max_settable_power()
74787478
return value
74797479

7480-
@ivi_synchronized
7481-
def get_script(self, script_name):
7482-
r'''get_script
7483-
7484-
TBD
7485-
7486-
Args:
7487-
script_name (str):
7488-
7489-
7490-
Returns:
7491-
script (str):
7492-
7493-
actual_buffer_size (int):
7494-
7495-
'''
7496-
script, actual_buffer_size = self._interpreter.get_script(script_name)
7497-
return script, actual_buffer_size
7498-
74997480
@ivi_synchronized
75007481
def _get_self_calibration_date_and_time(self, module):
75017482
r'''_get_self_calibration_date_and_time

generated/nirfsg/nirfsg/unit_tests/_mock_helper.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ def __init__(self):
149149
self._defaults['GetMaxSettablePower'] = {}
150150
self._defaults['GetMaxSettablePower']['return'] = 0
151151
self._defaults['GetMaxSettablePower']['value'] = None
152-
self._defaults['GetScript'] = {}
153-
self._defaults['GetScript']['return'] = 0
154-
self._defaults['GetScript']['actualBufferSize'] = None
155-
self._defaults['GetScript']['script'] = None
156152
self._defaults['GetSelfCalibrationDateAndTime'] = {}
157153
self._defaults['GetSelfCalibrationDateAndTime']['return'] = 0
158154
self._defaults['GetSelfCalibrationDateAndTime']['year'] = None
@@ -690,22 +686,6 @@ def niRFSG_GetMaxSettablePower(self, vi, value): # noqa: N802
690686
value.contents.value = self._defaults['GetMaxSettablePower']['value']
691687
return self._defaults['GetMaxSettablePower']['return']
692688

693-
def niRFSG_GetScript(self, vi, script_name, script, buffer_size, actual_buffer_size): # noqa: N802
694-
if self._defaults['GetScript']['return'] != 0:
695-
return self._defaults['GetScript']['return']
696-
# actual_buffer_size
697-
if self._defaults['GetScript']['actualBufferSize'] is None:
698-
raise MockFunctionCallError("niRFSG_GetScript", param='actualBufferSize')
699-
if actual_buffer_size is not None:
700-
actual_buffer_size.contents.value = self._defaults['GetScript']['actualBufferSize']
701-
# script
702-
if self._defaults['GetScript']['script'] is None:
703-
raise MockFunctionCallError("niRFSG_GetScript", param='script')
704-
if buffer_size.value == 0:
705-
return len(self._defaults['GetScript']['script'])
706-
script.value = self._defaults['GetScript']['script'].encode('ascii')
707-
return self._defaults['GetScript']['return']
708-
709689
def niRFSG_GetSelfCalibrationDateAndTime(self, vi, module, year, month, day, hour, minute, second): # noqa: N802
710690
if self._defaults['GetSelfCalibrationDateAndTime']['return'] != 0:
711691
return self._defaults['GetSelfCalibrationDateAndTime']['return']
@@ -1174,8 +1154,6 @@ def set_side_effects_and_return_values(self, mock_library):
11741154
mock_library.niRFSG_GetExternalCalibrationLastDateAndTime.return_value = 0
11751155
mock_library.niRFSG_GetMaxSettablePower.side_effect = MockFunctionCallError("niRFSG_GetMaxSettablePower")
11761156
mock_library.niRFSG_GetMaxSettablePower.return_value = 0
1177-
mock_library.niRFSG_GetScript.side_effect = MockFunctionCallError("niRFSG_GetScript")
1178-
mock_library.niRFSG_GetScript.return_value = 0
11791157
mock_library.niRFSG_GetSelfCalibrationDateAndTime.side_effect = MockFunctionCallError("niRFSG_GetSelfCalibrationDateAndTime")
11801158
mock_library.niRFSG_GetSelfCalibrationDateAndTime.return_value = 0
11811159
mock_library.niRFSG_GetSelfCalibrationTemperature.side_effect = MockFunctionCallError("niRFSG_GetSelfCalibrationTemperature")

src/nirfsg/metadata/functions.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2998,44 +2998,6 @@
29982998
],
29992999
'returns': 'ViStatus'
30003000
},
3001-
'GetScript': {
3002-
'documentation': {
3003-
'description': 'TBD'
3004-
},
3005-
'included_in_proto': True,
3006-
'parameters': [
3007-
{
3008-
'direction': 'in',
3009-
'name': 'vi',
3010-
'type': 'ViSession'
3011-
},
3012-
{
3013-
'direction': 'in',
3014-
'name': 'scriptName',
3015-
'type': 'ViConstString'
3016-
},
3017-
{
3018-
'direction': 'out',
3019-
'name': 'script',
3020-
'size': {
3021-
'mechanism': 'ivi-dance',
3022-
'value': 'bufferSize'
3023-
},
3024-
'type': 'ViChar[]'
3025-
},
3026-
{
3027-
'direction': 'in',
3028-
'name': 'bufferSize',
3029-
'type': 'ViInt32'
3030-
},
3031-
{
3032-
'direction': 'out',
3033-
'name': 'actualBufferSize',
3034-
'type': 'ViInt32'
3035-
}
3036-
],
3037-
'returns': 'ViStatus'
3038-
},
30393001
'GetSelfCalibrationDateAndTime': {
30403002
'codegen_method': 'private',
30413003
'documentation': {

0 commit comments

Comments
 (0)