How to use the nimodinst._visatype.ViSession 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):
        _PointerMatcher.__init__(self, _visatype.ViSession)
github ni / nimi-python / generated / nimodinst / unit_tests / _matchers.py View on Github external
def __init__(self, expected_value):
        _ScalarMatcher.__init__(self, _visatype.ViSession, expected_value)
github ni / nimi-python / generated / nimodinst / nimodinst / unit_tests / _matchers.py View on Github external
def __init__(self, expected_value):
        _ScalarMatcher.__init__(self, _visatype.ViSession, expected_value)
github ni / nimi-python / generated / nimodinst / nimodinst / unit_tests / _matchers.py View on Github external
def __init__(self, expected_size_or_value):
        _BufferMatcher.__init__(self, _visatype.ViSession, expected_size_or_value)
github ni / nimi-python / generated / nimodinst / nimodinst / unit_tests / _matchers.py View on Github external
def __init__(self):
        _PointerMatcher.__init__(self, _visatype.ViSession)
github ni / nimi-python / generated / nimodinst / nimodinst / session.py View on Github external
Number--the number of the chassis in which the device is installed. This
                property can only be queried for PXI devices installed in a chassis
                that has been properly identified in MAX. Bus Number--the bus on which
                the device has been enumerated. Socket Number--the socket number on
                which the device has been enumerated. Notes The bus number and socket
                number can be used to form a VISA resource string for this device, of
                the form "PXI::::INSTR". Traditional NI-DAQ devices do not support the
                chassis number, bus number, and socket number properties.


        Returns:
            attribute_value (int): A pointer to a signed 32-bit integer variable that receives the value of
                the requested property.

        '''
        handle_ctype = _visatype.ViSession(self._handle)  # case S110
        index_ctype = _visatype.ViInt32(index)  # case S150
        attribute_id_ctype = _visatype.ViInt32(attribute_id)  # case S150
        attribute_value_ctype = _visatype.ViInt32()  # case S220
        error_code = self._library.niModInst_GetInstalledDeviceAttributeViInt32(handle_ctype, index_ctype, attribute_id_ctype, None if attribute_value_ctype is None else (ctypes.pointer(attribute_value_ctype)))
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return int(attribute_value_ctype.value)
github ni / nimi-python / generated / nimodinst / nimodinst / session.py View on Github external
you use the empty string for this parameter, NI-ModInst creates a list
                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)
github ni / nimi-python / generated / nimodinst / nimodinst / session.py View on Github external
def _close_installed_devices_session(self):
        r'''_close_installed_devices_session

        Cleans up the NI-ModInst session created by a call to
        _open_installed_devices_session. Call this method when you are
        finished using the session handle and do not use this handle again.
        '''
        handle_ctype = _visatype.ViSession(self._handle)  # case S110
        error_code = self._library.niModInst_CloseInstalledDevicesSession(handle_ctype)
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return