• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PS_ALLOC_MSG_WITH_HEADER_LEN函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PS_ALLOC_MSG_WITH_HEADER_LEN函数的典型用法代码示例。如果您正苦于以下问题:C++ PS_ALLOC_MSG_WITH_HEADER_LEN函数的具体用法?C++ PS_ALLOC_MSG_WITH_HEADER_LEN怎么用?C++ PS_ALLOC_MSG_WITH_HEADER_LEN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PS_ALLOC_MSG_WITH_HEADER_LEN函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: TAF_CALL_ProcSupsCmdReq

VOS_VOID TAF_CALL_ProcSupsCmdReq(SPM_IMSA_CALL_SUPS_CMD_REQ_STRU *pstSupsCmdReq)
{
    MN_APP_CALL_SUPS_REQ_STRU          *pstDstMsg = VOS_NULL_PTR;
    /* 申请消息内存  */
    pstDstMsg = (MN_APP_CALL_SUPS_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                WUEPS_PID_TAF,
                                                                sizeof(MN_APP_CALL_SUPS_REQ_STRU));
    if (VOS_NULL_PTR == pstDstMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CALL_ProcSupsCmdReq: ERROR:Memory Alloc is fail!");

        return;
    }

    PS_MEM_SET(pstDstMsg, 0, sizeof(MN_APP_CALL_SUPS_REQ_STRU));

    /* 首先转换消息类型到call可处理的内部消息 */
    TAF_CALL_ConvertSupsCmdReqMsg(pstSupsCmdReq, pstDstMsg);

    /* 调用call模块SupsCmdReq消息处理函数 */
    MN_CALL_CallSupsCmdReqProc((struct MsgCB *)pstDstMsg);

    /* 释放分配的内存空间 */
    PS_FREE_MSG(WUEPS_PID_TAF, pstDstMsg);
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:25,代码来源:MnCallImsaProc.c


示例2: IMM_MntnReportMemLeakMsg

VOS_UINT32 IMM_MntnReportMemLeakMsg( VOS_UINT32 ulPid )
{
    IMM_MEM_LEAK_INFO_IND_MSG          *pstImmMemLeakInfoInd;

    /*申请消息  */
    pstImmMemLeakInfoInd = (IMM_MEM_LEAK_INFO_IND_MSG *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                               ulPid,
                                               sizeof(IMM_MEM_LEAK_INFO_IND_MSG));

    /* 内存申请失败,返回 */
    if ( VOS_NULL_PTR == pstImmMemLeakInfoInd )
    {
        return VOS_ERR;
    }

    /*填写消息内容*/
    pstImmMemLeakInfoInd->ulReceiverPid     = ulPid;
    pstImmMemLeakInfoInd->enMsgID           = ID_IMM_MEM_LEAK_INFO_IND;

    /* 发送消息 */
    PS_SEND_MSG(ulPid, pstImmMemLeakInfoInd);

    return VOS_OK;

}
开发者ID:herryfan,项目名称:kernel-huawei-h60,代码行数:25,代码来源:IMMmemMntn.c


示例3: TAF_CALL_ProcOrigReq

VOS_VOID TAF_CALL_ProcOrigReq(SPM_IMSA_CALL_ORIG_REQ_STRU *pstOrigReq)
{
    MN_CALL_APP_REQ_MSG_STRU           *pstDstMsg = VOS_NULL_PTR;
    /* 申请消息内存  */
    pstDstMsg = (MN_CALL_APP_REQ_MSG_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                WUEPS_PID_TAF,
                                                                sizeof(MN_CALL_APP_REQ_MSG_STRU));
    if (VOS_NULL_PTR == pstDstMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CALL_ProcOrigReq: ERROR:Memory Alloc is fail!");

        return;
    }

    PS_MEM_SET(pstDstMsg, 0, sizeof(MN_CALL_APP_REQ_MSG_STRU));

    /* 首先转换消息类型到call可处理的内部消息 */
    TAF_CALL_ConvertOrigReqMsg(pstOrigReq, pstDstMsg);

    /* 调用call模块Orig Req消息处理函数 */
    MN_CALL_CallOrigReqProc(pstDstMsg->clientId,
                            pstDstMsg->opId,
                            pstDstMsg->callId,
                            (MN_CALL_ORIG_PARAM_STRU*)&(pstDstMsg->unParm));

    /* 释放分配的内存空间 */
    PS_FREE_MSG(WUEPS_PID_TAF, pstDstMsg);
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:28,代码来源:MnCallImsaProc.c


示例4: TAF_APS_SndDhcpDnsIpv6Req

VOS_VOID TAF_APS_SndDhcpDnsIpv6Req(
    VOS_UINT8                           ucPdpId
)
{
    APS_DHCP_DNS_IPV6_REQ_STRU         *pstDnsIpv6Req = VOS_NULL_PTR;
    APS_PDP_CONTEXT_ENTITY_ST          *pstPdpEntity;

    /* 获取消息内容 */
    pstPdpEntity    = TAF_APS_GetPdpEntInfoAddr(ucPdpId);
    pstDnsIpv6Req   = (APS_DHCP_DNS_IPV6_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(WUEPS_PID_TAF,
                            sizeof(APS_DHCP_DNS_IPV6_REQ_STRU));

    if (VOS_NULL_PTR == pstDnsIpv6Req)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndDhcpDnsIpv6Req: Memory alloc failed");
        return;
    }

    PS_MEM_SET((VOS_UINT8*)pstDnsIpv6Req + VOS_MSG_HEAD_LENGTH, 0,
                sizeof(APS_DHCP_DNS_IPV6_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写参数 */
    pstDnsIpv6Req->ulReceiverPid        = UEPS_PID_DHCP;
    pstDnsIpv6Req->enMsgId              = ID_APS_DHCP_GET_DNS_IPV6_REQ;
    pstDnsIpv6Req->usOpId               = 0;
    pstDnsIpv6Req->ucRabId              = pstPdpEntity->ucNsapi;

    PS_MEM_CPY((VOS_CHAR *)pstDnsIpv6Req->aucIdentifierId,
                (VOS_CHAR *)pstPdpEntity->PdpAddr.aucIpV6Addr + TAF_APS_DHCP_IPV6_IFID_LEN,
                 TAF_APS_DHCP_IPV6_IFID_LEN);

    PS_SEND_MSG(WUEPS_PID_TAF, pstDnsIpv6Req);

    return;
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:35,代码来源:TafApsSndDhcp.c


示例5: TAF_SPM_SendMsgSmmaRsp

VOS_VOID TAF_SPM_SendMsgSmmaRsp(
    TAF_MSG_SIGNALLING_TYPE_ENUM_UINT32 enMsgSignallingType
)
{
    TAF_SPM_SMMA_RSP_STRU              *pstSmmaRsp = VOS_NULL_PTR;

    pstSmmaRsp = (TAF_SPM_SMMA_RSP_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(WUEPS_PID_TAF,sizeof(TAF_SPM_SMMA_RSP_STRU));

    if (VOS_NULL_PTR == pstSmmaRsp)
    {
        MN_WARN_LOG("TAF_SPM_SendMsgSmmaRsp:ERROR: VOS_AllocMsg fail.");
        return;
    }

    PS_MEM_SET(pstSmmaRsp, 0, sizeof(TAF_SPM_SMMA_RSP_STRU));
    
    pstSmmaRsp->ulSenderCpuId        = VOS_LOCAL_CPUID;
    pstSmmaRsp->ulSenderPid          = WUEPS_PID_TAF;
    pstSmmaRsp->ulReceiverCpuId      = VOS_LOCAL_CPUID;
    pstSmmaRsp->ulReceiverPid        = WUEPS_PID_TAF;
    pstSmmaRsp->ulLength             = sizeof(TAF_SPM_SMMA_RSP_STRU) - VOS_MSG_HEAD_LENGTH;
    pstSmmaRsp->ulMsgId              = ID_TAF_SPM_SMMA_RSP;
    pstSmmaRsp->enMsgSignallingType  = enMsgSignallingType;

    if ( VOS_OK != PS_SEND_MSG( WUEPS_PID_TAF, pstSmmaRsp ) )
    {
        MN_WARN_LOG( "TAF_SPM_SendMsgSmmaRsp:WARNING:SEND ID_TAF_SPM_SMMA_RSP msg FAIL!" );
    }

    return;
}
开发者ID:magnusjjj,项目名称:android_kernel_huawei_rle,代码行数:31,代码来源:TafSpmSndInternalMsg.c


示例6: TAF_APS_SndDhcpDeactInd

VOS_VOID TAF_APS_SndDhcpDeactInd(
    VOS_UINT8                           ucPdpId
)
{
    APS_DHCP_DEACT_IND_STRU            *pstDnsDeactInd = VOS_NULL_PTR;
    APS_PDP_CONTEXT_ENTITY_ST          *pstPdpEntity;
    VOS_UINT8                           ucCid;

    /* 获取消息内容 */

    ucCid           = TAF_APS_GetPdpEntCurrCid(ucPdpId);
    pstPdpEntity    = TAF_APS_GetPdpEntInfoAddr(ucPdpId);
    pstDnsDeactInd  = (APS_DHCP_DEACT_IND_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(WUEPS_PID_TAF,
                            sizeof(APS_DHCP_DEACT_IND_STRU));

    if (VOS_NULL_PTR == pstDnsDeactInd)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndDhcpDnsReqReq: Memory alloc failed");
        return;
    }

    PS_MEM_SET((VOS_UINT8*)pstDnsDeactInd + VOS_MSG_HEAD_LENGTH, 0,
                sizeof(APS_DHCP_DEACT_IND_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写参数 */
    pstDnsDeactInd->ulReceiverPid       = UEPS_PID_DHCP;
    pstDnsDeactInd->enMsgId             = ID_APS_DHCP_DEACT_IND;
    pstDnsDeactInd->usOpId              = 0;
    pstDnsDeactInd->ucRabId             = pstPdpEntity->ucNsapi;
    pstDnsDeactInd->enPdnType           = TAF_APS_GetPdpEntDialPdpType(ucPdpId, ucCid);

    PS_SEND_MSG(WUEPS_PID_TAF, pstDnsDeactInd);

    return;
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:35,代码来源:TafApsSndDhcp.c


示例7: CNAS_XCC_SndApsDataCallSuspendInd

VOS_VOID CNAS_XCC_SndApsDataCallSuspendInd(
    VOS_UINT8                                   ucConnectId,
    CNAS_XCC_SERVICE_TYPE_ENUM_UINT32           enServiceType
)
{
    XCC_APS_DATA_CALL_SUSPEND_IND_STRU         *pstMsg         = VOS_NULL_PTR;
    XCC_APS_SERVICE_TYPE_ENUM_UINT8             enTmpSrvType;

    enTmpSrvType = XCC_APS_SERVICE_TYPE_BUTT;

    if (CNAS_XCC_SERVICE_TYPE_VOICE_CALL == enServiceType)
    {
        enTmpSrvType = XCC_APS_SERVICE_TYPE_VOICE_CALL;
    }
    else if (CNAS_XCC_SERVICE_TYPE_SMS == enServiceType)
    {
        enTmpSrvType = XCC_APS_SERVICE_TYPE_SMS;

    }
    else if (CNAS_XCC_SERVICE_TYPE_AGPS_CALL == enServiceType)
    {
        enTmpSrvType = XCC_APS_SERVICE_TYPE_AGPS;

    }
    else
    {
        return;
    }

    pstMsg = (XCC_APS_DATA_CALL_SUSPEND_IND_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(UEPS_PID_XCC,
              sizeof(XCC_APS_DATA_CALL_SUSPEND_IND_STRU));

    if (VOS_NULL_PTR == pstMsg)
    {
        return;
    }

    NAS_MEM_SET_S((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH,
                  sizeof(XCC_APS_DATA_CALL_SUSPEND_IND_STRU) - VOS_MSG_HEAD_LENGTH,
                  0,
                  sizeof(XCC_APS_DATA_CALL_SUSPEND_IND_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填充消息 */
    pstMsg->ulSenderCpuId               = VOS_LOCAL_CPUID;
    pstMsg->ulSenderPid                 = UEPS_PID_XCC;
    pstMsg->ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstMsg->ulReceiverPid               = CNAS_CCB_ConvertPidBasedOnModemId(CNAS_CCB_GetCdmaModeModemId(), WUEPS_PID_TAF);
    pstMsg->enMsgId                     = ID_XCC_APS_DATA_CALL_SUSPEND_IND;
    pstMsg->usOpId                      = 0;
    pstMsg->ulLength                    = sizeof(XCC_APS_DATA_CALL_SUSPEND_IND_STRU) - VOS_MSG_HEAD_LENGTH;

    pstMsg->ucConnectId                 = ucConnectId;
    pstMsg->enServiceType               = enTmpSrvType;

    CNAS_MNTN_LogMsgInfo((MSG_HEADER_STRU*)pstMsg);

    /* 发送消息 */
    (VOS_VOID)PS_SEND_MSG(UEPS_PID_XCC, pstMsg);

}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:60,代码来源:CnasXccSndAps.c


示例8: CNAS_XCC_SndApsHangupDataCallCnf

VOS_VOID CNAS_XCC_SndApsHangupDataCallCnf(
    VOS_UINT8                           ucCallId
)
{
    XCC_APS_HANGUP_DATA_CALL_CNF_STRU                      *pstMsg         = VOS_NULL_PTR;

    pstMsg = (XCC_APS_HANGUP_DATA_CALL_CNF_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(UEPS_PID_XCC,
              sizeof(XCC_APS_HANGUP_DATA_CALL_CNF_STRU));

    if (VOS_NULL_PTR == pstMsg)
    {
        return;
    }

    NAS_MEM_SET_S((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH,
                  sizeof(XCC_APS_HANGUP_DATA_CALL_CNF_STRU) - VOS_MSG_HEAD_LENGTH,
                  0,
                  sizeof(XCC_APS_HANGUP_DATA_CALL_CNF_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填充消息 */
    pstMsg->ulSenderCpuId               = VOS_LOCAL_CPUID;
    pstMsg->ulSenderPid                 = UEPS_PID_XCC;
    pstMsg->ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstMsg->ulReceiverPid               = CNAS_CCB_ConvertPidBasedOnModemId(CNAS_CCB_GetCdmaModeModemId(), WUEPS_PID_TAF);
    pstMsg->ulLength                    = sizeof(XCC_APS_HANGUP_DATA_CALL_CNF_STRU) - VOS_MSG_HEAD_LENGTH;

    pstMsg->enMsgId                     = ID_XCC_APS_HANGUP_DATA_CALL_CNF;
    pstMsg->usOpId                      = 0;
    pstMsg->ucCallId                    = ucCallId;

    CNAS_MNTN_LogMsgInfo((MSG_HEADER_STRU*)pstMsg);

    /* 发送消息 */
    (VOS_VOID)PS_SEND_MSG(UEPS_PID_XCC, pstMsg);
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:35,代码来源:CnasXccSndAps.c


示例9: TAF_MMA_SndInterPowerInitReq

VOS_VOID TAF_MMA_SndInterPowerInitReq(VOS_VOID)
{
    TAF_MMA_INTER_POWER_INIT_REQ_STRU  *pstPowerInitMsg = VOS_NULL_PTR;

    pstPowerInitMsg  = (TAF_MMA_INTER_POWER_INIT_REQ_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(WUEPS_PID_MMA,
                                                                                       sizeof(TAF_MMA_INTER_POWER_INIT_REQ_STRU));

    if (VOS_NULL_PTR == pstPowerInitMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,
                      "TAF_MMA_SndMmaPowerInitReq: ERROR:Memory Alloc Error for pstMsg!");

        return;
    }

    PS_MEM_SET((VOS_UINT8*)pstPowerInitMsg + VOS_MSG_HEAD_LENGTH, 0,
              sizeof(TAF_MMA_INTER_POWER_INIT_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    pstPowerInitMsg->MsgHeader.ulSenderCpuId   = VOS_LOCAL_CPUID;
    pstPowerInitMsg->MsgHeader.ulSenderPid     = WUEPS_PID_MMA;
    pstPowerInitMsg->MsgHeader.ulReceiverCpuId = VOS_LOCAL_CPUID;
    pstPowerInitMsg->MsgHeader.ulReceiverPid   = WUEPS_PID_MMA;
    pstPowerInitMsg->MsgHeader.ulMsgName       = MMA_MMA_INTER_POWER_INIT;
    pstPowerInitMsg->MsgHeader.ulLength        = sizeof(TAF_MMA_INTER_POWER_INIT_REQ_STRU) - VOS_MSG_HEAD_LENGTH;

    /* 需要发送外部消息,因为上电时无外部消息触发内部消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_MMA, pstPowerInitMsg))
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,
                      "TAF_MMA_SndMmaPowerInitReq: Send message failed.");
    }

    return;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:34,代码来源:TafMmaSndInternalMsg.c


示例10: bastet_comm_write

int bastet_comm_write(u8 *msg, u32 len)
{
    BASTET_MSG_STRU *pMsg = NULL;
    VOS_UINT32 ulLength = 0;

    if (NULL == msg) {
        return -1;
    }

    ulLength = sizeof(BASTET_MSG_STRU) + BST_MAX_WRITE_PAYLOAD - 4;
    pMsg = (BASTET_MSG_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(ACPU_PID_BASTET_COMM, ulLength);
    if (NULL == pMsg) {
        BASTET_LOGE("PS_ALLOC_MSG_WITH_HEADER_LEN failed");
        return -1;
    }
    pMsg->ulReceiverPid = UEPS_PID_BASTET;
    PS_MEM_CPY((VOS_VOID*)pMsg->aucValue, msg, len);

    pMsg->usLen = len;

    if (PS_SEND_MSG(ACPU_PID_BASTET_COMM, pMsg) != 0) {
        BASTET_LOGE("PS_SEND_MSG failed");
        return -1;
    }

    return 0;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:27,代码来源:bastet_comm.c


示例11: TAF_SPM_SendImsaCallOrigReq

VOS_UINT32 TAF_SPM_SendImsaCallOrigReq(
    MN_CALL_APP_REQ_MSG_STRU           *pstAppMsg
)
{
    SPM_IMSA_CALL_ORIG_REQ_STRU        *pstSendImsaMsg = VOS_NULL_PTR;

    /* 构造消息 */
    pstSendImsaMsg = (SPM_IMSA_CALL_ORIG_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                WUEPS_PID_TAF,
                                                                sizeof(SPM_IMSA_CALL_ORIG_REQ_STRU));
    if (VOS_NULL_PTR == pstSendImsaMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_SPM_SendImsaCallOrigReq: ERROR:Memory Alloc Error for pstMsg!");

        return VOS_FALSE;
    }

    /* 初始化消息 */
    PS_MEM_SET(((VOS_UINT8*)pstSendImsaMsg) + VOS_MSG_HEAD_LENGTH,
               0x00,
               sizeof(SPM_IMSA_CALL_ORIG_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写消息头 */
    pstSendImsaMsg->ulSenderCpuId               = VOS_LOCAL_CPUID;
    pstSendImsaMsg->ulSenderPid                 = WUEPS_PID_TAF;
    pstSendImsaMsg->ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstSendImsaMsg->ulReceiverPid               = PS_PID_IMSA;
    pstSendImsaMsg->ulLength                    = sizeof(SPM_IMSA_CALL_ORIG_REQ_STRU) - VOS_MSG_HEAD_LENGTH;

    /* 填写消息内容 */
    pstSendImsaMsg->ulMsgId                     = ID_SPM_IMSA_CALL_ORIG_REQ;
    pstSendImsaMsg->usClientId                  = pstAppMsg->clientId;
    pstSendImsaMsg->ucOpId                      = pstAppMsg->opId;

    PS_MEM_CPY(&(pstSendImsaMsg->stOrig),
               &(pstAppMsg->unParm.stOrig),
               sizeof(MN_CALL_ORIG_PARAM_STRU));

    pstSendImsaMsg->stOrig.enCallType           = pstAppMsg->unParm.stOrig.enCallType;

    /* VOLTE PhaseI认为CS域不需要再尝试,后续阶段维护 */
    pstSendImsaMsg->stOrig.ucCsCallRetryFlg     = VOS_FALSE;

    PS_MEM_CPY(&(pstSendImsaMsg->stOrig.stEmergencyCat),
               &(pstAppMsg->unParm.stOrig.stEmergencyCat),
               sizeof(MN_CALL_EMERGENCY_CAT_STRU));

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstSendImsaMsg))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_SPM_SendImsaCallOrigReq: Send message failed.");

        return VOS_FALSE;
    }

    return VOS_TRUE;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:59,代码来源:TafSpmSndImsa.c


示例12: TAF_SPM_SendImsaCallInviteNewPtptReq

VOS_UINT32 TAF_SPM_SendImsaCallInviteNewPtptReq(
    MN_CALL_APP_REQ_MSG_STRU           *pstAppMsg
)
{
    SPM_IMSA_CALL_INVITE_NEW_PTPT_REQ_STRU                 *pstSendImsaMsg = VOS_NULL_PTR;

    /* 构造消息 */
    pstSendImsaMsg = (SPM_IMSA_CALL_INVITE_NEW_PTPT_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                WUEPS_PID_TAF,
                                                                sizeof(SPM_IMSA_CALL_INVITE_NEW_PTPT_REQ_STRU));
    if (VOS_NULL_PTR == pstSendImsaMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_SPM_SendImsaCallInviteNewPtptReq: ERROR:Memory Alloc Error for pstMsg!");

        return VOS_FALSE;
    }

    /* 初始化消息 */
    PS_MEM_SET(((VOS_UINT8*)pstSendImsaMsg) + VOS_MSG_HEAD_LENGTH,
               0x00,
               sizeof(SPM_IMSA_CALL_INVITE_NEW_PTPT_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写消息头 */
    pstSendImsaMsg->ulSenderCpuId               = VOS_LOCAL_CPUID;
    pstSendImsaMsg->ulSenderPid                 = WUEPS_PID_TAF;
    pstSendImsaMsg->ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstSendImsaMsg->ulReceiverPid               = PS_PID_IMSA;
    pstSendImsaMsg->ulLength                    = sizeof(SPM_IMSA_CALL_INVITE_NEW_PTPT_REQ_STRU) - VOS_MSG_HEAD_LENGTH;

    /* 填写消息内容 */
    pstSendImsaMsg->ulMsgId                     = ID_SPM_IMSA_CALL_INVITE_NEW_PTPT_REQ;
    pstSendImsaMsg->usClientId                  = pstAppMsg->clientId;
    pstSendImsaMsg->ucOpId                      = pstAppMsg->opId;

    /* 填写对方号码及呼叫类型 */
    pstSendImsaMsg->stNewPtptNumber.enNumType   = pstAppMsg->unParm.stOrig.stDialNumber.enNumType;
    pstSendImsaMsg->stNewPtptNumber.ucNumLen    = pstAppMsg->unParm.stOrig.stDialNumber.ucNumLen;
    if (MN_CALL_MAX_CALLED_BCD_NUM_LEN < pstSendImsaMsg->stNewPtptNumber.ucNumLen)
    {
        pstSendImsaMsg->stNewPtptNumber.ucNumLen = MN_CALL_MAX_CALLED_BCD_NUM_LEN;
    }

    PS_MEM_CPY(&(pstSendImsaMsg->stNewPtptNumber.aucBcdNum[0]),
               &(pstAppMsg->unParm.stOrig.stDialNumber.aucBcdNum[0]),
               pstSendImsaMsg->stNewPtptNumber.ucNumLen);

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstSendImsaMsg))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_SPM_SendImsaCallInviteNewPtptReq: Send message failed.");

        return VOS_FALSE;
    }

    return VOS_TRUE;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:58,代码来源:TafSpmSndImsa.c


示例13: TAF_APS_SndL4aSetCgscontrdpReq

VOS_VOID TAF_APS_SndL4aSetCgscontrdpReq(
    VOS_VOID                           *pMsgData
)
{
    TAF_PS_GET_DYNAMIC_SEC_PDP_CONTEXT_INFO_REQ_STRU       *pstDynamicPdpReq;
    APS_L4A_SET_CGSCONTRDP_REQ_STRU                        *pstCgscontrdpReq;

    /* 参数初始化 */
    pstDynamicPdpReq    = (TAF_PS_GET_DYNAMIC_SEC_PDP_CONTEXT_INFO_REQ_STRU*)(pMsgData);

    /* 构造消息 */
    pstCgscontrdpReq    = (APS_L4A_SET_CGSCONTRDP_REQ_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                            WUEPS_PID_TAF,
                            sizeof(APS_L4A_SET_CGSCONTRDP_REQ_STRU));
    if (VOS_NULL_PTR == pstCgscontrdpReq)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aSetCgscontrdpReq: Memory alloc failed.");
        return;
    }

    /* 初始化消息 */
    PS_MEM_SET((VOS_CHAR*)pstCgscontrdpReq + VOS_MSG_HEAD_LENGTH,
           0x00,
           sizeof(APS_L4A_SET_CGSCONTRDP_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写消息头 */
    pstCgscontrdpReq->ulReceiverCpuId   = VOS_LOCAL_CPUID;
    pstCgscontrdpReq->ulReceiverPid     = MSP_L4_L4A_PID;
    pstCgscontrdpReq->enMsgId           = ID_APS_L4A_SET_CGSCONTRDP_REQ;

    /* 填写消息内容 */
    pstCgscontrdpReq->stCtrl.ulPid      = pstDynamicPdpReq->stCtrl.ulModuleId;
    pstCgscontrdpReq->stCtrl.ulClientId = pstDynamicPdpReq->stCtrl.usClientId;
    pstCgscontrdpReq->stCtrl.ulOpId     = pstDynamicPdpReq->stCtrl.ucOpId;

    if(0xff == pstDynamicPdpReq->ucCid)
    {
        if(VOS_ERR == TAF_APS_GetActivedCid(pstCgscontrdpReq->aucCid))
        {
            PS_MEM_FREE(WUEPS_PID_TAF, pstCgscontrdpReq);
            TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aSetCgcontrdpReq: Get actived cid failed.");
            return;
        }
    }
    else
    {
        pstCgscontrdpReq->aucCid[pstDynamicPdpReq->ucCid] = 1;
    }

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstCgscontrdpReq))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aSetCgscontrdpReq: Send message failed.");
        return;
    }

    return;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:58,代码来源:TafApsSndL4a.c


示例14: TAF_APS_SndL4aIpv6InfoNotifyInd

VOS_UINT32 TAF_APS_SndL4aIpv6InfoNotifyInd(
    VOS_UINT8                           ucRabId,
    TAF_PDP_IPV6_RA_INFO_STRU          *pstIpv6RaInfo
)
{
    VOS_UINT32                          i;
    APS_L4A_IPV6_INFO_NOTIFY_IND_STRU  *pstL4aIpv6InfoNotifyInd;

    if (VOS_FALSE == TAF_SDC_IsPlatformSupportLte())
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_APS_SndL4aIpv6InfoNotifyInd: Platform don't support LTE.");
        return VOS_ERR;
    }

    /* 构造消息 */
    pstL4aIpv6InfoNotifyInd = (APS_L4A_IPV6_INFO_NOTIFY_IND_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                    WUEPS_PID_TAF,
                                    sizeof(APS_L4A_IPV6_INFO_NOTIFY_IND_STRU));
    if (VOS_NULL_PTR == pstL4aIpv6InfoNotifyInd)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_APS_SndL4aIpv6InfoNotifyInd: Memory alloc failed.");
        return VOS_ERR;
    }

    /* 初始化消息 */
    PS_MEM_SET((VOS_CHAR*)pstL4aIpv6InfoNotifyInd + VOS_MSG_HEAD_LENGTH,
               0x00,
               sizeof(APS_L4A_IPV6_INFO_NOTIFY_IND_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写消息头 */
    pstL4aIpv6InfoNotifyInd->ulReceiverCpuId = VOS_LOCAL_CPUID;
    pstL4aIpv6InfoNotifyInd->ulReceiverPid   = MSP_L4_L4A_PID;
    pstL4aIpv6InfoNotifyInd->enMsgId         = ID_APS_L4A_IPV6_INFO_NOTIFY_IND;

    /* 填写消息内容 */
    pstL4aIpv6InfoNotifyInd->ucRabId         = ucRabId;
    pstL4aIpv6InfoNotifyInd->ucIpv6PrefixNum = (VOS_UINT8)pstIpv6RaInfo->ulPrefixNum;
    for (i = 0; i < pstIpv6RaInfo->ulPrefixNum; i++)
    {
        pstL4aIpv6InfoNotifyInd->astIpv6PrefixArray[i].ucPrefixLen
                                             = pstIpv6RaInfo->astPrefixList[i].ulBitPrefixLen/8;

        PS_MEM_CPY(pstL4aIpv6InfoNotifyInd->astIpv6PrefixArray[i].aucPrefix,
                   pstIpv6RaInfo->astPrefixList[i].aucPrefix,
                   APS_L4A_MAX_IPV6_ADDR_LEN);
    }

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstL4aIpv6InfoNotifyInd))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aIpv6InfoNotifyInd: Send message failed.");
        return VOS_ERR;
    }

    return VOS_OK;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:58,代码来源:TafApsSndL4a.c


示例15: TAF_APS_SndXccOrigDataCallReq

VOS_VOID TAF_APS_SndXccOrigDataCallReq(
    VOS_UINT8                           ucPdpId,
    VOS_UINT8                           ucHrpdHandOff1xFlg
)
{
    APS_XCC_ORIG_DATA_CALL_REQ_STRU        *pstOrigReq     = VOS_NULL_PTR;
    APS_PDP_CONTEXT_ENTITY_ST              *pstPdpEntity   = VOS_NULL_PTR;
    TAF_APS_CDATA_HRPD_EPDSZID_CTX_STRU    *pstHrpdActInfo = VOS_NULL_PTR;

    pstPdpEntity = TAF_APS_GetPdpEntInfoAddr(ucPdpId);

    pstOrigReq = (APS_XCC_ORIG_DATA_CALL_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(WUEPS_PID_TAF,
                            sizeof(APS_XCC_ORIG_DATA_CALL_REQ_STRU));

    if (VOS_NULL_PTR == pstOrigReq)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndXccOrigDataCallReq: Memory alloc failed");
        return;
    }

    PS_MEM_SET((VOS_UINT8*)pstOrigReq + VOS_MSG_HEAD_LENGTH, 0,
                sizeof(APS_XCC_ORIG_DATA_CALL_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写参数 */
    pstOrigReq->ulReceiverPid           = UEPS_PID_XCC;
    pstOrigReq->enMsgId                 = ID_APS_XCC_ORIG_DATA_CALL_REQ;
    pstOrigReq->enSo                    = pstPdpEntity->stCdataInfo.enSo;
    pstOrigReq->ucCallId                = pstPdpEntity->stCdataInfo.ucCallId;
    pstOrigReq->ucDrsFlg                = pstPdpEntity->stCdataInfo.ucDrsFlg;
    pstOrigReq->ucIsDormDataCall        = pstPdpEntity->stCdataInfo.ucIsDormDataCall;
    pstOrigReq->ucReOrigCount           = pstPdpEntity->stCdataInfo.ucReOrigCount;
    pstOrigReq->ucIsL2ErrReOrig         = pstPdpEntity->stCdataInfo.ucIsL2ErrReOrig;
    pstOrigReq->ucSrId                  = pstPdpEntity->stCdataInfo.ucSrId;

    /* TODO:QOS */

    /* num filed默认值为DTMF编码格式的: #777 */
    pstOrigReq->stDialNumInfo.enDigitMode   = XCC_APS_DIGIT_MODE_DTMF;
    pstOrigReq->stDialNumInfo.ucDigitNum    = 4;
    pstOrigReq->stDialNumInfo.aucDigit[0]   = 0x0c;
    pstOrigReq->stDialNumInfo.aucDigit[1]   = 0x07;
    pstOrigReq->stDialNumInfo.aucDigit[2]   = 0x07;
    pstOrigReq->stDialNumInfo.aucDigit[3]   = 0x07;

    if (VOS_TRUE == ucHrpdHandOff1xFlg)
    {
        pstHrpdActInfo = TAF_APS_GetHrpdEpdszidInfo();

        pstOrigReq->ulIsPrevHrpdMode         = VOS_TRUE;
        pstOrigReq->stPrevHrpdActInfo.usSid  = pstHrpdActInfo->usSid;
        pstOrigReq->stPrevHrpdActInfo.usNid  = pstHrpdActInfo->usNid;
        pstOrigReq->stPrevHrpdActInfo.usPzid = pstHrpdActInfo->ucPzid;
    }

    PS_SEND_MSG(WUEPS_PID_TAF, pstOrigReq);

    return;
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:58,代码来源:TafApsSndXcc.c


示例16: TAF_MMA_SetSysCfgReq

VOS_UINT32 TAF_MMA_SetSysCfgReq(
    VOS_UINT32                          ulModuleId,
    VOS_UINT16                          usClientId,
    VOS_UINT8                           ucOpId,
    TAF_MMA_SYS_CFG_PARA_STRU          *pstSysCfgPara
)
{
    TAF_MMA_SYS_CFG_REQ_STRU           *pstMsg  = VOS_NULL_PTR;
    VOS_UINT32                          ulReceiverPid;
    VOS_UINT32                          ulSenderPid;

#if (OSA_CPU_ACPU == VOS_OSA_CPU)
    ulReceiverPid = AT_GetDestPid(usClientId, WUEPS_PID_MMA);
    ulSenderPid   = AT_GetDestPid(usClientId, WUEPS_PID_TAF);
#else
    ulReceiverPid = WUEPS_PID_MMA;
    ulSenderPid   = WUEPS_PID_TAF;
#endif

    /* 参数检查 */
    if (VOS_NULL_PTR == pstSysCfgPara)
    {
        return VOS_FALSE;
    }

    /* 申请消息包TAF_MMA_SYS_CFG_REQ_STRU */
    pstMsg = (TAF_MMA_SYS_CFG_REQ_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                             ulSenderPid,
                                             sizeof(TAF_MMA_SYS_CFG_REQ_STRU));

    /* 内存申请失败,返回 */
    if (VOS_NULL_PTR == pstMsg)
    {
        return VOS_FALSE;
    }

    PS_MEM_SET( (VOS_INT8 *)pstMsg + VOS_MSG_HEAD_LENGTH, 0X00,
            sizeof(TAF_MMA_SYS_CFG_REQ_STRU) - VOS_MSG_HEAD_LENGTH );

    /* 根据输入参数填充TAF_MMA_SYS_CFG_REQ_STRU */
    /* 发送PID统一填写为WUEPS_PID_TAF */
    pstMsg->ulSenderPid       = ulSenderPid;
    pstMsg->ulReceiverPid     = ulReceiverPid;
    pstMsg->ulMsgName         = ID_TAF_MMA_SYS_CFG_SET_REQ;
    pstMsg->stCtrl.ulModuleId = ulModuleId;
    pstMsg->stCtrl.usClientId = usClientId;
    pstMsg->stCtrl.ucOpId     = ucOpId;

    PS_MEM_CPY(&(pstMsg->stSysCfgPara), pstSysCfgPara, sizeof(TAF_MMA_SYS_CFG_PARA_STRU));

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(ulSenderPid, pstMsg))
    {
        return VOS_FALSE;
    }

    return VOS_TRUE;
}
开发者ID:printusrzero,项目名称:hwp6s-kernel,代码行数:58,代码来源:TafMmaApi.c


示例17: TAF_APS_SndXccPzidInfoNtf

VOS_VOID TAF_APS_SndXccPzidInfoNtf(
    XCC_APS_SO_CTRL_MSG_IND_STRU       *pstSoCtrlMsgInd
)
{
    APS_XCC_PZID_INFO_NTF_STRU         *pstPzidInfoNtf = VOS_NULL_PTR;
    TAF_APS_CDATA_EPDSZID_STRU         *pstCurrEpdszid = VOS_NULL_PTR;
    TAF_APS_CDATA_EPDSZID_CTX_STRU     *pstEpdszidCtx  = VOS_NULL_PTR;

    VOS_UINT8                           ucIndex;

    pstPzidInfoNtf = (APS_XCC_PZID_INFO_NTF_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(WUEPS_PID_TAF,
                     sizeof(APS_XCC_PZID_INFO_NTF_STRU));

    if (VOS_NULL_PTR == pstPzidInfoNtf)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndXccPzidInfoNtf: Memory alloc failed");
        return;
    }

    PS_MEM_SET((VOS_UINT8*)pstPzidInfoNtf + VOS_MSG_HEAD_LENGTH, 0,
                sizeof(APS_XCC_PZID_INFO_NTF_STRU) - VOS_MSG_HEAD_LENGTH);

    /* Head info */
    pstPzidInfoNtf->ulReceiverPid         = UEPS_PID_XCC;
    pstPzidInfoNtf->enMsgId               = ID_APS_XCC_PZID_INFO_NTF;

    /* Add Msg Info */
    if (VOS_TRUE == TAF_APS_GetHysEnableFlg())
    {
        pstCurrEpdszid = TAF_APS_GetCurrEpdszidInfo();

        pstPzidInfoNtf->ucPzidReportLen = TAF_APS_CDMA_EPDSZID_DEFAULT_MIN_LEN;
        pstPzidInfoNtf->aucPzid[0]      = pstCurrEpdszid->ucPzid;
    }
    else
    {
        pstEpdszidCtx = TAF_APS_GetEpdszidCtx();

        pstPzidInfoNtf->ucPzidReportLen = TAF_APS_GetCurrPacketZoneListLen();

        if (pstPzidInfoNtf->ucPzidReportLen < TAF_APS_CDMA_EPDSZID_LIST_MAX_LEN - 1)
        {
            for (ucIndex = 0; ucIndex < pstPzidInfoNtf->ucPzidReportLen; ucIndex++)
            {
                pstPzidInfoNtf->aucPzid[ucIndex] = pstEpdszidCtx->astEpdszidList[ucIndex].ucPzid;
            }
        }
    }

    pstPzidInfoNtf->ucConnectId = pstSoCtrlMsgInd->ucConnectId;
    pstPzidInfoNtf->usSo        = pstSoCtrlMsgInd->enSo;


    PS_SEND_MSG(WUEPS_PID_TAF, pstPzidInfoNtf);

    return;
}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:57,代码来源:TafApsSndXcc.c


示例18: TAF_APS_SndL4aSetCgeqosReq

VOS_VOID TAF_APS_SndL4aSetCgeqosReq(
    VOS_VOID                           *pMsgData
)
{
    TAF_PS_SET_EPS_QOS_INFO_REQ_STRU           *pstEpsQosReq;
    APS_L4A_SET_CGEQOS_REQ_STRU                *pstCgeqosReq;

    /* 参数初始化 */
    pstEpsQosReq    = (TAF_PS_SET_EPS_QOS_INFO_REQ_STRU*)(pMsgData);

    /* 构造消息 */
    pstCgeqosReq    = (APS_L4A_SET_CGEQOS_REQ_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                            WUEPS_PID_TAF,
                            sizeof(APS_L4A_SET_CGEQOS_REQ_STRU));
    if (VOS_NULL_PTR == pstCgeqosReq)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aSetCgeqosReq: Memory alloc failed.");
        return;
    }

    /* 初始化消息 */
    PS_MEM_SET((VOS_CHAR*)pstCgeqosReq + VOS_MSG_HEAD_LENGTH,
           0x00,
           sizeof(APS_L4A_SET_CGEQOS_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写消息头 */
    pstCgeqosReq->ulReceiverCpuId           = VOS_LOCAL_CPUID;
    pstCgeqosReq->ulReceiverPid             = MSP_L4_L4A_PID;
    pstCgeqosReq->enMsgId                   = ID_APS_L4A_SET_CGEQOS_REQ;

    /* 填写消息内容 */
    pstCgeqosReq->stCtrl.ulPid              = pstEpsQosReq->stCtrl.ulModuleId;
    pstCgeqosReq->stCtrl.ulClientId         = pstEpsQosReq->stCtrl.usClientId;
    pstCgeqosReq->stCtrl.ulOpId             = pstEpsQosReq->stCtrl.ucOpId;

    pstCgeqosReq->stCgeqosInfo.bitOpQCI     = pstEpsQosReq->stEpsQosInfo.bitOpQCI;
    pstCgeqosReq->stCgeqosInfo.bitOpDLGBR   = pstEpsQosReq->stEpsQosInfo.bitOpDLGBR;
    pstCgeqosReq->stCgeqosInfo.bitOpULGBR   = pstEpsQosReq->stEpsQosInfo.bitOpULGBR;
    pstCgeqosReq->stCgeqosInfo.bitOpDLMBR   = pstEpsQosReq->stEpsQosInfo.bitOpDLMBR;
    pstCgeqosReq->stCgeqosInfo.bitOpULMBR   = pstEpsQosReq->stEpsQosInfo.bitOpULMBR;

    pstCgeqosReq->stCgeqosInfo.ucCid        = pstEpsQosReq->stEpsQosInfo.ucCid;
    pstCgeqosReq->stCgeqosInfo.ucValQCI     = pstEpsQosReq->stEpsQosInfo.ucQCI;
    pstCgeqosReq->stCgeqosInfo.ulValDLGBR   = pstEpsQosReq->stEpsQosInfo.ulDLGBR;
    pstCgeqosReq->stCgeqosInfo.ulValULGBR   = pstEpsQosReq->stEpsQosInfo.ulULGBR;
    pstCgeqosReq->stCgeqosInfo.ulValDLMBR   = pstEpsQosReq->stEpsQosInfo.ulDLMBR;
    pstCgeqosReq->stCgeqosInfo.ulValULMBR   = pstEpsQosReq->stEpsQosInfo.ulULMBR;

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstCgeqosReq))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aSetCgeqosReq: Send message failed.");
        return;
    }

    return;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:57,代码来源:TafApsSndL4a.c


示例19: As_RrRelReq

VOS_INT32 As_RrRelReq(
    VOS_UINT8    ucCnDomain,
    RRC_CELL_BAR_ENUM_UINT32 enBarValidFlg
)
{
    RRMM_REL_REQ_STRU*          pMsg = VOS_NULL;                                           /* 定义原语类型指针                          */

    if(RRC_NAS_CS_DOMAIN == ucCnDomain)
    {
        pMsg = (RRMM_REL_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                   WUEPS_PID_MM,sizeof(RRMM_REL_REQ_STRU));
    }
    else
    {
        pMsg = (RRMM_REL_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                   WUEPS_PID_GMM,sizeof(RRMM_REL_REQ_STRU));
    }
    if( VOS_NULL == pMsg )
    {   /* 内存申请失败                              */
        return AS_VOS_ERR;                                                             /* 返回                                      */
    }
    PS_MEM_SET((VOS_INT8*)pMsg + VOS_MSG_HEAD_LENGTH,0,
               sizeof(RRMM_REL_REQ_STRU) - VOS_MSG_HEAD_LENGTH);
    pMsg->MsgHeader.ulReceiverPid   = WUEPS_PID_WRR;
    pMsg->MsgHeader.ulMsgName = RRMM_REL_REQ;                                          /* 消息名称                                  */
    pMsg->ulCnDomainId = ucCnDomain;
    pMsg->enBarValidFlg = enBarValidFlg;

    if (RRC_NAS_CS_DOMAIN == ucCnDomain)
    {
        pMsg->MsgHeader.ulSenderPid = WUEPS_PID_MM;
    }
    else
    {
        pMsg->MsgHeader.ulSenderPid = WUEPS_PID_GMM;
    }

    if (VOS_OK != NAS_UTRANCTRL_SndAsMsg(pMsg->MsgHeader.ulSenderPid, (struct MsgCB **)&pMsg))
    {
        return AS_SEND_FAILED;
    }

    return AS_SUCCESS;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:44,代码来源:asnasapi.c


示例20: TAF_SPM_SendImsaEconfAddUsersReq

VOS_UINT32 TAF_SPM_SendImsaEconfAddUsersReq(
    MN_CALL_APP_REQ_MSG_STRU           *pstAppMsg
)
{
    SPM_IMSA_CALL_ECONF_ADD_USERS_REQ_STRU     *pstSendImsaMsg  = VOS_NULL_PTR;
    TAF_CALL_ECONF_DIAL_REQ_STRU               *pstEconfDialReq = VOS_NULL_PTR;
    VOS_UINT32                                  ulMsgLen;

    ulMsgLen       = sizeof(SPM_IMSA_CALL_ECONF_ADD_USERS_REQ_STRU);

    /* 构造消息 */
    pstSendImsaMsg = (SPM_IMSA_CALL_ECONF_ADD_USERS_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                               WUEPS_PID_TAF,
                                                               ulMsgLen);
    if (VOS_NULL_PTR == pstSendImsaMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
                "TAF_SPM_SendImsaEconfAddUsersReq: ERROR:Memory Alloc Error for pstMsg!");

        return VOS_FALSE;
    }

    /* 初始化消息 */
    PS_MEM_SET(((VOS_UINT8 *)pstSendImsaMsg) + VOS_MSG_HEAD_LENGTH,
               0x00,
               (ulMsgLen - VOS_MSG_HEAD_LENGTH));

    pstEconfDialReq = (TAF_CALL_ECONF_DIAL_REQ_STRU *)&pstAppMsg->unParm;

    /* 填写消息头 */
    pstSendImsaMsg->ulSenderCpuId       = VOS_LOCAL_CPUID;
    pstSendImsaMsg->ulSenderPid         = WUEPS_PID_TAF;
    pstSendImsaMsg->ulReceiverCpuId     = VOS_LOCAL_CPUID;
    pstSendImsaMsg->ulReceiverPid       = PS_PID_IMSA;
    pstSendImsaMsg->ulLength            = ulMsgLen - VOS_MSG_HEAD_LENGTH;

    /* 填写消息内容 */
    pstSendImsaMsg->ulMsgId             = ID_SPM_IMSA_CALL_ECONF_ADD_USERS_REQ;
    pstSendImsaMsg->usClientId          = pstAppMsg->clientId;
    pstSendImsaMsg->ucOpId              = pstAppMsg->opId;

    /* 填充有效的电话号码 */
    PS_MEM_CPY(&pstSendImsaMsg->stEconfCalllist, &pstEconfDialReq->stEconfCalllist, sizeof(TAF_CALL_ECONF_CALL_LIST_STRU));

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstSendImsaMsg))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
                "TAF_SPM_SendImsaEconfAddUsersReq: Send message failed.");

        return VOS_FALSE;
    }

    return VOS_TRUE;
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:55,代码来源:TafSpmSndImsa.c



注:本文中的PS_ALLOC_MSG_WITH_HEADER_LEN函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PS_LOG函数代码示例发布时间:2022-05-30
下一篇:
C++ PSP_Shutdown函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap