mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 1625|reply: 0
打印 prevThread nextThread

PU端适配SOS报警输入无效,Smarteye客户端无报警提示

[copyURL]

7

主题

16

帖子

69

积分

member

Rank: 2

积分
69
jumpTo
owner
poston 2019-5-20 15:19 | authorOnly 回帖奖励 |倒序浏览 |阅读模式

PU端适配SOS报警提示的代码如下,调用如下实现后,Smarteye客户端无报警提示

对比MPU端,长按音量+键(可以开启或关闭SOS报警),Smarteye客户端报警提示功能正常

    BVCSP_Command stCommand;
    BVCU_PUCFG_AlertIn stAlertIn;
    BVCU_PUCFG_AlertIn_Normal stNormal;
    BVCU_Result enResult = BVCU_RESULT_S_OK;

    if (pParam)
    {
        bStart = *(HI_BOOL *)pParam;
        free(pParam);
        pParam = NULL;
    }

    pthread_detach(pthread_self());

    if (HI_NULL != g_hSession)
    {
        memset(&stCommand, 0, sizeof(stCommand));
        stCommand.iSize = sizeof(stCommand);
        stCommand.iMethod = BVCU_METHOD_CONTROL;
        stCommand.iSubMethod = BVCU_SUBMETHOD_PU_ALERTIN;
        stCommand.OnEvent = PUMNG_CUCmdOnEvent;

        stAlertIn.iMode = 1;
        stAlertIn.iStatus = 1;
        sprintf(stAlertIn.szName, "%s", "SOS");

        stAlertIn.iAlertInType = BVCU_ALERTIN_TYPE_NORMAL;
        stAlertIn.pAlertData = &stNormal;
        stAlertIn.iAlertCount = -1;
        stAlertIn.iHardwareType = BVCU_ALERTIN_HARDWARE_NORMAL;

        stCommand.stMsgContent.iDataCount = 1;
        stCommand.stMsgContent.pData = &stAlertIn;

        enResult = BVCSP_SendCmd(g_hSession, &stCommand);
        if (BVCU_Result_FAILED(enResult))
        {
            MLOGW("BVCSP_SendCmd fail! %d\n", enResult);
        }


谢谢.


reply

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-12-22 11:11 , Processed in 0.051755 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList