|
int SendCmd::getZFYInfo(BVCU_HSession hSession, SendCmd_OnGetZFYInfo onEvent, char* puid)
{
BVCU_Result result = QueryCmd(hSession, puid, NULL, sizeof(BVCU_PUCFG_ZFYInfo), INVALID_DEVICE, BVCU_SUBMETHOD_PU_ZFYINFO);
if (BVCU_Result_SUCCEEDED(result))
{
m_proGetZFYInfo = onEvent;
}
return result;
}
BVCU_Result SendCmd:ueryCmd(BVCU_HSession hSession, char* puId, void* cmdData, int dataLen, int device, int subMethod)
{
BVCU_Command cmd;
memset(&cmd, 0, sizeof(BVCU_Command));
cmd.iSize = sizeof(BVCU_Command);
if (NULL != puId)
{
strcpy_s(cmd.szTargetID, puId);
}
cmd.OnEvent = SendCmd_OnEvent;
if (NULL != cmdData)
{
memcpy(&cmd.stMsgContent, cmdData, sizeof(BVCU_CmdMsgContent));
}
cmd.iTargetIndex = device;
cmd.iMethod = BVCU_METHOD_QUERY;
cmd.iSubMethod = subMethod;
return BVCU_SendCmd(hSession, &cmd);
} |
|