How to use the nimodinst._visatype function in nimodinst

To help you get started, we’ve selected a few nimodinst examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ni / nimi-python / generated / nimodinst / unit_tests / _matchers.py View on Github external
def __init__(self, expected_size_or_value):
        _BufferMatcher.__init__(self, _visatype.ViInt32, expected_size_or_value)
github ni / nimi-python / generated / nimodinst / nimodinst / session.py View on Github external
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)