32 lines
818 B
C
32 lines
818 B
C
#pragma once
|
||
|
||
#include "MID/Mid_Def.h"
|
||
|
||
/*
|
||
* 这份文件负责解析 report id 0x03 的 Consumer 包。
|
||
*
|
||
* 当前下位机真实结构很简单:
|
||
* 1. 第 0 字节是 report id,固定为 0x03
|
||
* 2. 第 1、2 字节拼成一个 16 位 consumer usage
|
||
* 3. 整包固定长度 3 字节
|
||
*
|
||
* 所以这里不需要像 0x01 / 0x04 那样去拆 modifier 和 usage 位图。
|
||
*/
|
||
|
||
struct Lgc_Consumer_Struct_Result
|
||
{
|
||
// 这一包是否匹配 report id 0x03。
|
||
bool IsMatch = false;
|
||
|
||
// 如果匹配 0x03,长度是否也正确。
|
||
bool IsLengthOk = false;
|
||
|
||
// 解析得到的 consumer usage。
|
||
quint16 Usage = 0;
|
||
|
||
// 给调试窗口显示的简短中文说明。
|
||
QString TextExplain;
|
||
};
|
||
|
||
void Lgc_Consumer_Func_Parse(const QByteArray& ByteArray, Lgc_Consumer_Struct_Result* p_Result);
|