def rawWatchdog(self, IgnoreCommands = False, D0Active = False, D0State = False, D1Active = False, D1State = False, D8Active = False, D8State = False, ResetOnTimeout = False, WatchdogActive = False, Timeout = 60):
        """
        Name: U12.rawWatchdog( IgnoreCommands = False, D0Active = False,
                               D0State = False, D1Active = False,
                               D1State = False, D8Active = False,
                               D8State = False, ResetOnTimeout = False,
                               WatchdogActive = False, Timeout = 60)
        
        Desc: Sets the settings for the watchdog, or just reads the firmware
              version of the U12. See section 5.10 of the User's Guide.
              
              By defaults, just reads the firmware version.
              
        Returns: A dictionary with the following keys:
            FirmwareVersion, the firmware version of the U12.
        
        Example:
        >>> import u12
        >>> d = u12.U12()
        >>> print d.rawWatchdog()
        {'FirmwareVersion': '1.10'}
        """
        command = [ 0 ] * 8
        
        command[0] = int(bool(IgnoreCommands))
        
        bf = BitField()
        bf.bit7 = int(D0Active)
        bf.bit6 = int(D0State)
        bf.bit5 = int(D1Active)
        bf.bit4 = int(D1State)
        bf.bit3 = int(D8Active)
        bf.bit2 = int(D8State)
        bf.bit1 = int(ResetOnTimeout)
        bf.bit0 = int(WatchdogActive)
        
        command[4] = int(bf)
        
        # 01X1X011 (Watchdog)
        bf2 = BitField()
        bf2.bit6 = 1
        bf2.bit4 = 1
        bf2.bit1 = 1
        bf2.bit0 = 1
        command[5] = int(bf2)
        
        # Timeout is increments of 2^16 cycles.
        # 2^16 cycles is about 0.01 seconds.
        binTimeout = int((float(Timeout) / 0.01))
        command[6] = ( binTimeout >> 8 ) & 0xff
        command[7] = binTimeout & 0xff
        
        self.write(command)
        results = self.read()
        
        returnDict = dict()
        
        returnDict['FirmwareVersion'] = "%s.%.2d" % (results[0], results[1])
        
        return returnDict
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.rawWatchdog/original