def recv(self, full_frame=False):
payloadbuffer = b'<STR_LIT>'<EOL>tries = <NUM_LIT:3><EOL>while tries:<EOL><INDENT>tmpbuffer = self.serial_h.read(<NUM_LIT:1>)<EOL>if tmpbuffer != b'<STR_LIT>':<EOL><INDENT>self.loggerio.error('<STR_LIT>')<EOL>self.loggerio.debug('<STR_LIT>' + binascii.b2a_hex(tmpbuffer).decode('<STR_LIT:utf-8>') + '<STR_LIT>')<EOL>tries -= <NUM_LIT:1><EOL>continue<EOL><DEDENT>tmpbuffer += self.serial_h.read(<NUM_LIT:5>)<EOL>sequence, length = struct.unpack('<STR_LIT>', tmpbuffer)<EOL>payload = self.serial_h.read(length)<EOL>tmpbuffer += payload<EOL>chksum = self.serial_h.read(<NUM_LIT:2>)<EOL>if chksum == packet_checksum(tmpbuffer):<EOL><INDENT>self.serial_h.write(ACK)<EOL>data = tmpbuffer + chksum<EOL>self.loggerio.debug("<STR_LIT>".format(len(data), binascii.b2a_hex(data).decode('<STR_LIT:utf-8>')))<EOL>payloadbuffer += payload<EOL>if sequence == <NUM_LIT:0>:<EOL><INDENT>if full_frame:<EOL><INDENT>payloadbuffer = data<EOL><DEDENT>if sys.version_info[<NUM_LIT:0>] == <NUM_LIT:2>:<EOL><INDENT>payloadbuffer = bytearray(payloadbuffer)<EOL><DEDENT>return payloadbuffer<EOL><DEDENT>else:<EOL><INDENT>tries = <NUM_LIT:3><EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.serial_h.write(NACK)<EOL>self.loggerio.warning('<STR_LIT>')<EOL>tries -= <NUM_LIT:1><EOL><DEDENT><DEDENT>self.loggerio.critical('<STR_LIT>')<EOL>raise C1218IOError('<STR_LIT>')<EOL>
Receive a C1218Packet, the payload data is returned.

:param bool full_frame: If set to True, the entire C1218 frame is
  returned instead of just the payload.