def aiStreamStart(self, numChannels, channels, scanRate, idNum=None, demo=0, stateIOin=0, updateIO=0, ledOn=0, gains=[0, 0, 0, 0], disableCal=0, readCount=0):
        """
        Name: U12.aiStreamStart(numChannels, channels, scanRate, idNum=None, demo=0, stateIOin=0, updateIO=0, ledOn=0, gains=[0, 0, 0, 0], disableCal=0, readCount=0)
        Args: See section 4.8 of the User's Guide
        Desc: Starts a hardware timed continuous acquisition

        >>> dev = U12()
        >>> dev.aiStreamStart(1, [0], 200)
        {'scanRate': 200.0, 'idnum': 1}
        """
        
        # Configure return type
        staticLib.AIStreamStart.restype = ctypes.c_long
        
        # check list sizes
        if len(channels) < numChannels: raise ValueError("channels must have atleast numChannels elements")
        if len(gains) < numChannels: raise ValueError("gains must have atleast numChannels elements")
        #if len(stateIOin) < 4: raise ValueError("stateIOin must have atleast 4 elements")

        # Check id number
        if idNum is None:
            idNum = self.id
        idNum = ctypes.c_long(idNum)
        
        # Convert lists to arrays and create other ctypes
        channelsArray = listToCArray(channels, ctypes.c_long)
        gainsArray = listToCArray(gains, ctypes.c_long)
        scanRate = ctypes.c_float(scanRate)
        
        ecode = staticLib.AIStreamStart(ctypes.byref(idNum), demo, stateIOin, updateIO, ledOn, numChannels, ctypes.byref(channelsArray), ctypes.byref(gainsArray), ctypes.byref(scanRate), disableCal, 0, readCount)

        if ecode != 0: raise U12Exception(ecode) # TODO: Switch this out for exception
        
        # The ID number must be saved for AIStream
        self.id = idNum.value

        self.streaming = True
        
        return {"idnum":idNum.value, "scanRate":scanRate.value}
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.aiStreamStart/original