本文整理匯總了C++中At_sprintf函數的典型用法代碼示例。如果您正苦於以下問題:C++ At_sprintf函數的具體用法?C++ At_sprintf怎麽用?C++ At_sprintf使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了At_sprintf函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: At_TestCgeqreqPara
VOS_UINT32 At_TestCgeqreqPara(VOS_UINT8 ucIndex)
{
VOS_UINT16 usLength;
usLength = (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,(VOS_CHAR *)pgucAtSndCodeAddr,
"%s: \"IP\",%s%s",
g_stParseContext[ucIndex].pstCmdElement->pszCmdName,
CGEQREQ_TEST_CMD_PARA_STRING,
gaucAtCrLf);
#if (FEATURE_ON == FEATURE_IPV6)
usLength += (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,(VOS_CHAR *)pgucAtSndCodeAddr + usLength,
"%s: \"IPV6\",%s%s",
g_stParseContext[ucIndex].pstCmdElement->pszCmdName,
CGEQREQ_TEST_CMD_PARA_STRING,
gaucAtCrLf);
usLength += (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,(VOS_CHAR *)pgucAtSndCodeAddr + usLength,
"%s: \"IPV4V6\",%s",
g_stParseContext[ucIndex].pstCmdElement->pszCmdName,
CGEQREQ_TEST_CMD_PARA_STRING);
#endif
gstAtSendData.usBufLen = usLength;
return AT_OK;
}
示例2: atQryDLoadInfoCnf
VOS_UINT32 atQryDLoadInfoCnf(VOS_UINT8 ucClientId, VOS_VOID *pMsgBlock)
{
FTM_RD_DLOADINFO_CNF_STRU *pstCnf = NULL;
OS_MSG_STRU*pEvent = NULL;
gstLAtSendData.usBufLen = 0;
pEvent = (OS_MSG_STRU*)(((MsgBlock*)pMsgBlock)->aucValue);
pstCnf = (FTM_RD_DLOADINFO_CNF_STRU *)pEvent->ulParam1;
if(NULL == pstCnf)
{
CmdErrProc(ucClientId, ERR_MSP_FAILURE, 0, NULL);
return AT_OK;
}
if(pstCnf->ulErrCode != ERR_MSP_SUCCESS)
{
CmdErrProc(ucClientId, pstCnf->ulErrCode, 0, NULL);
return AT_OK;
}
else
{
gstLAtSendData.usBufLen = 0;
gstLAtSendData.usBufLen = (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)(pgucLAtSndCodeAddr),
(VOS_CHAR*)(pgucLAtSndCodeAddr + gstLAtSendData.usBufLen),
"\r\nswver:%s\r\n",
pstCnf->szSendSW
);
gstLAtSendData.usBufLen += (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)(pgucLAtSndCodeAddr),
(VOS_CHAR*)(pgucLAtSndCodeAddr+ gstLAtSendData.usBufLen),
"\r\nisover:%s\r\n",
pstCnf->szSendISO
);
gstLAtSendData.usBufLen += (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)(pgucLAtSndCodeAddr),
(VOS_CHAR*)(pgucLAtSndCodeAddr+ gstLAtSendData.usBufLen),
"\r\nproduct name:%s\r\n",
pstCnf->szSendProductID
);
gstLAtSendData.usBufLen += (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)(pgucLAtSndCodeAddr),
(VOS_CHAR*)(pgucLAtSndCodeAddr+ gstLAtSendData.usBufLen),
"\r\ndload type:%s\r\n",
pstCnf->szSendDloadType
);
CmdErrProc(ucClientId, pstCnf->ulErrCode, gstLAtSendData.usBufLen, pgucLAtSndCodeAddr);
}
return AT_OK;
}
示例3: AT_RcvImsaCireguInd
VOS_UINT32 AT_RcvImsaCireguInd(VOS_VOID * pMsg)
{
/* 定義局部變量 */
IMSA_AT_CIREGU_IND_STRU *pstCireguInd;
VOS_UINT8 ucIndex;
VOS_UINT16 usLength;
/* 初始化消息變量 */
ucIndex = 0;
usLength = 0;
pstCireguInd = (IMSA_AT_CIREGU_IND_STRU *)pMsg;
/* 通過ClientId獲取ucIndex */
if ( AT_FAILURE == At_ClientIdToUserId(pstCireguInd->usClientId, &ucIndex) )
{
AT_WARN_LOG("AT_RcvImsaCireguInd: WARNING:AT INDEX NOT FOUND!");
return VOS_ERR;
}
/* 判斷查詢操作是否成功 */
usLength += (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR *)pgucAtSndCodeAddr,
"%s%s: %d",
gaucAtCrLf,
gastAtStringTab[AT_STRING_CIREGU].pucText,
pstCireguInd->ulRegInfo);
/* 如果IMS未注冊,<ext_info>參數無意義 */
if ((VOS_FALSE != pstCireguInd->ulRegInfo) && (VOS_FALSE != pstCireguInd->bitOpExtInfo))
{
usLength += (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR *)pgucAtSndCodeAddr + usLength,
",%d",
pstCireguInd->ulExtInfo);
}
usLength += (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR *)pgucAtSndCodeAddr + usLength,
"%s",
gaucAtCrLf);
gstAtSendData.usBufLen = usLength;
At_SendResultData(ucIndex, pgucAtSndCodeAddr, gstAtSendData.usBufLen);
return VOS_OK;
}
示例4: atSetNVBackupCnf
VOS_UINT32 atSetNVBackupCnf(VOS_UINT8 ucClientId,VOS_VOID *pMsgBlock)
{
FTM_SET_NVBACKUP_CNF_STRU *pstCnf = NULL;
OS_MSG_STRU*pEvent = NULL;
gstLAtSendData.usBufLen = 0;
pEvent = (OS_MSG_STRU*)(((MsgBlock*)pMsgBlock)->aucValue);
pstCnf = (FTM_SET_NVBACKUP_CNF_STRU *)pEvent->ulParam1;
if(NULL == pstCnf)
{
CmdErrProc(ucClientId, ERR_MSP_FAILURE, 0, NULL);
return AT_OK;
}
if(pstCnf->ulErrCode != ERR_MSP_SUCCESS)
{
CmdErrProc(ucClientId, pstCnf->ulErrCode, 0, NULL);
return AT_OK;
}
else
{
g_atNvBackupFlag++;
gstLAtSendData.usBufLen = (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucLAtSndCodeAddr,
(VOS_CHAR*)pgucLAtSndCodeAddr,
"\r\n%d\r\n",
pstCnf->ulRetValue
);
CmdErrProc(ucClientId, pstCnf->ulErrCode, gstLAtSendData.usBufLen, pgucLAtSndCodeAddr);
}
return AT_OK;
}
示例5: atQryAuthorityIDCnf
VOS_UINT32 atQryAuthorityIDCnf(VOS_UINT8 ucClientId,VOS_VOID *pMsgBlock)
{
FTM_RD_AUTHORITYID_CNF_STRU *pstCnf = NULL;
OS_MSG_STRU*pEvent = NULL;
gstLAtSendData.usBufLen = 0;
pEvent = (OS_MSG_STRU*)(((MsgBlock*)pMsgBlock)->aucValue);
pstCnf = (FTM_RD_AUTHORITYID_CNF_STRU *)pEvent->ulParam1;
if(NULL == pstCnf)
{
CmdErrProc(ucClientId, ERR_MSP_FAILURE, 0, NULL);
return AT_OK;
}
if(pstCnf->ulErrCode != ERR_MSP_SUCCESS)
{
CmdErrProc(ucClientId, pstCnf->ulErrCode, 0, NULL);
return AT_OK;
}
else
{
gstLAtSendData.usBufLen = (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR*)pgucLAtSndCodeAddr,
(VOS_CHAR*)pgucLAtSndCodeAddr,
"\r\n%s,%s\r\n",
pstCnf->szAuthorityID,pstCnf->szAuthorityType
);
CmdErrProc(ucClientId, pstCnf->ulErrCode, gstLAtSendData.usBufLen, pgucLAtSndCodeAddr);
}
return AT_OK;
}
示例6: atSetNVRstSTTSCnf
VOS_UINT32 atSetNVRstSTTSCnf(VOS_UINT8 ucClientId,VOS_VOID *pMsgBlock)
{
FTM_SET_NVRSTSTTS_CNF_STRU *pstCnf = NULL;
OS_MSG_STRU*pEvent = NULL;
gstLAtSendData.usBufLen = 0;
/* VOS_BOOL bRet = TRUE;
*/
pEvent = (OS_MSG_STRU*)(((MsgBlock*)pMsgBlock)->aucValue);
pstCnf = (FTM_SET_NVRSTSTTS_CNF_STRU *)pEvent->ulParam1;
if(NULL == pstCnf)
{
CmdErrProc(ucClientId, ERR_MSP_FAILURE, 0, NULL);
return AT_OK;
}
if(pstCnf->ulErrCode != ERR_MSP_SUCCESS)
{
CmdErrProc(ucClientId, pstCnf->ulErrCode, 0, NULL);
return AT_OK;
}
else
{
gstLAtSendData.usBufLen = (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucLAtSndCodeAddr,
(VOS_CHAR*)pgucLAtSndCodeAddr,
"\r\n%s\r\n",
pstCnf->szNVRst
);
CmdErrProc(ucClientId, pstCnf->ulErrCode, gstLAtSendData.usBufLen, pgucLAtSndCodeAddr);
}
return AT_OK;
}
示例7: atQryBootRomVerCnf
/* BEGIN: To_Be_Deleted_V7R2 */
VOS_UINT32 atQryBootRomVerCnf(VOS_UINT8 ucClientId,VOS_VOID *pMsgBlock)
{
FTM_RD_BOOTROMVER_CNF_STRU *pstCnf = NULL;
OS_MSG_STRU*pEvent = NULL;
gstLAtSendData.usBufLen = 0;
pEvent = (OS_MSG_STRU*)(((MsgBlock*)pMsgBlock)->aucValue);
pstCnf = (FTM_RD_BOOTROMVER_CNF_STRU *)pEvent->ulParam1;
if(NULL == pstCnf)
{
CmdErrProc(ucClientId, ERR_MSP_FAILURE, 0, NULL);
return AT_OK;
}
if(pstCnf->ulErrCode != ERR_MSP_SUCCESS)
{
CmdErrProc(ucClientId, pstCnf->ulErrCode, 0, NULL);
return AT_OK;
}
else
{
gstLAtSendData.usBufLen = (VOS_UINT16)At_sprintf(
AT_CMD_MAX_LEN,
(VOS_CHAR *)(pgucLAtSndCodeAddr),
(VOS_CHAR *)(pgucLAtSndCodeAddr + gstLAtSendData.usBufLen),
"\r\n%s\r\n",
pstCnf->szSendStr
);
CmdErrProc(ucClientId, pstCnf->ulErrCode, gstLAtSendData.usBufLen, pgucLAtSndCodeAddr);
}
return AT_OK;
}
示例8: atQryDLoadVer
VOS_UINT32 atQryDLoadVer(VOS_UINT8 ucClientId)
{
VOS_UINT32 ulRst = AT_OK;
VOS_UINT8* pData = NULL;
gstAtSendData.usBufLen = 0;
pData = VOS_MemAlloc(WUEPS_PID_AT, (DYNAMIC_MEM_PT), UPGRADE_STR_BUF_SIZE);
if(NULL == pData)
{
CmdErrProc(ucClientId, ERR_MSP_MALLOC_FAILUE, 0, NULL);
return AT_ERROR;
}
MSP_MEMSET(pData,0,UPGRADE_STR_BUF_SIZE);
ulRst = BSP_DLOAD_GetDloadVer((BSP_CHAR *)pData,UPGRADE_STR_BUF_SIZE);
if(ulRst != ERR_MSP_SUCCESS)
{
VOS_MemFree(WUEPS_PID_AT, pData);
CmdErrProc(ucClientId, ulRst, 0, NULL);
return AT_ERROR;
}
gstAtSendData.usBufLen = (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR*)pgucAtSndCodeAddr,
"\r%s\r",
pData
);
VOS_MemFree(WUEPS_PID_AT, pData);
return AT_OK;
}
示例9: atQryFCHANParaCnfProc
VOS_UINT32 atQryFCHANParaCnfProc(VOS_UINT8 ucClientId, VOS_VOID *pMsgBlock)
{
FTM_RD_FCHAN_CNF_STRU *pstCnf = NULL;
OS_MSG_STRU*pEvent = NULL;
VOS_UINT16 usLength = 0;
pEvent = (OS_MSG_STRU*)(((MsgBlock*)pMsgBlock)->aucValue);
pstCnf = (FTM_RD_FCHAN_CNF_STRU *)pEvent->ulParam1;
if(NULL == pstCnf)
{
return ERR_MSP_FAILURE;
}
usLength += (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucLAtSndCodeAddr,
(VOS_CHAR *)pgucLAtSndCodeAddr + usLength,
"^FCHAN:%d,%d,%d,%d",
pstCnf->enFchanMode,
pstCnf->ucBand,
pstCnf->usUlChannel,
pstCnf->usDlChannel);
CmdErrProc(ucClientId, pstCnf->ulErrCode, usLength, pgucLAtSndCodeAddr);
return AT_FW_CLIENT_STATUS_READY;
}
示例10: AT_RcvImsaCirepiInd
VOS_UINT32 AT_RcvImsaCirepiInd(VOS_VOID * pMsg)
{
/* 定義局部變量 */
IMSA_AT_CIREPI_IND_STRU *pstCirepiInd;
VOS_UINT8 ucIndex;
/* 初始化消息變量 */
ucIndex = 0;
pstCirepiInd = (IMSA_AT_CIREPI_IND_STRU *)pMsg;
/* 通過ClientId獲取ucIndex */
if ( AT_FAILURE == At_ClientIdToUserId(pstCirepiInd->usClientId, &ucIndex) )
{
AT_WARN_LOG("AT_RcvImsaCirepiInd: WARNING:AT INDEX NOT FOUND!");
return VOS_ERR;
}
/* 判斷查詢操作是否成功 */
gstAtSendData.usBufLen = (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR *)pgucAtSndCodeAddr,
"%s%s: %d%s",
gaucAtCrLf,
gastAtStringTab[AT_STRING_CIREPI].pucText,
pstCirepiInd->enImsvops,
gaucAtCrLf);
At_SendResultData(ucIndex, pgucAtSndCodeAddr, gstAtSendData.usBufLen);
return VOS_OK;
}
示例11: AT_RcvImsaMtStateInd
VOS_UINT32 AT_RcvImsaMtStateInd(VOS_VOID * pMsg)
{
/* 定義局部變量 */
IMSA_AT_MT_STATES_IND_STRU *pstMtStatusInd;
VOS_UINT8 ucIndex;
VOS_CHAR acString[AT_IMSA_CALL_ASCII_NUM_MAX_LENGTH + 1];
/* 初始化消息變量 */
ucIndex = 0;
pstMtStatusInd = (IMSA_AT_MT_STATES_IND_STRU*)pMsg;
/* 通過ClientId獲取ucIndex */
if ( AT_FAILURE == At_ClientIdToUserId(pstMtStatusInd->usClientId, &ucIndex) )
{
AT_WARN_LOG("AT_RcvImsaImpuSetCnf: WARNING:AT INDEX NOT FOUND!");
return VOS_ERR;
}
VOS_MemSet(acString, 0, sizeof(acString));
VOS_MemCpy(acString, pstMtStatusInd->aucAsciiCallNum, AT_IMSA_CALL_ASCII_NUM_MAX_LENGTH);
gstAtSendData.usBufLen= (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR *)pgucAtSndCodeAddr,
"%s^IMSMTRPT: %s,%d,%d%s",
gaucAtCrLf,
acString,
pstMtStatusInd->ucMtStatus,
pstMtStatusInd->ulCauseCode,
gaucAtCrLf);
/* 調用At_SendResultData發送命令結果 */
At_SendResultData(ucIndex, pgucAtSndCodeAddr, gstAtSendData.usBufLen);
return VOS_OK;
}
示例12: atSetNVFactoryRestore
VOS_UINT32 atSetNVFactoryRestore(VOS_UINT8 ucClientId)
{
VOS_UINT32 ulRst = AT_OK;
/*因為MODEN撥號會下發該命令,所以在moden口不進行NV恢複,直接返回OK*/
if ( AT_MODEM_USER == gastAtClientTab[ucClientId].UserType )
{
return AT_OK;
}
ulRst = NVM_RevertFNV();
if(ulRst != ERR_MSP_SUCCESS)
{
CmdErrProc(ucClientId, ulRst, 0, NULL);
return AT_ERROR;
}
gstAtSendData.usBufLen = (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR*)pgucAtSndCodeAddr,
"\r%d\r",
ulRst
);
return AT_OK;
}
示例13: atQryAuthorityVer
VOS_UINT32 atQryAuthorityVer(VOS_UINT8 ucClientId)
{
VOS_UINT32 ulRst = AT_OK;
VOS_UINT32 ulAuthorityVer = 0;
VOS_UINT8 ucVer[4] ={0};
VOS_UINT32 i = 0;
ulRst = At_GetNvAuthorityVer(&ulAuthorityVer);
if(ulRst != ERR_MSP_SUCCESS)
{
CmdErrProc(ucClientId, ulRst, 0, NULL);
return AT_ERROR;
}
MSP_MEMCPY(ucVer,&ulAuthorityVer,sizeof(VOS_UINT32));
for(i = 0;i < 4;i++)
{
ucVer[i] = (ucVer[i] > 9 ? 0 : ucVer[i]) + '0'; /**/
}
gstAtSendData.usBufLen = 0;
gstAtSendData.usBufLen = (VOS_UINT16)At_sprintf( AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR*)pgucAtSndCodeAddr,
"\r%s\r",
ucVer
);
return AT_OK;
}
示例14: AT_RcvImsaCirepQryCnf
VOS_UINT32 AT_RcvImsaCirepQryCnf(VOS_VOID * pMsg)
{
/* 定義局部變量 */
IMSA_AT_CIREP_QRY_CNF_STRU *pstCirepCnf;
VOS_UINT8 ucIndex;
VOS_UINT32 ulResult;
/* 初始化消息變量 */
ucIndex = 0;
pstCirepCnf = (IMSA_AT_CIREP_QRY_CNF_STRU *)pMsg;
/* 通過ClientId獲取ucIndex */
if ( AT_FAILURE == At_ClientIdToUserId(pstCirepCnf->usClientId, &ucIndex) )
{
AT_WARN_LOG("AT_RcvImsaCirepQryCnf: WARNING:AT INDEX NOT FOUND!");
return VOS_ERR;
}
if (AT_IS_BROADCAST_CLIENT_INDEX(ucIndex))
{
AT_WARN_LOG("AT_RcvImsaCirepQryCnf: WARNING:AT_BROADCAST_INDEX!");
return VOS_ERR;
}
/* 判斷當前操作類型是否為AT_CMD_CIREP_QRY */
if ( AT_CMD_CIREP_QRY != gastAtClientTab[ucIndex].CmdCurrentOpt )
{
AT_WARN_LOG("AT_RcvImsaCirepQryCnf: WARNING:Not AT_CMD_CIREP_QRY!");
return VOS_ERR;
}
/* 複位AT狀態 */
AT_STOP_TIMER_CMD_READY(ucIndex);
/* 判斷查詢操作是否成功 */
if ( VOS_OK == pstCirepCnf->ulResult )
{
gstAtSendData.usBufLen= (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN,
(VOS_CHAR *)pgucAtSndCodeAddr,
(VOS_CHAR *)pgucAtSndCodeAddr,
"%s: %d,%d",
g_stParseContext[ucIndex].pstCmdElement->pszCmdName,
pstCirepCnf->enReport,
pstCirepCnf->enImsvops);
ulResult = AT_OK;
}
else
{
gstAtSendData.usBufLen = 0;
ulResult = AT_ERROR;
}
/* 調用At_FormatResultData發送命令結果 */
At_FormatResultData(ucIndex, ulResult);
return VOS_OK;
}
示例15: At_TestAuhtdata
VOS_UINT32 At_TestAuhtdata(VOS_UINT8 ucIndex)
{
VOS_UINT16 usLength = 0;
#if (FEATURE_ON == FEATURE_LTE)
usLength = (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN, (VOS_CHAR *)pgucAtSndCodeAddr, (VOS_CHAR *)pgucAtSndCodeAddr,
"%s: (0-31),(0-2),,",
g_stParseContext[ucIndex].pstCmdElement->pszCmdName);
#else
usLength = (VOS_UINT16)At_sprintf(AT_CMD_MAX_LEN, (VOS_CHAR *)pgucAtSndCodeAddr, (VOS_CHAR *)pgucAtSndCodeAddr,
"%s: (1-11),(0-2),,",
g_stParseContext[ucIndex].pstCmdElement->pszCmdName);
#endif
gstAtSendData.usBufLen = usLength;
return AT_OK;
}