# command_08.py import struct import logging class Command08: def build_08h_request(self, pile_id): frame = bytearray([0x4A, 0x58, 0x08]) # 帧头 + 命令 frame.extend(pile_id) # 桩号 frame.append(0x01) # 数据加密方式(不加密) # 数据域:时间标识 + 查询类型 data = bytearray() current_time = bytearray([0x19, 0x03, 0x0A, 0x13, 0x14, 0x00]) # 示例:2025-03-10 13:14:00 data.extend(current_time) data.append(0x01) # 查询类型(0x01: 实时状态) frame.extend(struct.pack('