@@ -383,6 +383,22 @@ def disable_start_trigger(self): # noqa: N802
383383 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
384384 return
385385
386+ def error_message (self , error_code , error_message ): # noqa: N802
387+ vi_ctype = _visatype .ViSession (self ._vi ) # case S110
388+ error_code_ctype = _visatype .ViStatus (error_code ) # case S150
389+ error_message_ctype = ctypes .create_string_buffer (error_message .encode (self ._encoding )) # case C020
390+ error_code = self ._library .niRFSG_ErrorMessage (vi_ctype , error_code_ctype , error_message_ctype )
391+ errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = True )
392+ return
393+
394+ def error_query (self ): # noqa: N802
395+ vi_ctype = _visatype .ViSession (self ._vi ) # case S110
396+ error_code_ctype = _visatype .ViInt32 () # case S220
397+ error_message_ctype = (_visatype .ViChar * 256 )() # case C070
398+ error_code = self ._library .niRFSG_ErrorQuery (vi_ctype , None if error_code_ctype is None else (ctypes .pointer (error_code_ctype )), error_message_ctype )
399+ errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
400+ return int (error_code_ctype .value ), error_message_ctype .value .decode (self ._encoding )
401+
386402 def export_signal (self , signal , signal_identifier , output_terminal ): # noqa: N802
387403 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
388404 signal_ctype = _visatype .ViInt32 (signal .value ) # case S130
@@ -515,32 +531,38 @@ def get_stream_endpoint_handle(self, stream_endpoint): # noqa: N802
515531 def get_waveform_burst_start_locations (self , channel_name , number_of_locations ): # noqa: N802
516532 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
517533 channel_name_ctype = ctypes .create_string_buffer (channel_name .encode (self ._encoding )) # case C010
518- number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S150
519- locations_ctype = _visatype .ViReal64 () # case S220
534+ number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S210
535+ locations_size = number_of_locations # case B600
536+ locations_array = array .array ("d" , [0 ]) * locations_size # case B600
537+ locations_ctype = _get_ctypes_pointer_for_buffer (value = locations_array , library_type = _visatype .ViReal64 ) # case B600
520538 required_size_ctype = _visatype .ViInt32 () # case S220
521- error_code = self ._library .niRFSG_GetWaveformBurstStartLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , None if locations_ctype is None else ( ctypes . pointer ( locations_ctype )) , None if required_size_ctype is None else (ctypes .pointer (required_size_ctype )))
539+ error_code = self ._library .niRFSG_GetWaveformBurstStartLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , locations_ctype , None if required_size_ctype is None else (ctypes .pointer (required_size_ctype )))
522540 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
523- return float ( locations_ctype . value ) , int (required_size_ctype .value )
541+ return locations_array , int (required_size_ctype .value )
524542
525543 def get_waveform_burst_stop_locations (self , channel_name , number_of_locations ): # noqa: N802
526544 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
527545 channel_name_ctype = ctypes .create_string_buffer (channel_name .encode (self ._encoding )) # case C010
528- number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S150
529- locations_ctype = _visatype .ViReal64 () # case S220
546+ number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S210
547+ locations_size = number_of_locations # case B600
548+ locations_array = array .array ("d" , [0 ]) * locations_size # case B600
549+ locations_ctype = _get_ctypes_pointer_for_buffer (value = locations_array , library_type = _visatype .ViReal64 ) # case B600
530550 required_size_ctype = _visatype .ViInt32 () # case S220
531- error_code = self ._library .niRFSG_GetWaveformBurstStopLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , None if locations_ctype is None else ( ctypes . pointer ( locations_ctype )) , None if required_size_ctype is None else (ctypes .pointer (required_size_ctype )))
551+ error_code = self ._library .niRFSG_GetWaveformBurstStopLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , locations_ctype , None if required_size_ctype is None else (ctypes .pointer (required_size_ctype )))
532552 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
533- return float ( locations_ctype . value ) , int (required_size_ctype .value )
553+ return locations_array , int (required_size_ctype .value )
534554
535555 def get_waveform_marker_event_locations (self , channel_name , number_of_locations ): # noqa: N802
536556 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
537557 channel_name_ctype = ctypes .create_string_buffer (channel_name .encode (self ._encoding )) # case C010
538- number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S150
539- locations_ctype = _visatype .ViReal64 () # case S220
558+ number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S210
559+ locations_size = number_of_locations # case B600
560+ locations_array = array .array ("d" , [0 ]) * locations_size # case B600
561+ locations_ctype = _get_ctypes_pointer_for_buffer (value = locations_array , library_type = _visatype .ViReal64 ) # case B600
540562 required_size_ctype = _visatype .ViInt32 () # case S220
541- error_code = self ._library .niRFSG_GetWaveformMarkerEventLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , None if locations_ctype is None else ( ctypes . pointer ( locations_ctype )) , None if required_size_ctype is None else (ctypes .pointer (required_size_ctype )))
563+ error_code = self ._library .niRFSG_GetWaveformMarkerEventLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , locations_ctype , None if required_size_ctype is None else (ctypes .pointer (required_size_ctype )))
542564 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
543- return float ( locations_ctype . value ) , int (required_size_ctype .value )
565+ return locations_array , int (required_size_ctype .value )
544566
545567 def init_with_options (self , resource_name , id_query , reset_device , option_string ): # noqa: N802
546568 resource_name_ctype = ctypes .create_string_buffer (resource_name .encode (self ._encoding )) # case C020
@@ -629,6 +651,14 @@ def reset_with_defaults(self): # noqa: N802
629651 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
630652 return
631653
654+ def revision_query (self ): # noqa: N802
655+ vi_ctype = _visatype .ViSession (self ._vi ) # case S110
656+ instrument_driver_revision_ctype = (_visatype .ViChar * 256 )() # case C070
657+ firmware_revision_ctype = (_visatype .ViChar * 256 )() # case C070
658+ error_code = self ._library .niRFSG_RevisionQuery (vi_ctype , instrument_driver_revision_ctype , firmware_revision_ctype )
659+ errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
660+ return instrument_driver_revision_ctype .value .decode (self ._encoding ), firmware_revision_ctype .value .decode (self ._encoding )
661+
632662 def save_configurations_to_file (self , channel_name , file_path ): # noqa: N802
633663 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
634664 channel_name_ctype = ctypes .create_string_buffer (channel_name .encode (self ._encoding )) # case C010
@@ -740,32 +770,35 @@ def set_attribute_vi_string(self, channel_name, attribute, value): # noqa: N802
740770 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
741771 return
742772
743- def set_waveform_burst_start_locations (self , channel_name , number_of_locations ): # noqa: N802
773+ def set_waveform_burst_start_locations (self , channel_name , number_of_locations , locations ): # noqa: N802
744774 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
745775 channel_name_ctype = ctypes .create_string_buffer (channel_name .encode (self ._encoding )) # case C010
746- number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S150
747- locations_ctype = _visatype .ViReal64 () # case S220
748- error_code = self ._library .niRFSG_SetWaveformBurstStartLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , None if locations_ctype is None else (ctypes .pointer (locations_ctype )))
776+ number_of_locations_ctype = _visatype .ViInt32 (0 if locations is None else len (locations )) # case S160
777+ locations_array = _convert_to_array (value = locations , array_type = "d" ) # case B550
778+ locations_ctype = _get_ctypes_pointer_for_buffer (value = locations_array , library_type = _visatype .ViReal64 ) # case B550
779+ error_code = self ._library .niRFSG_SetWaveformBurstStartLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , locations_ctype )
749780 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
750- return float ( locations_ctype . value )
781+ return
751782
752- def set_waveform_burst_stop_locations (self , channel_name , number_of_locations ): # noqa: N802
783+ def set_waveform_burst_stop_locations (self , channel_name , number_of_locations , locations ): # noqa: N802
753784 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
754785 channel_name_ctype = ctypes .create_string_buffer (channel_name .encode (self ._encoding )) # case C010
755- number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S150
756- locations_ctype = _visatype .ViReal64 () # case S220
757- error_code = self ._library .niRFSG_SetWaveformBurstStopLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , None if locations_ctype is None else (ctypes .pointer (locations_ctype )))
786+ number_of_locations_ctype = _visatype .ViInt32 (0 if locations is None else len (locations )) # case S160
787+ locations_array = _convert_to_array (value = locations , array_type = "d" ) # case B550
788+ locations_ctype = _get_ctypes_pointer_for_buffer (value = locations_array , library_type = _visatype .ViReal64 ) # case B550
789+ error_code = self ._library .niRFSG_SetWaveformBurstStopLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , locations_ctype )
758790 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
759- return float ( locations_ctype . value )
791+ return
760792
761- def set_waveform_marker_event_locations (self , channel_name , number_of_locations ): # noqa: N802
793+ def set_waveform_marker_event_locations (self , channel_name , number_of_locations , locations ): # noqa: N802
762794 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
763795 channel_name_ctype = ctypes .create_string_buffer (channel_name .encode (self ._encoding )) # case C010
764- number_of_locations_ctype = _visatype .ViInt32 (number_of_locations ) # case S150
765- locations_ctype = _visatype .ViReal64 () # case S220
766- error_code = self ._library .niRFSG_SetWaveformMarkerEventLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , None if locations_ctype is None else (ctypes .pointer (locations_ctype )))
796+ number_of_locations_ctype = _visatype .ViInt32 (0 if locations is None else len (locations )) # case S160
797+ locations_array = _convert_to_array (value = locations , array_type = "d" ) # case B550
798+ locations_ctype = _get_ctypes_pointer_for_buffer (value = locations_array , library_type = _visatype .ViReal64 ) # case B550
799+ error_code = self ._library .niRFSG_SetWaveformMarkerEventLocations (vi_ctype , channel_name_ctype , number_of_locations_ctype , locations_ctype )
767800 errors .handle_error (self , error_code , ignore_warnings = False , is_error_handling = False )
768- return float ( locations_ctype . value )
801+ return
769802
770803 def unlock (self ): # noqa: N802
771804 vi_ctype = _visatype .ViSession (self ._vi ) # case S110
0 commit comments