Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def niModInst_OpenInstalledDevicesSession(self, driver, handle, device_count): # noqa: N802
with self._func_lock:
if self.niModInst_OpenInstalledDevicesSession_cfunc is None:
self.niModInst_OpenInstalledDevicesSession_cfunc = self._library.niModInst_OpenInstalledDevicesSession
self.niModInst_OpenInstalledDevicesSession_cfunc.argtypes = [ViConstString_ctype, ctypes.POINTER(ViSession_ctype), ctypes.POINTER(ViInt32_ctype)] # noqa: F405
self.niModInst_OpenInstalledDevicesSession_cfunc.restype = nimodinst.python_types.ViStatus
return self.niModInst_OpenInstalledDevicesSession_cfunc(driver, handle, device_count)
def niModInst_CloseInstalledDevicesSession(self, handle): # noqa: N802
with self._func_lock:
if self.niModInst_CloseInstalledDevicesSession_cfunc is None:
self.niModInst_CloseInstalledDevicesSession_cfunc = self._library.niModInst_CloseInstalledDevicesSession
self.niModInst_CloseInstalledDevicesSession_cfunc.argtypes = [ViSession_ctype] # noqa: F405
self.niModInst_CloseInstalledDevicesSession_cfunc.restype = nimodinst.python_types.ViStatus
return self.niModInst_CloseInstalledDevicesSession_cfunc(handle)