15 #define SDU_HDR_LEN (3)
16 #define MINREQBKLEN (2048)
17 #define MSGID_AND_LEN (4)
18 #define MSGID_DONT_CARE (0xffff)
21 #define UNUSEDPARAM( x ) (void)x
24 #define DEAULT_LOC_TIMEOUT_IN_SEC 2
25 #define SDK_VALIDATE_INPUT_PACK_PARAM(pCtx, pBuf, pLen ) \
26 if ((pCtx == NULL) || (pBuf == NULL) || (pLen == NULL) ) \
28 liteqmi_log(eLOG_DEBUG,"[ pack] %s parameter NULL\n",__func__); \
29 return eQCWWAN_ERR_INVALID_ARG; \
32 #define SDK_VALIDATE_INPUT_PACK_PARAM_AND_FILL_XID(pCtx, pBuf, pLen ) \
33 if ((pCtx == NULL) || (pBuf == NULL) || (pLen == NULL) ) \
35 liteqmi_log(eLOG_DEBUG,"[ pack] %s parameter NULL\n",__func__); \
36 return eQCWWAN_ERR_INVALID_ARG; \
39 return eQCWWAN_ERR_INVALID_XID; \
41 pBuf[1] = pCtx->xid & 0xff; \
42 pBuf[2] = pCtx->xid >> 8;
44 #define SDK_VALIDATE_INPUT_UNPACK_PARAM(pResp, respLen, pOutput ) \
45 if ((pResp == NULL) || (respLen == 0) || (pOutput == NULL) ) \
47 liteqmi_log(eLOG_DEBUG,"[ unpack] %s parameter NULL or invalid\n",__func__); \
48 return eQCWWAN_ERR_INVALID_ARG; \
51 typedef void (*
logger)(uint8_t lvl,
const char* buff);
231 uint8_t *encoded_str,
252 #define SWI_INIT_UNPACK_RESULT_VALUE {0, SWI_UINT256_INT_VALUE}
void fill_pack_ctx(pack_qmi_t *pCtx, uint8_t *pReqBuf, uint16_t *pLen, uint8_t svc, int timeout)
int timeout
Definition: common.h:130
char * helper_get_error_reason(uint16_t retVal)
const char * helper_get_resp_ctx(uint8_t svc, uint8_t *pbuf, uint32_t len, unpack_qmi_t *pCtx)
int helper_set_log_func(logger *func)
uint16_t Tlvresult
Definition: common.h:260
int helper_set_log_lvl(uint8_t lvl)
uint16_t helper_get_xid(uint8_t *qmi_resp)
eTimeout
Definition: common.h:69
uint16_t xid
Definition: common.h:144
uint16_t xid
Definition: common.h:129
void liteqmi_log(uint8_t lvl, const char *fmt,...)
uint16_t msgid
Definition: common.h:131
const char * helper_get_req_str(uint8_t svc, uint8_t *req, uint32_t len)
int helper_isBootLoader_DebugEnabled(const char *szPath, const char *pQsn)
void liteqmi_helper_decode7bitAsciiEncString(uint8_t *encoded_str, uint8_t encoded_len, uint8_t *decoded_str)
char * liteqmi_GetVersion()
uint16_t helper_get_error_code(uint8_t *qmi_resp)
void(* logger)(uint8_t lvl, const char *buff)
Definition: common.h:51
void fill_sdu_hdr(pack_qmi_t *pCtx, uint8_t *pReqBuf)
uint8_t svc
Definition: common.h:132
uint16_t msgid
Definition: common.h:143
unsigned unpack_result_code_only(uint8_t *pMdmResp)
Definition: switype_256bit.h:15
eLOG_LEVEL
Definition: common.h:59
eQMI_SVC
Definition: common.h:85
swi_uint256_t ParamPresenceMask
Definition: common.h:261
msgtype
Definition: common.h:115