コード例 #1
0
VOS_VOID USIMM_EnvelopeCnf(VOS_UINT32                    ulReceiverPid,
                                    VOS_UINT32                  ulSendPara,
                                    VOS_UINT32                  ulErrorCode,
                                    USIMM_ENVELOPECNF_INFO_STRU *pstCnfInfo)
{
    PS_USIM_ENVELOPE_CNF_STRU  *pUsimMsg;

    pUsimMsg = (PS_USIM_ENVELOPE_CNF_STRU*)VOS_AllocMsg(WUEPS_PID_USIM, sizeof(PS_USIM_ENVELOPE_CNF_STRU)-VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pUsimMsg)
    {
        USIMM_ERROR_LOG("USIMM_EnvelopeCnf: VOS_AllocMsg is Failed");

        return;
    }

    pUsimMsg->ulReceiverPid = ulReceiverPid;
    pUsimMsg->ulMsgName     = PS_USIM_ENVELOPE_CNF;
    pUsimMsg->ulErrorCode   = ulErrorCode;
    pUsimMsg->ulSendPara    = ulSendPara;
    pUsimMsg->ucDataType    = pstCnfInfo->ucDataType;
    pUsimMsg->ucSW1         = pstCnfInfo->ucSW1;
    pUsimMsg->ucSW2         = pstCnfInfo->ucSW2;

    if(ulErrorCode != USIMM_SW_OK)
    {
        pUsimMsg->ulResult      = VOS_ERR;
    }
    else
    {
        pUsimMsg->ulResult      = VOS_OK;
    }

    /* 对于SMS PP DOWNLOAD,可能有数据要回复到网侧,需要上报给TAF */
    if (pstCnfInfo->ulDataLen > VOS_NULL)
    {
        VOS_MemCpy(pUsimMsg->aucData, pstCnfInfo->pucData, pstCnfInfo->ulDataLen);

        pUsimMsg->ucDataLen = (VOS_UINT8)pstCnfInfo->ulDataLen;
    }
    else
    {
        pUsimMsg->ucDataLen = 0;
    }

    (VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);

    return;
}
SI_UINT32 SI_PIH_FdnEnable ( MN_CLIENT_ID_T                  ClientId,
                                    MN_OPERATION_ID_T               OpId,
                                    SI_UINT8                        *pPIN2)
{
    SI_PIH_FDN_ENABLE_REQ_STRU     *pMsg;
    VOS_UINT32                      ulReceiverPid;

    if (VOS_OK != SI_PIH_GetReceiverPid(ClientId, &ulReceiverPid))
    {
        PIH_ERROR_LOG("SI_PIH_FdnEnable:Get ulReceiverPid Error.");
        return TAF_FAILURE;
    }

#if (FEATURE_MULTI_MODEM == FEATURE_OFF)
    if(PB_INIT_FINISHED != gstPBInitState.enPBInitStep)
    {
        PIH_ERROR_LOG("SI_PIH_FdnEnable:PB is Busy.");
        return TAF_FAILURE;
    }
#endif

    pMsg = (SI_PIH_FDN_ENABLE_REQ_STRU *)VOS_AllocMsg(WUEPS_PID_AT, sizeof(SI_PIH_FDN_ENABLE_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pMsg)
    {
        PIH_WARNING_LOG("SI_PIH_FdnEnable:WARNING AllocMsg FAILED.");
        return TAF_FAILURE;
    }

    pMsg->stMsgHeader.ulReceiverPid = ulReceiverPid;
    pMsg->stMsgHeader.ulMsgName     = SI_PIH_FDN_ENABLE_REQ;
    pMsg->stMsgHeader.usClient      = ClientId;
    pMsg->stMsgHeader.ucOpID        = OpId;
    pMsg->stMsgHeader.ulEventType   = SI_PIH_EVENT_FDN_CNF;

    if(VOS_NULL_PTR != pPIN2)
    {
        VOS_MemCpy(pMsg->aucPIN2, pPIN2, SI_PIH_PIN_CODE_LEN);
    }

    if(VOS_OK !=  VOS_SendMsg(WUEPS_PID_AT, pMsg))
    {
        PIH_WARNING_LOG("SI_PIH_FdnEnable:WARNING SendMsg FAILED.");
        return TAF_FAILURE;
    }

    return TAF_SUCCESS;

}
コード例 #3
0
ファイル: vos_log.c プロジェクト: KHATEEBNSIT/AP
GOS_ERROR_CODE LOG_ClearByName(const char* logName)
{
    LOG_CLEAR_BY_NAME_MSG_T msg;

    if (strlen(logName) > LOG_NAME_MAX_LEN)    
    {
        return GOS_ERR_OVERFLOW;
    }

    memset(&msg, 0, sizeof(msg));
    strcpy(msg.logName, logName);

    return VOS_SendMsg(VOS_APPLID_LOG, LOG_MSG_CLEAR_BY_NAME, VOS_MSG_PRI_NORMAL, 
                    &msg, sizeof(msg));
}
/*****************************************************************************
函 数 名  : SI_PIH_AccessUICCFileReq
功能描述  :
输入参数  : ClientId:用户ID
            OpId:OP id
            pstData:鉴权数据
输出参数  : 无
返 回 值  : SI_UINT32 函数执行结果
调用函数  : 无
被调函数  : 外部接口
History     :
1.日    期  : 2014年3月21日
  作    者  : zhuli
  修改内容  : Create
*****************************************************************************/
VOS_UINT32 SI_PIH_AccessUICCFileReq(MN_CLIENT_ID_T       ClientId,
                                    MN_OPERATION_ID_T               OpId,
                                    SI_PIH_ACCESSFILE_STRU          *pstData)
{
    SI_PIH_ACCESSFILE_REQ_STRU      *pstMsg;
    VOS_UINT32                      ulReceiverPid;

    if (VOS_OK != SI_PIH_GetReceiverPid(ClientId, &ulReceiverPid))
    {
        PIH_ERROR_LOG("SI_PIH_AccessUICCFileReq:Get ulReceiverPid Error.");

        return TAF_FAILURE;
    }

    if (VOS_NULL_PTR == pstData)
    {
        PIH_WARNING_LOG("SI_PIH_AccessUICCFileReq:Para Check Error");

        return TAF_FAILURE;
    }

    /* 分配消息内存 */
    pstMsg  = (SI_PIH_ACCESSFILE_REQ_STRU *)VOS_AllocMsg(WUEPS_PID_AT, sizeof(SI_PIH_ACCESSFILE_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg)
    {
        PIH_WARNING_LOG("SI_PIH_AccessUICCFileReq: AllocMsg FAILED");

        return TAF_FAILURE;
    }

    pstMsg->stMsgHeader.ulReceiverPid   =   ulReceiverPid;
    pstMsg->stMsgHeader.ulMsgName       =   SI_PIH_URSM_REQ;
    pstMsg->stMsgHeader.usClient        =   ClientId;
    pstMsg->stMsgHeader.ucOpID          =   OpId;
    pstMsg->stMsgHeader.ulEventType     =   SI_PIH_EVENT_URSM_CNF;

    VOS_MemCpy(&pstMsg->stCmdData, pstData, sizeof(SI_PIH_ACCESSFILE_STRU));

    if (VOS_OK !=  VOS_SendMsg(WUEPS_PID_AT, pstMsg))
    {
        PIH_WARNING_LOG("SI_PIH_AccessUICCFileReq:WARNING SendMsg FAILED");

        return TAF_FAILURE;
    }

    return TAF_SUCCESS;
}
コード例 #5
0
ファイル: vos_log.c プロジェクト: KHATEEBNSIT/AP
GOS_ERROR_CODE LOG_SetLogLevel(const char* logName, UINT32 level)
{
    LOG_LEVEL_MSG_T msg;

    if (strlen(logName) > LOG_NAME_MAX_LEN)    
    {
        return GOS_ERR_OVERFLOW;
    }

    memset(&msg, 0, sizeof(msg));
    strcpy(msg.logName, logName);
    msg.logLevel = level;

    return VOS_SendMsg(VOS_APPLID_LOG, LOG_MSG_SET_LEVEL_BY_NAME, VOS_MSG_PRI_NORMAL, 
                    &msg, sizeof(msg));
}
コード例 #6
0
ファイル: vos_log.c プロジェクト: KHATEEBNSIT/AP
GOS_ERROR_CODE VOS_E8C_Log(UINT32 log_level, const char *fmt, ...)
{
    LOG_E8C_MSG_T   msg;
    va_list args;

    va_start(args, fmt);
    vsnprintf(msg.msg, sizeof(msg.msg), fmt, args);
    va_end(args);

    if (log_level > LOG_E8C_LEVEL_MAX) {
        log_level = LOG_E8C_LEVEL_MAX;
    }
    msg.level = log_level;

    return VOS_SendMsg(VOS_APPLID_LOG, LOG_MSG_SET_E8C_LOG, VOS_MSG_PRI_NORMAL, &msg, sizeof(msg));
}
VOS_UINT32 SI_PIH_HvteeSet(MN_CLIENT_ID_T               ClientId,
                             MN_OPERATION_ID_T                 OpId,
                             SI_PIH_HVTEE_SET_STRU            *pstHvtee)
{
    SI_PIH_HVTEE_SET_REQ_STRU           *pstMsg;
    VOS_UINT32                          ulReceiverPid;

    if (VOS_NULL_PTR == pstHvtee)
    {
        PIH_ERROR_LOG("SI_PIH_HvteeSet: Input Para Error.");

        return TAF_FAILURE;
    }

    if (VOS_OK != SI_PIH_GetReceiverPid(ClientId, &ulReceiverPid))
    {
        PIH_ERROR_LOG("SI_PIH_HvteeSet:Get ulReceiverPid Error.");

        return TAF_FAILURE;
    }

    pstMsg = (SI_PIH_HVTEE_SET_REQ_STRU *)VOS_AllocMsg(WUEPS_PID_AT, sizeof(SI_PIH_HVTEE_SET_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg)
    {
        PIH_WARNING_LOG("SI_PIH_HvteeSet: AllocMsg FAILED");

        return TAF_FAILURE;
    }

    pstMsg->stMsgHeader.ulReceiverPid = ulReceiverPid;
    pstMsg->stMsgHeader.ulMsgName     = SI_PIH_HVTEE_SET_REQ;
    pstMsg->stMsgHeader.usClient      = ClientId;
    pstMsg->stMsgHeader.ucOpID        = OpId;
    pstMsg->stMsgHeader.ulEventType   = SI_PIH_EVENT_HVTEE_SET_CNF;

    VOS_MemCpy(&pstMsg->stHvtee, pstHvtee, sizeof(SI_PIH_HVTEE_SET_STRU));

    if(VOS_OK != VOS_SendMsg(WUEPS_PID_AT, pstMsg))
    {
        PIH_WARNING_LOG("SI_PIH_HvsContQuery:WARNING SendMsg FAILED");

        return TAF_FAILURE;
    }

    return TAF_SUCCESS;
}
コード例 #8
0
ファイル: pbapi.c プロジェクト: rgmabs19357/Huawei-
/*****************************************************************************
函 数 名  : SI_PB_Set
功能描述  : 设置当前号码本使用的存储器类型
输入参数  : 无
输出参数  : 无
返 回 值  : SI_UINT32 函数执行结果
调用函数  : 无
被调函数  : 外部接口
History     :
1.日    期  : 2008年10月14日
  修改内容  : Create
*****************************************************************************/
SI_UINT32 SI_PB_Set(    MN_CLIENT_ID_T           ClientId,
                            MN_OPERATION_ID_T        OpId,
                            SI_PB_STORATE_TYPE      Storage)
{
    SI_PB_SET_REQ_STRU  *pMsg;
    VOS_UINT32          ulReceiverPid;

#if (( FEATURE_MULTI_MODEM == FEATURE_ON )&&(!defined(DMT)))
    if(SI_PB_STORAGE_FD != Storage)
    {
        PB_ERROR_LOG("SI_PB_Set:Double Modem only support the FDN");

        return TAF_FAILURE;
    }
#endif

    if (VOS_OK != SI_PB_GetReceiverPid(ClientId, &ulReceiverPid))
    {
        PB_ERROR_LOG("SI_PB_Set:Get ulReceiverPid Error.");

        return TAF_FAILURE;
    }

    pMsg = (SI_PB_SET_REQ_STRU *)VOS_AllocMsg(WUEPS_PID_AT, sizeof(SI_PB_SET_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pMsg)
    {
        PB_ERROR_LOG("SI_PB_Set:VOS_AllocMsg Failed");

        return TAF_FAILURE;
    }

    pMsg->ulReceiverPid = ulReceiverPid;
    pMsg->ulMsgName     = SI_PB_SET_REQ;
    pMsg->usClient      = ClientId;
    pMsg->ucOpID        = OpId;
    pMsg->ulStorage     = Storage;

    if(VOS_OK != VOS_SendMsg(WUEPS_PID_AT, pMsg))
    {
        PB_ERROR_LOG("SI_PB_Set:VOS_SendMsg Failed");

        return TAF_FAILURE;
    }

    return TAF_SUCCESS;
}
コード例 #9
0
VOS_VOID USIMM_SetFileCnf(VOS_UINT32               ulReceiverPid,
                                VOS_UINT32              ulSendPara,
                                VOS_UINT32              ulErrorCode,
                                USIMM_SETCNF_INFO_STRU  *pstCnfInfo)
{
    PS_USIM_SET_FILE_CNF_STRU  *pUsimMsg;
    VOS_UINT32                 ulResult;

    if(ulErrorCode != USIMM_SW_OK)
    {
        ulResult = VOS_ERR;
    }
    else
    {
        ulResult = VOS_OK;
    }

    if( WUEPS_PID_OM == ulReceiverPid )
    {
        USIMM_OmFileCnf(ulResult,0,0,USIMM_OM_SET_CNF);/*最后一个参数1表示更新文件*/

        return;
    }

    pUsimMsg = (PS_USIM_SET_FILE_CNF_STRU*)VOS_AllocMsg(WUEPS_PID_USIM, sizeof(PS_USIM_SET_FILE_CNF_STRU)-VOS_MSG_HEAD_LENGTH);

    if(VOS_NULL_PTR == pUsimMsg)
    {
        USIMM_ERROR_LOG("USIMM_SetFileCnf: VOS_AllocMsg is Failed");

        return;
    }

    pUsimMsg->ulMsgName     = PS_USIM_SET_FILE_RSP;
    pUsimMsg->ulReceiverPid = ulReceiverPid;
    pUsimMsg->ulResult      = ulResult;
    pUsimMsg->ulErrorCode   = ulErrorCode;
    pUsimMsg->ulSendPara    = ulSendPara;
    pUsimMsg->usEfId        = pstCnfInfo->usEfid;
    pUsimMsg->usEfLen       = pstCnfInfo->usEFLen;
    pUsimMsg->ucRecordNum   = pstCnfInfo->ucRecordNum ;

    (VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);

    return;
}
コード例 #10
0
ファイル: pbapi.c プロジェクト: rgmabs19357/Huawei-
/*****************************************************************************
函 数 名  : SI_PB_Search
功能描述  : 电话本中查找一个记录
输入参数  : 无
输出参数  : 无
返 回 值  : SI_UINT32 函数执行结果
调用函数  : 无
被调函数  : 外部接口
History     :
1.日    期  : 2009年3月12日
  修改内容  : Create
*****************************************************************************/
SI_UINT32 SI_PB_Search(    MN_CLIENT_ID_T             ClientId,
                                MN_OPERATION_ID_T           OpId,
                                SI_PB_STORATE_TYPE          Storage,
                                SI_UINT8                    ucLength,
                                SI_UINT8                    *pucContent)
{
#if (( FEATURE_MULTI_MODEM == FEATURE_ON )&&(!defined(DMT)))
    return TAF_FAILURE;
#else
    SI_PB_SEARCH_REQ_STRU  *pMsg;

    /*lint -e433  修改人: j00174725; 检视人: xucheng */
    pMsg = (SI_PB_SEARCH_REQ_STRU *)VOS_AllocMsg(WUEPS_PID_AT, sizeof(SI_PB_SEARCH_REQ_STRU) - VOS_MSG_HEAD_LENGTH);
    /*lint +e433  修改人: j00174725; 检视人: xucheng */

    if (VOS_NULL_PTR == pMsg)
    {
        PB_ERROR_LOG("SI_PB_Search:VOS_AllocMsg Failed");
        return TAF_FAILURE;
    }

#if (VOS_WIN32 == VOS_OS_VER)
    pMsg->ulReceiverPid = MAPS_PB_PID;
#else
    pMsg->ulReceiverPid = ACPU_PID_PB;
#endif  /*(VOS_WIN32 == VOS_OS_VER)*/

    pMsg->ulMsgName     = SI_PB_SEARCH_REQ;
    pMsg->usClient      = ClientId;
    pMsg->ucOpID        = OpId;
    pMsg->ucLength      = ucLength;

    pMsg->ulStorage = ((Storage == SI_PB_STORAGE_UNSPECIFIED)?(gstPBCtrlInfo.enPBCurType):(Storage));

    VOS_MemCpy(pMsg->aucContent, pucContent, ucLength);

    if(VOS_OK !=  VOS_SendMsg(WUEPS_PID_AT, pMsg))
    {
        PB_ERROR_LOG("SI_PB_Search:VOS_SendMsg Failed");
        return TAF_FAILURE;
    }

    return TAF_SUCCESS;
#endif
}
コード例 #11
0
VOS_VOID TAF_XSMS_SndXccSmsOrgiCallReq
(
    VOS_UINT8                               ucCallId,
    VOS_UINT8                               ucIsL2ErrReOrig,
    VOS_UINT8                               ucL2ErrReOrigCount
)
{
    CSMS_XCC_ORIG_SMS_CALL_REQ_STRU    *pstOrigCallMsg;
    TAF_XSMS_MSG_MO_REC_STRU           *pstMoRec    = TAF_XSMS_MoGetRecAddr();

    /* 分配消息 */
    pstOrigCallMsg = (CSMS_XCC_ORIG_SMS_CALL_REQ_STRU *)VOS_AllocMsg(UEPS_PID_XSMS,
                                                                     sizeof(CSMS_XCC_ORIG_SMS_CALL_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstOrigCallMsg)
    {
        return;
    }

    pstMoRec->ucWaitRedirCompleteFlag   = VOS_FALSE;

    pstMoRec->ucIsOrigReqSendFlag       = VOS_TRUE;

    TAF_SDC_SetXsmsCallExistFlg(VOS_TRUE);

    pstOrigCallMsg->ulSenderCpuId       = VOS_LOCAL_CPUID;
    pstOrigCallMsg->ulReceiverPid       = UEPS_PID_XCC;
    pstOrigCallMsg->ulReceiverCpuId     = VOS_LOCAL_CPUID;
    pstOrigCallMsg->ulSenderPid         = UEPS_PID_XSMS;

    /*消息填充*/
    pstOrigCallMsg->enMsgId             = ID_CSMS_XCC_ORIG_SMS_CALL_REQ;
    pstOrigCallMsg->usOpId              = 0;
    pstOrigCallMsg->ucCallId            = ucCallId;
    pstOrigCallMsg->enSo                = TAF_CDMA_SO_6_SMS;
    /* 这里再和NAS确认下是否这样填 */
    pstOrigCallMsg->ucIsL2ErrReOrig     = ucIsL2ErrReOrig;
    pstOrigCallMsg->ucL2ErrReOrigCount  = ucL2ErrReOrigCount;


    /* 发送消息 */
    VOS_SendMsg(UEPS_PID_XSMS, pstOrigCallMsg);

    return;
}
VOS_UINT32 PPM_DisconnectTLPort(VOS_VOID)
{
    DIAG_DATA_MSG_STRU                 *pstMsg;

    pstMsg = (DIAG_DATA_MSG_STRU *)VOS_AllocMsg(UEPS_PID_OMRL, sizeof(DIAG_DATA_MSG_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg)
    {
        return VOS_ERR;
    }

    pstMsg->ulReceiverPid = MSP_PID_DIAG_FW;
    pstMsg->ulMsgId       = ID_MSG_DIAG_HSO_DISCONN_IND;

    (VOS_VOID)VOS_SendMsg(UEPS_PID_OMRL, pstMsg);

    return VOS_OK;
}
コード例 #13
0
VOS_VOID USIMM_VsimReDhNegotiateInd(VOS_VOID)
{
    PS_USIM_VSIM_REDH_IND_STRU         *pstMsg;

    pstMsg = (PS_USIM_VSIM_REDH_IND_STRU *)VOS_AllocMsg(WUEPS_PID_USIM, sizeof(PS_USIM_VSIM_REDH_IND_STRU)-VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg)
    {
        return;
    }

    pstMsg->ulReceiverPid = MAPS_PIH_PID;
    pstMsg->ulMsgName     = PS_USIMM_VSIM_RDH_IND;

    (VOS_VOID)VOS_SendMsg(WUEPS_PID_USIM, pstMsg);

    return;
}
コード例 #14
0
/*****************************************************************************
 Prototype       : OM_SendAcpuSocpVote
 Description     : Acpu OM send the Socp volte massage. Only for K3V3
 Input           : enVote  - The vote value.
 Output          : None.
 Return Value    : None.

 History         : ---
    Date         : 2014-02-20
    Author       : zhuli
    Modification : Created function
 *****************************************************************************/
VOS_VOID OM_SendAcpuSocpVote(SOCP_VOTE_TYPE_ENUM_U32 enVote)
{
#if(FEATURE_ON == FEATURE_SOCP_ON_DEMAND)
    DIAG_MSG_SOCP_VOTE_REQ_STRU *pstMsg;

    if (enVote >= SOCP_VOTE_TYPE_BUTT)
    {
        OM_AcpuSocpVoteInfoAdd(OM_SOCPVOTE_WARNNING);

        return;
    }

    pstMsg = (DIAG_MSG_SOCP_VOTE_REQ_STRU *)VOS_AllocMsg(ACPU_PID_OM, sizeof(DIAG_MSG_SOCP_VOTE_REQ_STRU)-VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg) /*Alloc msg fail could reboot*/
    {
        OM_AcpuSocpVoteInfoAdd(OM_SOCPVOTE_FATAL);

        return;
    }

    pstMsg->ulReceiverPid   = MSP_PID_DIAG_APP_AGENT;
    pstMsg->ulVoteId        = SOCP_VOTE_GU_OM_APP;
    pstMsg->ulVoteType      = enVote;

    if (VOS_OK != VOS_SendMsg(ACPU_PID_OM, pstMsg))
    {
        OM_AcpuSocpVoteInfoAdd(OM_SOCPVOTE_ERROR);

        return;
    }

    if (SOCP_VOTE_FOR_SLEEP == enVote)
    {
        OM_AcpuSocpVoteInfoAdd(OM_SOCPVOTE_SENDSLEEPMSG);
    }
    else
    {
        OM_AcpuSocpVoteInfoAdd(OM_SOCPVOTE_SENDWAKEMSG);
    }
#endif

    return;
}
SI_UINT32 SI_PIH_FdnBdnQuery(MN_CLIENT_ID_T                ClientId,
                                    MN_OPERATION_ID_T               OpId,
                                    SI_PIH_QUERY_TYPE_ENUM_UINT32   QueryType)
{
    SI_PIH_MSG_HEADER_STRU          *pMsg;
    VOS_UINT32                      ulReceiverPid;

    if (VOS_OK != SI_PIH_GetReceiverPid(ClientId, &ulReceiverPid))
    {
        PIH_ERROR_LOG("SI_PIH_FdnBdnQuery:Get ulReceiverPid Error.");
        return TAF_FAILURE;
    }

    pMsg = (SI_PIH_MSG_HEADER_STRU *)VOS_AllocMsg(WUEPS_PID_AT, sizeof(SI_PIH_MSG_HEADER_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pMsg)
    {
        PIH_WARNING_LOG("SI_PIH_FdnDisable:WARNING AllocMsg FAILED");
        return TAF_FAILURE;
    }

    pMsg->ulReceiverPid = ulReceiverPid;
    pMsg->usClient      = ClientId;
    pMsg->ucOpID        = OpId;

    if(QueryType == SI_PIH_FDN_QUERY)
    {
        pMsg->ulEventType   = SI_PIH_EVENT_FDN_CNF;
        pMsg->ulMsgName     = SI_PIH_FDN_QUERY_REQ;
    }
    else
    {
        pMsg->ulEventType   = SI_PIH_EVENT_BDN_CNF;
        pMsg->ulMsgName     = SI_PIH_BDN_QUERY_REQ;
    }

    if(VOS_OK !=  VOS_SendMsg(WUEPS_PID_AT, pMsg))
    {
        PIH_WARNING_LOG("SI_PIH_FdnDisable:WARNING SendMsg FAILED");
        return TAF_FAILURE;
    }

    return TAF_SUCCESS;
}
SI_UINT32 SI_PIH_CglaSetReq(
    MN_CLIENT_ID_T                      ClientId,
    MN_OPERATION_ID_T                   OpId,
    SI_PIH_CGLA_COMMAND_STRU           *pstData)
{
    SI_PIH_CGLA_REQ_STRU               *pstMsg;
    VOS_UINT32                          ulReceiverPid;

    if (VOS_OK != SI_PIH_GetReceiverPid(ClientId, &ulReceiverPid))
    {
        PIH_ERROR_LOG("SI_PIH_CglaSetReq:Get ulReceiverPid Error.");
        return TAF_FAILURE;
    }

    /* 分配消息内存 */
    pstMsg  = (SI_PIH_CGLA_REQ_STRU *)VOS_AllocMsg(WUEPS_PID_AT,
                                                   sizeof(SI_PIH_CGLA_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg)
    {
        PIH_WARNING_LOG("SI_PIH_CglaSetReq: AllocMsg FAILED");

        return TAF_FAILURE;
    }

    pstMsg->stMsgHeader.ulReceiverPid   =   ulReceiverPid;
    pstMsg->stMsgHeader.ulMsgName       =   SI_PIH_CGLA_SET_REQ;
    pstMsg->stMsgHeader.usClient        =   ClientId;
    pstMsg->stMsgHeader.ucOpID          =   OpId;
    pstMsg->stMsgHeader.ulEventType     =   SI_PIH_EVENT_CGLA_SET_CNF;
    pstMsg->ulSessionID                 =   pstData->ulSessionID;
    pstMsg->ulDataLen                   =   pstData->ulLen;

    VOS_MemCpy(pstMsg->aucData, pstData->pucCommand, pstData->ulLen);

    if (VOS_OK != VOS_SendMsg(WUEPS_PID_AT, pstMsg))
    {
        PIH_WARNING_LOG("SI_PIH_CglaSetReq:WARNING SendMsg FAILED");

        return TAF_FAILURE;
    }

    return TAF_SUCCESS;
}
コード例 #17
0
VOS_VOID USIMM_SetSPBFileCnf(VOS_UINT32                     ulReceiverPid,
                                      VOS_UINT32                    ulErrorCode,
                                      USIMM_SET_SPBFILE_REQ_STRU    *pstMsg)
{
    PS_USIM_SPB_CNF_STRU *pUsimMsg = VOS_NULL_PTR;
    VOS_UINT32           i;

    pUsimMsg = (PS_USIM_SPB_CNF_STRU *)VOS_AllocMsg(WUEPS_PID_USIM, sizeof(PS_USIM_SPB_CNF_STRU)-VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pUsimMsg)
    {
        USIMM_ERROR_LOG("USIMM_SetSPBFileCnf: VOS_AllocMsg is Failed");

        return;
    }

    if(ulErrorCode != USIMM_SW_OK)
    {
        pUsimMsg->ulResult = VOS_ERR;
    }
    else
    {
        pUsimMsg->ulResult = VOS_OK;
    }

    pUsimMsg->ulReceiverPid = ulReceiverPid;
    pUsimMsg->ulMsgName     = PS_USIM_SET_SPBFILE_CNF;
    pUsimMsg->ulErrorCode   = ulErrorCode;
    pUsimMsg->ucFileNum     = (VOS_UINT8)pstMsg->ulSPBReqCount;

    if (VOS_OK == pUsimMsg->ulResult)
    {
        for(i = 0; i < pstMsg->ulSPBReqCount; i++)
        {
            pUsimMsg->ausEfId[i]      = pstMsg->stSPBReq[i].usFileID;
            pUsimMsg->aucRecordNum[i] = pstMsg->stSPBReq[i].ucRecordNum;
            pUsimMsg->ausEfLen[i]     = pstMsg->stSPBReq[i].usDataLen;
        }
    }

    (VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);

    return;
}
コード例 #18
0
VOS_UINT32 OM_OledClear(VOS_VOID)
{
    OM_OLED_CLEAR_REQ_STRU    *pstOledCLearMsg;

    /* 分配消息内存 */
    pstOledCLearMsg = (OM_OLED_CLEAR_REQ_STRU*)VOS_AllocMsg(CCPU_PID_OMAGENT,
                    sizeof(OM_OLED_CLEAR_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstOledCLearMsg)
    {
        return VOS_ERR;
    }

    pstOledCLearMsg->ulReceiverPid = ACPU_PID_OMAGENT;
    pstOledCLearMsg->usPrimId      = OM_OLED_CLEAR_REQ;

    /* 将消息发送给ACPU */
    return VOS_SendMsg(CCPU_PID_OMAGENT, pstOledCLearMsg);
}
コード例 #19
0
VOS_UINT32 OM_HsicConnectReq(VOS_VOID)
{
    OM_HSIC_CONNECT_REQ_STRU           *pstOmHsicMsg;

    /* 分配消息内存 */
    pstOmHsicMsg = (OM_HSIC_CONNECT_REQ_STRU*)VOS_AllocMsg(CCPU_PID_OMAGENT,
                                                           sizeof(OM_HSIC_CONNECT_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstOmHsicMsg)
    {
        return VOS_ERR;
    }

    pstOmHsicMsg->ulReceiverPid = ACPU_PID_OMAGENT;
    pstOmHsicMsg->usPrimId      = OM_HSIC_CONNECT_REQ;

    /* 将消息发送给ACPU */
    return VOS_SendMsg(CCPU_PID_OMAGENT, pstOmHsicMsg);
}
コード例 #20
0
 */
/* 功能描述: AT模块给FTM 模块发送消息
 */
/*
 */
/* 参数说明:
 */
/*   TaskId [in] 接收PID
 */
/*   MsgId  [in] 消息ID
 */
/*   ulClientId [in] 端口号
 */
/*   pData  [in] 数据起始
 */
/*   uLen   [in] 数据长度
 */
/* 返 回 值:
 */
VOS_UINT32 SI_PIH_SciCfgSet (MN_CLIENT_ID_T               ClientId,
                             MN_OPERATION_ID_T                  OpId,
                             SI_PIH_CARD_SLOT_ENUM_UINT32       enCard0Slot,
                             SI_PIH_CARD_SLOT_ENUM_UINT32       enCard1Slot)
{
    SI_PIH_SCICFG_SET_REQ_STRU  *pstMsg;
    VOS_UINT32                  ulReceiverPid;

    if (VOS_OK != SI_PIH_GetReceiverPid(ClientId, &ulReceiverPid))
    {
        PIH_ERROR_LOG("SI_PIH_SciCfgSet:Get ulReceiverPid Error.");

        return TAF_FAILURE;
    }

    pstMsg = (SI_PIH_SCICFG_SET_REQ_STRU *)VOS_AllocMsg(WUEPS_PID_AT, sizeof(SI_PIH_SCICFG_SET_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg)
    {
        PIH_WARNING_LOG("SI_PIH_SciCfgSet:WARNING AllocMsg FAILED");

        return TAF_FAILURE;
    }

    pstMsg->stMsgHeader.ulReceiverPid   = ulReceiverPid;
    pstMsg->stMsgHeader.usClient        = ClientId;
    pstMsg->stMsgHeader.ucOpID          = OpId;
    pstMsg->stMsgHeader.ulMsgName       = SI_PIH_SCICFG_SET_REQ;
    pstMsg->stMsgHeader.ulEventType     = SI_PIH_EVENT_SCICFG_SET_CNF;

    pstMsg->enCard0Slot                 = enCard0Slot;
    pstMsg->enCard1Slot                 = enCard1Slot;

    if(VOS_OK !=  VOS_SendMsg(WUEPS_PID_AT, pstMsg))
    {
        PIH_WARNING_LOG("SI_PIH_SciCfgSet:WARNING SendMsg FAILED");

        return TAF_FAILURE;
    }

    return TAF_SUCCESS;
}
VOS_UINT32 PCSC_AcpuCmdReq(VOS_UINT32 ulCmdType, VOS_UINT8 *pucAPDU, VOS_UINT32 ulAPDULen)
{
    SI_PIH_PCSC_REQ_STRU     *pstMsg;

    if((ulAPDULen > 5)&&(pucAPDU[4] != ulAPDULen-5))
    {
        PS_LOG(ACPU_PID_PCSC, 0, PS_PRINT_ERROR, "PCSC_AcpuCmdReq: Data Len is Not Eq P3");
        return VOS_ERR;
    }

    pstMsg = (SI_PIH_PCSC_REQ_STRU *)VOS_AllocMsg(ACPU_PID_PCSC,
                        (sizeof(SI_PIH_PCSC_REQ_STRU) - VOS_MSG_HEAD_LENGTH) + ulAPDULen);
    if (VOS_NULL_PTR == pstMsg)
    {
        /* 打印错误 */
        PS_LOG(ACPU_PID_PCSC, 0, PS_PRINT_WARNING, "PCSC_AcpuCmdReq: VOS_AllocMsg is Failed");
        vos_printf("PCSC_AcpuCmdReq: VOS_AllocMsg is Failed.\r\n");

        return VOS_ERR; /* 返回函数错误信息 */
    }

    pstMsg->stMsgHeader.ulReceiverPid = MAPS_PIH_PID;
    pstMsg->stMsgHeader.ulMsgName     = SI_PIH_PCSC_DATA_REQ;
    pstMsg->stMsgHeader.ulEventType   = ulCmdType;
    pstMsg->ulCmdType                 = ulCmdType;
    pstMsg->ulCmdLen                  = ulAPDULen;

    if(ulAPDULen != 0)
    {
        VOS_MemCpy(pstMsg->aucAPDU, pucAPDU, ulAPDULen);
    }

    if (VOS_OK != VOS_SendMsg(ACPU_PID_PCSC, pstMsg))
    {
        /*打印错误*/
        PS_LOG(ACPU_PID_PCSC, 0, PS_PRINT_WARNING, "PCSC_AcpuCmdReq: VOS_SendMsg is Failed.");
        vos_printf("PCSC_AcpuCmdReq: VOS_SendMsg is Failed.");
        return VOS_ERR;
    }

    return VOS_OK;
}
コード例 #23
0
VOS_VOID OM_SendConfigMsg(VOS_UINT32 ulRcvPid, MsgBlock* pstMsg)
{
    MsgBlock    *pstDestMsg;

    pstDestMsg = VOS_AllocMsg(WUEPS_PID_OM, pstMsg->ulLength);

    if (VOS_NULL_PTR == pstDestMsg)
    {
        return;
    }

    VOS_MemCpy(pstDestMsg, pstMsg, VOS_MSG_HEAD_LENGTH + pstMsg->ulLength);

    pstDestMsg->ulSenderPid   = WUEPS_PID_OM;
    pstDestMsg->ulReceiverPid = ulRcvPid;

    (VOS_VOID)VOS_SendMsg(WUEPS_PID_OM, pstDestMsg);

    return;
}
コード例 #24
0
VOS_VOID PAMOM_QuereyPidInfo(VOS_VOID)
{
    PAM_VOS_QUEREY_PID_INFO_REQ_STRU    *pstMsg;
    
    pstMsg = (PAM_VOS_QUEREY_PID_INFO_REQ_STRU *)VOS_AllocMsg(CCPU_PID_PAM_OM,
                            sizeof(PAM_VOS_QUEREY_PID_INFO_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 分配消息失败 */
    if (VOS_NULL_PTR == pstMsg)
    {
        return;
    }

    pstMsg->ulReceiverPid  = ACPU_PID_PAM_OM;
    pstMsg->usPrimId       = PAM_VOS_QUEREY_PID_INFO_REQ;

    (VOS_VOID)VOS_SendMsg(CCPU_PID_PAM_OM, pstMsg);
    
    return;
}
コード例 #25
0
ファイル: vos_log.c プロジェクト: KHATEEBNSIT/AP
GOS_ERROR_CODE LOG_SaveAllToFile(const CHAR* fileName)
{
    LOG_SAVEALLTOFILE_MSG_T msg;
    UINT32                  filenameLen;

    if (NULL == fileName)
    {
        return GOS_FAIL;
    }
    
    filenameLen = strlen(fileName);
    if (filenameLen > (LOG_FILE_NAME_MAX_LEN - 1))
    {
        filenameLen = LOG_FILE_NAME_MAX_LEN -1;
    }
    memcpy(msg.fileName, fileName, filenameLen);
    msg.fileName[filenameLen] = '\0';

    return VOS_SendMsg(VOS_APPLID_LOG, LOG_MSG_SAVEALLTOFILE, VOS_MSG_PRI_NORMAL, &msg, sizeof(LOG_SAVEALLTOFILE_MSG_T));
}
コード例 #26
0
VOS_VOID PAMOM_QuereyPidInfoMsgProc(MsgBlock* pMsg)
{
    PAM_VOS_QUEREY_PID_INFO_REQ_STRU    *pstMsg;
    PAM_VOS_QUEREY_PID_INFO_CNF_STRU    *pstCnfMsg;
    VOS_UINT32                           ulLen;
    
    pstMsg = (PAM_VOS_QUEREY_PID_INFO_REQ_STRU *)pMsg;

    if (PAM_VOS_QUEREY_PID_INFO_REQ == pstMsg->usPrimId)
    {
        ulLen = VOS_QueryPidInfoBufSize();

        pstCnfMsg = (PAM_VOS_QUEREY_PID_INFO_CNF_STRU *)VOS_AllocMsg(CCPU_PID_PAM_OM,
                            sizeof(PAM_VOS_QUEREY_PID_INFO_CNF_STRU) - VOS_MSG_HEAD_LENGTH + ulLen);

        /* 分配消息失败 */
        if (VOS_NULL_PTR == pstCnfMsg)
        {
            return;
        }

        pstCnfMsg->ulReceiverPid  = ACPU_PID_PAM_OM;
        pstCnfMsg->usPrimId       = PAM_VOS_QUEREY_PID_INFO_CNF;
        pstCnfMsg->usLen          = (VOS_UINT16)ulLen;
        VOS_QueryPidInfo((VOS_VOID *)pstCnfMsg->aucValue);

        (VOS_VOID)VOS_SendMsg(CCPU_PID_PAM_OM, pstCnfMsg);
    }
    else if (PAM_VOS_QUEREY_PID_INFO_CNF == pstMsg->usPrimId)
    {
        pstCnfMsg = (PAM_VOS_QUEREY_PID_INFO_CNF_STRU *)pMsg;
        
        VOS_SetPidInfo((VOS_VOID *)(pstCnfMsg->aucValue), pstCnfMsg->usLen);
    }
    else
    {
        /* blank */
    }

    return;
}
コード例 #27
0
VOS_VOID diag_AgentVoteToSocp(SOCP_VOTE_TYPE_ENUM_U32 voteType)
{
    DIAG_MSG_SOCP_VOTE_REQ_STRU * voteReq;

    voteReq = (DIAG_MSG_SOCP_VOTE_REQ_STRU *)VOS_AllocMsg(MSP_PID_DIAG_AGENT,(sizeof(DIAG_MSG_SOCP_VOTE_REQ_STRU) - 20));
    if(voteReq == NULL)
    {
        diag_printf("%s: alloc msg fail\n", __FUNCTION__);
        return;
    }
    voteReq->ulReceiverPid = MSP_PID_DIAG_APP_AGENT;
    voteReq->ulSenderPid   = MSP_PID_DIAG_AGENT;
    voteReq->ulLength      = sizeof(DIAG_MSG_SOCP_VOTE_REQ_STRU) - 20;
    voteReq->ulVoteId      = SOCP_VOTE_DIAG_COMM;
    voteReq->ulVoteType    = voteType;

    if(ERR_MSP_SUCCESS != VOS_SendMsg(MSP_PID_DIAG_AGENT, voteReq))
    {
        diag_printf("%s: send msg fail\n", __FUNCTION__);
    }
}
コード例 #28
0
ファイル: wms_lai_function.c プロジェクト: KHATEEBNSIT/AP
GOS_ERROR_CODE  Wms_dns_redirect_task(void *pData)
{
    WMS_LAI_SESSION_T  *session = (WMS_LAI_SESSION_T  *)pData;
    CHAR  *argv[1], cmd[512] = "";

    unlink(WMS_DNS_REDIRECT_XML);

    sprintf(cmd, "wget -q -O %s %s 1>/dev/null 2>&1", WMS_DNS_REDIRECT_XML, session->dns_redirect.url);
    argv[0] = cmd;

    WMS_LOG("Wms_dns_redirect_task start download url: %s", session->dns_redirect.url);
    VOS_Exec(0, 1, argv);

    sleep(1);

    VOS_SendMsg(PON_APPLID_WMS, WMS_MSG_PARSE_DNS_REDIRECT_XML, VOS_MSG_PRI_NORMAL, NULL, 0);
    
    session->dns_redirect.taskID = VOS_TASK_ID_INVALID;
    
    return GOS_OK;
}
コード例 #29
0
VOS_VOID USIMM_SingleCmdCnf(VOS_UINT32 ulReceiverPid, VOS_UINT32 ulMsgName, VOS_UINT32 ulResult)
{
    PS_USIM_SINGLECMD_CNF_STRU  *pUsimMsg;

    pUsimMsg = (PS_USIM_SINGLECMD_CNF_STRU*)VOS_AllocMsg(WUEPS_PID_USIM, (sizeof(PS_USIM_SINGLECMD_CNF_STRU)-VOS_MSG_HEAD_LENGTH));

    if (VOS_NULL_PTR == pUsimMsg)
    {
        USIMM_ERROR_LOG("USIMM_SingleCmdCnf: VOS_AllocMsg is Failed");

        return;
    }

    pUsimMsg->ulReceiverPid     = ulReceiverPid;
    pUsimMsg->ulMsgName         = ulMsgName;
    pUsimMsg->ulResult          = ulResult;

    (VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);

    return;
}
コード例 #30
0
ファイル: vos_log.c プロジェクト: KHATEEBNSIT/AP
GOS_ERROR_CODE LOG_EnableMem(const CHAR* logName, BOOL enable)
{
    LOG_ENABLEMEM_MSG_T msg;
    UINT32              len;

    if (NULL == logName)
    {
        return GOS_FAIL;
    }

    msg.enable = enable;
    len = strlen(logName);
    if (len > (LOG_NAME_MAX_LEN - 1))
    {
        len = LOG_NAME_MAX_LEN -1;
    }
    memcpy(msg.logName, logName, len);
    msg.logName[len] = '\0';

    return VOS_SendMsg(VOS_APPLID_LOG, LOG_MSG_ENABLEMEM, VOS_MSG_PRI_NORMAL, &msg, sizeof(LOG_ENABLEMEM_MSG_T));
}