b.liu | 68a94c9 | 2025-05-24 12:53:41 +0800 | [diff] [blame] | 1 | /** |
| 2 | *@file ql_mcm_nw.h |
| 3 | *@date 2018-02-22 |
| 4 | *@author |
| 5 | *@brief |
| 6 | */ |
| 7 | #ifndef __QL_MCM_NW_H__ |
| 8 | #define __QL_MCM_NW_H__ |
| 9 | #include "ql_mcm.h" |
| 10 | #include "mbtk_type.h" |
| 11 | |
| 12 | typedef uint32 nw_client_handle_type; |
| 13 | |
| 14 | |
| 15 | #define QL_MCM_NW_MODE_NONE 0x00 /**< No network. */ |
| 16 | #define QL_MCM_NW_MODE_GSM 0x01 /**< Include GSM networks. */ |
| 17 | #define QL_MCM_NW_MODE_WCDMA 0x02 /**< Include WCDMA networks. */ |
| 18 | #define QL_MCM_NW_MODE_CDMA 0x04 /**< Include CDMA networks. */ |
| 19 | #define QL_MCM_NW_MODE_EVDO 0x08 /**< Include EVDO networks. */ |
| 20 | #define QL_MCM_NW_MODE_LTE 0x10 /**< Include LTE networks. */ |
| 21 | #define QL_MCM_NW_MODE_TDSCDMA 0x20 /**< Include TDSCDMA networks. */ |
| 22 | #define QL_MCM_NW_MODE_PRL 0x10000 /**< Give preference according to the preferred roaming list. */ |
| 23 | |
| 24 | typedef enum |
| 25 | { |
| 26 | E_QL_MCM_NW_ROAM_STATE_OFF = 0, /**< None, or roaming indicator off. */ |
| 27 | E_QL_MCM_NW_ROAM_STATE_ON = 1 /**< Roaming indicator on. */ |
| 28 | }E_QL_MCM_NW_ROAM_STATE_TYPE_T; |
| 29 | |
| 30 | /** Configures the settings that define the MCM network interface. */ |
| 31 | typedef struct |
| 32 | { |
| 33 | /* Configuration parameters for MCM network registration Network registration details Technology dependent network registration details */ |
| 34 | uint64_t preferred_nw_mode; /**< Preferred network mode for connections; a bitmask of QL_MCM_NW_MODE_xxxx.*/ |
| 35 | E_QL_MCM_NW_ROAM_STATE_TYPE_T roaming_pref; /**< Roaming preference.*/ |
| 36 | }QL_MCM_NW_CONFIG_INFO_T; |
| 37 | |
| 38 | #define QL_MCM_NW_NITZ_BUF_LEN 30 |
| 39 | /** Get NITZ Time information. */ |
| 40 | typedef struct |
| 41 | { |
| 42 | //i.e.: nitz_time="18/09/19,07:40:18+32,00" format: YY/MM/DD,HH:MM:SS'+/-'TZ,daylight, Here TZ multiplied by 4. |
| 43 | char nitz_time[QL_MCM_NW_NITZ_BUF_LEN + 1]; |
| 44 | uint64_t abs_time; // 0 means invalid |
| 45 | int8_t leap_sec; // 0 means invalid |
| 46 | }QL_MCM_NW_NITZ_TIME_INFO_T; |
| 47 | |
| 48 | |
| 49 | //defined for QL_MCM_NW_EventRegister |
| 50 | #define NW_IND_VOICE_REG_EVENT_IND_FLAG (1 << 0) /**< msg format : QL_MCM_NW_VOICE_REG_EVENT_IND_T */ |
| 51 | #define NW_IND_DATA_REG_EVENT_IND_FLAG (1 << 1) /**< msg format : QL_MCM_NW_DATA_REG_EVENT_IND_T */ |
| 52 | #define NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG (1 << 2) /**< msg format : QL_MCM_NW_SINGNAL_EVENT_IND_T */ |
| 53 | #define NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG (1 << 3) /**< msg format : QL_MCM_NW_CELL_ACCESS_STATE_EVENT_IND_T */ |
| 54 | #define NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG (1 << 4) /**< msg format : QL_MCM_NW_NITZ_TIME_EVENT_IND_T */ |
| 55 | |
| 56 | |
| 57 | |
| 58 | typedef struct |
| 59 | { |
| 60 | char long_eons[512 + 1]; /**< Long EONS.*/ |
| 61 | char short_eons[512 + 1]; /**< Short EONS.*/ |
| 62 | char mcc[3 + 1]; /**< Mobile country code.*/ |
| 63 | char mnc[3 + 1]; /**< Mobile network code.*/ |
| 64 | }QL_MCM_NW_OPERATOR_NAME_INFO_T; |
| 65 | |
| 66 | typedef enum |
| 67 | { |
| 68 | E_QL_MCM_NW_NETWORK_STATUS_NONE = 0, /**< Network status not available. */ |
| 69 | E_QL_MCM_NW_NETWORK_STATUS_CURRENT_SERVING = 1, /**< Current serving network. */ |
| 70 | E_QL_MCM_NW_NETWORK_STATUS_PREFERRED = 2, /**< Preferred network. */ |
| 71 | E_QL_MCM_NW_NETWORK_STATUS_NOT_PREFERRED = 3, /**< Not the preferred network. */ |
| 72 | E_QL_MCM_NW_NETWORK_STATUS_AVAILABLE = 4, /**< Service available. */ |
| 73 | E_QL_MCM_NW_NETWORK_STATUS_FORBIDDEN = 5 /**< Forbidden service. */ |
| 74 | }E_QL_MCM_NW_NETWORK_STATUS_TYPE_T; |
| 75 | |
| 76 | typedef enum |
| 77 | { |
| 78 | E_QL_MCM_NW_RADIO_TECH_TD_SCDMA = 1, |
| 79 | E_QL_MCM_NW_RADIO_TECH_GSM = 2, /**< GSM; only supports voice. */ |
| 80 | E_QL_MCM_NW_RADIO_TECH_HSPAP = 3, /**< HSPA+. */ |
| 81 | E_QL_MCM_NW_RADIO_TECH_LTE = 4, /**< LTE. */ |
| 82 | E_QL_MCM_NW_RADIO_TECH_EHRPD = 5, /**< EHRPD. */ |
| 83 | E_QL_MCM_NW_RADIO_TECH_EVDO_B = 6, /**< EVDO B. */ |
| 84 | E_QL_MCM_NW_RADIO_TECH_HSPA = 7, /**< HSPA. */ |
| 85 | E_QL_MCM_NW_RADIO_TECH_HSUPA = 8, /**< HSUPA. */ |
| 86 | E_QL_MCM_NW_RADIO_TECH_HSDPA = 9, /**< HSDPA. */ |
| 87 | E_QL_MCM_NW_RADIO_TECH_EVDO_A = 10, /**< EVDO A. */ |
| 88 | E_QL_MCM_NW_RADIO_TECH_EVDO_0 = 11, /**< EVDO 0. */ |
| 89 | E_QL_MCM_NW_RADIO_TECH_1xRTT = 12, /**< 1xRTT. */ |
| 90 | E_QL_MCM_NW_RADIO_TECH_IS95B = 13, /**< IS95B. */ |
| 91 | E_QL_MCM_NW_RADIO_TECH_IS95A = 14, /**< IS95A. */ |
| 92 | E_QL_MCM_NW_RADIO_TECH_UMTS = 15, /**< UMTS. */ |
| 93 | E_QL_MCM_NW_RADIO_TECH_EDGE = 16, /**< EDGE. */ |
| 94 | E_QL_MCM_NW_RADIO_TECH_GPRS = 17, /**< GPRS. */ |
| 95 | E_QL_MCM_NW_RADIO_TECH_NONE = 18 /**< No technology selected. */ |
| 96 | }E_QL_MCM_NW_RADIO_TECH_TYPE_T; |
| 97 | |
| 98 | typedef struct |
| 99 | { |
| 100 | QL_MCM_NW_OPERATOR_NAME_INFO_T operator_name; /**< Operator name.*/ |
| 101 | E_QL_MCM_NW_NETWORK_STATUS_TYPE_T network_status; /**< Network status.*/ |
| 102 | E_QL_MCM_NW_RADIO_TECH_TYPE_T rat; /**< Radio technology.*/ |
| 103 | }QL_MCM_NW_SCAN_ENTRY_INFO_T; /* Type */ |
| 104 | |
| 105 | #define QL_MCM_NW_SCAN_LIST_MAX 40 |
| 106 | /** Gets the status associated with the connection of \<id\>. */ |
| 107 | typedef struct |
| 108 | { |
| 109 | uint32_t entry_len; /**< Must be set to the number of elements in entry. */ |
| 110 | QL_MCM_NW_SCAN_ENTRY_INFO_T entry[QL_MCM_NW_SCAN_LIST_MAX]; /**< Scan entry.*/ |
| 111 | }QL_MCM_NW_SCAN_RESULT_LIST_INFO_T; /* Message */ |
| 112 | |
| 113 | |
| 114 | typedef enum |
| 115 | { |
| 116 | E_QL_MCM_NW_TECH_DOMAIN_NONE = 0, /**< None. */ |
| 117 | E_QL_MCM_NW_TECH_DOMAIN_3GPP = 1, /**< 3GPP. */ |
| 118 | E_QL_MCM_NW_TECH_DOMAIN_3GPP2 = 2, /**< 3GPP2. */ |
| 119 | }E_QL_MCM_NW_TECH_DOMAIN_TYPE_T; |
| 120 | |
| 121 | typedef enum |
| 122 | { |
| 123 | E_QL_MCM_NW_IMSI_UNKNOWN_HLR_DENY_REASON = 1, /**< IMSI unknown in HLR. */ |
| 124 | E_QL_MCM_NW_ILLEGAL_MS_DENY_REASON = 2, /**< Illegal MS. */ |
| 125 | E_QL_MCM_NW_IMSI_UNKNOWN_VLR_DENY_REASON = 3, /**< IMSI unknown in VLR. */ |
| 126 | E_QL_MCM_NW_IMEI_NOT_ACCEPTED_DENY_REASON = 4, /**< IMEI not accepted. */ |
| 127 | E_QL_MCM_NW_ILLEGAL_ME_DENY_REASON = 5, /**< Illegal ME. */ |
| 128 | E_QL_MCM_NW_PLMN_NOT_ALLOWED_DENY_REASON = 6, /**< PLMN not allowed. */ |
| 129 | E_QL_MCM_NW_LA_NOT_ALLOWED_DENY_REASON = 7, /**< Location area not allowed. */ |
| 130 | E_QL_MCM_NW_ROAMING_NOT_ALLOWED_LA_DENY_REASON = 8, /**< Roaming not allowed in this location area. */ |
| 131 | E_QL_MCM_NW_NO_SUITABLE_CELLS_LA_DENY_REASON = 9, /**< No suitable cells in location area. */ |
| 132 | E_QL_MCM_NW_NETWORK_FAILURE_DENY_REASON = 10, /**< Network failure. */ |
| 133 | E_QL_MCM_NW_MAC_FAILURE_DENY_REASON = 11, /**< MAC failure. */ |
| 134 | E_QL_MCM_NW_SYNCH_FAILURE_DENY_REASON = 12, /**< Sync failure. */ |
| 135 | E_QL_MCM_NW_CONGESTION_DENY_REASON = 13, /**< Congestion. */ |
| 136 | E_QL_MCM_NW_GSM_AUTHENTICATION_UNACCEPTABLE_DENY_REASON = 14, /**< GSM authentication unacceptable. */ |
| 137 | E_QL_MCM_NW_NOT_AUTHORIZED_CSG_DENY_REASON = 15, /**< Not authorized in this CSG. */ |
| 138 | E_QL_MCM_NW_SERVICE_OPTION_NOT_SUPPORTED_DENY_REASON = 16, /**< Service option not supported. */ |
| 139 | E_QL_MCM_NW_REQ_SERVICE_OPTION_NOT_SUBSCRIBED_DENY_REASON = 17, /**< Requested service option not subscribed. */ |
| 140 | E_QL_MCM_NW_CALL_CANNOT_BE_IDENTIFIED_DENY_REASON = 18, /**< Call cannot be identified. */ |
| 141 | E_QL_MCM_NW_SEMANTICALLY_INCORRECT_MSG_DENY_REASON = 19, /**< Semantically incorrect message. */ |
| 142 | E_QL_MCM_NW_INVALID_MANDATORY_INFO_DENY_REASON = 20, /**< Invalid mandatory information. */ |
| 143 | E_QL_MCM_NW_MSG_TYPE_NON_EXISTENT_DENY_REASON = 21, /**< Message type non-existent or not implemented. */ |
| 144 | E_QL_MCM_NW_INFO_ELEMENT_NON_EXISTENT_DENY_REASON = 22, /**< Message type not compatible with the protocol state. */ |
| 145 | E_QL_MCM_NW_CONDITIONAL_IE_ERR_DENY_REASON = 23, /**< Conditional IE error. */ |
| 146 | E_QL_MCM_NW_MSG_INCOMPATIBLE_PROTOCOL_STATE_DENY_REASON = 24, /**< Message not compatible with the protocol state. */ |
| 147 | E_QL_MCM_NW_PROTOCOL_ERROR_DENY_REASON = 25, /**< Unspecified protocol error. */ |
| 148 | }E_QL_MCM_NW_DENY_REASON_TYPE_T; |
| 149 | |
| 150 | |
| 151 | typedef enum |
| 152 | { |
| 153 | E_QL_MCM_NW_SERVICE_NONE = 0x0000, /**< Not registered or no data. */ |
| 154 | E_QL_MCM_NW_SERVICE_LIMITED = 0x0001, /**< Registered; emergency service only. */ |
| 155 | E_QL_MCM_NW_SERVICE_FULL = 0x0002, /**< Registered, full service. */ |
| 156 | }E_QL_MCM_NW_SERVICE_TYPE_T; |
| 157 | |
| 158 | typedef struct |
| 159 | { |
| 160 | E_QL_MCM_NW_TECH_DOMAIN_TYPE_T tech_domain; /**< Technology, used to determine the structure type mcm_tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/ |
| 161 | E_QL_MCM_NW_RADIO_TECH_TYPE_T radio_tech; /**< Radio technology; see #mcm_nw_radio_tech_t_v01.*/ |
| 162 | E_QL_MCM_NW_ROAM_STATE_TYPE_T roaming; /**< 0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/ |
| 163 | E_QL_MCM_NW_DENY_REASON_TYPE_T deny_reason; /**< Set when registration state is #mcm_nw_deny_reason_t_v01.*/ |
| 164 | E_QL_MCM_NW_SERVICE_TYPE_T registration_state; /**< Registration state.*/ |
| 165 | }QL_MCM_NW_COMMON_REG_INFO_T; |
| 166 | |
| 167 | |
| 168 | typedef struct |
| 169 | { |
| 170 | E_QL_MCM_NW_TECH_DOMAIN_TYPE_T tech_domain; /**< Technology, used to determine the structure type mcm_tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/ |
| 171 | E_QL_MCM_NW_RADIO_TECH_TYPE_T radio_tech; /**< Radio technology; see #mcm_nw_radio_tech_t_v01.*/ |
| 172 | char mcc[3+1]; /**< Mobile country code.*/ |
| 173 | char mnc[3+1]; /**< Mobile network code.*/ |
| 174 | E_QL_MCM_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 | }QL_MCM_NW_3GPP_REG_INFO_T; |
| 181 | |
| 182 | |
| 183 | typedef struct |
| 184 | { |
| 185 | E_QL_MCM_NW_TECH_DOMAIN_TYPE_T tech_domain; /**< Technology, used to determine structure type mcm_tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/ |
| 186 | E_QL_MCM_NW_RADIO_TECH_TYPE_T radio_tech; /**< Radio technology; see #mcm_nw_radio_tech_t_v01.*/ |
| 187 | char mcc[3+1]; /**< Mobile country code.*/ |
| 188 | char mnc[3+1]; /**< Mobile network code.*/ |
| 189 | E_QL_MCM_NW_ROAM_STATE_TYPE_T roaming; /**< Roaming status; see #mcm_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 | }QL_MCM_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 | QL_MCM_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 | QL_MCM_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 | QL_MCM_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 | QL_MCM_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 | QL_MCM_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 | QL_MCM_NW_3GPP2_REG_INFO_T data_registration_details_3gpp2; /**< Data registration details for 3GPP2. */ |
| 218 | }QL_MCM_NW_REG_STATUS_INFO_T; |
| 219 | |
| 220 | |
| 221 | typedef enum |
| 222 | { |
| 223 | E_QL_MCM_NW_SELECTION_AUTOMATIC = 0, /**< Automatic network selection. */ |
| 224 | E_QL_MCM_NW_SELECTION_MANUAL = 1, /**< Manual network selection. */ |
| 225 | }E_QL_MCM_NW_SELECTION_TYPE_T; |
| 226 | |
| 227 | typedef struct |
| 228 | { |
| 229 | E_QL_MCM_NW_SELECTION_TYPE_T nw_selection_type; /**< Network selection type. */ |
| 230 | char mcc[3 + 1]; /**< Mobile country code for a manual network selection.*/ |
| 231 | char mnc[3 + 1]; /**< Mobile network code for a manual network selection.*/ |
| 232 | E_QL_MCM_NW_RADIO_TECH_TYPE_T rat; /**< Radio technology.*/ |
| 233 | }QL_MCM_NW_SELECTION_INFO_T; |
| 234 | |
| 235 | |
| 236 | typedef struct |
| 237 | { |
| 238 | int8_t rssi; /**< RSSI in dBm. Indicates received signal strength. A signed value; -125 or lower indicates no signal.*/ |
| 239 | }QL_MCM_NW_GSM_SIGNAL_INFO_T; |
| 240 | |
| 241 | |
| 242 | typedef struct |
| 243 | { |
| 244 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/ |
| 245 | int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/ |
| 246 | }QL_MCM_NW_WCDMA_SIGNAL_INFO_T; |
| 247 | |
| 248 | typedef struct |
| 249 | { |
| 250 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. a signed value; -125 or lower indicates no signal.*/ |
| 251 | int8_t rscp; /**< RSCP in dBm.*/ |
| 252 | int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/ |
| 253 | int8_t sinr; /**< Measured SINR in dB. @newpagetable */ |
| 254 | }QL_MCM_NW_TDSCDMA_SIGNAL_INFO_T; |
| 255 | |
| 256 | typedef struct |
| 257 | { |
| 258 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/ |
| 259 | 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).*/ |
| 260 | int16_t rsrp; /**< Current RSRP in dBm, as measured by L1. Range: -44 to -140 (-44 equals -44 dBm, -140 equals -140 dBm).*/ |
| 261 | 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.*/ |
| 262 | }QL_MCM_NW_LTE_SIGNAL_INFO_T; |
| 263 | |
| 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 | }QL_MCM_NW_CDMA_SIGNAL_INFO_T; |
| 270 | |
| 271 | typedef struct |
| 272 | { |
| 273 | int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/ |
| 274 | int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/ |
| 275 | int8_t sinr; /**< SINR level.*/ |
| 276 | int32_t io; /**< Received IO in dBm. */ |
| 277 | }QL_MCM_NW_HDR_SIGNAL_INFO_T; |
| 278 | |
| 279 | /** Gets signal strength information. */ |
| 280 | typedef struct |
| 281 | { |
| 282 | uint8_t gsm_sig_info_valid; /**< Must be set to TRUE if gsm_sig_info is being passed. */ |
| 283 | QL_MCM_NW_GSM_SIGNAL_INFO_T gsm_sig_info; /**< GSM signal information. */ |
| 284 | uint8_t wcdma_sig_info_valid; /**< Must be set to TRUE if wcdma_sig_info is being passed. */ |
| 285 | QL_MCM_NW_WCDMA_SIGNAL_INFO_T wcdma_sig_info; /**< WCDMA signal information. */ |
| 286 | uint8_t tdscdma_sig_info_valid; /**< Must be set to TRUE if tdscdma_sig_info is being passed. */ |
| 287 | QL_MCM_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info; /**< TDSCDMA signal information. */ |
| 288 | uint8_t lte_sig_info_valid; /**< Must be set to TRUE if lte_sig_info is being passed. */ |
| 289 | QL_MCM_NW_LTE_SIGNAL_INFO_T lte_sig_info; /**< LTE signal information. */ |
| 290 | uint8_t cdma_sig_info_valid; /**< Must be set to TRUE if cdma_sig_info is being passed. */ |
| 291 | QL_MCM_NW_CDMA_SIGNAL_INFO_T cdma_sig_info; /**< CDMA signal information. */ |
| 292 | uint8_t hdr_sig_info_valid; /**< Must be set to TRUE if hdr_sig_info is being passed. */ |
| 293 | QL_MCM_NW_HDR_SIGNAL_INFO_T hdr_sig_info; /**< HDR signal information. */ |
| 294 | }QL_MCM_NW_SIGNAL_STRENGTH_INFO_T; |
| 295 | |
| 296 | |
| 297 | |
| 298 | typedef enum |
| 299 | { |
| 300 | E_QL_MCM_NW_CELL_ACCESS_NONE = 0x00, /**< Unknown cell access state. */ |
| 301 | E_QL_MCM_NW_CELL_ACCESS_NORMAL_ONLY = 0x01, /**< Cell access is allowed for normal calls only. */ |
| 302 | E_QL_MCM_NW_CELL_ACCESS_EMERGENCY_ONLY = 0x02, /**< Cell access is allowed for emergency calls only. */ |
| 303 | E_QL_MCM_NW_CELL_ACCESS_NO_CALLS = 0x03, /**< Cell access is not allowed for any call type. */ |
| 304 | E_QL_MCM_NW_CELL_ACCESS_ALL_CALLS = 0x04, /**< Cell access is allowed for all call types. */ |
| 305 | }E_QL_MCM_NW_CELL_ACCESS_STATE_TYPE_T; |
| 306 | |
| 307 | |
| 308 | /* @bridef Callback function registered to QL_MCM_NW_AddRxMsgHandler |
| 309 | * map of ind_flag and ind_msg_buf as bellow : |
| 310 | * NW_IND_VOICE_REG_EVENT_IND_FLAG : QL_MCM_NW_VOICE_REG_EVENT_IND_T |
| 311 | * NW_IND_DATA_REG_EVENT_IND_FLAG : QL_MCM_NW_DATA_REG_EVENT_IND_T |
| 312 | * NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG : QL_MCM_NW_SINGNAL_EVENT_IND_T |
| 313 | * NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG : QL_MCM_NW_CELL_ACCESS_STATE_EVENT_IND_T |
| 314 | * NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG : QL_MCM_NW_NITZ_TIME_EVENT_IND_T |
| 315 | * */ |
| 316 | typedef void (*QL_MCM_NW_RxMsgHandlerFunc_t)( |
| 317 | nw_client_handle_type h_nw, |
| 318 | uint32_t ind_flag, |
| 319 | void *ind_msg_buf, |
| 320 | uint32_t ind_msg_len, |
| 321 | void *contextPtr |
| 322 | ); |
| 323 | |
| 324 | |
| 325 | /** Indication message; Indication for the corresponding registered event flag NW_IND_VOICE_REG_EVENT_IND_FLAG */ |
| 326 | typedef struct { |
| 327 | |
| 328 | uint8_t registration_valid; /**< Must be set to TRUE if voice_registration is being passed. */ |
| 329 | QL_MCM_NW_COMMON_REG_INFO_T registration; /**< Voice registration. */ |
| 330 | |
| 331 | uint8_t registration_details_3gpp_valid; /**< Must be set to TRUE if voice_registration_details_3gpp is being passed. */ |
| 332 | QL_MCM_NW_3GPP_REG_INFO_T registration_details_3gpp; /**< Voice registration details for 3GPP. */ |
| 333 | |
| 334 | uint8_t registration_details_3gpp2_valid; /**< Must be set to TRUE if voice_registration_details_3gpp2 is being passed. */ |
| 335 | QL_MCM_NW_3GPP2_REG_INFO_T registration_details_3gpp2; /**< Voice registration details for 3GPP2. */ |
| 336 | }QL_MCM_NW_VOICE_REG_EVENT_IND_T; |
| 337 | |
| 338 | /** Indication message; Indication for the corresponding registered event flag NW_IND_DATA_REG_EVENT_IND_FLAG */ |
| 339 | typedef struct { |
| 340 | |
| 341 | uint8_t registration_valid; /**< Must be set to TRUE if data_registration is being passed. */ |
| 342 | QL_MCM_NW_COMMON_REG_INFO_T registration; /**< Data registration. */ |
| 343 | |
| 344 | uint8_t registration_details_3gpp_valid; /**< Must be set to TRUE if data_registration_details_3gpp is being passed. */ |
| 345 | QL_MCM_NW_3GPP_REG_INFO_T registration_details_3gpp; /**< Data registration details for 3GPP. */ |
| 346 | |
| 347 | uint8_t registration_details_3gpp2_valid; /**< Must be set to TRUE if data_registration_details_3gpp2 is being passed. */ |
| 348 | QL_MCM_NW_3GPP2_REG_INFO_T registration_details_3gpp2; /**< Data registration details for 3GPP2. */ |
| 349 | }QL_MCM_NW_DATA_REG_EVENT_IND_T; |
| 350 | |
| 351 | |
| 352 | /** Indication message; Indication for the corresponding registered event flag NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG */ |
| 353 | typedef struct { |
| 354 | uint8_t gsm_sig_info_valid; /**< Must be set to TRUE if gsm_sig_info is being passed. */ |
| 355 | QL_MCM_NW_GSM_SIGNAL_INFO_T gsm_sig_info; /**< GSM singal information. */ |
| 356 | |
| 357 | uint8_t wcdma_sig_info_valid; /**< Must be set to TRUE if wcdma_sig_info is being passed. */ |
| 358 | QL_MCM_NW_WCDMA_SIGNAL_INFO_T wcdma_sig_info; /**< WCDMA singal information. */ |
| 359 | |
| 360 | uint8_t tdscdma_sig_info_valid; /**< Must be set to TRUE if tdscdma_sig_info is being passed. */ |
| 361 | QL_MCM_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info; /**< TDSCDMA singal information. */ |
| 362 | |
| 363 | uint8_t lte_sig_info_valid; /**< Must be set to TRUE if lte_sig_info is being passed. */ |
| 364 | QL_MCM_NW_LTE_SIGNAL_INFO_T lte_sig_info; /**< LTE singal information. */ |
| 365 | |
| 366 | uint8_t cdma_sig_info_valid; /**< Must be set to TRUE if cdma_sig_info is being passed. */ |
| 367 | QL_MCM_NW_CDMA_SIGNAL_INFO_T cdma_sig_info; /**< CDMA singal information. */ |
| 368 | |
| 369 | uint8_t hdr_sig_info_valid; /**< Must be set to TRUE if hdr_sig_info is being passed. */ |
| 370 | QL_MCM_NW_HDR_SIGNAL_INFO_T hdr_sig_info; /**< HDR singal information. */ |
| 371 | }QL_MCM_NW_SINGNAL_EVENT_IND_T; |
| 372 | |
| 373 | |
| 374 | /** Indication message; Indication for a change in the cell access state, e.g., emergency only, CS call only. |
| 375 | * Indication for the corresponding registered event flag NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG */ |
| 376 | typedef struct { |
| 377 | E_QL_MCM_NW_CELL_ACCESS_STATE_TYPE_T state; /**< Network cell access state. */ |
| 378 | }QL_MCM_NW_CELL_ACCESS_STATE_EVENT_IND_T; |
| 379 | |
| 380 | /** Indication Message; Indication to update NITZ time. |
| 381 | * Indication for the corresponding registered event flag NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG */ |
| 382 | typedef struct { |
| 383 | QL_MCM_NW_NITZ_TIME_INFO_T info; |
| 384 | }QL_MCM_NW_NITZ_TIME_EVENT_IND_T; |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | E_QL_ERROR_CODE_T QL_MCM_NW_Client_Init(nw_client_handle_type *ph_nw); |
| 390 | |
| 391 | E_QL_ERROR_CODE_T QL_MCM_NW_Client_Deinit(nw_client_handle_type h_nw); |
| 392 | |
| 393 | E_QL_ERROR_CODE_T QL_MCM_NW_SetConfig |
| 394 | ( |
| 395 | nw_client_handle_type h_nw, |
| 396 | QL_MCM_NW_CONFIG_INFO_T *pt_info |
| 397 | ); |
| 398 | |
| 399 | E_QL_ERROR_CODE_T QL_MCM_NW_GetConfig |
| 400 | ( |
| 401 | nw_client_handle_type h_nw, |
| 402 | QL_MCM_NW_CONFIG_INFO_T *pt_info |
| 403 | ); |
| 404 | |
| 405 | E_QL_ERROR_CODE_T QL_MCM_NW_GetNitzTimeInfo |
| 406 | ( |
| 407 | nw_client_handle_type h_nw, |
| 408 | QL_MCM_NW_NITZ_TIME_INFO_T *pt_info |
| 409 | ); |
| 410 | |
| 411 | E_QL_ERROR_CODE_T QL_MCM_NW_EventRegister |
| 412 | ( |
| 413 | nw_client_handle_type h_nw, |
| 414 | uint32_t bitmask // bit OR of NW_IND_xxxx_EVENT_ON |
| 415 | ); |
| 416 | |
| 417 | E_QL_ERROR_CODE_T QL_MCM_NW_GetOperatorName |
| 418 | ( |
| 419 | nw_client_handle_type h_nw, |
| 420 | QL_MCM_NW_OPERATOR_NAME_INFO_T *pt_info //You should malloc this or may cause stack overflow |
| 421 | ); |
| 422 | |
| 423 | E_QL_ERROR_CODE_T QL_MCM_NW_PerformScan |
| 424 | ( |
| 425 | nw_client_handle_type h_nw, |
| 426 | QL_MCM_NW_SCAN_RESULT_LIST_INFO_T *pt_info |
| 427 | ); |
| 428 | |
| 429 | E_QL_ERROR_CODE_T QL_MCM_NW_GetRegStatus |
| 430 | ( |
| 431 | nw_client_handle_type h_nw, |
| 432 | QL_MCM_NW_REG_STATUS_INFO_T *pt_info |
| 433 | ); |
| 434 | |
| 435 | E_QL_ERROR_CODE_T QL_MCM_NW_SetLowPowerMode |
| 436 | ( |
| 437 | nw_client_handle_type h_nw, |
| 438 | uint32_t low_power_mode_on // 0: off, other: on |
| 439 | ); |
| 440 | |
| 441 | E_QL_ERROR_CODE_T QL_MCM_NW_SetSelection |
| 442 | ( |
| 443 | nw_client_handle_type h_nw, |
| 444 | QL_MCM_NW_SELECTION_INFO_T *pt_info |
| 445 | ); |
| 446 | |
| 447 | E_QL_ERROR_CODE_T QL_MCM_NW_GetSignalStrength |
| 448 | ( |
| 449 | nw_client_handle_type h_nw, |
| 450 | QL_MCM_NW_SIGNAL_STRENGTH_INFO_T *pt_info |
| 451 | ); |
| 452 | |
| 453 | E_QL_ERROR_CODE_T QL_MCM_NW_GetCellAccessState |
| 454 | ( |
| 455 | nw_client_handle_type h_nw, |
| 456 | E_QL_MCM_NW_CELL_ACCESS_STATE_TYPE_T *pe_state |
| 457 | ); |
| 458 | |
| 459 | E_QL_ERROR_CODE_T QL_MCM_NW_AddRxMsgHandler |
| 460 | ( |
| 461 | nw_client_handle_type h_nw, |
| 462 | QL_MCM_NW_RxMsgHandlerFunc_t handlerPtr, |
| 463 | void* contextPtr |
| 464 | ); |
| 465 | |
| 466 | |
| 467 | #endif//__QL_MCM_NW_H__ |