SDK增加设备锁定令牌接口

This commit is contained in:
yangjiaxuan 2024-04-23 11:16:40 +08:00
parent e5712a4eeb
commit 09b12b33aa
5 changed files with 25 additions and 0 deletions

View File

@ -24,6 +24,7 @@ HGLib_GetDeviceFWVersion
HGLib_GetDeviceRollerCount HGLib_GetDeviceRollerCount
HGLib_GetDeviceTotalCount HGLib_GetDeviceTotalCount
HGLib_ClearDeviceRollerCount HGLib_ClearDeviceRollerCount
HGLib_SetDeviceToken
HGLib_SetDeviceParam HGLib_SetDeviceParam
HGLib_GetDeviceParamGroupList HGLib_GetDeviceParamGroupList
HGLib_GetDeviceParam HGLib_GetDeviceParam

View File

@ -460,6 +460,15 @@ HGBool HGLibDeviceImpl::ClearRollerCount()
return ret; return ret;
} }
HGBool HGLibDeviceImpl::SetDeviceToken(const HGChar* code)
{
assert(NULL != m_devHandle);
if (NULL == code)
return HGFALSE;
SetValueStr256(0x8116, code);
}
HGBool HGLibDeviceImpl::SetParam(HGUInt option, const HGVoid* data) HGBool HGLibDeviceImpl::SetParam(HGUInt option, const HGVoid* data)
{ {
assert(NULL != m_devHandle); assert(NULL != m_devHandle);

View File

@ -29,6 +29,7 @@ public:
HGInt GetRollerCount(); HGInt GetRollerCount();
HGInt GetTotalCount(); HGInt GetTotalCount();
HGBool ClearRollerCount(); HGBool ClearRollerCount();
HGBool SetDeviceToken(const HGChar* code);
HGBool SetParam(HGUInt option, const HGVoid* data); HGBool SetParam(HGUInt option, const HGVoid* data);
HGLibDeviceParamGroup* GetParamGroupList(HGUInt* count); HGLibDeviceParamGroup* GetParamGroupList(HGUInt* count);
HGLibDeviceParam* GetParam(HGUInt option); HGLibDeviceParam* GetParam(HGUInt option);

View File

@ -467,3 +467,14 @@ HGInt HGAPI HGLib_GetDeviceOperateCode(HGLibDevice device)
HGLibDeviceImpl* deviceImpl = (HGLibDeviceImpl*)device; HGLibDeviceImpl* deviceImpl = (HGLibDeviceImpl*)device;
return deviceImpl->GetOperateCode(); return deviceImpl->GetOperateCode();
} }
HGBool HGAPI HGLib_SetDeviceToken(HGLibDevice device, const HGChar *code)
{
if (NULL == device)
{
return HGFALSE;
}
HGLibDeviceImpl* deviceImpl = (HGLibDeviceImpl*)device;
return deviceImpl->SetDeviceToken(code);
}

View File

@ -646,6 +646,9 @@ HGEXPORT HGInt HGAPI HGLib_GetDeviceTotalCount(HGLibDevice device);
/* 清除滚轴计数 */ /* 清除滚轴计数 */
HGEXPORT HGBool HGAPI HGLib_ClearDeviceRollerCount(HGLibDevice device); HGEXPORT HGBool HGAPI HGLib_ClearDeviceRollerCount(HGLibDevice device);
/* 设置设备锁定令牌 */
HGEXPORT HGBool HGAPI HGLib_SetDeviceToken(HGLibDevice device, const HGChar *code);
/* 设置设备参数 */ /* 设置设备参数 */
HGEXPORT HGBool HGAPI HGLib_SetDeviceParam(HGLibDevice device, HGUInt option, const HGVoid *data); HGEXPORT HGBool HGAPI HGLib_SetDeviceParam(HGLibDevice device, HGUInt option, const HGVoid *data);