def _sendoutput(self, output, sendbreak=False):
        self.myseq += 1
        self.myseq &= 0xf
        if self.myseq == 0:
            self.myseq = 1
        # currently we don't try to combine ack with outgoing data
        # so we use 0 for ack sequence number and accepted character
        # count
        breakbyte = 0
        if sendbreak:
            breakbyte = 0b10000
        payload = struct.pack("BBBB", self.myseq, 0, 0, breakbyte)
        payload += output
        self.lasttextsize = len(output)
        needskeepalive = False
        if self.lasttextsize == 0:
            needskeepalive = True
        self.awaitingack = True
        payload = struct.unpack("%dB" % len(payload), payload)
        self.lastpayload = payload
        self.send_payload(payload, needskeepalive=needskeepalive)
dataset/ETHPy150Open openstack/pyghmi/pyghmi/ipmi/console.py/Console._sendoutput/original