b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame^] | 1 | /** |
| 2 | *@file QSER_nw.h |
| 3 | *@date 2018-02-22 |
| 4 | *@author |
| 5 | *@brief |
| 6 | */ |
| 7 | #ifndef __LYNQ_QSER_NETWORK_H__ |
| 8 | #define __LYNQ_QSER_NETWORK_H__ |
| 9 | #ifdef __cplusplus |
| 10 | extern "C" { |
| 11 | #endif |
| 12 | #include "mbtk_type.h" |
| 13 | |
| 14 | typedef uint32_t nw_client_handle_type; |
| 15 | |
| 16 | |
| 17 | #define QSER_NW_MODE_NONE 0x00 /**< No network. */ |
| 18 | #define QSER_NW_MODE_GSM 0x01 /**< Include GSM networks. */ |
| 19 | #define QSER_NW_MODE_WCDMA 0x02 /**< Include WCDMA networks. */ |
| 20 | #define QSER_NW_MODE_CDMA 0x04 /**< Include CDMA networks. */ |
| 21 | #define QSER_NW_MODE_EVDO 0x08 /**< Include EVDO networks. */ |
| 22 | #define QSER_NW_MODE_LTE 0x10 /**< Include LTE networks. */ |
| 23 | #define QSER_NW_MODE_TDSCDMA 0x20 /**< Include TDSCDMA networks. */ |
| 24 | |
| 25 | typedef enum |
| 26 | { |
| 27 | E_QSER_NW_ROAM_STATE_OFF = 0, /**< None, or roaming indicator off. */ |
| 28 | E_QSER_NW_ROAM_STATE_ON = 1 /**< Roaming indicator on. */ |
| 29 | }E_QSER_NW_ROAM_STATE_TYPE_T; |
| 30 | |
| 31 | /** Configures the settings that define the MCM network interface. */ |
| 32 | typedef struct |
| 33 | { |
| 34 | /* Configuration parameters for MCM network registration Network registration details Technology dependent network registration details */ |
| 35 | uint64_t preferred_nw_mode; /**< Preferred network mode for connections; a bitmask of QSER_NW_MODE_xxxx.*/ |
| 36 | E_QSER_NW_ROAM_STATE_TYPE_T roaming_pref; /**< Roaming preference.*/ |
| 37 | }QSER_NW_CONFIG_INFO_T; |
| 38 | |
| 39 | typedef enum |
| 40 | { |
| 41 | E_QSER_NW_IMS_MODE_OFF = 0, /**< close ims. */ |
| 42 | E_QSER_NW_IMS_MODE_VOLTE_ENABLE = 1, /**< support volte. */ |
| 43 | }E_QSER_NW_IMS_MODE_TYPE_T; |
| 44 | |
| 45 | /** Configures the OOS (out of service) settings that define the MCM network interface. */ |
| 46 | #define QSER_NW_OOS_CFG_TYPE_FAST_SCAN 0x00 /**< fast net scan */ |
| 47 | #define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN 0x01 /**< full band scan */ |
| 48 | |
| 49 | typedef struct |
| 50 | { |
| 51 | /* Configuration parameters for MCM network fast network scan when OOS (out of service)*/ |
| 52 | char enable; |
| 53 | uint16_t time_interval; |
| 54 | }QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T; |
| 55 | |
| 56 | typedef struct |
| 57 | { |
| 58 | /* Configuration parameters for MCM network full band network scan when OOS (out of service)*/ |
| 59 | int t_min; |
| 60 | int t_step; |
| 61 | int t_num; |
| 62 | int t_max; |
| 63 | }QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T; |
| 64 | |
| 65 | |
| 66 | typedef struct |
| 67 | { |
| 68 | char type; /**< QSER_NW_OOS_CFG_TYPE_xxxx.*/ |
| 69 | union { |
| 70 | QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T fast_can_info; // 00 |
| 71 | QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T full_band_scan_info; // 01 |
| 72 | } u; |
| 73 | }QSER_NW_OOS_CONFIG_INFO_T; |
| 74 | |
| 75 | //defined for QSER_NW_EventRegister |
| 76 | #define NW_IND_VOICE_REG_EVENT_IND_FLAG (1 << 0) /**< msg format : QSER_NW_VOICE_REG_EVENT_IND_T */ |
| 77 | #define NW_IND_DATA_REG_EVENT_IND_FLAG (1 << 1) /**< msg format : QSER_NW_DATA_REG_EVENT_IND_T */ |
| 78 | #define NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG (1 << 2) /**< msg format : QSER_NW_SINGNAL_EVENT_IND_T */ |
| 79 | //#define NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG (1 << 3) /**< msg format : QL_MCM_NW_CELL_ACCESS_STATE_EVENT_IND_T */ |
| 80 | //#define NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG (1 << 4) /**< msg format : QL_MCM_NW_NITZ_TIME_EVENT_IND_T */ |
| 81 | #define NW_IND_IMS_REG_EVENT_IND_FLAG (1 << 5) /**< msg format : NULL */ |
| 82 | |
| 83 | typedef struct |
| 84 | { |
| 85 | char long_eons[512 + 1]; /**< Long EONS.*/ |
| 86 | char short_eons[512 + 1]; /**< Short EONS.*/ |
| 87 | char mcc[10]; /**< Mobile country code.*/ |
| 88 | char mnc[10]; /**< Mobile network code.*/ |
| 89 | }QSER_NW_OPERATOR_NAME_INFO_T; |
| 90 | |
| 91 | typedef enum |
| 92 | { |
| 93 | E_QSER_NW_RADIO_TECH_TD_SCDMA = 1, |
| 94 | E_QSER_NW_RADIO_TECH_GSM = 2, /**< GSM; only supports voice. */ |
| 95 | E_QSER_NW_RADIO_TECH_HSPAP = 3, /**< HSPA+. */ |
| 96 | E_QSER_NW_RADIO_TECH_LTE = 4, /**< LTE. */ |
| 97 | E_QSER_NW_RADIO_TECH_EHRPD = 5, /**< EHRPD. */ |
| 98 | E_QSER_NW_RADIO_TECH_EVDO_B = 6, /**< EVDO B. */ |
| 99 | E_QSER_NW_RADIO_TECH_HSPA = 7, /**< HSPA. */ |
| 100 | E_QSER_NW_RADIO_TECH_HSUPA = 8, /**< HSUPA. */ |
| 101 | E_QSER_NW_RADIO_TECH_HSDPA = 9, /**< HSDPA. */ |
| 102 | E_QSER_NW_RADIO_TECH_EVDO_A = 10, /**< EVDO A. */ |
| 103 | E_QSER_NW_RADIO_TECH_EVDO_0 = 11, /**< EVDO 0. */ |
| 104 | E_QSER_NW_RADIO_TECH_1xRTT = 12, /**< 1xRTT. */ |
| 105 | E_QSER_NW_RADIO_TECH_IS95B = 13, /**< IS95B. */ |
| 106 | E_QSER_NW_RADIO_TECH_IS95A = 14, /**< IS95A. */ |
| 107 | E_QSER_NW_RADIO_TECH_UMTS = 15, /**< UMTS. */ |
| 108 | E_QSER_NW_RADIO_TECH_EDGE = 16, /**< EDGE. */ |
| 109 | E_QSER_NW_RADIO_TECH_GPRS = 17, /**< GPRS. */ |
| 110 | E_QSER_NW_RADIO_TECH_NONE = 18 /**< No technology selected. */ |
| 111 | }E_QSER_NW_RADIO_TECH_TYPE_T; |
| 112 | |
| 113 | |
| 114 | typedef enum |
| 115 | { |
| 116 | E_QSER_NW_TECH_DOMAIN_NONE = 0, /**< None. */ |
| 117 | E_QSER_NW_TECH_DOMAIN_3GPP = 1, /**< 3GPP. */ |
| 118 | E_QSER_NW_TECH_DOMAIN_3GPP2 = 2, /**< 3GPP2. */ |
| 119 | }E_QSER_NW_TECH_DOMAIN_TYPE_T; |
| 120 | |
| 121 | typedef enum |
| 122 | { |
| 123 | E_QSER_NW_IMSI_UNKNOWN_HLR_DENY_REASON = 1, /**< IMSI unknown in HLR. */ |
| 124 | E_QSER_NW_ILLEGAL_MS_DENY_REASON = 2, /**< Illegal MS. */ |
| 125 | E_QSER_NW_IMSI_UNKNOWN_VLR_DENY_REASON = 3, /**< IMSI unknown in VLR. */ |
| 126 | E_QSER_NW_IMEI_NOT_ACCEPTED_DENY_REASON = 4, /**< IMEI not accepted. */ |
| 127 | E_QSER_NW_ILLEGAL_ME_DENY_REASON = 5, /**< Illegal ME. */ |
| 128 | E_QSER_NW_PLMN_NOT_ALLOWED_DENY_REASON = 6, /**< PLMN not allowed. */ |
| 129 | E_QSER_NW_LA_NOT_ALLOWED_DENY_REASON = 7, /**< Location area not allowed. */ |
| 130 | E_QSER_NW_ROAMING_NOT_ALLOWED_LA_DENY_REASON = 8, /**< Roaming not allowed in this location area. */ |
| 131 | E_QSER_NW_NO_SUITABLE_CELLS_LA_DENY_REASON = 9, /**< No suitable cells in location area. */ |
| 132 | E_QSER_NW_NETWORK_FAILURE_DENY_REASON = 10, /**< Network failure. */ |
| 133 | E_QSER_NW_MAC_FAILURE_DENY_REASON = 11, /**< MAC failure. */ |
| 134 | E_QSER_NW_SYNCH_FAILURE_DENY_REASON = 12, /**< Sync failure. */ |
| 135 | E_QSER_NW_CONGESTION_DENY_REASON = 13, /**< Congestion. */ |
| 136 | E_QSER_NW_GSM_AUTHENTICATION_UNACCEPTABLE_DENY_REASON = 14, /**< GSM authentication unacceptable. */ |
| 137 | E_QSER_NW_NOT_AUTHORIZED_CSG_DENY_REASON = 15, /**< Not authorized in this CSG. */ |
| 138 | E_QSER_NW_SERVICE_OPTION_NOT_SUPPORTED_DENY_REASON = 16, /**< Service option not supported. */ |
| 139 | E_QSER_NW_REQ_SERVICE_OPTION_NOT_SUBSCRIBED_DENY_REASON = 17, /**< Requested service option not subscribed. */ |
| 140 | E_QSER_NW_CALL_CANNOT_BE_IDENTIFIED_DENY_REASON = 18, /**< Call cannot be identified. */ |
| 141 | E_QSER_NW_SEMANTICALLY_INCORRECT_MSG_DENY_REASON = 19, /**< Semantically incorrect message. */ |
| 142 | E_QSER_NW_INVALID_MANDATORY_INFO_DENY_REASON = 20, /**< Invalid mandatory information. */ |
| 143 | E_QSER_NW_MSG_TYPE_NON_EXISTENT_DENY_REASON = 21, /**< Message type non-existent or not implemented. */ |
| 144 | E_QSER_NW_INFO_ELEMENT_NON_EXISTENT_DENY_REASON = 22, /**< Message type not compatible with the protocol state. */ |
| 145 | E_QSER_NW_CONDITIONAL_IE_ERR_DENY_REASON = 23, /**< Conditional IE error. */ |
| 146 | E_QSER_NW_MSG_INCOMPATIBLE_PROTOCOL_STATE_DENY_REASON = 24, /**< Message not compatible with the protocol state. */ |
| 147 | E_QSER_NW_PROTOCOL_ERROR_DENY_REASON = 25, /**< Unspecified protocol error. */ |
| 148 | }E_QSER_NW_DENY_REASON_TYPE_T; |
| 149 | |
| 150 | |
| 151 | typedef enum |
| 152 | { |
| 153 | E_QSER_NW_SERVICE_NONE = 0x0000, /**< Not registered or no data. */ |
| 154 | E_QSER_NW_SERVICE_LIMITED = 0x0001, /**< Registered; emergency service only. */ |
| 155 | E_QSER_NW_SERVICE_FULL = 0x0002, /**< Registered, full service. */ |
| 156 | }E_QSER_NW_SERVICE_TYPE_T; |
| 157 | |
| 158 | typedef struct |
| 159 | { |
| 160 | E_QSER_NW_TECH_DOMAIN_TYPE_T tech_domain; /**< Technology, used to determine the structure type tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/ |
| 161 | E_QSER_NW_RADIO_TECH_TYPE_T radio_tech; /**< Radio technology; see #nw_radio_tech_t_v01.*/ |
| 162 | E_QSER_NW_ROAM_STATE_TYPE_T roaming; /**< 0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/ |
| 163 | E_QSER_NW_DENY_REASON_TYPE_T deny_reason; /**< Set when registration state is #nw_deny_reason_t_v01.*/ |
| 164 | E_QSER_NW_SERVICE_TYPE_T registration_state; /**< Registration state.*/ |
| 165 | }QSER_NW_COMMON_REG_INFO_T; |
| 166 | |
| 167 | |
| 168 | typedef struct |
| 169 | { |
| 170 | E_QSER_NW_TECH_DOMAIN_TYPE_T tech_domain; /**< Technology, used to determine the structure type tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/ |
| 171 | E_QSER_NW_RADIO_TECH_TYPE_T radio_tech; /**< Radio technology; see #nw_radio_tech_t_v01.*/ |
| 172 | char mcc[10]; /**< Mobile country code.*/ |
| 173 | char mnc[10]; /**< Mobile network code.*/ |
| 174 | E_QSER_NW_ROAM_STATE_TYPE_T roaming; /**< 0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/ |
| 175 | uint8_t forbidden; /**< Forbidden: 0 -- No, 1 -- Yes.*/ |
| 176 | uint32_t cid; /**< Cell ID for the registered 3GPP system.*/ |
| 177 | uint16_t lac; /**< Locatin area code for the registered 3GPP system.*/ |
| 178 | uint16_t psc; /**< Primary scrambling code (WCDMA only); 0 -- None.*/ |
| 179 | uint16_t tac; /**< Tracking area code information for LTE.*/ |
| 180 | }QSER_NW_3GPP_REG_INFO_T; |
| 181 | |
| 182 | |
| 183 | typedef struct |
| 184 | { |
| 185 | E_QSER_NW_TECH_DOMAIN_TYPE_T tech_domain; /**< Technology, used to determine structure type tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/ |
| 186 | E_QSER_NW_RADIO_TECH_TYPE_T radio_tech; /**< Radio technology; see #nw_radio_tech_t_v01.*/ |
| 187 | char mcc[3+1]; /**< Mobile country code.*/ |
| 188 | char mnc[3+1]; /**< Mobile network code.*/ |
| 189 | E_QSER_NW_ROAM_STATE_TYPE_T roaming; /**< Roaming status; see #nw_roam_state_t_v01.*/ |
| 190 | uint8_t forbidden; /**< Forbidden: 0 -- No, 1 -- Yes.*/ |
| 191 | uint8_t inPRL; /**< 0 -- Not in PRL, 1 -- In PRL.*/ |
| 192 | uint8_t css; /**< Concurrent services supported: 0 -- No, 1 -- Yes.*/ |
| 193 | uint16_t sid; /**< CDMA system ID.*/ |
| 194 | uint16_t nid; /**< CDMA network ID.*/ |
| 195 | uint16_t bsid; /**< Base station ID. @newpagetable */ |
| 196 | }QSER_NW_3GPP2_REG_INFO_T; |
| 197 | |
| 198 | /** Gets the status associated with the connection of \<id\>. */ |
| 199 | typedef struct |
| 200 | { |
| 201 | uint8_t voice_registration_valid; /**< Must be set to TRUE if voice_registration is being passed. */ |
| 202 | QSER_NW_COMMON_REG_INFO_T voice_registration; /**< Voice registration. */ |
| 203 | |
| 204 | uint8_t data_registration_valid; /**< Must be set to TRUE if data_registration is being passed. */ |
| 205 | QSER_NW_COMMON_REG_INFO_T data_registration; /**< Data registration. */ |
| 206 | |
| 207 | uint8_t voice_registration_details_3gpp_valid; /**< Must be set to TRUE if voice_registration_details_3gpp is being passed. */ |
| 208 | QSER_NW_3GPP_REG_INFO_T voice_registration_details_3gpp; /**< Voice registration details for 3GPP. */ |
| 209 | |
| 210 | uint8_t data_registration_details_3gpp_valid; /**< Must be set to TRUE if data_registration_details_3gpp is being passed. */ |
| 211 | QSER_NW_3GPP_REG_INFO_T data_registration_details_3gpp; /**< Data registration details for 3GPP. */ |
| 212 | |
| 213 | uint8_t voice_registration_details_3gpp2_valid; /**< Must be set to TRUE if voice_registration_details_3gpp2 is being passed. */ |
| 214 | QSER_NW_3GPP2_REG_INFO_T voice_registration_details_3gpp2; /**< Voice registration details for 3GPP2. */ |
| 215 | |
| 216 | uint8_t data_registration_details_3gpp2_valid; /**< Must be set to TRUE if data_registration_details_3gpp2 is being passed. */ |
| 217 | QSER_NW_3GPP2_REG_INFO_T data_registration_details_3gpp2; /**< Data registration details for 3GPP2. */ |
| 218 | }QSER_NW_REG_STATUS_INFO_T; |
| 219 | |
| 220 | typedef enum |
| 221 | { |
| 222 | E_QSER_NW_IMS_SERVICE_NONE = 0x0000, /**< Not registered */ |
| 223 | E_QSER_NW_IMS_SERVICE_REGISTERED = 0x0001, /**< Registered*/ |
| 224 | }E_QSER_NW_IMS_SERVICE_TYPE_T; |
| 225 | |
| 226 | typedef struct |
| 227 | { |
| 228 | E_QSER_NW_IMS_SERVICE_TYPE_T registration_state; /**< Registration state.*/ |
| 229 | }QSER_NW_IMS_REG_STATUS_INFO_T; |
| 230 | |
| 231 | typedef struct |
| 232 | { |
| 233 | int8_t rssi; /**< RSSI in dBm. Indicates received signal strength. A signed value; -125 or lower indicates no signal.*/ |
| 234 | }QSER_NW_GSM_SIGNAL_INFO_T; |
| 235 | |
| 236 | |
| 237 | typedef struct |
| 238 | { |
| 239 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/ |
| 240 | int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/ |
| 241 | }QSER_NW_WCDMA_SIGNAL_INFO_T; |
| 242 | |
| 243 | typedef struct |
| 244 | { |
| 245 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. a signed value; -125 or lower indicates no signal.*/ |
| 246 | int8_t rscp; /**< RSCP in dBm.*/ |
| 247 | int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/ |
| 248 | int8_t sinr; /**< Measured SINR in dB. @newpagetable */ |
| 249 | }QSER_NW_TDSCDMA_SIGNAL_INFO_T; |
| 250 | |
| 251 | typedef struct |
| 252 | { |
| 253 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/ |
| 254 | int8_t rsrq; /**< RSRQ value in dB (signed integer value), as measured by L1. Range: -3 to -20 (-3 equals -3 dB, -20 equals -20 dB).*/ |
| 255 | int16_t rsrp; /**< Current RSRP in dBm, as measured by L1. Range: -44 to -140 (-44 equals -44 dBm, -140 equals -140 dBm).*/ |
| 256 | int16_t snr; /**< SNR level as a scaled integer in units of 0.1 dB; e.g., -16 dB has a value of -160 and 24.6 dB has a value of 246.*/ |
| 257 | }QSER_NW_LTE_SIGNAL_INFO_T; |
| 258 | |
| 259 | typedef struct |
| 260 | { |
| 261 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/ |
| 262 | int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/ |
| 263 | }QSER_NW_CDMA_SIGNAL_INFO_T; |
| 264 | |
| 265 | typedef struct |
| 266 | { |
| 267 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/ |
| 268 | int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/ |
| 269 | int8_t sinr; /**< SINR level.*/ |
| 270 | int32_t io; /**< Received IO in dBm. */ |
| 271 | }QSER_NW_HDR_SIGNAL_INFO_T; |
| 272 | |
| 273 | typedef struct |
| 274 | { |
| 275 | int16_t ssRsrp; /* SS(Synchronization Signal) reference signal received power, multipled by -1. |
| 276 | * Reference: 3GPP TS 38.215. |
| 277 | * Range [44, 140], INT_MAX means invalid/unreported.*/ |
| 278 | int16_t ssRsrq; /* SS reference signal received quality, multipled by -1. |
| 279 | * Reference: 3GPP TS 38.215. |
| 280 | * Range [3, 20], INT_MAX means invalid/unreported.*/ |
| 281 | int16_t ssSinr; /* SS signal-to-noise and interference ratio. |
| 282 | * Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1. |
| 283 | * Range [-23, 40], INT_MAX means invalid/unreported.*/ |
| 284 | int16_t csiRsrp; /* CSI reference signal received power, multipled by -1. |
| 285 | * Reference: 3GPP TS 38.215. |
| 286 | * Range [44, 140], INT_MAX means invalid/unreported.*/ |
| 287 | int16_t csiRsrq; /* CSI reference signal received quality, multipled by -1. |
| 288 | * Reference: 3GPP TS 38.215. |
| 289 | * Range [3, 20], INT_MAX means invalid/unreported.*/ |
| 290 | int16_t csiSinr; /* CSI signal-to-noise and interference ratio. |
| 291 | * Reference: 3GPP TS 138.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1. |
| 292 | * Range [-23, 40], INT_MAX means invalid/unreported.*/ |
| 293 | }QSER_NW_NR_SIGNAL_INFO_T; |
| 294 | |
| 295 | |
| 296 | /** Gets signal strength information. */ |
| 297 | typedef struct |
| 298 | { |
| 299 | uint8_t gsm_sig_info_valid; /**< Must be set to TRUE if gsm_sig_info is being passed. */ |
| 300 | QSER_NW_GSM_SIGNAL_INFO_T gsm_sig_info; /**< GSM signal information. */ |
| 301 | uint8_t wcdma_sig_info_valid; /**< Must be set to TRUE if wcdma_sig_info is being passed. */ |
| 302 | QSER_NW_WCDMA_SIGNAL_INFO_T wcdma_sig_info; /**< WCDMA signal information. */ |
| 303 | uint8_t tdscdma_sig_info_valid; /**< Must be set to TRUE if tdscdma_sig_info is being passed. */ |
| 304 | QSER_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info; /**< TDSCDMA signal information. */ |
| 305 | uint8_t lte_sig_info_valid; /**< Must be set to TRUE if lte_sig_info is being passed. */ |
| 306 | QSER_NW_LTE_SIGNAL_INFO_T lte_sig_info; /**< LTE signal information. */ |
| 307 | uint8_t cdma_sig_info_valid; /**< Must be set to TRUE if cdma_sig_info is being passed. */ |
| 308 | QSER_NW_CDMA_SIGNAL_INFO_T cdma_sig_info; /**< CDMA signal information. */ |
| 309 | uint8_t hdr_sig_info_valid; /**< Must be set to TRUE if hdr_sig_info is being passed. */ |
| 310 | QSER_NW_HDR_SIGNAL_INFO_T hdr_sig_info; /**< HDR signal information. */ |
| 311 | uint8_t nr_sig_info_valid; |
| 312 | QSER_NW_NR_SIGNAL_INFO_T nr_sig_info; |
| 313 | }QSER_NW_SIGNAL_STRENGTH_INFO_T; |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | /* @bridef Callback function registered to QSER_NW_AddRxMsgHandler |
| 320 | * map of ind_flag and ind_msg_buf as bellow : |
| 321 | * NW_IND_VOICE_REG_EVENT_IND_FLAG : QSER_NW_VOICE_REG_EVENT_IND_T |
| 322 | * NW_IND_DATA_REG_EVENT_IND_FLAG : QSER_NW_DATA_REG_EVENT_IND_T |
| 323 | * NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG : QSER_NW_SINGNAL_EVENT_IND_T |
| 324 | * NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG : QSER_NW_CELL_ACCESS_STATE_EVENT_IND_T |
| 325 | * NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG : QSER_NW_NITZ_TIME_EVENT_IND_T |
| 326 | * */ |
| 327 | typedef void (*QSER_NW_RxMsgHandlerFunc_t)( |
| 328 | nw_client_handle_type h_nw, |
| 329 | uint32_t ind_flag, |
| 330 | void *ind_msg_buf, |
| 331 | uint32_t ind_msg_len, |
| 332 | void *contextPtr |
| 333 | ); |
| 334 | |
| 335 | |
| 336 | /** Indication message; Indication for the corresponding registered event flag NW_IND_VOICE_REG_EVENT_IND_FLAG */ |
| 337 | typedef struct { |
| 338 | |
| 339 | uint8_t registration_valid; /**< Must be set to TRUE if voice_registration is being passed. */ |
| 340 | QSER_NW_COMMON_REG_INFO_T registration; /**< Voice registration. */ |
| 341 | |
| 342 | uint8_t registration_details_3gpp_valid; /**< Must be set to TRUE if voice_registration_details_3gpp is being passed. */ |
| 343 | QSER_NW_3GPP_REG_INFO_T registration_details_3gpp; /**< Voice registration details for 3GPP. */ |
| 344 | |
| 345 | uint8_t registration_details_3gpp2_valid; /**< Must be set to TRUE if voice_registration_details_3gpp2 is being passed. */ |
| 346 | QSER_NW_3GPP2_REG_INFO_T registration_details_3gpp2; /**< Voice registration details for 3GPP2. */ |
| 347 | }QSER_NW_VOICE_REG_EVENT_IND_T; |
| 348 | |
| 349 | /** Indication message; Indication for the corresponding registered event flag NW_IND_DATA_REG_EVENT_IND_FLAG */ |
| 350 | typedef struct { |
| 351 | |
| 352 | uint8_t registration_valid; /**< Must be set to TRUE if data_registration is being passed. */ |
| 353 | QSER_NW_COMMON_REG_INFO_T registration; /**< Data registration. */ |
| 354 | |
| 355 | uint8_t registration_details_3gpp_valid; /**< Must be set to TRUE if data_registration_details_3gpp is being passed. */ |
| 356 | QSER_NW_3GPP_REG_INFO_T registration_details_3gpp; /**< Data registration details for 3GPP. */ |
| 357 | |
| 358 | uint8_t registration_details_3gpp2_valid; /**< Must be set to TRUE if data_registration_details_3gpp2 is being passed. */ |
| 359 | QSER_NW_3GPP2_REG_INFO_T registration_details_3gpp2; /**< Data registration details for 3GPP2. */ |
| 360 | }QSER_NW_DATA_REG_EVENT_IND_T; |
| 361 | |
| 362 | |
| 363 | /** Indication message; Indication for the corresponding registered event flag NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG */ |
| 364 | typedef struct { |
| 365 | uint8_t gsm_sig_info_valid; /**< Must be set to TRUE if gsm_sig_info is being passed. */ |
| 366 | QSER_NW_GSM_SIGNAL_INFO_T gsm_sig_info; /**< GSM singal information. */ |
| 367 | |
| 368 | uint8_t wcdma_sig_info_valid; /**< Must be set to TRUE if wcdma_sig_info is being passed. */ |
| 369 | QSER_NW_WCDMA_SIGNAL_INFO_T wcdma_sig_info; /**< WCDMA singal information. */ |
| 370 | |
| 371 | uint8_t tdscdma_sig_info_valid; /**< Must be set to TRUE if tdscdma_sig_info is being passed. */ |
| 372 | QSER_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info; /**< TDSCDMA singal information. */ |
| 373 | |
| 374 | uint8_t lte_sig_info_valid; /**< Must be set to TRUE if lte_sig_info is being passed. */ |
| 375 | QSER_NW_LTE_SIGNAL_INFO_T lte_sig_info; /**< LTE singal information. */ |
| 376 | |
| 377 | uint8_t cdma_sig_info_valid; /**< Must be set to TRUE if cdma_sig_info is being passed. */ |
| 378 | QSER_NW_CDMA_SIGNAL_INFO_T cdma_sig_info; /**< CDMA singal information. */ |
| 379 | |
| 380 | uint8_t hdr_sig_info_valid; /**< Must be set to TRUE if hdr_sig_info is being passed. */ |
| 381 | QSER_NW_HDR_SIGNAL_INFO_T hdr_sig_info; /**< HDR singal information. */ |
| 382 | |
| 383 | uint8_t nr_sig_info_valid; |
| 384 | QSER_NW_NR_SIGNAL_INFO_T nr_sig_info; |
| 385 | }QSER_NW_SINGNAL_EVENT_IND_T; |
| 386 | |
| 387 | typedef enum |
| 388 | { |
| 389 | E_QSER_NW_RF_MODE_CFUN_0 = 0, /**< CFUN 0. */ |
| 390 | E_QSER_NW_RF_MODE_CFUN_1 = 1, /**< CFUN 1. */ |
| 391 | E_QSER_NW_RF_MODE_FLIGHT = 4, /**< Flight Mode, CFUN 4. */ |
| 392 | }E_QSER_NW_RF_MODE_TYPE_T; |
| 393 | |
| 394 | int qser_nw_client_init(nw_client_handle_type *ph_nw); |
| 395 | |
| 396 | int qser_nw_client_deinit(nw_client_handle_type h_nw); |
| 397 | |
| 398 | int qser_nw_set_config |
| 399 | ( |
| 400 | nw_client_handle_type h_nw, |
| 401 | QSER_NW_CONFIG_INFO_T *pt_info |
| 402 | ); |
| 403 | |
| 404 | int qser_nw_set_ims_enable |
| 405 | ( |
| 406 | nw_client_handle_type h_nw, |
| 407 | E_QSER_NW_IMS_MODE_TYPE_T ims_mode |
| 408 | ); |
| 409 | |
| 410 | int qser_nw_set_oos_config |
| 411 | ( |
| 412 | nw_client_handle_type h_nw, |
| 413 | QSER_NW_OOS_CONFIG_INFO_T *pt_info |
| 414 | ); |
| 415 | |
| 416 | int qser_nw_get_oos_config |
| 417 | ( |
| 418 | nw_client_handle_type h_nw, |
| 419 | QSER_NW_OOS_CONFIG_INFO_T *pt_info |
| 420 | ); |
| 421 | |
| 422 | int qser_nw_event_register |
| 423 | ( |
| 424 | nw_client_handle_type h_nw, |
| 425 | uint32_t bitmask // bit OR of NW_IND_xxxx_EVENT_ON |
| 426 | ); |
| 427 | |
| 428 | int qser_nw_get_operator_name |
| 429 | ( |
| 430 | nw_client_handle_type h_nw, |
| 431 | QSER_NW_OPERATOR_NAME_INFO_T *pt_info //You should malloc this or may cause stack overflow |
| 432 | ); |
| 433 | |
| 434 | int qser_nw_get_reg_status |
| 435 | ( |
| 436 | nw_client_handle_type h_nw, |
| 437 | QSER_NW_REG_STATUS_INFO_T *pt_info |
| 438 | ); |
| 439 | |
| 440 | int qser_nw_get_ims_reg_status |
| 441 | ( |
| 442 | nw_client_handle_type h_nw, |
| 443 | QSER_NW_IMS_REG_STATUS_INFO_T *pt_info |
| 444 | ); |
| 445 | |
| 446 | int qser_nw_get_signal_strength |
| 447 | ( |
| 448 | nw_client_handle_type h_nw, |
| 449 | QSER_NW_SIGNAL_STRENGTH_INFO_T *pt_info |
| 450 | ); |
| 451 | |
| 452 | int qser_nw_add_rx_msg_handler |
| 453 | ( |
| 454 | nw_client_handle_type h_nw, |
| 455 | QSER_NW_RxMsgHandlerFunc_t handlerPtr, |
| 456 | void* contextPtr |
| 457 | ); |
| 458 | |
| 459 | int qser_nw_set_rf_mode |
| 460 | ( |
| 461 | nw_client_handle_type h_nw, |
| 462 | E_QSER_NW_RF_MODE_TYPE_T rf_mode |
| 463 | ); |
| 464 | |
| 465 | int qser_nw_get_rf_mode |
| 466 | ( |
| 467 | nw_client_handle_type h_nw, |
| 468 | E_QSER_NW_RF_MODE_TYPE_T *rf_mode |
| 469 | ); |
| 470 | |
| 471 | #ifdef __cplusplus |
| 472 | } |
| 473 | #endif |
| 474 | #endif//__QSER_NW_H__ |