mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 1500|reply: 4
打印 prevThread nextThread

BVCU_SendCmd无回调

[copyURL]

11

主题

34

帖子

129

积分

member

Rank: 2

积分
129
jumpTo
owner
poston 2018-3-5 11:15 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
在使用BVCU_SendCmd的时候 result返回0  但是没有回调信息。



reply

使用道具 report

11

主题

34

帖子

129

积分

member

Rank: 2

积分
129
sofa
 Owner| poston 2018-3-5 11:37 | authorOnly
应该是返回了错误信息:BVCU_RESULT_E_UNAVAILABLE(-65512 无法获取。例如初始化Dialog时设备不在线 )
reply agree Against

使用道具 report

1

主题

589

帖子

2045

积分

vipMem

Rank: 6Rank: 6

积分
2045
bench
poston 2018-3-5 12:18 | authorOnly
Toba post on2018-3-5 11:37
应该是返回了错误信息:BVCU_RESULT_E_UNAVAILABLE(-65512 无法获取。例如初始化Dialog时设备不在线 )

具体发送的命令是什么?还有参数值。
这个错误,一般是设备不在线。
reply agree Against

使用道具 report

11

主题

34

帖子

129

积分

member

Rank: 2

积分
129
ground
 Owner| poston 2018-3-5 15:58 | authorOnly
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);
}
reply agree Against

使用道具 report

11

主题

34

帖子

129

积分

member

Rank: 2

积分
129
5#
 Owner| poston 2018-3-5 15:59 | authorOnly
Toba post on2018-3-5 11:37
应该是返回了错误信息:BVCU_RESULT_E_UNAVAILABLE(-65512 无法获取。例如初始化Dialog时设备不在线 )

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);
}
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-12-24 01:16 , Processed in 0.053713 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList