Beispiel #1
0
    def printingLog(self):

        beeCmd = self.beeCon.getCommandIntf()

        while beeCmd.getStatus() is None:
            logger.info("Waiting for print to start")
            time.sleep(self._freq)

        logger.info("Starting loging temperatures during print to {} at {} records per second".format(self._logFileName,self._freq))

        self._stopLog = False

        self._t = 0
        i = 0
        while not self._stopLog:
            st = beeCmd.getStatus()
            if st is not None:
                if 'SD_Print' not in st:
                    self._stopLog = True
            reply = beeCmd.sendCmd("M1029\n")

            parsedLine = parsers.parseLogReply(reply)
            if parsedLine is not None:
                i = i + 1
                self._logFile.write("{},{}".format(self._t,parsedLine))
                if not self._hideLog:
                    logger.info("{}: {}".format(i,parsedLine))

            time.sleep(self._freq)
            self._t += self._freq

        return
Beispiel #2
0
    def printingLog(self):

        beeCmd = self.beeCon.getCommandIntf()

        while beeCmd.getStatus() is None:
            logger.info("Waiting for print to start")
            time.sleep(self._freq)

        logger.info(
            "Starting loging temperatures during print to {} at {} records per second"
            .format(self._logFileName, self._freq))

        self._stopLog = False

        self._t = 0
        i = 0
        while not self._stopLog:
            st = beeCmd.getStatus()
            if st is not None:
                if 'SD_Print' not in st:
                    self._stopLog = True
            reply = beeCmd.sendCmd("M1029\n")

            parsedLine = parsers.parseLogReply(reply)
            if parsedLine is not None:
                i = i + 1
                self._logFile.write("{},{}".format(self._t, parsedLine))
                if not self._hideLog:
                    logger.info("{}: {}".format(i, parsedLine))

            time.sleep(self._freq)
            self._t += self._freq

        return
Beispiel #3
0
    def continuousStatusLog(self):


        logger.info("Starting loging Status to {} at {} records per second".format(self._logFileName,self._freq))

        self._t = 0
        while not self._stopLog:
            reply = self.beeCon.sendCmd("M1029\n")
            parsedLine = parsers.parseLogReply(reply,self._printer)
            if parsedLine is not None:
                self._logFile.write("{},{}".format(self._t, parsedLine))
                if not self._hideLog:
                    logger.info(parsedLine)

            time.sleep(self._freq)
            self._t += self._freq


        return
Beispiel #4
0
    def continuousStatusLog(self):

        logger.info(
            "Starting loging Status to {} at {} records per second".format(
                self._logFileName, self._freq))

        self._t = 0
        while not self._stopLog:
            reply = self.beeCon.sendCmd("M1029\n")
            parsedLine = parsers.parseLogReply(reply, self._printer)
            if parsedLine is not None:
                self._logFile.write("{},{}".format(self._t, parsedLine))
                if not self._hideLog:
                    logger.info(parsedLine)

            time.sleep(self._freq)
            self._t += self._freq

        return
Beispiel #5
0
    def finiteStatusLog(self):


        logger.info("Starting loging Status {} samples to {} at {} records per second".format(self._samples,self._logFileName,self._freq))

        self._t = 0
        for i in range(0,self._samples):
            reply = self.beeCon.sendCmd("M1029\n")
            parsedLine = parsers.parseLogReply(reply,self._printer)
            if parsedLine is not None:
                self._logFile.write("{},{}".format(self._t, parsedLine))
                if not self._hideLog:
                    logger.info("{}/{} {}".format(i,self._samples,parsedLine))

            if self._stopLog:
                break
            time.sleep(self._freq)
            self._t += self._freq


        return
Beispiel #6
0
    def finiteStatusLog(self):

        logger.info(
            "Starting loging Status {} samples to {} at {} records per second".
            format(self._samples, self._logFileName, self._freq))

        self._t = 0
        for i in range(0, self._samples):
            reply = self.beeCon.sendCmd("M1029\n")
            parsedLine = parsers.parseLogReply(reply, self._printer)
            if parsedLine is not None:
                self._logFile.write("{},{}".format(self._t, parsedLine))
                if not self._hideLog:
                    logger.info("{}/{} {}".format(i, self._samples,
                                                  parsedLine))

            if self._stopLog:
                break
            time.sleep(self._freq)
            self._t += self._freq

        return