Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViInt32, expected_size_or_value)
of all Modular Instruments devices installed in the system.
Returns:
handle (int): A pointer to a ViSession variable that receives the value of the
NI-ModInst session handle. This value acts as a handle to the list of
installed devices and is used in other NI-ModInst methods.
device_count (int): A pointer to an integer variable that receives the number of devices
found in the system that are supported by the driver specified in the
driver parameter.
'''
driver_ctype = ctypes.create_string_buffer(driver.encode(self._encoding)) # case C020
handle_ctype = _visatype.ViSession() # case S220
device_count_ctype = _visatype.ViInt32() # case S220
error_code = self._library.niModInst_OpenInstalledDevicesSession(driver_ctype, None if handle_ctype is None else (ctypes.pointer(handle_ctype)), None if device_count_ctype is None else (ctypes.pointer(device_count_ctype)))
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return int(handle_ctype.value), int(device_count_ctype.value)