@staticmethod<EOL><INDENT>def build_frame(command, payload):<DEDENT>
packet_length = <NUM_LIT:2> + len(payload) + <NUM_LIT:1><EOL>ret = struct.pack("<STR_LIT>", <NUM_LIT:0>, packet_length)<EOL>ret += struct.pack("<STR_LIT>", command.value)<EOL>ret += payload<EOL>ret += struct.pack("<STR_LIT:B>", calc_crc(ret))<EOL>return ret<EOL>
Build raw bytes from command and payload.