/*================================================================ Copyright (c) 2018 Quectel Wireless Solution, Co., Ltd. All Rights Reserved. Quectel Wireless Solution Proprietary and Confidential. =================================================================*/ #ifndef __QUEC_NETWORK_H__ #define __QUEC_NETWORK_H__ #include "quec_common.h" #include "ci_ps.h" #include "ci_mm.h" #include "quec_atcmd_network.h" #ifdef QUECTEL_NETWORK_SUPPORT //connor 2018/11/16 typedef this struct for quec to use typedef struct mmExtendedSignal mmExtendedSignal_quec; #endif #ifdef QUEC_ATCMD_LOG #define Network_Info_Log(msg, ...) custom_log("NETWORK_INFO", msg, ##__VA_ARGS__) #else #define Network_Info_Log(msg, ...) #endif //used for distinguish diffrent action when use the same ASR API typedef enum { QNWINFO_GET=0, // qnwinfo QENG_SERVINGCELL_GET, //servingcell QENG_NEIGHBOURCELL_GET, //neighbourcell #ifdef QUECTEL_CELL CELL_GET, //neighbourcell get cellid #endif #ifdef QUEC_RSRP_SUPPORT RSRP_GET, #endif #ifdef QUEC_QCELLINFO_SUPPORT QCELLINFOEX_GET, #endif DRXTM, //add new here } quectel_eng_mode_query_e_type; #define QENG_SERVINGCELL_RXLEV_MAX 63 #define QUEC_QENG_RESBUFLEN_MIN 1024 #define QUEC_QENG_RESBUFLEN_MAX 16384 //used to distinguish diffrent action of qeng command typedef enum { QUECTEL_QENG_SCELL_MODE = 0, QUECTEL_QENG_NCELL_MODE, QUECTEL_QENG_3G_USUAL_INFO, //add new here QUECTEL_QENG_MAX_MODE }quectel_qeng_query_e_type; typedef struct { char state[10] ; char tdd_fdd[5] ; UINT16 mcc ; UINT16 mnc ; UINT16 pci; UINT32 cid; UINT16 tac; UINT32 earfcn; UINT8 band; UINT8 ul_bandwidth; UINT8 dl_bandwidth; INT16 rsrp; INT16 rsrq; INT16 rssi; INT16 sinr; INT16 srxlev; }Quec_LTE_scell_type; typedef struct { UINT64 u64PrevRxCnt; //which is used to record the rx cnt every time after power on and reset to 0 UINT64 u64TotalRxCnt; UINT64 u64PrevTxCnt; //which is used to record the tx cnt every time after power on and reset to 0 UINT64 u64TotalTxCnt; }QuecDataCntInfoType; extern CiPsNwRegInfo quec_cgreg_info; extern CiPs4GNwRegInfo quec_cereg_info; extern CiMmPrimRegResultInd quec_creg_info; extern UINT64 network_infor_bitmsk; UINT8 quec_regstatus_asr2quec(UINT8 asr_status, UINT8 need_attach); void quec_save_current_reg_mode(int CurrRegMode); UINT8 quec_get_ps_regstatus(void); UINT8 quec_get_regstatus(UINT8 need_attach); QuecOSStatus Quectel_GDCNTReadParamFromNV(void); QuecOSStatus Quectel_GDCNTSaveParamToNV(void); void Quectel_GDCNTUpdateAllCnt(void); QuecOSStatus Quectel_GDCNTResetAllCnt(void); quectel_qeng_query_e_type quec_qeng_get_monitor_type(char * monitor_type); int8 quec_assemble_qeng_resp(char * start, char * end); void quec_qeng_get_currrent_state(char * sate); quec_network_mode_type quec_get_current_rat(UINT32 athandle); #endif /* __QUEC_NETWORK_H__ */