typedef union _DATA_PACKET
{
struct
{
struct
{
unsigned reserved : 0x01;
unsigned dev_type : 0x02;
unsigned reserved1 : 0x01;
unsigned type : 0x04;
} hdr;
} bind_request;
struct
{
unsigned char mid_1;
unsigned char mid_2;
unsigned char mid_3;
unsigned char mid_4;
} bind_response;
struct
{
unsigned char byte;
} first;
} LP_PACKET;
本文详细解析了一个名为 DATA_PACKET 的联合体(union)结构定义,该结构包含 bind_request、bind_response 和 first 几个成员。bind_request 包含设备类型等字段,bind_response 包含四个字节的 mid 成员,而 first 则仅包含一个字节类型的成员。
1213

被折叠的 条评论
为什么被折叠?



