Skip to content

Commit 051d74d

Browse files
corrected datatype to float64 list and turned on some apis (#2106)
* corrected datatype to float64 list and turned on some apis * updated metadata after resolving conflicts * corrected name of APIs and removed mismatched enum value
1 parent 473d86f commit 051d74d

File tree

10 files changed

+1557
-173
lines changed

10 files changed

+1557
-173
lines changed

build/helper/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def camelcase_to_snakecase(camelcase_string):
4242
'''Converts a camelCase string to lower_case_snake_case'''
4343
# https://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-snake-case
4444
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', camelcase_string)
45-
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
45+
return re.sub('([a-z])([A-Z])', r'\1_\2', s1).lower()
4646

4747

4848
# TODO(marcoskirsch): not being used

docs/nirfsg/class.rst

Lines changed: 421 additions & 46 deletions
Large diffs are not rendered by default.

docs/nirfsg/enums.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,10 +1318,6 @@ RFFilter
13181318

13191319

13201320

1321-
.. py:attribute:: RFFilter.CONFIGURATION_SETTLED_EVENT
1322-
1323-
1324-
13251321
.. py:attribute:: RFFilter.LO_FREQ_MOD_4000
13261322
13271323

generated/nirfsg/nirfsg/_library.py

Lines changed: 79 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def __init__(self, ctypes_library):
5959
self.niRFSG_Disable_cfunc = None
6060
self.niRFSG_DisableScriptTrigger_cfunc = None
6161
self.niRFSG_DisableStartTrigger_cfunc = None
62+
self.niRFSG_ErrorMessage_cfunc = None
63+
self.niRFSG_ErrorQuery_cfunc = None
6264
self.niRFSG_ExportSignal_cfunc = None
6365
self.niRFSG_GetAllNamedWaveformNames_cfunc = None
6466
self.niRFSG_GetAllScriptNames_cfunc = None
@@ -76,6 +78,9 @@ def __init__(self, ctypes_library):
7678
self.niRFSG_GetSelfCalibrationTemperature_cfunc = None
7779
self.niRFSG_GetStreamEndpointHandle_cfunc = None
7880
self.niRFSG_GetTerminalName_cfunc = None
81+
self.niRFSG_GetWaveformBurstStartLocations_cfunc = None
82+
self.niRFSG_GetWaveformBurstStopLocations_cfunc = None
83+
self.niRFSG_GetWaveformMarkerEventLocations_cfunc = None
7984
self.niRFSG_InitWithOptions_cfunc = None
8085
self.niRFSG_Initiate_cfunc = None
8186
self.niRFSG_LoadConfigurationsFromFile_cfunc = None
@@ -88,7 +93,7 @@ def __init__(self, ctypes_library):
8893
self.niRFSG_ResetAttribute_cfunc = None
8994
self.niRFSG_ResetDevice_cfunc = None
9095
self.niRFSG_ResetWithDefaults_cfunc = None
91-
self.niRFSG_ResetWithOptions_cfunc = None
96+
self.niRFSG_RevisionQuery_cfunc = None
9297
self.niRFSG_SaveConfigurationsToFile_cfunc = None
9398
self.niRFSG_SelectArbWaveform_cfunc = None
9499
self.niRFSG_SelfCal_cfunc = None
@@ -102,6 +107,9 @@ def __init__(self, ctypes_library):
102107
self.niRFSG_SetAttributeViReal64_cfunc = None
103108
self.niRFSG_SetAttributeViSession_cfunc = None
104109
self.niRFSG_SetAttributeViString_cfunc = None
110+
self.niRFSG_SetWaveformBurstStartLocations_cfunc = None
111+
self.niRFSG_SetWaveformBurstStopLocations_cfunc = None
112+
self.niRFSG_SetWaveformMarkerEventLocations_cfunc = None
105113
self.niRFSG_UnlockSession_cfunc = None
106114
self.niRFSG_WaitUntilSettled_cfunc = None
107115
self.niRFSG_WriteP2PEndpointI16_cfunc = None
@@ -435,6 +443,22 @@ def niRFSG_DisableStartTrigger(self, vi): # noqa: N802
435443
self.niRFSG_DisableStartTrigger_cfunc.restype = ViStatus # noqa: F405
436444
return self.niRFSG_DisableStartTrigger_cfunc(vi)
437445

446+
def niRFSG_ErrorMessage(self, vi, error_code, error_message): # noqa: N802
447+
with self._func_lock:
448+
if self.niRFSG_ErrorMessage_cfunc is None:
449+
self.niRFSG_ErrorMessage_cfunc = self._get_library_function('niRFSG_ErrorMessage')
450+
self.niRFSG_ErrorMessage_cfunc.argtypes = [ViSession, ViStatus, ctypes.POINTER(ViChar)] # noqa: F405
451+
self.niRFSG_ErrorMessage_cfunc.restype = ViStatus # noqa: F405
452+
return self.niRFSG_ErrorMessage_cfunc(vi, error_code, error_message)
453+
454+
def niRFSG_ErrorQuery(self, vi, error_code, error_message): # noqa: N802
455+
with self._func_lock:
456+
if self.niRFSG_ErrorQuery_cfunc is None:
457+
self.niRFSG_ErrorQuery_cfunc = self._get_library_function('niRFSG_ErrorQuery')
458+
self.niRFSG_ErrorQuery_cfunc.argtypes = [ViSession, ctypes.POINTER(ViInt32), ctypes.POINTER(ViChar)] # noqa: F405
459+
self.niRFSG_ErrorQuery_cfunc.restype = ViStatus # noqa: F405
460+
return self.niRFSG_ErrorQuery_cfunc(vi, error_code, error_message)
461+
438462
def niRFSG_ExportSignal(self, vi, signal, signal_identifier, output_terminal): # noqa: N802
439463
with self._func_lock:
440464
if self.niRFSG_ExportSignal_cfunc is None:
@@ -571,6 +595,30 @@ def niRFSG_GetTerminalName(self, vi, signal, signal_identifier, buffer_size, ter
571595
self.niRFSG_GetTerminalName_cfunc.restype = ViStatus # noqa: F405
572596
return self.niRFSG_GetTerminalName_cfunc(vi, signal, signal_identifier, buffer_size, terminal_name)
573597

598+
def niRFSG_GetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802
599+
with self._func_lock:
600+
if self.niRFSG_GetWaveformBurstStartLocations_cfunc is None:
601+
self.niRFSG_GetWaveformBurstStartLocations_cfunc = self._get_library_function('niRFSG_GetWaveformBurstStartLocations')
602+
self.niRFSG_GetWaveformBurstStartLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64), ctypes.POINTER(ViInt32)] # noqa: F405
603+
self.niRFSG_GetWaveformBurstStartLocations_cfunc.restype = ViStatus # noqa: F405
604+
return self.niRFSG_GetWaveformBurstStartLocations_cfunc(vi, channel_name, number_of_locations, locations, required_size)
605+
606+
def niRFSG_GetWaveformBurstStopLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802
607+
with self._func_lock:
608+
if self.niRFSG_GetWaveformBurstStopLocations_cfunc is None:
609+
self.niRFSG_GetWaveformBurstStopLocations_cfunc = self._get_library_function('niRFSG_GetWaveformBurstStopLocations')
610+
self.niRFSG_GetWaveformBurstStopLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64), ctypes.POINTER(ViInt32)] # noqa: F405
611+
self.niRFSG_GetWaveformBurstStopLocations_cfunc.restype = ViStatus # noqa: F405
612+
return self.niRFSG_GetWaveformBurstStopLocations_cfunc(vi, channel_name, number_of_locations, locations, required_size)
613+
614+
def niRFSG_GetWaveformMarkerEventLocations(self, vi, channel_name, number_of_locations, locations, required_size): # noqa: N802
615+
with self._func_lock:
616+
if self.niRFSG_GetWaveformMarkerEventLocations_cfunc is None:
617+
self.niRFSG_GetWaveformMarkerEventLocations_cfunc = self._get_library_function('niRFSG_GetWaveformMarkerEventLocations')
618+
self.niRFSG_GetWaveformMarkerEventLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64), ctypes.POINTER(ViInt32)] # noqa: F405
619+
self.niRFSG_GetWaveformMarkerEventLocations_cfunc.restype = ViStatus # noqa: F405
620+
return self.niRFSG_GetWaveformMarkerEventLocations_cfunc(vi, channel_name, number_of_locations, locations, required_size)
621+
574622
def niRFSG_InitWithOptions(self, resource_name, id_query, reset_device, option_string, new_vi): # noqa: N802
575623
with self._func_lock:
576624
if self.niRFSG_InitWithOptions_cfunc is None:
@@ -667,13 +715,13 @@ def niRFSG_ResetWithDefaults(self, vi): # noqa: N802
667715
self.niRFSG_ResetWithDefaults_cfunc.restype = ViStatus # noqa: F405
668716
return self.niRFSG_ResetWithDefaults_cfunc(vi)
669717

670-
def niRFSG_ResetWithOptions(self, vi, steps_to_omit): # noqa: N802
718+
def niRFSG_RevisionQuery(self, vi, instrument_driver_revision, firmware_revision): # noqa: N802
671719
with self._func_lock:
672-
if self.niRFSG_ResetWithOptions_cfunc is None:
673-
self.niRFSG_ResetWithOptions_cfunc = self._get_library_function('niRFSG_ResetWithOptions')
674-
self.niRFSG_ResetWithOptions_cfunc.argtypes = [ViSession, ViUInt64] # noqa: F405
675-
self.niRFSG_ResetWithOptions_cfunc.restype = ViStatus # noqa: F405
676-
return self.niRFSG_ResetWithOptions_cfunc(vi, steps_to_omit)
720+
if self.niRFSG_RevisionQuery_cfunc is None:
721+
self.niRFSG_RevisionQuery_cfunc = self._get_library_function('niRFSG_RevisionQuery')
722+
self.niRFSG_RevisionQuery_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ctypes.POINTER(ViChar)] # noqa: F405
723+
self.niRFSG_RevisionQuery_cfunc.restype = ViStatus # noqa: F405
724+
return self.niRFSG_RevisionQuery_cfunc(vi, instrument_driver_revision, firmware_revision)
677725

678726
def niRFSG_SaveConfigurationsToFile(self, vi, channel_name, file_path): # noqa: N802
679727
with self._func_lock:
@@ -779,6 +827,30 @@ def niRFSG_SetAttributeViString(self, vi, channel_name, attribute, value): # no
779827
self.niRFSG_SetAttributeViString_cfunc.restype = ViStatus # noqa: F405
780828
return self.niRFSG_SetAttributeViString_cfunc(vi, channel_name, attribute, value)
781829

830+
def niRFSG_SetWaveformBurstStartLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802
831+
with self._func_lock:
832+
if self.niRFSG_SetWaveformBurstStartLocations_cfunc is None:
833+
self.niRFSG_SetWaveformBurstStartLocations_cfunc = self._get_library_function('niRFSG_SetWaveformBurstStartLocations')
834+
self.niRFSG_SetWaveformBurstStartLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64)] # noqa: F405
835+
self.niRFSG_SetWaveformBurstStartLocations_cfunc.restype = ViStatus # noqa: F405
836+
return self.niRFSG_SetWaveformBurstStartLocations_cfunc(vi, channel_name, number_of_locations, locations)
837+
838+
def niRFSG_SetWaveformBurstStopLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802
839+
with self._func_lock:
840+
if self.niRFSG_SetWaveformBurstStopLocations_cfunc is None:
841+
self.niRFSG_SetWaveformBurstStopLocations_cfunc = self._get_library_function('niRFSG_SetWaveformBurstStopLocations')
842+
self.niRFSG_SetWaveformBurstStopLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64)] # noqa: F405
843+
self.niRFSG_SetWaveformBurstStopLocations_cfunc.restype = ViStatus # noqa: F405
844+
return self.niRFSG_SetWaveformBurstStopLocations_cfunc(vi, channel_name, number_of_locations, locations)
845+
846+
def niRFSG_SetWaveformMarkerEventLocations(self, vi, channel_name, number_of_locations, locations): # noqa: N802
847+
with self._func_lock:
848+
if self.niRFSG_SetWaveformMarkerEventLocations_cfunc is None:
849+
self.niRFSG_SetWaveformMarkerEventLocations_cfunc = self._get_library_function('niRFSG_SetWaveformMarkerEventLocations')
850+
self.niRFSG_SetWaveformMarkerEventLocations_cfunc.argtypes = [ViSession, ctypes.POINTER(ViChar), ViInt32, ctypes.POINTER(ViReal64)] # noqa: F405
851+
self.niRFSG_SetWaveformMarkerEventLocations_cfunc.restype = ViStatus # noqa: F405
852+
return self.niRFSG_SetWaveformMarkerEventLocations_cfunc(vi, channel_name, number_of_locations, locations)
853+
782854
def niRFSG_UnlockSession(self, vi, caller_has_lock): # noqa: N802
783855
with self._func_lock:
784856
if self.niRFSG_UnlockSession_cfunc is None:

0 commit comments

Comments
 (0)