# pylint: disable=wrong-spelling-in-comment

from . import peak_backend_defs  # pylint: disable=unused-import
from .peak_backend_defs import drPEAK_RETURN_CODE_t
from .peak_backend_defs import define_functions

from ...core.utils import ctypes_wrap, py3
from ...core.devio.comm_backend import DeviceError
from ..utils import load_lib

import platform
import os


class IDSPeakError(DeviceError):
    """Generic IDS peak error"""
class IDSPeakLibError(IDSPeakError):
    """Generic IDS peak library error"""
    def __init__(self, func, code, lib=None):
        self.func=func
        self.code=code
        self.name=drPEAK_RETURN_CODE_t.get(code,"N/A")
        self.lastcode=code
        self.desc=""
        try:
            if lib is not None:
                self.lastcode,desc=lib.PEAK_Library_GetLastError()
                self.desc=py3.as_str(desc)
        except IDSPeakLibError:
            pass
        self.msg="function '{}' raised error {}({}): {} (code {})".format(func,code,self.name,self.desc,self.lastcode)
        super().__init__(self.msg)
def errcheck(passing=None, lib=None):
    """
    Build an error checking function.

    Return a function which checks return codes of IDS peak library functions.
    `passing` is a list specifying which return codes are acceptable (by default only 0, which is success code, is acceptable).
    """
    if passing is None:
        passing={0}
    def errchecker(result, func, arguments):  # pylint: disable=unused-argument
        if result not in passing:
            raise IDSPeakLibError(func.__name__,result,lib=lib)
        return result
    return errchecker


class IDSPeakLib:
    def __init__(self):
        self._initialized=False

    def initlib(self):
        if self._initialized:
            return
        sdk_path=os.environ.get("IDS_PEAK_SDK_PATH")
        if sdk_path is None or not os.path.exists(sdk_path):
            sdk_path=load_lib.get_program_files_folder(os.path.join("IDS","ids_peak","generic_sdk"))
        sdk_path=os.path.join(sdk_path,"api")
        archbit=platform.architecture()[0][:2]
        lib_path=os.path.join(sdk_path,"lib","x86_{}".format(archbit))
        error_message="The library is automatically supplied with IDS peak software\n"+load_lib.par_error_message.format("ids_peak")
        self.lib=load_lib.load_lib("ids_peak.dll",locations=("parameter/ids_peak",lib_path,"global"),error_message=error_message,call_conv="cdecl",locally=True)
        lib=self.lib
        define_functions(lib)

        self.errcheck=errcheck(lib=self)
        wrapper=ctypes_wrap.CFunctionWrapper(errcheck=errcheck(lib=self),default_rvals="pointer")
        errwrapper=ctypes_wrap.CFunctionWrapper(errcheck=errcheck(),default_rvals="pointer")
        strsize=1024
        strprep=ctypes_wrap.strprep(strsize)

        def wrap_strret(func, strarg, sizearg=None, **kwargs):
            sizearg=sizearg or strarg+"Size"
            args=kwargs.get("args",func.argnames)
            args=[a for a in args if a not in [strarg,sizearg]]
            kwargs.setdefault("argprep",{}).update({strarg:strprep,sizearg:strsize})
            kwargs.setdefault("byref",[]).append(sizearg)
            kwargs.setdefault("rvals",[strarg])
            kwargs.setdefault("args",args)
            return wrapper(func,**kwargs)
        def wrap_strval(func, strarg, sizearg=None, **kwargs):
            sizearg=sizearg or strarg+"Size"
            kwargs.setdefault("argprep",{}).update({sizearg:lambda **kwargs:len(kwargs[strarg])+1})
            return wrapper(func,**kwargs)


        #  PEAK_RETURN_CODE PEAK_Library_GetLastError(ctypes.POINTER(PEAK_RETURN_CODE) lastErrorCode, ctypes.c_char_p lastErrorDescription, ctypes.POINTER(ctypes.c_size_t) lastErrorDescriptionSize)
        self.PEAK_Library_GetLastError=errwrapper(lib.PEAK_Library_GetLastError, args=[], rvals=["lastErrorCode", "lastErrorDescription"],
                        argprep={"lastErrorDescriptionSize":strsize,"lastErrorDescription":strprep}, byref=["lastErrorCode","lastErrorDescriptionSize"])
        #  PEAK_RETURN_CODE PEAK_Library_Initialize()
        self.PEAK_Library_Initialize=wrapper(lib.PEAK_Library_Initialize)
        #  PEAK_RETURN_CODE PEAK_Library_Close()
        self.PEAK_Library_Close=wrapper(lib.PEAK_Library_Close)
        #  PEAK_RETURN_CODE PEAK_Library_IsInitialized(ctypes.POINTER(PEAK_BOOL8) isInitialized)
        self.PEAK_Library_IsInitialized=wrapper(lib.PEAK_Library_IsInitialized)
        #  PEAK_RETURN_CODE PEAK_Library_GetVersionMajor(ctypes.POINTER(ctypes.c_uint32) libraryVersionMajor)
        self.PEAK_Library_GetVersionMajor=wrapper(lib.PEAK_Library_GetVersionMajor)
        #  PEAK_RETURN_CODE PEAK_Library_GetVersionMinor(ctypes.POINTER(ctypes.c_uint32) libraryVersionMinor)
        self.PEAK_Library_GetVersionMinor=wrapper(lib.PEAK_Library_GetVersionMinor)
        #  PEAK_RETURN_CODE PEAK_Library_GetVersionSubminor(ctypes.POINTER(ctypes.c_uint32) libraryVersionSubminor)
        self.PEAK_Library_GetVersionSubminor=wrapper(lib.PEAK_Library_GetVersionSubminor)

        #  PEAK_RETURN_CODE PEAK_EnvironmentInspector_UpdateCTIPaths()
        self.PEAK_EnvironmentInspector_UpdateCTIPaths=wrapper(lib.PEAK_EnvironmentInspector_UpdateCTIPaths)
        #  PEAK_RETURN_CODE PEAK_EnvironmentInspector_GetNumCTIPaths(ctypes.POINTER(ctypes.c_size_t) numCtiPaths)
        self.PEAK_EnvironmentInspector_GetNumCTIPaths=wrapper(lib.PEAK_EnvironmentInspector_GetNumCTIPaths)
        #  PEAK_RETURN_CODE PEAK_EnvironmentInspector_GetCTIPath(ctypes.c_size_t index, ctypes.c_char_p ctiPath, ctypes.POINTER(ctypes.c_size_t) ctiPathSize)
        self.PEAK_EnvironmentInspector_GetCTIPath=wrap_strret(lib.PEAK_EnvironmentInspector_GetCTIPath,"ctiPath","ctiPathSize")
        
        #  PEAK_RETURN_CODE PEAK_ProducerLibrary_Construct(ctypes.c_char_p ctiPath, ctypes.c_size_t ctiPathSize, ctypes.POINTER(PEAK_PRODUCER_LIBRARY_HANDLE) producerLibraryHandle)
        self.PEAK_ProducerLibrary_Construct=wrap_strval(lib.PEAK_ProducerLibrary_Construct,"ctiPath",args=["ctiPath"])
        #  PEAK_RETURN_CODE PEAK_ProducerLibrary_GetKey(PEAK_PRODUCER_LIBRARY_HANDLE producerLibraryHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_ProducerLibrary_GetKey=wrap_strret(lib.PEAK_ProducerLibrary_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_ProducerLibrary_GetSystem(PEAK_PRODUCER_LIBRARY_HANDLE producerLibraryHandle, ctypes.POINTER(PEAK_SYSTEM_DESCRIPTOR_HANDLE) systemDescriptorHandle)
        self.PEAK_ProducerLibrary_GetSystem=wrapper(lib.PEAK_ProducerLibrary_GetSystem)
        #  PEAK_RETURN_CODE PEAK_ProducerLibrary_Destruct(PEAK_PRODUCER_LIBRARY_HANDLE producerLibraryHandle)
        self.PEAK_ProducerLibrary_Destruct=wrapper(lib.PEAK_ProducerLibrary_Destruct)

        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_ToModuleDescriptor(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.POINTER(PEAK_MODULE_DESCRIPTOR_HANDLE) moduleDescriptorHandle)
        self.PEAK_SystemDescriptor_ToModuleDescriptor=wrapper(lib.PEAK_SystemDescriptor_ToModuleDescriptor)
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetKey(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_SystemDescriptor_GetKey=wrap_strret(lib.PEAK_SystemDescriptor_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetDisplayName(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p displayName, ctypes.POINTER(ctypes.c_size_t) displayNameSize)
        self.PEAK_SystemDescriptor_GetDisplayName=wrap_strret(lib.PEAK_SystemDescriptor_GetDisplayName,"displayName")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetVendorName(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p vendorName, ctypes.POINTER(ctypes.c_size_t) vendorNameSize)
        self.PEAK_SystemDescriptor_GetVendorName=wrap_strret(lib.PEAK_SystemDescriptor_GetVendorName,"vendorName")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetModelName(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p modelName, ctypes.POINTER(ctypes.c_size_t) modelNameSize)
        self.PEAK_SystemDescriptor_GetModelName=wrap_strret(lib.PEAK_SystemDescriptor_GetModelName,"modelName")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetVersion(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p version, ctypes.POINTER(ctypes.c_size_t) versionSize)
        self.PEAK_SystemDescriptor_GetVersion=wrap_strret(lib.PEAK_SystemDescriptor_GetVersion,"version")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetTLType(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
        self.PEAK_SystemDescriptor_GetTLType=wrap_strret(lib.PEAK_SystemDescriptor_GetTLType,"tlType")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetCTIFileName(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p ctiFileName, ctypes.POINTER(ctypes.c_size_t) ctiFileNameSize)
        self.PEAK_SystemDescriptor_GetCTIFileName=wrap_strret(lib.PEAK_SystemDescriptor_GetCTIFileName,"ctiFileName")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetCTIFullPath(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_char_p ctiFullPath, ctypes.POINTER(ctypes.c_size_t) ctiFullPathSize)
        self.PEAK_SystemDescriptor_GetCTIFullPath=wrap_strret(lib.PEAK_SystemDescriptor_GetCTIFullPath,"ctiFullPath")
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetGenTLVersionMajor(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.POINTER(ctypes.c_uint32) gentlVersionMajor)
        self.PEAK_SystemDescriptor_GetGenTLVersionMajor=wrapper(lib.PEAK_SystemDescriptor_GetGenTLVersionMajor)
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetGenTLVersionMinor(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.POINTER(ctypes.c_uint32) gentlVersionMinor)
        self.PEAK_SystemDescriptor_GetGenTLVersionMinor=wrapper(lib.PEAK_SystemDescriptor_GetGenTLVersionMinor)
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetCharacterEncoding(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.POINTER(PEAK_CHARACTER_ENCODING) characterEncoding)
        self.PEAK_SystemDescriptor_GetCharacterEncoding=wrapper(lib.PEAK_SystemDescriptor_GetCharacterEncoding)
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetParentLibrary(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.POINTER(PEAK_PRODUCER_LIBRARY_HANDLE) producerLibraryHandle)
        self.PEAK_SystemDescriptor_GetParentLibrary=wrapper(lib.PEAK_SystemDescriptor_GetParentLibrary)
        
        #  PEAK_RETURN_CODE PEAK_SystemDescriptor_OpenSystem(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.POINTER(PEAK_SYSTEM_HANDLE) systemHandle)
        self.PEAK_SystemDescriptor_OpenSystem=wrapper(lib.PEAK_SystemDescriptor_OpenSystem)
        #  PEAK_RETURN_CODE PEAK_System_Destruct(PEAK_SYSTEM_HANDLE systemHandle)
        self.PEAK_System_Destruct=wrapper(lib.PEAK_System_Destruct)
        #  PEAK_RETURN_CODE PEAK_System_ToModule(PEAK_SYSTEM_HANDLE systemHandle, ctypes.POINTER(PEAK_MODULE_HANDLE) moduleHandle)
        self.PEAK_System_ToModule=wrapper(lib.PEAK_System_ToModule)
        #  PEAK_RETURN_CODE PEAK_System_ToEventSupportingModule(PEAK_SYSTEM_HANDLE systemHandle, ctypes.POINTER(PEAK_EVENT_SUPPORTING_MODULE_HANDLE) eventSupportingModuleHandle)
        self.PEAK_System_ToEventSupportingModule=wrapper(lib.PEAK_System_ToEventSupportingModule)
        #  PEAK_RETURN_CODE PEAK_System_GetKey(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_System_GetKey=wrap_strret(lib.PEAK_System_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_System_GetID(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p id, ctypes.POINTER(ctypes.c_size_t) idSize)
        self.PEAK_System_GetID=wrap_strret(lib.PEAK_System_GetID,"id")
        #  PEAK_RETURN_CODE PEAK_System_GetDisplayName(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p displayName, ctypes.POINTER(ctypes.c_size_t) displayNameSize)
        self.PEAK_System_GetDisplayName=wrap_strret(lib.PEAK_System_GetDisplayName,"displayName")
        #  PEAK_RETURN_CODE PEAK_System_GetVendorName(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p vendorName, ctypes.POINTER(ctypes.c_size_t) vendorNameSize)
        self.PEAK_System_GetVendorName=wrap_strret(lib.PEAK_System_GetVendorName,"vendorName")
        #  PEAK_RETURN_CODE PEAK_System_GetModelName(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p modelName, ctypes.POINTER(ctypes.c_size_t) modelNameSize)
        self.PEAK_System_GetModelName=wrap_strret(lib.PEAK_System_GetModelName,"modelName")
        #  PEAK_RETURN_CODE PEAK_System_GetVersion(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p version, ctypes.POINTER(ctypes.c_size_t) versionSize)
        self.PEAK_System_GetVersion=wrap_strret(lib.PEAK_System_GetVersion,"version")
        #  PEAK_RETURN_CODE PEAK_System_GetTLType(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
        self.PEAK_System_GetTLType=wrap_strret(lib.PEAK_System_GetTLType,"tlType")
        #  PEAK_RETURN_CODE PEAK_System_GetCTIFileName(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p ctiFileName, ctypes.POINTER(ctypes.c_size_t) ctiFileNameSize)
        self.PEAK_System_GetCTIFileName=wrap_strret(lib.PEAK_System_GetCTIFileName,"ctiFileName")
        #  PEAK_RETURN_CODE PEAK_System_GetCTIFullPath(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_char_p ctiFullPath, ctypes.POINTER(ctypes.c_size_t) ctiFullPathSize)
        self.PEAK_System_GetCTIFullPath=wrap_strret(lib.PEAK_System_GetCTIFullPath,"ctiFullPath")
        #  PEAK_RETURN_CODE PEAK_System_GetGenTLVersionMajor(PEAK_SYSTEM_HANDLE systemHandle, ctypes.POINTER(ctypes.c_uint32) gentlVersionMajor)
        self.PEAK_System_GetGenTLVersionMajor=wrapper(lib.PEAK_System_GetGenTLVersionMajor)
        #  PEAK_RETURN_CODE PEAK_System_GetGenTLVersionMinor(PEAK_SYSTEM_HANDLE systemHandle, ctypes.POINTER(ctypes.c_uint32) gentlVersionMinor)
        self.PEAK_System_GetGenTLVersionMinor=wrapper(lib.PEAK_System_GetGenTLVersionMinor)
        #  PEAK_RETURN_CODE PEAK_System_GetCharacterEncoding(PEAK_SYSTEM_HANDLE systemHandle, ctypes.POINTER(PEAK_CHARACTER_ENCODING) characterEncoding)
        self.PEAK_System_GetCharacterEncoding=wrapper(lib.PEAK_System_GetCharacterEncoding)
        #  PEAK_RETURN_CODE PEAK_System_GetParentLibrary(PEAK_SYSTEM_HANDLE systemHandle, ctypes.POINTER(PEAK_PRODUCER_LIBRARY_HANDLE) producerLibraryHandle)
        self.PEAK_System_GetParentLibrary=wrapper(lib.PEAK_System_GetParentLibrary)
        #  PEAK_RETURN_CODE PEAK_System_UpdateInterfaces(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_uint64 timeout_ms)
        self.PEAK_System_UpdateInterfaces=wrapper(lib.PEAK_System_UpdateInterfaces)
        
        #  PEAK_RETURN_CODE PEAK_System_GetNumInterfaces(PEAK_SYSTEM_HANDLE systemHandle, ctypes.POINTER(ctypes.c_size_t) numInterfaces)
        self.PEAK_System_GetNumInterfaces=wrapper(lib.PEAK_System_GetNumInterfaces)
        #  PEAK_RETURN_CODE PEAK_System_GetInterface(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_INTERFACE_DESCRIPTOR_HANDLE) interfaceDescriptorHandle)
        self.PEAK_System_GetInterface=wrapper(lib.PEAK_System_GetInterface)
        #  PEAK_RETURN_CODE PEAK_InterfaceDescriptor_ToModuleDescriptor(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, ctypes.POINTER(PEAK_MODULE_DESCRIPTOR_HANDLE) moduleDescriptorHandle)
        self.PEAK_InterfaceDescriptor_ToModuleDescriptor=wrapper(lib.PEAK_InterfaceDescriptor_ToModuleDescriptor)
        #  PEAK_RETURN_CODE PEAK_InterfaceDescriptor_GetKey(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_InterfaceDescriptor_GetKey=wrap_strret(lib.PEAK_InterfaceDescriptor_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_InterfaceDescriptor_GetDisplayName(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, ctypes.c_char_p displayName, ctypes.POINTER(ctypes.c_size_t) displayNameSize)
        self.PEAK_InterfaceDescriptor_GetDisplayName=wrap_strret(lib.PEAK_InterfaceDescriptor_GetDisplayName,"displayName")
        #  PEAK_RETURN_CODE PEAK_InterfaceDescriptor_GetTLType(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
        self.PEAK_InterfaceDescriptor_GetTLType=wrap_strret(lib.PEAK_InterfaceDescriptor_GetTLType,"tlType")
        #  PEAK_RETURN_CODE PEAK_InterfaceDescriptor_GetParentSystem(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, ctypes.POINTER(PEAK_SYSTEM_HANDLE) systemHandle)
        self.PEAK_InterfaceDescriptor_GetParentSystem=wrapper(lib.PEAK_InterfaceDescriptor_GetParentSystem)
        
        #  PEAK_RETURN_CODE PEAK_InterfaceDescriptor_OpenInterface(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, ctypes.POINTER(PEAK_INTERFACE_HANDLE) interfaceHandle)
        self.PEAK_InterfaceDescriptor_OpenInterface=wrapper(lib.PEAK_InterfaceDescriptor_OpenInterface)
        #  PEAK_RETURN_CODE PEAK_Interface_Destruct(PEAK_INTERFACE_HANDLE interfaceHandle)
        self.PEAK_Interface_Destruct=wrapper(lib.PEAK_Interface_Destruct)
        #  PEAK_RETURN_CODE PEAK_Interface_ToModule(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.POINTER(PEAK_MODULE_HANDLE) moduleHandle)
        self.PEAK_Interface_ToModule=wrapper(lib.PEAK_Interface_ToModule)
        #  PEAK_RETURN_CODE PEAK_Interface_ToEventSupportingModule(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.POINTER(PEAK_EVENT_SUPPORTING_MODULE_HANDLE) eventSupportingModuleHandle)
        self.PEAK_Interface_ToEventSupportingModule=wrapper(lib.PEAK_Interface_ToEventSupportingModule)
        #  PEAK_RETURN_CODE PEAK_Interface_GetKey(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_Interface_GetKey=wrap_strret(lib.PEAK_Interface_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_Interface_GetID(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.c_char_p id, ctypes.POINTER(ctypes.c_size_t) idSize)
        self.PEAK_Interface_GetID=wrap_strret(lib.PEAK_Interface_GetID,"id")
        #  PEAK_RETURN_CODE PEAK_Interface_GetDisplayName(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.c_char_p displayName, ctypes.POINTER(ctypes.c_size_t) displayNameSize)
        self.PEAK_Interface_GetDisplayName=wrap_strret(lib.PEAK_Interface_GetDisplayName,"displayName")
        #  PEAK_RETURN_CODE PEAK_Interface_GetTLType(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
        self.PEAK_Interface_GetTLType=wrap_strret(lib.PEAK_Interface_GetTLType,"tlType")
        #  PEAK_RETURN_CODE PEAK_Interface_GetParentSystem(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.POINTER(PEAK_SYSTEM_HANDLE) systemHandle)
        self.PEAK_Interface_GetParentSystem=wrapper(lib.PEAK_Interface_GetParentSystem)
        #  PEAK_RETURN_CODE PEAK_Interface_UpdateDevices(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.c_uint64 timeout_ms)
        self.PEAK_Interface_UpdateDevices=wrapper(lib.PEAK_Interface_UpdateDevices)
        
        #  PEAK_RETURN_CODE PEAK_Interface_GetNumDevices(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.POINTER(ctypes.c_size_t) numDevices)
        self.PEAK_Interface_GetNumDevices=wrapper(lib.PEAK_Interface_GetNumDevices)
        #  PEAK_RETURN_CODE PEAK_Interface_GetDevice(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_DEVICE_DESCRIPTOR_HANDLE) deviceDescriptorHandle)
        self.PEAK_Interface_GetDevice=wrapper(lib.PEAK_Interface_GetDevice)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_ToModuleDescriptor(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.POINTER(PEAK_MODULE_DESCRIPTOR_HANDLE) moduleDescriptorHandle)
        self.PEAK_DeviceDescriptor_ToModuleDescriptor=wrapper(lib.PEAK_DeviceDescriptor_ToModuleDescriptor)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetKey(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_DeviceDescriptor_GetKey=wrap_strret(lib.PEAK_DeviceDescriptor_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetDisplayName(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p displayName, ctypes.POINTER(ctypes.c_size_t) displayNameSize)
        self.PEAK_DeviceDescriptor_GetDisplayName=wrap_strret(lib.PEAK_DeviceDescriptor_GetDisplayName,"displayName")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetVendorName(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p vendorName, ctypes.POINTER(ctypes.c_size_t) vendorNameSize)
        self.PEAK_DeviceDescriptor_GetVendorName=wrap_strret(lib.PEAK_DeviceDescriptor_GetVendorName,"vendorName")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetModelName(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p modelName, ctypes.POINTER(ctypes.c_size_t) modelNameSize)
        self.PEAK_DeviceDescriptor_GetModelName=wrap_strret(lib.PEAK_DeviceDescriptor_GetModelName,"modelName")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetVersion(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p version, ctypes.POINTER(ctypes.c_size_t) versionSize)
        self.PEAK_DeviceDescriptor_GetVersion=wrap_strret(lib.PEAK_DeviceDescriptor_GetVersion,"version")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetTLType(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
        self.PEAK_DeviceDescriptor_GetTLType=wrap_strret(lib.PEAK_DeviceDescriptor_GetTLType,"tlType")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetUserDefinedName(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p userDefinedName, ctypes.POINTER(ctypes.c_size_t) userDefinedNameSize)
        self.PEAK_DeviceDescriptor_GetUserDefinedName=wrap_strret(lib.PEAK_DeviceDescriptor_GetUserDefinedName,"userDefinedName")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetSerialNumber(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_char_p serialNumber, ctypes.POINTER(ctypes.c_size_t) serialNumberSize)
        self.PEAK_DeviceDescriptor_GetSerialNumber=wrap_strret(lib.PEAK_DeviceDescriptor_GetSerialNumber,"serialNumber")
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetAccessStatus(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.POINTER(PEAK_DEVICE_ACCESS_STATUS) accessStatus)
        self.PEAK_DeviceDescriptor_GetAccessStatus=wrapper(lib.PEAK_DeviceDescriptor_GetAccessStatus)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetTimestampTickFrequency(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.POINTER(ctypes.c_uint64) timestampTickFrequency)
        self.PEAK_DeviceDescriptor_GetTimestampTickFrequency=wrapper(lib.PEAK_DeviceDescriptor_GetTimestampTickFrequency)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetIsOpenableExclusive(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.POINTER(PEAK_BOOL8) isOpenable)
        self.PEAK_DeviceDescriptor_GetIsOpenableExclusive=wrapper(lib.PEAK_DeviceDescriptor_GetIsOpenableExclusive)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetIsOpenable(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, PEAK_DEVICE_ACCESS_TYPE accessType, ctypes.POINTER(PEAK_BOOL8) isOpenable)
        self.PEAK_DeviceDescriptor_GetIsOpenable=wrapper(lib.PEAK_DeviceDescriptor_GetIsOpenable)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetMonitoringUpdateInterval(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.POINTER(ctypes.c_uint64) monitoringUpdateInterval_ms)
        self.PEAK_DeviceDescriptor_GetMonitoringUpdateInterval=wrapper(lib.PEAK_DeviceDescriptor_GetMonitoringUpdateInterval)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_SetMonitoringUpdateInterval(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_uint64 monitoringUpdateInterval_ms)
        self.PEAK_DeviceDescriptor_SetMonitoringUpdateInterval=wrapper(lib.PEAK_DeviceDescriptor_SetMonitoringUpdateInterval)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_IsInformationRoleMonitored(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, PEAK_DEVICE_INFORMATION_ROLE informationRole, ctypes.POINTER(PEAK_BOOL8) isInformationRoleMonitored)
        self.PEAK_DeviceDescriptor_IsInformationRoleMonitored=wrapper(lib.PEAK_DeviceDescriptor_IsInformationRoleMonitored)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_AddInformationRoleToMonitoring(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, PEAK_DEVICE_INFORMATION_ROLE informationRole)
        self.PEAK_DeviceDescriptor_AddInformationRoleToMonitoring=wrapper(lib.PEAK_DeviceDescriptor_AddInformationRoleToMonitoring)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_RemoveInformationRoleFromMonitoring(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, PEAK_DEVICE_INFORMATION_ROLE informationRole)
        self.PEAK_DeviceDescriptor_RemoveInformationRoleFromMonitoring=wrapper(lib.PEAK_DeviceDescriptor_RemoveInformationRoleFromMonitoring)
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetParentInterface(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.POINTER(PEAK_INTERFACE_HANDLE) interfaceHandle)
        self.PEAK_DeviceDescriptor_GetParentInterface=wrapper(lib.PEAK_DeviceDescriptor_GetParentInterface)
        
        #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_OpenDevice(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, PEAK_DEVICE_ACCESS_TYPE accessType, ctypes.POINTER(PEAK_DEVICE_HANDLE) deviceHandle)
        self.PEAK_DeviceDescriptor_OpenDevice=wrapper(lib.PEAK_DeviceDescriptor_OpenDevice)
        #  PEAK_RETURN_CODE PEAK_Device_Destruct(PEAK_DEVICE_HANDLE deviceHandle)
        self.PEAK_Device_Destruct=wrapper(lib.PEAK_Device_Destruct)
        #  PEAK_RETURN_CODE PEAK_Device_ToModule(PEAK_DEVICE_HANDLE deviceHandle, ctypes.POINTER(PEAK_MODULE_HANDLE) moduleHandle)
        self.PEAK_Device_ToModule=wrapper(lib.PEAK_Device_ToModule)
        #  PEAK_RETURN_CODE PEAK_Device_ToEventSupportingModule(PEAK_DEVICE_HANDLE deviceHandle, ctypes.POINTER(PEAK_EVENT_SUPPORTING_MODULE_HANDLE) eventSupportingModuleHandle)
        self.PEAK_Device_ToEventSupportingModule=wrapper(lib.PEAK_Device_ToEventSupportingModule)
        #  PEAK_RETURN_CODE PEAK_Device_GetKey(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_Device_GetKey=wrap_strret(lib.PEAK_Device_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_Device_GetID(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p id, ctypes.POINTER(ctypes.c_size_t) idSize)
        self.PEAK_Device_GetID=wrap_strret(lib.PEAK_Device_GetID,"id")
        #  PEAK_RETURN_CODE PEAK_Device_GetDisplayName(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p displayName, ctypes.POINTER(ctypes.c_size_t) displayNameSize)
        self.PEAK_Device_GetDisplayName=wrap_strret(lib.PEAK_Device_GetDisplayName,"displayName")
        #  PEAK_RETURN_CODE PEAK_Device_GetVendorName(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p vendorName, ctypes.POINTER(ctypes.c_size_t) vendorNameSize)
        self.PEAK_Device_GetVendorName=wrap_strret(lib.PEAK_Device_GetVendorName,"vendorName")
        #  PEAK_RETURN_CODE PEAK_Device_GetModelName(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p modelName, ctypes.POINTER(ctypes.c_size_t) modelNameSize)
        self.PEAK_Device_GetModelName=wrap_strret(lib.PEAK_Device_GetModelName,"modelName")
        #  PEAK_RETURN_CODE PEAK_Device_GetVersion(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p version, ctypes.POINTER(ctypes.c_size_t) versionSize)
        self.PEAK_Device_GetVersion=wrap_strret(lib.PEAK_Device_GetVersion,"version")
        #  PEAK_RETURN_CODE PEAK_Device_GetTLType(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
        self.PEAK_Device_GetTLType=wrap_strret(lib.PEAK_Device_GetTLType,"tlType")
        #  PEAK_RETURN_CODE PEAK_Device_GetUserDefinedName(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p userDefinedName, ctypes.POINTER(ctypes.c_size_t) userDefinedNameSize)
        self.PEAK_Device_GetUserDefinedName=wrap_strret(lib.PEAK_Device_GetUserDefinedName,"userDefinedName")
        #  PEAK_RETURN_CODE PEAK_Device_GetSerialNumber(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_char_p serialNumber, ctypes.POINTER(ctypes.c_size_t) serialNumberSize)
        self.PEAK_Device_GetSerialNumber=wrap_strret(lib.PEAK_Device_GetSerialNumber,"serialNumber")
        #  PEAK_RETURN_CODE PEAK_Device_GetAccessStatus(PEAK_DEVICE_HANDLE deviceHandle, ctypes.POINTER(PEAK_DEVICE_ACCESS_STATUS) accessStatus)
        self.PEAK_Device_GetAccessStatus=wrapper(lib.PEAK_Device_GetAccessStatus)
        #  PEAK_RETURN_CODE PEAK_Device_GetTimestampTickFrequency(PEAK_DEVICE_HANDLE deviceHandle, ctypes.POINTER(ctypes.c_uint64) timestampTickFrequency)
        self.PEAK_Device_GetTimestampTickFrequency=wrapper(lib.PEAK_Device_GetTimestampTickFrequency)
        #  PEAK_RETURN_CODE PEAK_Device_GetParentInterface(PEAK_DEVICE_HANDLE deviceHandle, ctypes.POINTER(PEAK_INTERFACE_HANDLE) interfaceHandle)
        self.PEAK_Device_GetParentInterface=wrapper(lib.PEAK_Device_GetParentInterface)
        #  PEAK_RETURN_CODE PEAK_Device_GetRemoteDevice(PEAK_DEVICE_HANDLE deviceHandle, ctypes.POINTER(PEAK_REMOTE_DEVICE_HANDLE) remoteDeviceHandle)
        self.PEAK_Device_GetRemoteDevice=wrapper(lib.PEAK_Device_GetRemoteDevice)
        #  PEAK_RETURN_CODE PEAK_RemoteDevice_ToModule(PEAK_REMOTE_DEVICE_HANDLE remoteDeviceHandle, ctypes.POINTER(PEAK_MODULE_HANDLE) moduleHandle)
        self.PEAK_RemoteDevice_ToModule=wrapper(lib.PEAK_RemoteDevice_ToModule)
        #  PEAK_RETURN_CODE PEAK_RemoteDevice_GetLocalDevice(PEAK_REMOTE_DEVICE_HANDLE remoteDeviceHandle, ctypes.POINTER(PEAK_DEVICE_HANDLE) deviceHandle)
        self.PEAK_RemoteDevice_GetLocalDevice=wrapper(lib.PEAK_RemoteDevice_GetLocalDevice)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetInfo(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
        self.PEAK_DataStream_GetInfo=wrapper(lib.PEAK_DataStream_GetInfo)
        
        #  PEAK_RETURN_CODE PEAK_Device_GetNumDataStreams(PEAK_DEVICE_HANDLE deviceHandle, ctypes.POINTER(ctypes.c_size_t) numDataStreams)
        self.PEAK_Device_GetNumDataStreams=wrapper(lib.PEAK_Device_GetNumDataStreams)
        #  PEAK_RETURN_CODE PEAK_Device_GetDataStream(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE) dataStreamDescriptorHandle)
        self.PEAK_Device_GetDataStream=wrapper(lib.PEAK_Device_GetDataStream)
        #  PEAK_RETURN_CODE PEAK_DataStreamDescriptor_ToModuleDescriptor(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE dataStreamDescriptorHandle, ctypes.POINTER(PEAK_MODULE_DESCRIPTOR_HANDLE) moduleDescriptorHandle)
        self.PEAK_DataStreamDescriptor_ToModuleDescriptor=wrapper(lib.PEAK_DataStreamDescriptor_ToModuleDescriptor)
        #  PEAK_RETURN_CODE PEAK_DataStreamDescriptor_GetKey(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE dataStreamDescriptorHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_DataStreamDescriptor_GetKey=wrap_strret(lib.PEAK_DataStreamDescriptor_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_DataStreamDescriptor_GetParentDevice(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE dataStreamDescriptorHandle, ctypes.POINTER(PEAK_DEVICE_HANDLE) deviceHandle)
        self.PEAK_DataStreamDescriptor_GetParentDevice=wrapper(lib.PEAK_DataStreamDescriptor_GetParentDevice)
        
        #  PEAK_RETURN_CODE PEAK_DataStreamDescriptor_OpenDataStream(PEAK_DATA_STREAM_DESCRIPTOR_HANDLE dataStreamDescriptorHandle, ctypes.POINTER(PEAK_DATA_STREAM_HANDLE) dataStreamHandle)
        self.PEAK_DataStreamDescriptor_OpenDataStream=wrapper(lib.PEAK_DataStreamDescriptor_OpenDataStream)
        #  PEAK_RETURN_CODE PEAK_DataStream_Destruct(PEAK_DATA_STREAM_HANDLE dataStreamHandle)
        self.PEAK_DataStream_Destruct=wrapper(lib.PEAK_DataStream_Destruct)
        #  PEAK_RETURN_CODE PEAK_DataStream_ToModule(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(PEAK_MODULE_HANDLE) moduleHandle)
        self.PEAK_DataStream_ToModule=wrapper(lib.PEAK_DataStream_ToModule)
        #  PEAK_RETURN_CODE PEAK_DataStream_ToEventSupportingModule(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(PEAK_EVENT_SUPPORTING_MODULE_HANDLE) eventSupportingModuleHandle)
        self.PEAK_DataStream_ToEventSupportingModule=wrapper(lib.PEAK_DataStream_ToEventSupportingModule)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetKey(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.c_char_p key, ctypes.POINTER(ctypes.c_size_t) keySize)
        self.PEAK_DataStream_GetKey=wrap_strret(lib.PEAK_DataStream_GetKey,"key")
        #  PEAK_RETURN_CODE PEAK_DataStream_GetID(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.c_char_p id, ctypes.POINTER(ctypes.c_size_t) idSize)
        self.PEAK_DataStream_GetID=wrap_strret(lib.PEAK_DataStream_GetID,"id")
        #  PEAK_RETURN_CODE PEAK_DataStream_GetTLType(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
        self.PEAK_DataStream_GetTLType=wrap_strret(lib.PEAK_DataStream_GetTLType,"tlType")
        #  PEAK_RETURN_CODE PEAK_DataStream_GetParentDevice(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(PEAK_DEVICE_HANDLE) deviceHandle)
        self.PEAK_DataStream_GetParentDevice=wrapper(lib.PEAK_DataStream_GetParentDevice)
        
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumBuffersAnnouncedMinRequired(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_size_t) numBuffersAnnouncedMinRequired)
        self.PEAK_DataStream_GetNumBuffersAnnouncedMinRequired=wrapper(lib.PEAK_DataStream_GetNumBuffersAnnouncedMinRequired)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumBuffersAnnounced(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_size_t) numBuffersAnnounced)
        self.PEAK_DataStream_GetNumBuffersAnnounced=wrapper(lib.PEAK_DataStream_GetNumBuffersAnnounced)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumBuffersQueued(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_size_t) numBuffersQueued)
        self.PEAK_DataStream_GetNumBuffersQueued=wrapper(lib.PEAK_DataStream_GetNumBuffersQueued)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumBuffersAwaitDelivery(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_size_t) numBuffersAwaitDelivery)
        self.PEAK_DataStream_GetNumBuffersAwaitDelivery=wrapper(lib.PEAK_DataStream_GetNumBuffersAwaitDelivery)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumBuffersDelivered(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_uint64) numBuffersDelivered)
        self.PEAK_DataStream_GetNumBuffersDelivered=wrapper(lib.PEAK_DataStream_GetNumBuffersDelivered)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumBuffersStarted(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_uint64) numBuffersStarted)
        self.PEAK_DataStream_GetNumBuffersStarted=wrapper(lib.PEAK_DataStream_GetNumBuffersStarted)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumUnderruns(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_uint64) numUnderruns)
        self.PEAK_DataStream_GetNumUnderruns=wrapper(lib.PEAK_DataStream_GetNumUnderruns)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetNumChunksPerBufferMax(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_size_t) numChunksPerBufferMax)
        self.PEAK_DataStream_GetNumChunksPerBufferMax=wrapper(lib.PEAK_DataStream_GetNumChunksPerBufferMax)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetBufferAlignment(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_size_t) bufferAlignment)
        self.PEAK_DataStream_GetBufferAlignment=wrapper(lib.PEAK_DataStream_GetBufferAlignment)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetDefinesPayloadSize(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(PEAK_BOOL8) definesPayloadSize)
        self.PEAK_DataStream_GetDefinesPayloadSize=wrapper(lib.PEAK_DataStream_GetDefinesPayloadSize)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetPayloadSize(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(ctypes.c_size_t) payloadSize)
        self.PEAK_DataStream_GetPayloadSize=wrapper(lib.PEAK_DataStream_GetPayloadSize)
        #  PEAK_RETURN_CODE PEAK_DataStream_GetIsGrabbing(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.POINTER(PEAK_BOOL8) isGrabbing)
        self.PEAK_DataStream_GetIsGrabbing=wrapper(lib.PEAK_DataStream_GetIsGrabbing)

        #  PEAK_RETURN_CODE PEAK_DataStream_AnnounceBuffer(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.c_void_p buffer, ctypes.c_size_t bufferSize, ctypes.c_void_p userPtr, PEAK_BUFFER_REVOCATION_CALLBACK revocationCallback, ctypes.c_void_p callbackContext, ctypes.POINTER(PEAK_BUFFER_HANDLE) bufferHandle)
        self.PEAK_DataStream_AnnounceBuffer=wrapper(lib.PEAK_DataStream_AnnounceBuffer)
        #  PEAK_RETURN_CODE PEAK_DataStream_AllocAndAnnounceBuffer(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.c_size_t bufferSize, ctypes.c_void_p userPtr, ctypes.POINTER(PEAK_BUFFER_HANDLE) bufferHandle)
        self.PEAK_DataStream_AllocAndAnnounceBuffer=wrapper(lib.PEAK_DataStream_AllocAndAnnounceBuffer)
        #  PEAK_RETURN_CODE PEAK_DataStream_QueueBuffer(PEAK_DATA_STREAM_HANDLE dataStreamHandle, PEAK_BUFFER_HANDLE bufferHandle)
        self.PEAK_DataStream_QueueBuffer=wrapper(lib.PEAK_DataStream_QueueBuffer)
        #  PEAK_RETURN_CODE PEAK_DataStream_RevokeBuffer(PEAK_DATA_STREAM_HANDLE dataStreamHandle, PEAK_BUFFER_HANDLE bufferHandle)
        self.PEAK_DataStream_RevokeBuffer=wrapper(lib.PEAK_DataStream_RevokeBuffer)
        #  PEAK_RETURN_CODE PEAK_DataStream_WaitForFinishedBuffer(PEAK_DATA_STREAM_HANDLE dataStreamHandle, ctypes.c_uint64 timeout_ms, ctypes.POINTER(PEAK_BUFFER_HANDLE) bufferHandle)
        self.PEAK_DataStream_WaitForFinishedBuffer=wrapper(lib.PEAK_DataStream_WaitForFinishedBuffer)
        #  PEAK_RETURN_CODE PEAK_DataStream_KillWait(PEAK_DATA_STREAM_HANDLE dataStreamHandle)
        self.PEAK_DataStream_KillWait=wrapper(lib.PEAK_DataStream_KillWait)
        #  PEAK_RETURN_CODE PEAK_DataStream_Flush(PEAK_DATA_STREAM_HANDLE dataStreamHandle, PEAK_DATA_STREAM_FLUSH_MODE flushMode)
        self.PEAK_DataStream_Flush=wrapper(lib.PEAK_DataStream_Flush)
        #  PEAK_RETURN_CODE PEAK_DataStream_StartAcquisitionInfinite(PEAK_DATA_STREAM_HANDLE dataStreamHandle, PEAK_ACQUISITION_START_MODE startMode)
        self.PEAK_DataStream_StartAcquisitionInfinite=wrapper(lib.PEAK_DataStream_StartAcquisitionInfinite)
        #  PEAK_RETURN_CODE PEAK_DataStream_StartAcquisition(PEAK_DATA_STREAM_HANDLE dataStreamHandle, PEAK_ACQUISITION_START_MODE startMode, ctypes.c_uint64 numToAcquire)
        self.PEAK_DataStream_StartAcquisition=wrapper(lib.PEAK_DataStream_StartAcquisition)
        #  PEAK_RETURN_CODE PEAK_DataStream_StopAcquisition(PEAK_DATA_STREAM_HANDLE dataStreamHandle, PEAK_ACQUISITION_STOP_MODE stopMode)
        self.PEAK_DataStream_StopAcquisition=wrapper(lib.PEAK_DataStream_StopAcquisition)
        
        
        #  PEAK_RETURN_CODE PEAK_ModuleDescriptor_GetID(PEAK_MODULE_DESCRIPTOR_HANDLE moduleDescriptorHandle, ctypes.c_char_p id, ctypes.POINTER(ctypes.c_size_t) idSize)
        self.PEAK_ModuleDescriptor_GetID=wrap_strret(lib.PEAK_ModuleDescriptor_GetID,"id")
        #  PEAK_RETURN_CODE PEAK_Module_GetNumNodeMaps(PEAK_MODULE_HANDLE moduleHandle, ctypes.POINTER(ctypes.c_size_t) numNodeMaps)
        self.PEAK_Module_GetNumNodeMaps=wrapper(lib.PEAK_Module_GetNumNodeMaps)
        #  PEAK_RETURN_CODE PEAK_Module_GetPort(PEAK_MODULE_HANDLE moduleHandle, ctypes.POINTER(PEAK_PORT_HANDLE) portHandle)
        self.PEAK_Module_GetPort=wrapper(lib.PEAK_Module_GetPort)
        
        #  PEAK_RETURN_CODE PEAK_Module_GetNodeMap(PEAK_MODULE_HANDLE moduleHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_NODE_MAP_HANDLE) nodeMapHandle)
        self.PEAK_Module_GetNodeMap=wrapper(lib.PEAK_Module_GetNodeMap)
        #  PEAK_RETURN_CODE PEAK_NodeMap_InvalidateNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle)
        self.PEAK_NodeMap_InvalidateNodes=wrapper(lib.PEAK_NodeMap_InvalidateNodes)
        #  PEAK_RETURN_CODE PEAK_NodeMap_PollNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, ctypes.c_int64 elapsedTime_ms)
        self.PEAK_NodeMap_PollNodes=wrapper(lib.PEAK_NodeMap_PollNodes)
        #  PEAK_RETURN_CODE PEAK_NodeMap_GetHasNode(PEAK_NODE_MAP_HANDLE nodeMapHandle, ctypes.c_char_p nodeName, ctypes.c_size_t nodeNameSize, ctypes.POINTER(PEAK_BOOL8) hasNode)
        self.PEAK_NodeMap_GetHasNode=wrap_strval(lib.PEAK_NodeMap_GetHasNode,"nodeName",args=["nodeMapHandle","nodeName"])
        #  PEAK_RETURN_CODE PEAK_NodeMap_FindNode(PEAK_NODE_MAP_HANDLE nodeMapHandle, ctypes.c_char_p nodeName, ctypes.c_size_t nodeNameSize, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_NodeMap_FindNode=wrapper(lib.PEAK_NodeMap_FindNode)
        #  PEAK_RETURN_CODE PEAK_NodeMap_Lock(PEAK_NODE_MAP_HANDLE nodeMapHandle)
        self.PEAK_NodeMap_Lock=wrapper(lib.PEAK_NodeMap_Lock)
        #  PEAK_RETURN_CODE PEAK_NodeMap_Unlock(PEAK_NODE_MAP_HANDLE nodeMapHandle)
        self.PEAK_NodeMap_Unlock=wrapper(lib.PEAK_NodeMap_Unlock)
        
        #  PEAK_RETURN_CODE PEAK_NodeMap_GetNumNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, ctypes.POINTER(ctypes.c_size_t) numNodes)
        self.PEAK_NodeMap_GetNumNodes=wrapper(lib.PEAK_NodeMap_GetNumNodes)
        #  PEAK_RETURN_CODE PEAK_NodeMap_GetNode(PEAK_NODE_MAP_HANDLE nodeMapHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_NodeMap_GetNode=wrapper(lib.PEAK_NodeMap_GetNode)
        #  PEAK_RETURN_CODE PEAK_Node_GetName(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p name, ctypes.POINTER(ctypes.c_size_t) nameSize)
        self.PEAK_Node_GetName=wrap_strret(lib.PEAK_Node_GetName,"name")
        #  PEAK_RETURN_CODE PEAK_Node_GetDisplayName(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p displayName, ctypes.POINTER(ctypes.c_size_t) displayNameSize)
        self.PEAK_Node_GetDisplayName=wrap_strret(lib.PEAK_Node_GetDisplayName,"displayName")
        #  PEAK_RETURN_CODE PEAK_Node_GetNamespace(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_NODE_NAMESPACE) _namespace)
        self.PEAK_Node_GetNamespace=wrapper(lib.PEAK_Node_GetNamespace)
        #  PEAK_RETURN_CODE PEAK_Node_GetVisibility(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_NODE_VISIBILITY) visibility)
        self.PEAK_Node_GetVisibility=wrapper(lib.PEAK_Node_GetVisibility)
        #  PEAK_RETURN_CODE PEAK_Node_GetAccessStatus(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_NODE_ACCESS_STATUS) accessStatus)
        self.PEAK_Node_GetAccessStatus=wrapper(lib.PEAK_Node_GetAccessStatus)
        #  PEAK_RETURN_CODE PEAK_Node_GetIsCacheable(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_BOOL8) isCacheable)
        self.PEAK_Node_GetIsCacheable=wrapper(lib.PEAK_Node_GetIsCacheable)
        #  PEAK_RETURN_CODE PEAK_Node_GetIsAccessStatusCacheable(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_BOOL8) isAccessStatusCacheable)
        self.PEAK_Node_GetIsAccessStatusCacheable=wrapper(lib.PEAK_Node_GetIsAccessStatusCacheable)
        #  PEAK_RETURN_CODE PEAK_Node_GetIsStreamable(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_BOOL8) isStreamable)
        self.PEAK_Node_GetIsStreamable=wrapper(lib.PEAK_Node_GetIsStreamable)
        #  PEAK_RETURN_CODE PEAK_Node_GetIsDeprecated(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_BOOL8) isDeprecated)
        self.PEAK_Node_GetIsDeprecated=wrapper(lib.PEAK_Node_GetIsDeprecated)
        #  PEAK_RETURN_CODE PEAK_Node_GetIsFeature(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_BOOL8) isFeature)
        self.PEAK_Node_GetIsFeature=wrapper(lib.PEAK_Node_GetIsFeature)
        #  PEAK_RETURN_CODE PEAK_Node_GetCachingMode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_NODE_CACHING_MODE) cachingMode)
        self.PEAK_Node_GetCachingMode=wrapper(lib.PEAK_Node_GetCachingMode)
        #  PEAK_RETURN_CODE PEAK_Node_GetPollingTime(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(ctypes.c_int64) pollingTime_ms)
        self.PEAK_Node_GetPollingTime=wrapper(lib.PEAK_Node_GetPollingTime)
        #  PEAK_RETURN_CODE PEAK_Node_GetToolTip(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p toolTip, ctypes.POINTER(ctypes.c_size_t) toolTipSize)
        self.PEAK_Node_GetToolTip=wrap_strret(lib.PEAK_Node_GetToolTip,"toolTip")
        #  PEAK_RETURN_CODE PEAK_Node_GetDescription(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p description, ctypes.POINTER(ctypes.c_size_t) descriptionSize)
        self.PEAK_Node_GetDescription=wrap_strret(lib.PEAK_Node_GetDescription,"description")
        #  PEAK_RETURN_CODE PEAK_Node_GetType(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_NODE_TYPE) type)
        self.PEAK_Node_GetType=wrapper(lib.PEAK_Node_GetType)
        #  PEAK_RETURN_CODE PEAK_Node_GetParentNodeMap(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_NODE_MAP_HANDLE) nodeMapHandle)
        self.PEAK_Node_GetParentNodeMap=wrapper(lib.PEAK_Node_GetParentNodeMap)
        
        #  PEAK_RETURN_CODE PEAK_Node_ToIntegerNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_INTEGER_NODE_HANDLE) integerNodeHandle)
        self.PEAK_Node_ToIntegerNode=wrapper(lib.PEAK_Node_ToIntegerNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToBooleanNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_BOOLEAN_NODE_HANDLE) booleanNodeHandle)
        self.PEAK_Node_ToBooleanNode=wrapper(lib.PEAK_Node_ToBooleanNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToCommandNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_COMMAND_NODE_HANDLE) commandNodeHandle)
        self.PEAK_Node_ToCommandNode=wrapper(lib.PEAK_Node_ToCommandNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToFloatNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_FLOAT_NODE_HANDLE) floatNodeHandle)
        self.PEAK_Node_ToFloatNode=wrapper(lib.PEAK_Node_ToFloatNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToStringNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_STRING_NODE_HANDLE) stringNodeHandle)
        self.PEAK_Node_ToStringNode=wrapper(lib.PEAK_Node_ToStringNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToRegisterNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_REGISTER_NODE_HANDLE) registerNodeHandle)
        self.PEAK_Node_ToRegisterNode=wrapper(lib.PEAK_Node_ToRegisterNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToCategoryNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_CATEGORY_NODE_HANDLE) categoryNodeHandle)
        self.PEAK_Node_ToCategoryNode=wrapper(lib.PEAK_Node_ToCategoryNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToEnumerationNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_ENUMERATION_NODE_HANDLE) enumerationNodeHandle)
        self.PEAK_Node_ToEnumerationNode=wrapper(lib.PEAK_Node_ToEnumerationNode)
        #  PEAK_RETURN_CODE PEAK_Node_ToEnumerationEntryNode(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(PEAK_ENUMERATION_ENTRY_NODE_HANDLE) enumerationEntryNodeHandle)
        self.PEAK_Node_ToEnumerationEntryNode=wrapper(lib.PEAK_Node_ToEnumerationEntryNode)
        
        #  PEAK_RETURN_CODE PEAK_IntegerNode_ToNode(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_IntegerNode_ToNode=wrapper(lib.PEAK_IntegerNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetMinimum(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.POINTER(ctypes.c_int64) minimum)
        self.PEAK_IntegerNode_GetMinimum=wrapper(lib.PEAK_IntegerNode_GetMinimum)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetMaximum(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.POINTER(ctypes.c_int64) maximum)
        self.PEAK_IntegerNode_GetMaximum=wrapper(lib.PEAK_IntegerNode_GetMaximum)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetIncrement(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.POINTER(ctypes.c_int64) increment)
        self.PEAK_IntegerNode_GetIncrement=wrapper(lib.PEAK_IntegerNode_GetIncrement)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetIncrementType(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.POINTER(PEAK_NODE_INCREMENT_TYPE) incrementType)
        self.PEAK_IntegerNode_GetIncrementType=wrapper(lib.PEAK_IntegerNode_GetIncrementType)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetValidValues(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.POINTER(ctypes.c_int64) validValues, ctypes.POINTER(ctypes.c_size_t) validValuesSize)
        self.PEAK_IntegerNode_GetValidValues_lib=wrapper(lib.PEAK_IntegerNode_GetValidValues)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetRepresentation(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.POINTER(PEAK_NODE_REPRESENTATION) representation)
        self.PEAK_IntegerNode_GetRepresentation=wrapper(lib.PEAK_IntegerNode_GetRepresentation)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetUnit(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.c_char_p unit, ctypes.POINTER(ctypes.c_size_t) unitSize)
        self.PEAK_IntegerNode_GetUnit=wrap_strret(lib.PEAK_IntegerNode_GetUnit,"unit")
        #  PEAK_RETURN_CODE PEAK_IntegerNode_GetValue(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, PEAK_NODE_CACHE_USE_POLICY cacheUsePolicy, ctypes.POINTER(ctypes.c_int64) value)
        self.PEAK_IntegerNode_GetValue=wrapper(lib.PEAK_IntegerNode_GetValue)
        #  PEAK_RETURN_CODE PEAK_IntegerNode_SetValue(PEAK_INTEGER_NODE_HANDLE integerNodeHandle, ctypes.c_int64 value)
        self.PEAK_IntegerNode_SetValue=wrapper(lib.PEAK_IntegerNode_SetValue)
        
        #  PEAK_RETURN_CODE PEAK_BooleanNode_ToNode(PEAK_BOOLEAN_NODE_HANDLE booleanNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_BooleanNode_ToNode=wrapper(lib.PEAK_BooleanNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_BooleanNode_GetValue(PEAK_BOOLEAN_NODE_HANDLE booleanNodeHandle, PEAK_NODE_CACHE_USE_POLICY cacheUsePolicy, ctypes.POINTER(PEAK_BOOL8) value)
        self.PEAK_BooleanNode_GetValue=wrapper(lib.PEAK_BooleanNode_GetValue)
        #  PEAK_RETURN_CODE PEAK_BooleanNode_SetValue(PEAK_BOOLEAN_NODE_HANDLE booleanNodeHandle, PEAK_BOOL8 value)
        self.PEAK_BooleanNode_SetValue=wrapper(lib.PEAK_BooleanNode_SetValue)
        
        #  PEAK_RETURN_CODE PEAK_CommandNode_ToNode(PEAK_COMMAND_NODE_HANDLE commandNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_CommandNode_ToNode=wrapper(lib.PEAK_CommandNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_CommandNode_GetIsDone(PEAK_COMMAND_NODE_HANDLE commandNodeHandle, ctypes.POINTER(PEAK_BOOL8) isDone)
        self.PEAK_CommandNode_GetIsDone=wrapper(lib.PEAK_CommandNode_GetIsDone)
        #  PEAK_RETURN_CODE PEAK_CommandNode_Execute(PEAK_COMMAND_NODE_HANDLE commandNodeHandle)
        self.PEAK_CommandNode_Execute=wrapper(lib.PEAK_CommandNode_Execute)
        #  PEAK_RETURN_CODE PEAK_CommandNode_WaitUntilDoneInfinite(PEAK_COMMAND_NODE_HANDLE commandNodeHandle)
        self.PEAK_CommandNode_WaitUntilDoneInfinite=wrapper(lib.PEAK_CommandNode_WaitUntilDoneInfinite)
        #  PEAK_RETURN_CODE PEAK_CommandNode_WaitUntilDone(PEAK_COMMAND_NODE_HANDLE commandNodeHandle, ctypes.c_uint64 waitTimeout_ms)
        self.PEAK_CommandNode_WaitUntilDone=wrapper(lib.PEAK_CommandNode_WaitUntilDone)
        
        #  PEAK_RETURN_CODE PEAK_FloatNode_ToNode(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_FloatNode_ToNode=wrapper(lib.PEAK_FloatNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetMinimum(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(ctypes.c_double) minimum)
        self.PEAK_FloatNode_GetMinimum=wrapper(lib.PEAK_FloatNode_GetMinimum)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetMaximum(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(ctypes.c_double) maximum)
        self.PEAK_FloatNode_GetMaximum=wrapper(lib.PEAK_FloatNode_GetMaximum)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetIncrement(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(ctypes.c_double) increment)
        self.PEAK_FloatNode_GetIncrement=wrapper(lib.PEAK_FloatNode_GetIncrement)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetIncrementType(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(PEAK_NODE_INCREMENT_TYPE) incrementType)
        self.PEAK_FloatNode_GetIncrementType=wrapper(lib.PEAK_FloatNode_GetIncrementType)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetValidValues(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(ctypes.c_double) validValues, ctypes.POINTER(ctypes.c_size_t) validValuesSize)
        self.PEAK_FloatNode_GetValidValues_lib=wrapper(lib.PEAK_FloatNode_GetValidValues)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetRepresentation(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(PEAK_NODE_REPRESENTATION) representation)
        self.PEAK_FloatNode_GetRepresentation=wrapper(lib.PEAK_FloatNode_GetRepresentation)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetUnit(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.c_char_p unit, ctypes.POINTER(ctypes.c_size_t) unitSize)
        self.PEAK_FloatNode_GetUnit=wrap_strret(lib.PEAK_FloatNode_GetUnit,"unit")
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetDisplayNotation(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(PEAK_NODE_DISPLAY_NOTATION) displayNotation)
        self.PEAK_FloatNode_GetDisplayNotation=wrapper(lib.PEAK_FloatNode_GetDisplayNotation)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetDisplayPrecision(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(ctypes.c_int64) displayPrecision)
        self.PEAK_FloatNode_GetDisplayPrecision=wrapper(lib.PEAK_FloatNode_GetDisplayPrecision)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetHasConstantIncrement(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.POINTER(PEAK_BOOL8) hasConstantIncrement)
        self.PEAK_FloatNode_GetHasConstantIncrement=wrapper(lib.PEAK_FloatNode_GetHasConstantIncrement)
        #  PEAK_RETURN_CODE PEAK_FloatNode_GetValue(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, PEAK_NODE_CACHE_USE_POLICY cacheUsePolicy, ctypes.POINTER(ctypes.c_double) value)
        self.PEAK_FloatNode_GetValue=wrapper(lib.PEAK_FloatNode_GetValue)
        #  PEAK_RETURN_CODE PEAK_FloatNode_SetValue(PEAK_FLOAT_NODE_HANDLE floatNodeHandle, ctypes.c_double value)
        self.PEAK_FloatNode_SetValue=wrapper(lib.PEAK_FloatNode_SetValue)
        
        #  PEAK_RETURN_CODE PEAK_StringNode_ToNode(PEAK_STRING_NODE_HANDLE stringNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_StringNode_ToNode=wrapper(lib.PEAK_StringNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_StringNode_GetMaximumLength(PEAK_STRING_NODE_HANDLE stringNodeHandle, ctypes.POINTER(ctypes.c_int64) maximumLength)
        self.PEAK_StringNode_GetMaximumLength=wrapper(lib.PEAK_StringNode_GetMaximumLength)
        #  PEAK_RETURN_CODE PEAK_StringNode_GetValue(PEAK_STRING_NODE_HANDLE stringNodeHandle, PEAK_NODE_CACHE_USE_POLICY cacheUsePolicy, ctypes.c_char_p value, ctypes.POINTER(ctypes.c_size_t) valueSize)
        self.PEAK_StringNode_GetValue=wrap_strret(lib.PEAK_StringNode_GetValue,"value")
        #  PEAK_RETURN_CODE PEAK_StringNode_SetValue(PEAK_STRING_NODE_HANDLE stringNodeHandle, ctypes.c_char_p value, ctypes.c_size_t valueSize)
        self.PEAK_StringNode_SetValue=wrap_strval(lib.PEAK_StringNode_SetValue,"value",args=["stringNodeHandle","value"])
        
        #  PEAK_RETURN_CODE PEAK_RegisterNode_ToNode(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_RegisterNode_ToNode=wrapper(lib.PEAK_RegisterNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_RegisterNode_GetAddress(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, ctypes.POINTER(ctypes.c_uint64) address)
        self.PEAK_RegisterNode_GetAddress=wrapper(lib.PEAK_RegisterNode_GetAddress)
        #  PEAK_RETURN_CODE PEAK_RegisterNode_GetLength(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, ctypes.POINTER(ctypes.c_size_t) length)
        self.PEAK_RegisterNode_GetLength=wrapper(lib.PEAK_RegisterNode_GetLength)
        #  PEAK_RETURN_CODE PEAK_RegisterNode_Read(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, PEAK_NODE_CACHE_USE_POLICY cacheUsePolicy, ctypes.POINTER(ctypes.c_uint8) bytesToRead, ctypes.c_size_t bytesToReadSize)
        self.PEAK_RegisterNode_Read_lib=wrapper(lib.PEAK_RegisterNode_Read)
        #  PEAK_RETURN_CODE PEAK_RegisterNode_Write(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, ctypes.POINTER(ctypes.c_uint8) bytesToWrite, ctypes.c_size_t bytesToWriteSize)
        self.PEAK_RegisterNode_Write_lib=wrapper(lib.PEAK_RegisterNode_Write)
        
        #  PEAK_RETURN_CODE PEAK_CategoryNode_ToNode(PEAK_CATEGORY_NODE_HANDLE categoryNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_CategoryNode_ToNode=wrapper(lib.PEAK_CategoryNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_CategoryNode_GetNumSubNodes(PEAK_CATEGORY_NODE_HANDLE categoryNodeHandle, ctypes.POINTER(ctypes.c_size_t) numSubNodes)
        self.PEAK_CategoryNode_GetNumSubNodes=wrapper(lib.PEAK_CategoryNode_GetNumSubNodes)
        #  PEAK_RETURN_CODE PEAK_CategoryNode_GetSubNode(PEAK_CATEGORY_NODE_HANDLE categoryNodeHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_CategoryNode_GetSubNode=wrapper(lib.PEAK_CategoryNode_GetSubNode)
        
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_ToNode(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_EnumerationNode_ToNode=wrapper(lib.PEAK_EnumerationNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_GetCurrentEntry(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, PEAK_NODE_CACHE_USE_POLICY cacheUsePolicy, ctypes.POINTER(PEAK_ENUMERATION_ENTRY_NODE_HANDLE) enumerationEntryNodeHandle)
        self.PEAK_EnumerationNode_GetCurrentEntry=wrapper(lib.PEAK_EnumerationNode_GetCurrentEntry)
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_SetCurrentEntry(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, PEAK_ENUMERATION_ENTRY_NODE_HANDLE enumerationEntryNodeHandle)
        self.PEAK_EnumerationNode_SetCurrentEntry=wrapper(lib.PEAK_EnumerationNode_SetCurrentEntry)
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_SetCurrentEntryBySymbolicValue(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, ctypes.c_char_p symbolicValue, ctypes.c_size_t symbolicValueSize)
        self.PEAK_EnumerationNode_SetCurrentEntryBySymbolicValue=wrap_strval(lib.PEAK_EnumerationNode_SetCurrentEntryBySymbolicValue,"symbolicValue",args=["enumerationNodeHandle","symbolicValue"])
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_SetCurrentEntryByValue(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, ctypes.c_int64 value)
        self.PEAK_EnumerationNode_SetCurrentEntryByValue=wrapper(lib.PEAK_EnumerationNode_SetCurrentEntryByValue)
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_FindEntryBySymbolicValue(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, ctypes.c_char_p symbolicValue, ctypes.c_size_t symbolicValueSize, ctypes.POINTER(PEAK_ENUMERATION_ENTRY_NODE_HANDLE) enumerationEntryNodeHandle)
        self.PEAK_EnumerationNode_FindEntryBySymbolicValue=wrap_strval(lib.PEAK_EnumerationNode_FindEntryBySymbolicValue,"symbolicValue",args=["enumerationNodeHandle","symbolicValue"],
            rvals=["enumerationEntryNodeHandle"],byref=["enumerationEntryNodeHandle"])
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_FindEntryByValue(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, ctypes.c_int64 value, ctypes.POINTER(PEAK_ENUMERATION_ENTRY_NODE_HANDLE) enumerationEntryNodeHandle)
        self.PEAK_EnumerationNode_FindEntryByValue=wrapper(lib.PEAK_EnumerationNode_FindEntryByValue)
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_GetNumEntries(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, ctypes.POINTER(ctypes.c_size_t) numEntries)
        self.PEAK_EnumerationNode_GetNumEntries=wrapper(lib.PEAK_EnumerationNode_GetNumEntries)
        #  PEAK_RETURN_CODE PEAK_EnumerationNode_GetEntry(PEAK_ENUMERATION_NODE_HANDLE enumerationNodeHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_ENUMERATION_ENTRY_NODE_HANDLE) enumerationEntryNodeHandle)
        self.PEAK_EnumerationNode_GetEntry=wrapper(lib.PEAK_EnumerationNode_GetEntry)
        #  PEAK_RETURN_CODE PEAK_EnumerationEntryNode_ToNode(PEAK_ENUMERATION_ENTRY_NODE_HANDLE enumerationEntryNodeHandle, ctypes.POINTER(PEAK_NODE_HANDLE) nodeHandle)
        self.PEAK_EnumerationEntryNode_ToNode=wrapper(lib.PEAK_EnumerationEntryNode_ToNode)
        #  PEAK_RETURN_CODE PEAK_EnumerationEntryNode_GetIsSelfClearing(PEAK_ENUMERATION_ENTRY_NODE_HANDLE enumerationEntryNodeHandle, ctypes.POINTER(PEAK_BOOL8) isSelfClearing)
        self.PEAK_EnumerationEntryNode_GetIsSelfClearing=wrapper(lib.PEAK_EnumerationEntryNode_GetIsSelfClearing)
        #  PEAK_RETURN_CODE PEAK_EnumerationEntryNode_GetSymbolicValue(PEAK_ENUMERATION_ENTRY_NODE_HANDLE enumerationEntryNodeHandle, ctypes.c_char_p symbolicValue, ctypes.POINTER(ctypes.c_size_t) symbolicValueSize)
        self.PEAK_EnumerationEntryNode_GetSymbolicValue=wrap_strret(lib.PEAK_EnumerationEntryNode_GetSymbolicValue,"symbolicValue")
        #  PEAK_RETURN_CODE PEAK_EnumerationEntryNode_GetValue(PEAK_ENUMERATION_ENTRY_NODE_HANDLE enumerationEntryNodeHandle, ctypes.POINTER(ctypes.c_int64) value)
        self.PEAK_EnumerationEntryNode_GetValue=wrapper(lib.PEAK_EnumerationEntryNode_GetValue)
        

        return
    
            # #  PEAK_RETURN_CODE PEAK_Node_FindInvalidatedNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p name, ctypes.c_size_t nameSize, ctypes.POINTER(PEAK_NODE_HANDLE) invalidatedNodeHandle)
            # self.PEAK_Node_FindInvalidatedNode=wrapper(lib.PEAK_Node_FindInvalidatedNode)
            # #  PEAK_RETURN_CODE PEAK_Node_GetNumInvalidatedNodes(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(ctypes.c_size_t) numInvalidatedNodes)
            # self.PEAK_Node_GetNumInvalidatedNodes=wrapper(lib.PEAK_Node_GetNumInvalidatedNodes)
            # #  PEAK_RETURN_CODE PEAK_Node_GetInvalidatedNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_NODE_HANDLE) invalidatedNodeHandle)
            # self.PEAK_Node_GetInvalidatedNode=wrapper(lib.PEAK_Node_GetInvalidatedNode)
            # #  PEAK_RETURN_CODE PEAK_Node_FindInvalidatingNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p name, ctypes.c_size_t nameSize, ctypes.POINTER(PEAK_NODE_HANDLE) invalidatingNodeHandle)
            # self.PEAK_Node_FindInvalidatingNode=wrapper(lib.PEAK_Node_FindInvalidatingNode)
            # #  PEAK_RETURN_CODE PEAK_Node_GetNumInvalidatingNodes(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(ctypes.c_size_t) numInvalidatingNodes)
            # self.PEAK_Node_GetNumInvalidatingNodes=wrapper(lib.PEAK_Node_GetNumInvalidatingNodes)
            # #  PEAK_RETURN_CODE PEAK_Node_GetInvalidatingNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_NODE_HANDLE) invalidatingNodeHandle)
            # self.PEAK_Node_GetInvalidatingNode=wrapper(lib.PEAK_Node_GetInvalidatingNode)
            # #  PEAK_RETURN_CODE PEAK_Node_FindSelectedNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p name, ctypes.c_size_t nameSize, ctypes.POINTER(PEAK_NODE_HANDLE) selectedNodeHandle)
            # self.PEAK_Node_FindSelectedNode=wrapper(lib.PEAK_Node_FindSelectedNode)
            # #  PEAK_RETURN_CODE PEAK_Node_GetNumSelectedNodes(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(ctypes.c_size_t) numSelectedNodes)
            # self.PEAK_Node_GetNumSelectedNodes=wrapper(lib.PEAK_Node_GetNumSelectedNodes)
            # #  PEAK_RETURN_CODE PEAK_Node_GetSelectedNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_NODE_HANDLE) selectedNodeHandle)
            # self.PEAK_Node_GetSelectedNode=wrapper(lib.PEAK_Node_GetSelectedNode)
            # #  PEAK_RETURN_CODE PEAK_Node_FindSelectingNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_char_p name, ctypes.c_size_t nameSize, ctypes.POINTER(PEAK_NODE_HANDLE) selectingNodeHandle)
            # self.PEAK_Node_FindSelectingNode=wrapper(lib.PEAK_Node_FindSelectingNode)
            # #  PEAK_RETURN_CODE PEAK_Node_GetNumSelectingNodes(PEAK_NODE_HANDLE nodeHandle, ctypes.POINTER(ctypes.c_size_t) numSelectingNodes)
            # self.PEAK_Node_GetNumSelectingNodes=wrapper(lib.PEAK_Node_GetNumSelectingNodes)
            # #  PEAK_RETURN_CODE PEAK_Node_GetSelectingNode(PEAK_NODE_HANDLE nodeHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_NODE_HANDLE) selectingNodeHandle)
            # self.PEAK_Node_GetSelectingNode=wrapper(lib.PEAK_Node_GetSelectingNode)
            # #  PEAK_RETURN_CODE PEAK_Node_RegisterChangedCallback(PEAK_NODE_HANDLE nodeHandle, PEAK_NODE_CHANGED_CALLBACK callback, ctypes.c_void_p callbackContext, ctypes.POINTER(PEAK_NODE_CHANGED_CALLBACK_HANDLE) callbackHandle)
            # self.PEAK_Node_RegisterChangedCallback=wrapper(lib.PEAK_Node_RegisterChangedCallback)
            # #  PEAK_RETURN_CODE PEAK_Node_UnregisterChangedCallback(PEAK_NODE_HANDLE nodeHandle, PEAK_NODE_CHANGED_CALLBACK_HANDLE callbackHandle)
            # self.PEAK_Node_UnregisterChangedCallback=wrapper(lib.PEAK_Node_UnregisterChangedCallback)

            # #  PEAK_RETURN_CODE PEAK_Port_GetInfo(PEAK_PORT_HANDLE portHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_Port_GetInfo=wrapper(lib.PEAK_Port_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_Port_GetID(PEAK_PORT_HANDLE portHandle, ctypes.c_char_p id, ctypes.POINTER(ctypes.c_size_t) idSize)
            # self.PEAK_Port_GetID=wrapper(lib.PEAK_Port_GetID)
            # #  PEAK_RETURN_CODE PEAK_Port_GetName(PEAK_PORT_HANDLE portHandle, ctypes.c_char_p name, ctypes.POINTER(ctypes.c_size_t) nameSize)
            # self.PEAK_Port_GetName=wrapper(lib.PEAK_Port_GetName)
            # #  PEAK_RETURN_CODE PEAK_Port_GetVendorName(PEAK_PORT_HANDLE portHandle, ctypes.c_char_p vendorName, ctypes.POINTER(ctypes.c_size_t) vendorNameSize)
            # self.PEAK_Port_GetVendorName=wrapper(lib.PEAK_Port_GetVendorName)
            # #  PEAK_RETURN_CODE PEAK_Port_GetModelName(PEAK_PORT_HANDLE portHandle, ctypes.c_char_p modelName, ctypes.POINTER(ctypes.c_size_t) modelNameSize)
            # self.PEAK_Port_GetModelName=wrapper(lib.PEAK_Port_GetModelName)
            # #  PEAK_RETURN_CODE PEAK_Port_GetVersion(PEAK_PORT_HANDLE portHandle, ctypes.c_char_p version, ctypes.POINTER(ctypes.c_size_t) versionSize)
            # self.PEAK_Port_GetVersion=wrapper(lib.PEAK_Port_GetVersion)
            # #  PEAK_RETURN_CODE PEAK_Port_GetTLType(PEAK_PORT_HANDLE portHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
            # self.PEAK_Port_GetTLType=wrapper(lib.PEAK_Port_GetTLType)
            # #  PEAK_RETURN_CODE PEAK_Port_GetModuleName(PEAK_PORT_HANDLE portHandle, ctypes.c_char_p moduleName, ctypes.POINTER(ctypes.c_size_t) moduleNameSize)
            # self.PEAK_Port_GetModuleName=wrapper(lib.PEAK_Port_GetModuleName)
            # #  PEAK_RETURN_CODE PEAK_Port_GetDataEndianness(PEAK_PORT_HANDLE portHandle, ctypes.POINTER(PEAK_ENDIANNESS) dataEndianness)
            # self.PEAK_Port_GetDataEndianness=wrapper(lib.PEAK_Port_GetDataEndianness)
            # #  PEAK_RETURN_CODE PEAK_Port_GetIsReadable(PEAK_PORT_HANDLE portHandle, ctypes.POINTER(PEAK_BOOL8) isReadable)
            # self.PEAK_Port_GetIsReadable=wrapper(lib.PEAK_Port_GetIsReadable)
            # #  PEAK_RETURN_CODE PEAK_Port_GetIsWritable(PEAK_PORT_HANDLE portHandle, ctypes.POINTER(PEAK_BOOL8) isWritable)
            # self.PEAK_Port_GetIsWritable=wrapper(lib.PEAK_Port_GetIsWritable)
            # #  PEAK_RETURN_CODE PEAK_Port_GetIsAvailable(PEAK_PORT_HANDLE portHandle, ctypes.POINTER(PEAK_BOOL8) isAvailable)
            # self.PEAK_Port_GetIsAvailable=wrapper(lib.PEAK_Port_GetIsAvailable)
            # #  PEAK_RETURN_CODE PEAK_Port_GetIsImplemented(PEAK_PORT_HANDLE portHandle, ctypes.POINTER(PEAK_BOOL8) isImplemented)
            # self.PEAK_Port_GetIsImplemented=wrapper(lib.PEAK_Port_GetIsImplemented)
            # #  PEAK_RETURN_CODE PEAK_Port_Read(PEAK_PORT_HANDLE portHandle, ctypes.c_uint64 address, ctypes.POINTER(ctypes.c_uint8) bytesToRead, ctypes.c_size_t bytesToReadSize)
            # self.PEAK_Port_Read=wrapper(lib.PEAK_Port_Read)
            # #  PEAK_RETURN_CODE PEAK_Port_Write(PEAK_PORT_HANDLE portHandle, ctypes.c_uint64 address, ctypes.POINTER(ctypes.c_uint8) bytesToWrite, ctypes.c_size_t bytesToWriteSize)
            # self.PEAK_Port_Write=wrapper(lib.PEAK_Port_Write)
            # #  PEAK_RETURN_CODE PEAK_Port_GetNumURLs(PEAK_PORT_HANDLE portHandle, ctypes.POINTER(ctypes.c_size_t) numUrls)
            # self.PEAK_Port_GetNumURLs=wrapper(lib.PEAK_Port_GetNumURLs)
            # #  PEAK_RETURN_CODE PEAK_Port_GetURL(PEAK_PORT_HANDLE portHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_PORT_URL_HANDLE) portUrlHandle)
            # self.PEAK_Port_GetURL=wrapper(lib.PEAK_Port_GetURL)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetInfo(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_PortURL_GetInfo=wrapper(lib.PEAK_PortURL_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetURL(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.c_char_p url, ctypes.POINTER(ctypes.c_size_t) urlSize)
            # self.PEAK_PortURL_GetURL=wrapper(lib.PEAK_PortURL_GetURL)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetScheme(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(PEAK_PORT_URL_SCHEME) scheme)
            # self.PEAK_PortURL_GetScheme=wrapper(lib.PEAK_PortURL_GetScheme)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileName(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.c_char_p fileName, ctypes.POINTER(ctypes.c_size_t) fileNameSize)
            # self.PEAK_PortURL_GetFileName=wrapper(lib.PEAK_PortURL_GetFileName)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileRegisterAddress(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_uint64) fileRegisterAddress)
            # self.PEAK_PortURL_GetFileRegisterAddress=wrapper(lib.PEAK_PortURL_GetFileRegisterAddress)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileSize(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_uint64) fileSize)
            # self.PEAK_PortURL_GetFileSize=wrapper(lib.PEAK_PortURL_GetFileSize)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileSHA1Hash(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_uint8) fileSha1Hash, ctypes.POINTER(ctypes.c_size_t) fileSha1HashSize)
            # self.PEAK_PortURL_GetFileSHA1Hash=wrapper(lib.PEAK_PortURL_GetFileSHA1Hash)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileVersionMajor(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_int32) fileVersionMajor)
            # self.PEAK_PortURL_GetFileVersionMajor=wrapper(lib.PEAK_PortURL_GetFileVersionMajor)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileVersionMinor(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_int32) fileVersionMinor)
            # self.PEAK_PortURL_GetFileVersionMinor=wrapper(lib.PEAK_PortURL_GetFileVersionMinor)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileVersionSubminor(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_int32) fileVersionSubminor)
            # self.PEAK_PortURL_GetFileVersionSubminor=wrapper(lib.PEAK_PortURL_GetFileVersionSubminor)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileSchemaVersionMajor(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_int32) fileSchemaVersionMajor)
            # self.PEAK_PortURL_GetFileSchemaVersionMajor=wrapper(lib.PEAK_PortURL_GetFileSchemaVersionMajor)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetFileSchemaVersionMinor(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(ctypes.c_int32) fileSchemaVersionMinor)
            # self.PEAK_PortURL_GetFileSchemaVersionMinor=wrapper(lib.PEAK_PortURL_GetFileSchemaVersionMinor)
            # #  PEAK_RETURN_CODE PEAK_PortURL_GetParentPort(PEAK_PORT_URL_HANDLE portUrlHandle, ctypes.POINTER(PEAK_PORT_HANDLE) portHandle)
            # self.PEAK_PortURL_GetParentPort=wrapper(lib.PEAK_PortURL_GetParentPort)
            # #  PEAK_RETURN_CODE PEAK_EventSupportingModule_EnableEvents(PEAK_EVENT_SUPPORTING_MODULE_HANDLE eventSupportingModuleHandle, PEAK_EVENT_TYPE eventType, ctypes.POINTER(PEAK_EVENT_CONTROLLER_HANDLE) eventControllerHandle)
            # self.PEAK_EventSupportingModule_EnableEvents=wrapper(lib.PEAK_EventSupportingModule_EnableEvents)
            # #  PEAK_RETURN_CODE PEAK_EventController_GetInfo(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_EventController_GetInfo=wrapper(lib.PEAK_EventController_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_EventController_GetNumEventsInQueue(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle, ctypes.POINTER(ctypes.c_size_t) numEventsInQueue)
            # self.PEAK_EventController_GetNumEventsInQueue=wrapper(lib.PEAK_EventController_GetNumEventsInQueue)
            # #  PEAK_RETURN_CODE PEAK_EventController_GetNumEventsFired(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle, ctypes.POINTER(ctypes.c_uint64) numEventsFired)
            # self.PEAK_EventController_GetNumEventsFired=wrapper(lib.PEAK_EventController_GetNumEventsFired)
            # #  PEAK_RETURN_CODE PEAK_EventController_GetEventMaxSize(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle, ctypes.POINTER(ctypes.c_size_t) eventMaxSize)
            # self.PEAK_EventController_GetEventMaxSize=wrapper(lib.PEAK_EventController_GetEventMaxSize)
            # #  PEAK_RETURN_CODE PEAK_EventController_GetEventDataMaxSize(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle, ctypes.POINTER(ctypes.c_size_t) eventDataMaxSize)
            # self.PEAK_EventController_GetEventDataMaxSize=wrapper(lib.PEAK_EventController_GetEventDataMaxSize)
            # #  PEAK_RETURN_CODE PEAK_EventController_GetControlledEventType(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle, ctypes.POINTER(PEAK_EVENT_TYPE) controlledEventType)
            # self.PEAK_EventController_GetControlledEventType=wrapper(lib.PEAK_EventController_GetControlledEventType)
            # #  PEAK_RETURN_CODE PEAK_EventController_WaitForEvent(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle, ctypes.c_uint64 timeout_ms, ctypes.POINTER(PEAK_EVENT_HANDLE) eventHandle)
            # self.PEAK_EventController_WaitForEvent=wrapper(lib.PEAK_EventController_WaitForEvent)
            # #  PEAK_RETURN_CODE PEAK_EventController_KillWait(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle)
            # self.PEAK_EventController_KillWait=wrapper(lib.PEAK_EventController_KillWait)
            # #  PEAK_RETURN_CODE PEAK_EventController_FlushEvents(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle)
            # self.PEAK_EventController_FlushEvents=wrapper(lib.PEAK_EventController_FlushEvents)
            # #  PEAK_RETURN_CODE PEAK_EventController_Destruct(PEAK_EVENT_CONTROLLER_HANDLE eventControllerHandle)
            # self.PEAK_EventController_Destruct=wrapper(lib.PEAK_EventController_Destruct)
            # #  PEAK_RETURN_CODE PEAK_Event_GetInfo(PEAK_EVENT_HANDLE eventHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_Event_GetInfo=wrapper(lib.PEAK_Event_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_Event_GetID(PEAK_EVENT_HANDLE eventHandle, ctypes.POINTER(ctypes.c_uint64) id)
            # self.PEAK_Event_GetID=wrapper(lib.PEAK_Event_GetID)
            # #  PEAK_RETURN_CODE PEAK_Event_GetData(PEAK_EVENT_HANDLE eventHandle, ctypes.POINTER(ctypes.c_uint8) data, ctypes.POINTER(ctypes.c_size_t) dataSize)
            # self.PEAK_Event_GetData=wrapper(lib.PEAK_Event_GetData)
            # #  PEAK_RETURN_CODE PEAK_Event_GetType(PEAK_EVENT_HANDLE eventHandle, ctypes.POINTER(PEAK_EVENT_TYPE) type)
            # self.PEAK_Event_GetType=wrapper(lib.PEAK_Event_GetType)
            # #  PEAK_RETURN_CODE PEAK_Event_GetRawData(PEAK_EVENT_HANDLE eventHandle, ctypes.POINTER(ctypes.c_uint8) rawData, ctypes.POINTER(ctypes.c_size_t) rawDataSize)
            # self.PEAK_Event_GetRawData=wrapper(lib.PEAK_Event_GetRawData)
            # #  PEAK_RETURN_CODE PEAK_Event_Destruct(PEAK_EVENT_HANDLE eventHandle)
            # self.PEAK_Event_Destruct=wrapper(lib.PEAK_Event_Destruct)



            # #  PEAK_RETURN_CODE PEAK_Buffer_ToModule(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_MODULE_HANDLE) moduleHandle)
            # self.PEAK_Buffer_ToModule=wrapper(lib.PEAK_Buffer_ToModule)
            # #  PEAK_RETURN_CODE PEAK_Buffer_ToEventSupportingModule(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_EVENT_SUPPORTING_MODULE_HANDLE) eventSupportingModuleHandle)
            # self.PEAK_Buffer_ToEventSupportingModule=wrapper(lib.PEAK_Buffer_ToEventSupportingModule)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetInfo(PEAK_BUFFER_HANDLE bufferHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_Buffer_GetInfo=wrapper(lib.PEAK_Buffer_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetTLType(PEAK_BUFFER_HANDLE bufferHandle, ctypes.c_char_p tlType, ctypes.POINTER(ctypes.c_size_t) tlTypeSize)
            # self.PEAK_Buffer_GetTLType=wrapper(lib.PEAK_Buffer_GetTLType)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetBasePtr(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_void_p) basePtr)
            # self.PEAK_Buffer_GetBasePtr=wrapper(lib.PEAK_Buffer_GetBasePtr)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetSize(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) size)
            # self.PEAK_Buffer_GetSize=wrapper(lib.PEAK_Buffer_GetSize)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetUserPtr(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_void_p) userPtr)
            # self.PEAK_Buffer_GetUserPtr=wrapper(lib.PEAK_Buffer_GetUserPtr)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetPayloadType(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BUFFER_PAYLOAD_TYPE) payloadType)
            # self.PEAK_Buffer_GetPayloadType=wrapper(lib.PEAK_Buffer_GetPayloadType)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetPixelFormat(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_uint64) pixelFormat)
            # self.PEAK_Buffer_GetPixelFormat=wrapper(lib.PEAK_Buffer_GetPixelFormat)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetPixelFormatNamespace(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_PIXEL_FORMAT_NAMESPACE) pixelFormatNamespace)
            # self.PEAK_Buffer_GetPixelFormatNamespace=wrapper(lib.PEAK_Buffer_GetPixelFormatNamespace)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetPixelEndianness(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_ENDIANNESS) pixelEndianness)
            # self.PEAK_Buffer_GetPixelEndianness=wrapper(lib.PEAK_Buffer_GetPixelEndianness)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetExpectedDataSize(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) expectedDataSize)
            # self.PEAK_Buffer_GetExpectedDataSize=wrapper(lib.PEAK_Buffer_GetExpectedDataSize)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetDeliveredDataSize(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) deliveredDataSize)
            # self.PEAK_Buffer_GetDeliveredDataSize=wrapper(lib.PEAK_Buffer_GetDeliveredDataSize)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetFrameID(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_uint64) frameId)
            # self.PEAK_Buffer_GetFrameID=wrapper(lib.PEAK_Buffer_GetFrameID)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetImageOffset(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) imageOffset)
            # self.PEAK_Buffer_GetImageOffset=wrapper(lib.PEAK_Buffer_GetImageOffset)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetDeliveredImageHeight(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) deliveredImageHeight)
            # self.PEAK_Buffer_GetDeliveredImageHeight=wrapper(lib.PEAK_Buffer_GetDeliveredImageHeight)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetDeliveredChunkPayloadSize(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) deliveredChunkPayloadSize)
            # self.PEAK_Buffer_GetDeliveredChunkPayloadSize=wrapper(lib.PEAK_Buffer_GetDeliveredChunkPayloadSize)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetChunkLayoutID(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_uint64) chunkLayoutId)
            # self.PEAK_Buffer_GetChunkLayoutID=wrapper(lib.PEAK_Buffer_GetChunkLayoutID)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetFileName(PEAK_BUFFER_HANDLE bufferHandle, ctypes.c_char_p fileName, ctypes.POINTER(ctypes.c_size_t) fileNameSize)
            # self.PEAK_Buffer_GetFileName=wrapper(lib.PEAK_Buffer_GetFileName)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetWidth(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) width)
            # self.PEAK_Buffer_GetWidth=wrapper(lib.PEAK_Buffer_GetWidth)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetHeight(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) height)
            # self.PEAK_Buffer_GetHeight=wrapper(lib.PEAK_Buffer_GetHeight)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetXOffset(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) xOffset)
            # self.PEAK_Buffer_GetXOffset=wrapper(lib.PEAK_Buffer_GetXOffset)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetYOffset(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) yOffset)
            # self.PEAK_Buffer_GetYOffset=wrapper(lib.PEAK_Buffer_GetYOffset)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetXPadding(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) xPadding)
            # self.PEAK_Buffer_GetXPadding=wrapper(lib.PEAK_Buffer_GetXPadding)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetYPadding(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) yPadding)
            # self.PEAK_Buffer_GetYPadding=wrapper(lib.PEAK_Buffer_GetYPadding)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetTimestamp_ticks(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_uint64) timestamp_ticks)
            # self.PEAK_Buffer_GetTimestamp_ticks=wrapper(lib.PEAK_Buffer_GetTimestamp_ticks)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetTimestamp_ns(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_uint64) timestamp_ns)
            # self.PEAK_Buffer_GetTimestamp_ns=wrapper(lib.PEAK_Buffer_GetTimestamp_ns)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetIsQueued(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BOOL8) isQueued)
            # self.PEAK_Buffer_GetIsQueued=wrapper(lib.PEAK_Buffer_GetIsQueued)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetIsAcquiring(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BOOL8) isAcquiring)
            # self.PEAK_Buffer_GetIsAcquiring=wrapper(lib.PEAK_Buffer_GetIsAcquiring)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetIsIncomplete(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BOOL8) isIncomplete)
            # self.PEAK_Buffer_GetIsIncomplete=wrapper(lib.PEAK_Buffer_GetIsIncomplete)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetHasNewData(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BOOL8) hasNewData)
            # self.PEAK_Buffer_GetHasNewData=wrapper(lib.PEAK_Buffer_GetHasNewData)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetHasImage(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BOOL8) hasImage)
            # self.PEAK_Buffer_GetHasImage=wrapper(lib.PEAK_Buffer_GetHasImage)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetHasChunks(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BOOL8) hasChunks)
            # self.PEAK_Buffer_GetHasChunks=wrapper(lib.PEAK_Buffer_GetHasChunks)
            # #  PEAK_RETURN_CODE PEAK_Buffer_UpdateChunks(PEAK_BUFFER_HANDLE bufferHandle)
            # self.PEAK_Buffer_UpdateChunks=wrapper(lib.PEAK_Buffer_UpdateChunks)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetNumChunks(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) numChunks)
            # self.PEAK_Buffer_GetNumChunks=wrapper(lib.PEAK_Buffer_GetNumChunks)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetChunk(PEAK_BUFFER_HANDLE bufferHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_BUFFER_CHUNK_HANDLE) bufferChunkHandle)
            # self.PEAK_Buffer_GetChunk=wrapper(lib.PEAK_Buffer_GetChunk)
            # #  PEAK_RETURN_CODE PEAK_Buffer_UpdateParts(PEAK_BUFFER_HANDLE bufferHandle)
            # self.PEAK_Buffer_UpdateParts=wrapper(lib.PEAK_Buffer_UpdateParts)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetNumParts(PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(ctypes.c_size_t) numParts)
            # self.PEAK_Buffer_GetNumParts=wrapper(lib.PEAK_Buffer_GetNumParts)
            # #  PEAK_RETURN_CODE PEAK_Buffer_GetPart(PEAK_BUFFER_HANDLE bufferHandle, ctypes.c_size_t index, ctypes.POINTER(PEAK_BUFFER_PART_HANDLE) bufferPartHandle)
            # self.PEAK_Buffer_GetPart=wrapper(lib.PEAK_Buffer_GetPart)
            # #  PEAK_RETURN_CODE PEAK_BufferChunk_GetID(PEAK_BUFFER_CHUNK_HANDLE bufferChunkHandle, ctypes.POINTER(ctypes.c_uint64) id)
            # self.PEAK_BufferChunk_GetID=wrapper(lib.PEAK_BufferChunk_GetID)
            # #  PEAK_RETURN_CODE PEAK_BufferChunk_GetBasePtr(PEAK_BUFFER_CHUNK_HANDLE bufferChunkHandle, ctypes.POINTER(ctypes.c_void_p) basePtr)
            # self.PEAK_BufferChunk_GetBasePtr=wrapper(lib.PEAK_BufferChunk_GetBasePtr)
            # #  PEAK_RETURN_CODE PEAK_BufferChunk_GetSize(PEAK_BUFFER_CHUNK_HANDLE bufferChunkHandle, ctypes.POINTER(ctypes.c_size_t) size)
            # self.PEAK_BufferChunk_GetSize=wrapper(lib.PEAK_BufferChunk_GetSize)
            # #  PEAK_RETURN_CODE PEAK_BufferChunk_GetParentBuffer(PEAK_BUFFER_CHUNK_HANDLE bufferChunkHandle, ctypes.POINTER(PEAK_BUFFER_HANDLE) bufferHandle)
            # self.PEAK_BufferChunk_GetParentBuffer=wrapper(lib.PEAK_BufferChunk_GetParentBuffer)
            # #  PEAK_RETURN_CODE PEAK_BufferChunk_Destruct(PEAK_BUFFER_CHUNK_HANDLE bufferChunkHandle)
            # self.PEAK_BufferChunk_Destruct=wrapper(lib.PEAK_BufferChunk_Destruct)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetInfo(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_BufferPart_GetInfo=wrapper(lib.PEAK_BufferPart_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetSourceID(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_uint64) sourceId)
            # self.PEAK_BufferPart_GetSourceID=wrapper(lib.PEAK_BufferPart_GetSourceID)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetBasePtr(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_void_p) basePtr)
            # self.PEAK_BufferPart_GetBasePtr=wrapper(lib.PEAK_BufferPart_GetBasePtr)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetSize(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_size_t) size)
            # self.PEAK_BufferPart_GetSize=wrapper(lib.PEAK_BufferPart_GetSize)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetType(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(PEAK_BUFFER_PART_TYPE) type)
            # self.PEAK_BufferPart_GetType=wrapper(lib.PEAK_BufferPart_GetType)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetFormat(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_uint64) format)
            # self.PEAK_BufferPart_GetFormat=wrapper(lib.PEAK_BufferPart_GetFormat)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetFormatNamespace(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_uint64) formatNamespace)
            # self.PEAK_BufferPart_GetFormatNamespace=wrapper(lib.PEAK_BufferPart_GetFormatNamespace)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetWidth(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_size_t) width)
            # self.PEAK_BufferPart_GetWidth=wrapper(lib.PEAK_BufferPart_GetWidth)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetHeight(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_size_t) height)
            # self.PEAK_BufferPart_GetHeight=wrapper(lib.PEAK_BufferPart_GetHeight)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetXOffset(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_size_t) xOffset)
            # self.PEAK_BufferPart_GetXOffset=wrapper(lib.PEAK_BufferPart_GetXOffset)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetYOffset(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_size_t) yOffset)
            # self.PEAK_BufferPart_GetYOffset=wrapper(lib.PEAK_BufferPart_GetYOffset)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetXPadding(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_size_t) xPadding)
            # self.PEAK_BufferPart_GetXPadding=wrapper(lib.PEAK_BufferPart_GetXPadding)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetDeliveredImageHeight(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(ctypes.c_size_t) deliveredImageHeight)
            # self.PEAK_BufferPart_GetDeliveredImageHeight=wrapper(lib.PEAK_BufferPart_GetDeliveredImageHeight)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_GetParentBuffer(PEAK_BUFFER_PART_HANDLE bufferPartHandle, ctypes.POINTER(PEAK_BUFFER_HANDLE) bufferHandle)
            # self.PEAK_BufferPart_GetParentBuffer=wrapper(lib.PEAK_BufferPart_GetParentBuffer)
            # #  PEAK_RETURN_CODE PEAK_BufferPart_Destruct(PEAK_BUFFER_PART_HANDLE bufferPartHandle)
            # self.PEAK_BufferPart_Destruct=wrapper(lib.PEAK_BufferPart_Destruct)
            
            


            # #  PEAK_RETURN_CODE PEAK_SystemDescriptor_GetInfo(PEAK_SYSTEM_DESCRIPTOR_HANDLE systemDescriptorHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_SystemDescriptor_GetInfo=wrapper(lib.PEAK_SystemDescriptor_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_System_GetInfo(PEAK_SYSTEM_HANDLE systemHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_System_GetInfo=wrapper(lib.PEAK_System_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_InterfaceDescriptor_GetInfo(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_InterfaceDescriptor_GetInfo=wrapper(lib.PEAK_InterfaceDescriptor_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_System_RegisterInterfaceFoundCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_FOUND_CALLBACK callback, ctypes.c_void_p callbackContext, ctypes.POINTER(PEAK_INTERFACE_FOUND_CALLBACK_HANDLE) callbackHandle)
            # self.PEAK_System_RegisterInterfaceFoundCallback=wrapper(lib.PEAK_System_RegisterInterfaceFoundCallback)
            # #  PEAK_RETURN_CODE PEAK_System_UnregisterInterfaceFoundCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_FOUND_CALLBACK_HANDLE callbackHandle)
            # self.PEAK_System_UnregisterInterfaceFoundCallback=wrapper(lib.PEAK_System_UnregisterInterfaceFoundCallback)
            # #  PEAK_RETURN_CODE PEAK_System_RegisterInterfaceLostCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_LOST_CALLBACK callback, ctypes.c_void_p callbackContext, ctypes.POINTER(PEAK_INTERFACE_LOST_CALLBACK_HANDLE) callbackHandle)
            # self.PEAK_System_RegisterInterfaceLostCallback=wrapper(lib.PEAK_System_RegisterInterfaceLostCallback)
            # #  PEAK_RETURN_CODE PEAK_System_UnregisterInterfaceLostCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_LOST_CALLBACK_HANDLE callbackHandle)
            # self.PEAK_System_UnregisterInterfaceLostCallback=wrapper(lib.PEAK_System_UnregisterInterfaceLostCallback)
            # #  PEAK_RETURN_CODE PEAK_Interface_GetInfo(PEAK_INTERFACE_HANDLE interfaceHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_Interface_GetInfo=wrapper(lib.PEAK_Interface_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_Interface_RegisterDeviceFoundCallback(PEAK_INTERFACE_HANDLE interfaceHandle, PEAK_DEVICE_FOUND_CALLBACK callback, ctypes.c_void_p callbackContext, ctypes.POINTER(PEAK_DEVICE_FOUND_CALLBACK_HANDLE) callbackHandle)
            # self.PEAK_Interface_RegisterDeviceFoundCallback=wrapper(lib.PEAK_Interface_RegisterDeviceFoundCallback)
            # #  PEAK_RETURN_CODE PEAK_Interface_UnregisterDeviceFoundCallback(PEAK_INTERFACE_HANDLE interfaceHandle, PEAK_DEVICE_FOUND_CALLBACK_HANDLE callbackHandle)
            # self.PEAK_Interface_UnregisterDeviceFoundCallback=wrapper(lib.PEAK_Interface_UnregisterDeviceFoundCallback)
            # #  PEAK_RETURN_CODE PEAK_Interface_RegisterDeviceLostCallback(PEAK_INTERFACE_HANDLE interfaceHandle, PEAK_DEVICE_LOST_CALLBACK callback, ctypes.c_void_p callbackContext, ctypes.POINTER(PEAK_DEVICE_LOST_CALLBACK_HANDLE) callbackHandle)
            # self.PEAK_Interface_RegisterDeviceLostCallback=wrapper(lib.PEAK_Interface_RegisterDeviceLostCallback)
            # #  PEAK_RETURN_CODE PEAK_Interface_UnregisterDeviceLostCallback(PEAK_INTERFACE_HANDLE interfaceHandle, PEAK_DEVICE_LOST_CALLBACK_HANDLE callbackHandle)
            # self.PEAK_Interface_UnregisterDeviceLostCallback=wrapper(lib.PEAK_Interface_UnregisterDeviceLostCallback)
            # #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_GetInfo(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_DeviceDescriptor_GetInfo=wrapper(lib.PEAK_DeviceDescriptor_GetInfo)
            # #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_RegisterInformationChangedCallback(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, PEAK_DEVICE_DESCRIPTOR_INFORMATION_CHANGED_CALLBACK callback, ctypes.c_void_p callbackContext, ctypes.POINTER(PEAK_DEVICE_DESCRIPTOR_INFORMATION_CHANGED_CALLBACK_HANDLE) callbackHandle)
            # self.PEAK_DeviceDescriptor_RegisterInformationChangedCallback=wrapper(lib.PEAK_DeviceDescriptor_RegisterInformationChangedCallback)
            # #  PEAK_RETURN_CODE PEAK_DeviceDescriptor_UnregisterInformationChangedCallback(PEAK_DEVICE_DESCRIPTOR_HANDLE deviceDescriptorHandle, PEAK_DEVICE_DESCRIPTOR_INFORMATION_CHANGED_CALLBACK_HANDLE callbackHandle)
            # self.PEAK_DeviceDescriptor_UnregisterInformationChangedCallback=wrapper(lib.PEAK_DeviceDescriptor_UnregisterInformationChangedCallback)
            # #  PEAK_RETURN_CODE PEAK_Device_GetInfo(PEAK_DEVICE_HANDLE deviceHandle, ctypes.c_int32 infoCommand, ctypes.POINTER(ctypes.c_int32) infoDataType, ctypes.POINTER(ctypes.c_uint8) info, ctypes.POINTER(ctypes.c_size_t) infoSize)
            # self.PEAK_Device_GetInfo=wrapper(lib.PEAK_Device_GetInfo)
            
            # #  PEAK_RETURN_CODE PEAK_NodeMap_GetHasBufferSupportedChunks(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_BUFFER_HANDLE bufferHandle, ctypes.POINTER(PEAK_BOOL8) hasSupportedChunks)
            # self.PEAK_NodeMap_GetHasBufferSupportedChunks=wrapper(lib.PEAK_NodeMap_GetHasBufferSupportedChunks)
            # #  PEAK_RETURN_CODE PEAK_NodeMap_UpdateChunkNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_BUFFER_HANDLE bufferHandle)
            # self.PEAK_NodeMap_UpdateChunkNodes=wrapper(lib.PEAK_NodeMap_UpdateChunkNodes)
            # #  PEAK_RETURN_CODE PEAK_NodeMap_GetHasEventSupportedData(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_EVENT_HANDLE eventHandle, ctypes.POINTER(PEAK_BOOL8) hasSupportedData)
            # self.PEAK_NodeMap_GetHasEventSupportedData=wrapper(lib.PEAK_NodeMap_GetHasEventSupportedData)
            # #  PEAK_RETURN_CODE PEAK_NodeMap_UpdateEventNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_EVENT_HANDLE eventHandle)
            # self.PEAK_NodeMap_UpdateEventNodes=wrapper(lib.PEAK_NodeMap_UpdateEventNodes)
            # #  PEAK_RETURN_CODE PEAK_NodeMap_StoreToFile(PEAK_NODE_MAP_HANDLE nodeMapHandle, ctypes.c_char_p filePath, ctypes.c_size_t filePathSize)
            # self.PEAK_NodeMap_StoreToFile=wrapper(lib.PEAK_NodeMap_StoreToFile)
            # #  PEAK_RETURN_CODE PEAK_NodeMap_LoadFromFile(PEAK_NODE_MAP_HANDLE nodeMapHandle, ctypes.c_char_p filePath, ctypes.c_size_t filePathSize)
            # self.PEAK_NodeMap_LoadFromFile=wrapper(lib.PEAK_NodeMap_LoadFromFile)
        

wlib=IDSPeakLib()