9 #define SDU_HDR_LEN (3) 10 #define MINREQBKLEN (2048) 11 #define MSGID_AND_LEN (4) 12 #define MSGID_DONT_CARE (0xffff) 15 #define UNUSEDPARAM( x ) (void)x 18 #define DEAULT_LOC_TIMEOUT_IN_SEC 2 19 #define SDK_VALIDATE_INPUT_PACK_PARAM(pCtx, pBuf, pLen ) \ 20 if ((pCtx == NULL) || (pBuf == NULL) || (pLen == NULL) ) \ 22 libpack_log(eLOG_DEBUG,"[ pack] %s parameter NULL\n",__func__); \ 23 return eQCWWAN_ERR_INVALID_ARG; \ 26 #define SDK_VALIDATE_INPUT_PACK_PARAM_AND_FILL_XID(pCtx, pBuf, pLen ) \ 27 if ((pCtx == NULL) || (pBuf == NULL) || (pLen == NULL) ) \ 29 libpack_log(eLOG_DEBUG,"[ pack] %s parameter NULL\n",__func__); \ 30 return eQCWWAN_ERR_INVALID_ARG; \ 33 return eQCWWAN_ERR_INVALID_XID; \ 35 pBuf[1] = pCtx->xid & 0xff; \ 36 pBuf[2] = pCtx->xid >> 8; 38 typedef void (*
logger)(uint8_t lvl,
const char* buff);
void fill_pack_ctx(pack_qmi_t *pCtx, uint8_t *pReqBuf, uint16_t *pLen, uint8_t svc, int timeout)
int timeout
Definition: common.h:105
char * libpack_GetVersion()
const char * helper_get_resp_ctx(uint8_t svc, uint8_t *pbuf, uint32_t len, unpack_qmi_t *pCtx)
void libpack_log(uint8_t lvl, const char *fmt,...)
int helper_set_log_lvl(uint8_t lvl)
uint16_t helper_get_xid(uint8_t *qmi_resp)
eTimeout
Definition: common.h:56
uint16_t xid
Definition: common.h:119
uint16_t xid
Definition: common.h:104
uint16_t msgid
Definition: common.h:106
void(* logger)(uint8_t lvl, const char *buff)
Definition: common.h:38
void fill_sdu_hdr(pack_qmi_t *pCtx, uint8_t *pReqBuf)
uint8_t svc
Definition: common.h:107
int helper_set_log_func(logger func)
uint16_t msgid
Definition: common.h:118
unsigned unpack_result_code_only(uint8_t *pMdmResp)
eLOG_LEVEL
Definition: common.h:46
eQMI_SVC
Definition: common.h:72
msgtype
Definition: common.h:90