Skip to content

Commit ed95e65

Browse files
committed
fixed parameter name and method name for consistency
1 parent 8cff730 commit ed95e65

File tree

7 files changed

+120
-69
lines changed

7 files changed

+120
-69
lines changed

docs/nirfsg/class.rst

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ clear_arb_waveform
361361

362362
.. py:currentmodule:: nirfsg.Session
363363

364-
.. py:method:: clear_arb_waveform(name)
364+
.. py:method:: clear_arb_waveform(waveform_name)
365365

366366
Deletes a specified waveform from the pool of currently defined waveforms.
367367

@@ -373,15 +373,15 @@ clear_arb_waveform
373373

374374

375375

376-
:param name:
376+
:param waveform_name:
377377

378378

379379
Name of the stored waveform to delete.
380380

381381

382382

383383

384-
:type name: str
384+
:type waveform_name: str
385385

386386
clear_self_calibrate_range
387387
--------------------------
@@ -1342,12 +1342,12 @@ get_max_settable_power
13421342

13431343

13441344

1345-
get_self_calibration_last_date_and_time
1346-
---------------------------------------
1345+
get_self_cal_last_date_and_time
1346+
-------------------------------
13471347

13481348
.. py:currentmodule:: nirfsg.Session
13491349

1350-
.. py:method:: get_self_calibration_last_date_and_time(module)
1350+
.. py:method:: get_self_cal_last_date_and_time(module=nirfsg.Module.PRIMARY_MODULE)
13511351

13521352
Returns the date and time of the last successful self-calibration.
13531353

@@ -1386,7 +1386,7 @@ get_self_calibration_temperature
13861386

13871387
.. py:currentmodule:: nirfsg.Session
13881388

1389-
.. py:method:: get_self_calibration_temperature(module)
1389+
.. py:method:: get_self_calibration_temperature(module=nirfsg.Module.PRIMARY_MODULE)
13901390

13911391
Returns the temperature, in degrees Celsius, of the device at the last successful self-calibration.
13921392

@@ -2069,7 +2069,7 @@ select_arb_waveform
20692069

20702070
.. py:currentmodule:: nirfsg.Session
20712071

2072-
.. py:method:: select_arb_waveform(name)
2072+
.. py:method:: select_arb_waveform(waveform_name)
20732073

20742074
Specifies the waveform that is generated upon a call to the :py:meth:`nirfsg.Session._initiate` method when the generation_mode property is set to :py:data:`~nirfsg.GenerationMode.ARB_WAVEFORM`.
20752075

@@ -2087,15 +2087,15 @@ select_arb_waveform
20872087

20882088

20892089

2090-
:param name:
2090+
:param waveform_name:
20912091

20922092

20932093
Specifies the name of the stored waveform to generate. This is a case-insensitive alphanumeric string that does not use reserved words. NI-RFSG sets the :py:attr:`nirfsg.Session.arb_selected_waveform` property to this value.
20942094

20952095

20962096

20972097

2098-
:type name: str
2098+
:type waveform_name: str
20992099

21002100
self_cal
21012101
--------
@@ -2216,7 +2216,7 @@ self_test
22162216

22172217
.. py:currentmodule:: nirfsg.Session
22182218

2219-
.. py:method:: self_test(self_test_message)
2219+
.. py:method:: self_test()
22202220

22212221
Performs a self-test on the NI-RFSG device and returns the test results.
22222222

@@ -2230,35 +2230,13 @@ self_test
22302230

22312231
`Device Warm-Up <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/warmup.html>`_
22322232

2233-
2234-
2235-
2236-
2237-
:param self_test_message:
2238-
2239-
2240-
Returns the self-test response string from the NI-RFSG device. For an explanation of the string contents, refer to the **status** parameter of this method.
2241-
2242-
You must pass a ViChar array with at least 256 bytes.
2243-
2244-
2245-
2246-
2247-
:type self_test_message: str
2248-
2249-
:rtype: int
2250-
:return:
2251-
2252-
2253-
This parameter contains the value returned from the NI-RFSG device self test.
2254-
2255-
+----------------+------------------+
2256-
| Self-Test Code | Description |
2257-
+================+==================+
2258-
| 0 | Self test passed |
2259-
+----------------+------------------+
2260-
| 1 | Self test failed |
2261-
+----------------+------------------+
2233+
+----------------+------------------+
2234+
| Self-Test Code | Description |
2235+
+================+==================+
2236+
| 0 | Passed self-test |
2237+
+----------------+------------------+
2238+
| 1 | Self-test failed |
2239+
+----------------+------------------+
22622240

22632241

22642242

generated/nirfsg/nirfsg/_library.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ def niRFSG_ClearAllArbWaveforms(self, vi): # noqa: N802
165165
self.niRFSG_ClearAllArbWaveforms_cfunc.restype = ViStatus # noqa: F405
166166
return self.niRFSG_ClearAllArbWaveforms_cfunc(vi)
167167

168-
def niRFSG_ClearArbWaveform(self, vi, name): # noqa: N802
168+
def niRFSG_ClearArbWaveform(self, vi, waveform_name): # noqa: N802
169169
with self._func_lock:
170170
if self.niRFSG_ClearArbWaveform_cfunc is None:
171171
self.niRFSG_ClearArbWaveform_cfunc = self._get_library_function('niRFSG_ClearArbWaveform')
172172
self.niRFSG_ClearArbWaveform_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar)] # noqa: F405
173173
self.niRFSG_ClearArbWaveform_cfunc.restype = ViStatus # noqa: F405
174-
return self.niRFSG_ClearArbWaveform_cfunc(vi, name)
174+
return self.niRFSG_ClearArbWaveform_cfunc(vi, waveform_name)
175175

176176
def niRFSG_ClearSelfCalibrateRange(self, vi): # noqa: N802
177177
with self._func_lock:
@@ -573,13 +573,13 @@ def niRFSG_SaveConfigurationsToFile(self, vi, channel_name, file_path): # noqa:
573573
self.niRFSG_SaveConfigurationsToFile_cfunc.restype = ViStatus # noqa: F405
574574
return self.niRFSG_SaveConfigurationsToFile_cfunc(vi, channel_name, file_path)
575575

576-
def niRFSG_SelectArbWaveform(self, vi, name): # noqa: N802
576+
def niRFSG_SelectArbWaveform(self, vi, waveform_name): # noqa: N802
577577
with self._func_lock:
578578
if self.niRFSG_SelectArbWaveform_cfunc is None:
579579
self.niRFSG_SelectArbWaveform_cfunc = self._get_library_function('niRFSG_SelectArbWaveform')
580580
self.niRFSG_SelectArbWaveform_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar)] # noqa: F405
581581
self.niRFSG_SelectArbWaveform_cfunc.restype = ViStatus # noqa: F405
582-
return self.niRFSG_SelectArbWaveform_cfunc(vi, name)
582+
return self.niRFSG_SelectArbWaveform_cfunc(vi, waveform_name)
583583

584584
def niRFSG_SelfCal(self, vi): # noqa: N802
585585
with self._func_lock:

generated/nirfsg/nirfsg/_library_interpreter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ def clear_all_arb_waveforms(self): # noqa: N802
141141
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
142142
return
143143

144-
def clear_arb_waveform(self, name): # noqa: N802
144+
def clear_arb_waveform(self, waveform_name): # noqa: N802
145145
vi_ctype = _visatype.ViSession(self._vi) # case S110
146-
name_ctype = ctypes.create_string_buffer(name.encode(self._encoding)) # case C020
147-
error_code = self._library.niRFSG_ClearArbWaveform(vi_ctype, name_ctype)
146+
waveform_name_ctype = ctypes.create_string_buffer(waveform_name.encode(self._encoding)) # case C020
147+
error_code = self._library.niRFSG_ClearArbWaveform(vi_ctype, waveform_name_ctype)
148148
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
149149
return
150150

@@ -601,10 +601,10 @@ def save_configurations_to_file(self, channel_name, file_path): # noqa: N802
601601
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
602602
return
603603

604-
def select_arb_waveform(self, name): # noqa: N802
604+
def select_arb_waveform(self, waveform_name): # noqa: N802
605605
vi_ctype = _visatype.ViSession(self._vi) # case S110
606-
name_ctype = ctypes.create_string_buffer(name.encode(self._encoding)) # case C020
607-
error_code = self._library.niRFSG_SelectArbWaveform(vi_ctype, name_ctype)
606+
waveform_name_ctype = ctypes.create_string_buffer(waveform_name.encode(self._encoding)) # case C020
607+
error_code = self._library.niRFSG_SelectArbWaveform(vi_ctype, waveform_name_ctype)
608608
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
609609
return
610610

generated/nirfsg/nirfsg/session.py

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5942,7 +5942,7 @@ def clear_all_arb_waveforms(self):
59425942
self._interpreter.clear_all_arb_waveforms()
59435943

59445944
@ivi_synchronized
5945-
def clear_arb_waveform(self, name):
5945+
def clear_arb_waveform(self, waveform_name):
59465946
r'''clear_arb_waveform
59475947

59485948
Deletes a specified waveform from the pool of currently defined waveforms.
@@ -5952,10 +5952,10 @@ def clear_arb_waveform(self, name):
59525952
**Supported Devices** : PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860
59535953

59545954
Args:
5955-
name (str): Name of the stored waveform to delete.
5955+
waveform_name (str): Name of the stored waveform to delete.
59565956

59575957
'''
5958-
self._interpreter.clear_arb_waveform(name)
5958+
self._interpreter.clear_arb_waveform(waveform_name)
59595959

59605960
@ivi_synchronized
59615961
def clear_self_calibrate_range(self):
@@ -6528,8 +6528,8 @@ def get_external_calibration_last_date_and_time(self):
65286528
return hightime.datetime(year, month, day, hour, minute, second)
65296529

65306530
@ivi_synchronized
6531-
def get_self_calibration_last_date_and_time(self, module):
6532-
'''get_self_calibration_last_date_and_time
6531+
def get_self_cal_last_date_and_time(self, module=enums.Module.PRIMARY_MODULE):
6532+
'''get_self_cal_last_date_and_time
65336533

65346534
Returns the date and time of the last successful self-calibration.
65356535

@@ -6605,7 +6605,7 @@ def _get_self_calibration_date_and_time(self, module):
66056605
return year, month, day, hour, minute, second
66066606

66076607
@ivi_synchronized
6608-
def get_self_calibration_temperature(self, module):
6608+
def get_self_calibration_temperature(self, module=enums.Module.PRIMARY_MODULE):
66096609
r'''get_self_calibration_temperature
66106610

66116611
Returns the temperature, in degrees Celsius, of the device at the last successful self-calibration.
@@ -6991,7 +6991,7 @@ def reset_with_options(self, steps_to_omit):
69916991
self._interpreter.reset_with_options(steps_to_omit)
69926992

69936993
@ivi_synchronized
6994-
def select_arb_waveform(self, name):
6994+
def select_arb_waveform(self, waveform_name):
69956995
r'''select_arb_waveform
69966996

69976997
Specifies the waveform that is generated upon a call to the _initiate method when the generation_mode property is set to GenerationMode.ARB_WAVEFORM.
@@ -7008,10 +7008,10 @@ def select_arb_waveform(self, name):
70087008
One or more of the referenced properties are not in the Python API for this driver.
70097009

70107010
Args:
7011-
name (str): Specifies the name of the stored waveform to generate. This is a case-insensitive alphanumeric string that does not use reserved words. NI-RFSG sets the arb_selected_waveform property to this value.
7011+
waveform_name (str): Specifies the name of the stored waveform to generate. This is a case-insensitive alphanumeric string that does not use reserved words. NI-RFSG sets the arb_selected_waveform property to this value.
70127012

70137013
'''
7014-
self._interpreter.select_arb_waveform(name)
7014+
self._interpreter.select_arb_waveform(waveform_name)
70157015

70167016
@ivi_synchronized
70177017
def self_cal(self):
@@ -7088,8 +7088,8 @@ def self_calibrate_range(self, steps_to_omit, min_frequency, max_frequency, min_
70887088
self._interpreter.self_calibrate_range(steps_to_omit, min_frequency, max_frequency, min_power_level, max_power_level)
70897089

70907090
@ivi_synchronized
7091-
def self_test(self, self_test_message):
7092-
r'''self_test
7091+
def _self_test(self, self_test_message):
7092+
r'''_self_test
70937093

70947094
Performs a self-test on the NI-RFSG device and returns the test results.
70957095

@@ -7374,6 +7374,35 @@ def _close(self):
73747374
'''
73757375
self._interpreter.close()
73767376

7377+
@ivi_synchronized
7378+
def self_test(self):
7379+
'''self_test
7380+
7381+
Performs a self-test on the NI-RFSG device and returns the test results.
7382+
7383+
This method performs a simple series of tests to ensure that the NI-RFSG device is powered up and responding.
7384+
7385+
This method does not affect external I/O connections or connections between devices. Complete functional testing and calibration are not performed by this method. The NI-RFSG device must be in the Configuration state before you call this method.
7386+
7387+
**Supported Devices** : PXI-5610, PXIe-5611, PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654 with PXIe-5696, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860
7388+
7389+
**Related Topics**
7390+
7391+
`Device Warm-Up <https://www.ni.com/docs/en-US/bundle/rfsg/page/rfsg/warmup.html>`_
7392+
7393+
+----------------+------------------+
7394+
| Self-Test Code | Description |
7395+
+================+==================+
7396+
| 0 | Passed self-test |
7397+
+----------------+------------------+
7398+
| 1 | Self-test failed |
7399+
+----------------+------------------+
7400+
'''
7401+
code, msg = self._self_test()
7402+
if code:
7403+
raise errors.SelfTestError(code, msg)
7404+
return None
7405+
73777406
@ivi_synchronized
73787407
def reset(self):
73797408
r'''reset

generated/nirfsg/nirfsg/unit_tests/_mock_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def niRFSG_ClearAllArbWaveforms(self, vi): # noqa: N802
283283
return self._defaults['ClearAllArbWaveforms']['return']
284284
return self._defaults['ClearAllArbWaveforms']['return']
285285

286-
def niRFSG_ClearArbWaveform(self, vi, name): # noqa: N802
286+
def niRFSG_ClearArbWaveform(self, vi, waveform_name): # noqa: N802
287287
if self._defaults['ClearArbWaveform']['return'] != 0:
288288
return self._defaults['ClearArbWaveform']['return']
289289
return self._defaults['ClearArbWaveform']['return']
@@ -782,7 +782,7 @@ def niRFSG_SaveConfigurationsToFile(self, vi, channel_name, file_path): # noqa:
782782
return self._defaults['SaveConfigurationsToFile']['return']
783783
return self._defaults['SaveConfigurationsToFile']['return']
784784

785-
def niRFSG_SelectArbWaveform(self, vi, name): # noqa: N802
785+
def niRFSG_SelectArbWaveform(self, vi, waveform_name): # noqa: N802
786786
if self._defaults['SelectArbWaveform']['return'] != 0:
787787
return self._defaults['SelectArbWaveform']['return']
788788
return self._defaults['SelectArbWaveform']['return']

0 commit comments

Comments
 (0)