le_mrc_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_mrc Modem Radio Control
14  *
15  * @ref le_mrc_interface.h "API Reference"
16  *
17  * <HR>
18  *
19  * The Modem Radio Control (MRC) APIs is used to control cellular network environments.
20  *
21  * It's important for many M2M apps to know details about cellular network environments (like
22  * network registration and signal quality).
23  * It allows you to limit some M2M services based on the reliability of the network environment, and
24  * provides information to control power consumption (power on or shutdown the radio module).
25  *
26  * @section le_mrc_binding IPC interfaces binding
27  *
28  * All the functions of this API are provided by the @b modemService service.
29  *
30  * Here's a code sample binding to modem services:
31  * @verbatim
32  bindings:
33  {
34  clientExe.clientComponent.le_mrc -> modemService.le_mrc
35  }
36  @endverbatim
37  *
38  * @section le_mrc_power Radio Power Management
39  * le_mrc_SetRadioPower() API allows the application to power up or shutdown the radio module.
40  *
41  * le_mrc_GetRadioPower() API displays radio module power state.
42  *
43  * A sample code can be seen in the following page:
44  * - @subpage c_mrcRadioPower
45  *
46  * @section le_mrc_configuration Radio Configuration preferences
47  *
48  * The following functions let you configure and retrieve the radio configuration preferences:
49  * le_mrc_SetAutomaticRegisterMode(), le_mrc_SetManualRegisterMode() and le_mrc_GetRegisterMode()
50  * let you set/get the selected Scan mode.
51  *
52  * le_mrc_SetBandPreferences(), le_mrc_GetBandPreferences() let you set/get the 2G/3G band
53  * preferences by using a bit mask built with @c le_mrc_BandBitMask_t
54  *
55  * The 2G/3G band preferences can be:
56  * - Band-Class-0-A-System
57  * - Band-Class-0-B-System
58  * - Band-Class-1-All-Blocks
59  * - Band-Class-2-Placeholder
60  * - Band-Class-3-A-System
61  * - Band-Class-4-All-Blocks
62  * - Band-Class-5-All-Blocks
63  * - Band-Class-6
64  * - Band-Class-7
65  * - Band-Class-8
66  * - Band-Class-9
67  * - Band-Class-10
68  * - Band-Class-11
69  * - Band-Class-12
70  * - Band-Class-13
71  * - Band-Class-14
72  * - Band-Class-15
73  * - Band-Class-16
74  * - Band-Class-17
75  * - Band-Class-18
76  * - Band-Class-19
77  * - GSM-DCS-1800
78  * - E-GSM-900 (for Extended GSM 900 band)
79  * - Primary-GSM-900
80  * - GSM-450
81  * - GSM-480
82  * - GSM-750
83  * - GSM-850
84  * - GSMR-900 (for GSM Railways GSM 900 band)
85  * - GSM-PCS-1900
86  * - WCDMA-EU-J-CH-IMT-2100 (for WCDMA Europe, Japan, and China IMT 2100 band)
87  * - WCDMA-US-PCS-1900 (for WCDMA U.S. PCS 1900 band)
88  * - WCDMA-EU-CH-DCS-1800 (for WCDMA Europe and China DCS 1800 band)
89  * - WCDMA-US-1700 (for WCDMA U.S. 1700 band)
90  * - WCDMA-US-850 (for WCDMA U.S. 850 band)
91  * - WCDMA-J-800 (for WCDMA Japan 800 band)
92  * - WCDMA-EU-2600 (for WCDMA Europe 2600 band)
93  * - WCDMA-EU-J-900 (for WCDMA Europe and Japan 900 band)
94  * - WCDMA-J-1700 (for WCDMA Japan 1700 band)
95  *
96  * le_mrc_SetLteBandPreferences(), le_mrc_GetLteBandPreferences() let you set/get the LTE band
97  * preferences by using a bit mask built with @c le_mrc_LteBandBitMask_t.
98  *
99  * The LTE band preferences can be 0 to 43 except 15, 16, 22, 23, and 26 to 32.
100  *
101  * le_mrc_SetTdScdmaBandPreferences(), le_mrc_GetTdScdmaBandPreferences() let you set/get the
102  * TD-SCDMA band preferences by using a bit mask built with @c le_mrc_TdScdmaBandBitMask_t
103  *
104  * The TD-SCDMA band preferences can be 'A' to 'F'
105  *
106  * @warning Ensure to check the supported preferences for your specific platform.
107  *
108  * le_mrc_AddPreferredOperator() , le_mrc_RemovePreferredOperator() to add/remove a preferred
109  * operator by specifying the MCC/MNC and the Radio Access Technology.
110  *
111  * le_mrc_GetPreferredOperatorsList(), le_mrc_GetFirstPreferredOperator(),
112  * le_mrc_GetNextPreferredOperator(), le_mrc_DeletePreferredOperatorsList(),
113  * le_mrc_GetPreferredOperatorDetails() let you retrieve a list of the selected preferred
114  * operators and get their details.
115  *
116  * A sample code can be seen in the following page:
117  * - @subpage c_mrcRadioConfigurationPreferences
118  *
119  * @section le_mrc_capabilities Radio Capabilities
120  *
121  * le_mrc_GetBandCapabilities() let you get the 2G/3G band capabilities by retrieving a bit mask
122  * built with @c le_mrc_BandBitMask_t
123  *
124  * le_mrc_GetLteBandCapabilities() let you get the LTE band capabilities by retrieving a bit mask
125  * built with @c le_mrc_LteBandBitMask_t
126  *
127  * le_mrc_GetTdScdmaBandCapabilities() let you get the TD-SCDMA band capabilities by retrieving
128  * a bit mask built with @c le_mrc_TdScdmaBandBitMask_t
129  *
130  * A sample code can be seen in the following page:
131  * - @subpage c_mrcBandCapabilities
132  *
133  * @section le_mrc_rat Radio Access Technology (RAT)
134  * le_mrc_GetRadioAccessTechInUse() API retrieves the current active Radio Access Technology.
135  *
136  * The application can register a handler function to retrieve the Radio Access Technology each time
137  * the RAT changes.
138  *
139  * le_mrc_AddRatChangeHandler() API installs a RAT change handler.
140  *
141  * le_mrc_RemoveRatChangeHandler() API uninstalls the handler function.
142  *
143  * le_mrc_SetRatPreferences(), le_mrc_GetRatPreferences() let you set/get the Radio Access
144  * Technology preferences by using a bit mask built with @c le_mrc_RatBitMask_t.
145  *
146  * The Radio Access Technology preferences can be:
147  * - CDMA (CDMA2000-1X + CDMA2000-HRPD)
148  * - GSM
149  * - UMTS (UMTS + TD-SCDMA)
150  * - LTE
151  *
152  * @note LE_MRC_BITMASK_RAT_ALL value can be used to select the RAT in automatic mode.
153  *
154  * A sample code can be seen in the following page:
155  * - @subpage c_mrcRAT
156  *
157  * @section le_mrc_registration Network Registration
158  * le_mrc_GetNetRegState() API retrieves the radio module network registration status.
159  *
160  * The application can register a handler function to retrieve the registration status each time the
161  * registration state changes.
162  *
163  * le_mrc_AddNetRegStateEventHandler() API installs a registration state handler.
164  *
165  * le_mrc_RemoveNetRegStateEventHandler() API uninstalls the handler function.
166  * @note If only one handler is registered, the le_mrc_RemoveNetRegStateHandler() API
167  * resets the registration mode to its original value before any handler functions were added.
168  *
169  * le_mrc_SetManualRegisterMode() API registers on a cellular network.
170  *
171  * Call le_mrc_SetManualRegisterModeAsync() function to set the manual registration mode
172  * asynchronously. The function is not blocking. The response will be returned with the
173  * @c le_mrc_ManualSelectionHandlerFunc_t handler function.
174  *
175  * When the network registration fails, the platform specific network registration error code can
176  * be known by using le_mrc_GetPlatformSpecificRegistrationErrorCode() (refer to your platform
177  * documentation for further details).
178  *
179  * A sample code can be seen in the following page:
180  * - @subpage c_mrcNetworkRegistration
181  *
182  * @section le_mrc_service Packet services state
183  *
184  * le_mrc_GetPacketSwitchedState() API retrieves the current Packet Switched state
185  * @ref le_mrc_NetRegState_t.
186  *
187  * The Packet Switched services state can be:
188  * - NONE
189  * - HOME
190  * - ROAMING
191  *
192  * The application can register a handler function to retrieve the Packet
193  * Switched state each time the service state changes.
194  *
195  * le_mrc_AddPacketSwitchedChangeHandler() API installs a Packet Switched state handler.
196  *
197  * le_mrc_RemovePacketSwitchedChangeHandler() API uninstalls the handler function.
198  *
199  * A sample code can be seen in the following page:
200  * - @subpage c_mrcGetService
201  *
202  * @section le_mrc_signal Signal Quality
203  *
204  * le_mrc_GetSignalQual() retrieves the received signal strength details.
205  *
206  * You must call le_mrc_MeasureSignalMetrics() to measure the signal metrics of the serving cell (aka
207  * the 'serving' cell). It returns a reference of le_mrc_MetricsRef_t type.
208  *
209  * When the signal metrics are no longer needed, you must call le_mrc_DeleteSignalMetrics() to free
210  * all allocated ressources associated with the Metrics object.
211  *
212  * le_mrc_GetRatOfSignalMetrics() returns the Radio Access Technology of the signal measures.
213  *
214  * le_mrc_GetGsmSignalMetrics() the signal strength in dBm and the bit error rate measured on GSM
215  * network.
216  *
217  * le_mrc_GetUmtsSignalMetrics() returns the signal metrics measured on UMTS network.
218  *
219  * le_mrc_GetLteSignalMetrics() returns the signal metrics measured on LTE network.
220  *
221  * le_mrc_GetCdmaSignalMetrics() returns the signal metrics measured on CDMA network.
222  *
223  * The application can register a handler function to get notifications when the signal strength
224  * changes of a certain threshold value.
225  *
226  * le_mrc_AddSignalStrengthChangeHandler() API installs a signal strength change handler.
227  * The RAT, the lower-range and the upper-range thresholds must be passed as input parameters. These
228  * parameters are updated each time the function is called, the previous thresholds are replaced by
229  * the new ones if the function is called with the same RAT.
230  *
231  * @warning The threshold values must be in the allowed platform range.
232  *
233  * The event is notified when we cross the range limits in both direction.
234  *
235  * le_mrc_RemoveSignalStrengthChangeHandler() API uninstalls the handler function.
236  *
237  * A sample code can be seen in the following page:
238  * - @subpage c_mrcQuality
239  *
240  * @section le_mrc_location Serving cell's location information
241  *
242  * le_mrc_GetServingCellId() retrieves the the serving Cell Identifier.
243  *
244  * le_mrc_GetServingCellLocAreaCode() retrieves the Location Area Code of the serving cell.
245  *
246  * le_mrc_GetServingCellLteTracAreaCode() retrieves the the Tracking Area Code of the serving cell
247  * (LTE only).
248  *
249  * A sample code can be seen in the following page:
250  * - @subpage c_mrcLocationinformation
251  *
252  * @section le_mrc_network_information Current Network Information
253  * le_mrc_GetCurrentNetworkName() retrieves the Current Network Name.
254  * le_mrc_GetCurrentNetworkMccMnc() retrieves the Current Network PLMN information.
255  *
256  * A sample code can be seen in the following page:
257  * - @subpage c_mrcGetCurrentNetwork
258  *
259  * @section le_mrc_networkScan Network Scan
260  *
261  * Call le_mrc_PerformCellularNetworkScan() to fill a list of all network in sight.
262  * You can go through all Scan Information by calling le_mrc_GetFirstCellularNetworkScan() and
263  * le_mrc_GetNextCellularNetworkScan().
264  *
265  * Call le_mrc_PerformCellularNetworkScanAsync() to start a network scan asynchronously. The
266  * function is not blocking. The scan list reference will be returned with the handler function
267  * response (@c le_mrc_CellularNetworkScanHandlerFunc_t).
268  *
269  * For each Scan Information, you can call:
270  *
271  * - le_mrc_GetCellularNetworkMccMnc() to have the operator code.
272  * - le_mrc_GetCellularNetworkName() to get the operator name.
273  * - le_mrc_GetCellularNetworkRat() to get the radio access technology.
274  * - le_mrc_IsCellularNetworkInUse() to check if this is currently in use by the network.
275  * - le_mrc_IsCellularNetworkAvailable() to check if this is available.
276  * - le_mrc_IsCellularNetworkHome() to check if this is in home status.
277  * - le_mrc_IsCellularNetworkForbidden() to check if this is forbidden by the network.
278  *
279  * le_mrc_DeleteCellularNetworkScan() should be called when you do not need the list anymore.
280  *
281  * A sample code can be seen in the following page:
282  * - @subpage c_mrcNetworkScan
283  *
284  * @section le_mrc_ngbr Neighboring Cells Information
285  *
286  * @warning The following functions do not apply to CDMA network.
287  *
288  * You must call le_mrc_GetNeighborCellsInfo() to retrieve the neighboring cells
289  * information. It returns a reference of le_mrc_NeighborCellsRef_t type.
290  *
291  * When the neighboring cells information is no longer needed, you must call
292  * le_mrc_DeleteNeighborCellsInfo() to free all allocated resources associated with the
293  * object.
294  *
295  * Then, you can use the following function to get the information:
296  * - le_mrc_GetFirstNeighborCellInfo() and le_mrc_GetFirstNeighborCellInfo() allow to go among
297  * the single cell information retrieved with le_mrc_GetNeighborCellsInfo(). These two functions
298  * return a reference of le_mrc_CellInfoRef_t type.
299  * - le_mrc_GetNeighborCellId() gets the identifier of the cell specified with the
300  * le_mrc_CellInfoRef_t parameter (can be called for any kind of RAT).
301  * - le_mrc_GetNeighborCellLocAreaCode() gets the location area code of the cell specified with the
302  * le_mrc_CellInfoRef_t parameter (can be called for any kind of RAT). UINT16_MAX value is
303  * returned if the value is not available.
304  * - le_mrc_GetNeighborCellRxLevel() gets the signal strength (in dBm) of the cell specified with
305  * the le_mrc_CellInfoRef_t parameter (can be called for any kind of RAT).
306  * - le_mrc_GetNeighborCellRat() gets the Radio Access Technology of the cell specified with
307  * the le_mrc_CellInfoRef_t parameter.
308  * - le_mrc_GetNeighborCellUmtsEcIo() gets the Ec/Io (the received energy per chip divided by the
309  * power density in the band measured in dBm on the primary CPICH channel of serving cell) of the
310  * cell specified with the le_mrc_CellInfoRef_t parameter.
311  * - le_mrc_GetNeighborCellLteIntraFreq() gets the RSRP and RSRQ of the Interfrequency of the cell
312  * specified with the le_mrc_CellInfoRef_t parameter.
313  * - le_mrc_GetNeighborCellLteInterFreq() gets the RSRP and RSRQ of the Interfrequency of the cell
314  * specified with the le_mrc_CellInfoRef_t parameter.
315  *
316  * A sample code can be seen in the following page:
317  * - @subpage c_mrcNeighborCells
318  *
319  *c_mrcNeighborCells
320  * <HR>
321  *
322  * Copyright (C) Sierra Wireless Inc.
323  */
324 /**
325  * @page c_mrcRadioPower Sample code for Radio Power Management
326  *
327  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Radio Power
328  */
329 /**
330  * @page c_mrcRadioConfigurationPreferences Sample code for Radio Configuration Preferences
331  *
332  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Band Preferences
333  *
334  */
335 /**
336  * @page c_mrcRAT Sample code for Radio Access Technology
337  *
338  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" RAT in Use
339  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" RAT Preferences
340  *
341  */
342 /**
343  * @page c_mrcNetworkRegistration Sample code for Network Registration
344  *
345  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Register
346  *
347  */
348 /**
349  * @page c_mrcQuality Sample code for Signal Quality
350  *
351  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Signal Quality
352  *
353  */
354 /**
355  * @page c_mrcLocationinformation Sample code for Location information
356  *
357  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Loc information
358  *
359  */
360 /**
361  * @page c_mrcBandCapabilities Sample code for Band Capabilities
362  *
363  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Band Capabilities
364  *
365  */
366 /**
367  * @page c_mrcGetCurrentNetwork Sample code for Get Current Network Information
368  *
369  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Get Network
370  *
371  */
372 /**
373  * @page c_mrcNetworkScan Sample code for Network Scan
374  *
375  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Network Scan
376  *
377  */
378 /**
379  * @page c_mrcNeighborCells Sample code for Neighboring Cells Information
380  *
381  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Neighbor Cells
382  *
383  */
384 /**
385  * @page c_mrcGetService Sample code for Get the Current Packet Switched state
386  *
387  * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Service State
388  *
389  */
390 /**
391  * @file le_mrc_interface.h
392  *
393  * Legato @ref c_mrc include file.
394  *
395  * Copyright (C) Sierra Wireless Inc.
396  */
397 
398 #ifndef LE_MRC_INTERFACE_H_INCLUDE_GUARD
399 #define LE_MRC_INTERFACE_H_INCLUDE_GUARD
400 
401 
402 #include "legato.h"
403 
404 
405 //--------------------------------------------------------------------------------------------------
406 /**
407  * Type for handler called when a server disconnects.
408  */
409 //--------------------------------------------------------------------------------------------------
410 typedef void (*le_mrc_DisconnectHandler_t)(void *);
411 
412 //--------------------------------------------------------------------------------------------------
413 /**
414  *
415  * Connect the current client thread to the service providing this API. Block until the service is
416  * available.
417  *
418  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
419  * called before any other functions in this API. Normally, ConnectService is automatically called
420  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
421  *
422  * This function is created automatically.
423  */
424 //--------------------------------------------------------------------------------------------------
426 (
427  void
428 );
429 
430 //--------------------------------------------------------------------------------------------------
431 /**
432  *
433  * Try to connect the current client thread to the service providing this API. Return with an error
434  * if the service is not available.
435  *
436  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
437  * called before any other functions in this API. Normally, ConnectService is automatically called
438  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
439  *
440  * This function is created automatically.
441  *
442  * @return
443  * - LE_OK if the client connected successfully to the service.
444  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
445  * bound.
446  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
447  * - LE_COMM_ERROR if the Service Directory cannot be reached.
448  */
449 //--------------------------------------------------------------------------------------------------
451 (
452  void
453 );
454 
455 //--------------------------------------------------------------------------------------------------
456 /**
457  * Set handler called when server disconnection is detected.
458  *
459  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
460  * to continue without exiting, it should call longjmp() from inside the handler.
461  */
462 //--------------------------------------------------------------------------------------------------
464 (
465  le_mrc_DisconnectHandler_t disconnectHandler,
466  void *contextPtr
467 );
468 
469 //--------------------------------------------------------------------------------------------------
470 /**
471  *
472  * Disconnect the current client thread from the service providing this API.
473  *
474  * Normally, this function doesn't need to be called. After this function is called, there's no
475  * longer a connection to the service, and the functions in this API can't be used. For details, see
476  * @ref apiFilesC_client.
477  *
478  * This function is created automatically.
479  */
480 //--------------------------------------------------------------------------------------------------
482 (
483  void
484 );
485 
486 
487 //--------------------------------------------------------------------------------------------------
488 /**
489  * Mobile Country Code length
490  */
491 //--------------------------------------------------------------------------------------------------
492 #define LE_MRC_MCC_LEN 3
493 
494 //--------------------------------------------------------------------------------------------------
495 /**
496  * Mobile Country Code length
497  * One extra byte is added for the null character.
498  */
499 //--------------------------------------------------------------------------------------------------
500 #define LE_MRC_MCC_BYTES 4
501 
502 //--------------------------------------------------------------------------------------------------
503 /**
504  * Mobile Network Code length
505  */
506 //--------------------------------------------------------------------------------------------------
507 #define LE_MRC_MNC_LEN 3
508 
509 //--------------------------------------------------------------------------------------------------
510 /**
511  * Mobile Network Code length
512  * One extra byte is added for the null character.
513  */
514 //--------------------------------------------------------------------------------------------------
515 #define LE_MRC_MNC_BYTES 4
516 
517 //--------------------------------------------------------------------------------------------------
518 /**
519  * Cellular Network length.
520  *
521  */
522 //--------------------------------------------------------------------------------------------------
523 #define LE_MRC_NETWORK_NAME_MAX_LEN 100
524 
525 //--------------------------------------------------------------------------------------------------
526 /**
527  * 2G/3G Band Bit Mask (64 bits)
528  */
529 //--------------------------------------------------------------------------------------------------
530 typedef enum
531 {
532  LE_MRC_BITMASK_BAND_CLASS_0_A_SYSTEM = 0x1,
533  LE_MRC_BITMASK_BAND_CLASS_0_B_SYSTEM = 0x2,
534  LE_MRC_BITMASK_BAND_CLASS_1_ALL_BLOCKS = 0x4,
535  LE_MRC_BITMASK_BAND_CLASS_2_PLACEHOLDER = 0x8,
536  LE_MRC_BITMASK_BAND_CLASS_3_A_SYSTEM = 0x10,
537  LE_MRC_BITMASK_BAND_CLASS_4_ALL_BLOCKS = 0x20,
538  LE_MRC_BITMASK_BAND_CLASS_5_ALL_BLOCKS = 0x40,
539  LE_MRC_BITMASK_BAND_CLASS_6 = 0x80,
540  LE_MRC_BITMASK_BAND_CLASS_7 = 0x100,
541  LE_MRC_BITMASK_BAND_CLASS_8 = 0x200,
542  LE_MRC_BITMASK_BAND_CLASS_9 = 0x400,
543  LE_MRC_BITMASK_BAND_CLASS_10 = 0x800,
544  LE_MRC_BITMASK_BAND_CLASS_11 = 0x1000,
545  LE_MRC_BITMASK_BAND_CLASS_12 = 0x2000,
546  LE_MRC_BITMASK_BAND_CLASS_14 = 0x4000,
547  LE_MRC_BITMASK_BAND_CLASS_15 = 0x8000,
548  LE_MRC_BITMASK_BAND_CLASS_16 = 0x10000,
549  LE_MRC_BITMASK_BAND_CLASS_17 = 0x20000,
550  LE_MRC_BITMASK_BAND_CLASS_18 = 0x40000,
551  LE_MRC_BITMASK_BAND_CLASS_19 = 0x80000,
552  LE_MRC_BITMASK_BAND_GSM_DCS_1800 = 0x100000,
553  LE_MRC_BITMASK_BAND_EGSM_900 = 0x200000,
554  LE_MRC_BITMASK_BAND_PRI_GSM_900 = 0x400000,
555  LE_MRC_BITMASK_BAND_GSM_450 = 0x800000,
556  LE_MRC_BITMASK_BAND_GSM_480 = 0x1000000,
557  LE_MRC_BITMASK_BAND_GSM_750 = 0x2000000,
558  LE_MRC_BITMASK_BAND_GSM_850 = 0x4000000,
559  LE_MRC_BITMASK_BAND_GSMR_900 = 0x8000000,
560  LE_MRC_BITMASK_BAND_GSM_PCS_1900 = 0x10000000,
561  LE_MRC_BITMASK_BAND_WCDMA_EU_J_CH_IMT_2100 = 0x20000000,
562  LE_MRC_BITMASK_BAND_WCDMA_US_PCS_1900 = 0x40000000,
563  LE_MRC_BITMASK_BAND_WCDMA_EU_CH_DCS_1800 = 0x80000000,
564  LE_MRC_BITMASK_BAND_WCDMA_US_1700 = 0x100000000,
565  LE_MRC_BITMASK_BAND_WCDMA_US_850 = 0x200000000,
566  LE_MRC_BITMASK_BAND_WCDMA_J_800 = 0x400000000,
567  LE_MRC_BITMASK_BAND_WCDMA_EU_2600 = 0x800000000,
568  LE_MRC_BITMASK_BAND_WCDMA_EU_J_900 = 0x1000000000,
569  LE_MRC_BITMASK_BAND_WCDMA_J_1700 = 0x2000000000
570 }
572 
573 
574 //--------------------------------------------------------------------------------------------------
575 /**
576  * LTE Band Bit Mask (32bits)
577  *
578  */
579 //--------------------------------------------------------------------------------------------------
580 typedef enum
581 {
582  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_1 = 0x1,
583  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_2 = 0x2,
584  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_3 = 0x4,
585  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_4 = 0x8,
586  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_5 = 0x10,
587  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_6 = 0x20,
588  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_7 = 0x40,
589  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_8 = 0x80,
590  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_9 = 0x100,
591  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_10 = 0x200,
592  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_11 = 0x400,
593  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_12 = 0x800,
594  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_13 = 0x1000,
595  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_14 = 0x2000,
596  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_17 = 0x4000,
597  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_18 = 0x8000,
598  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_19 = 0x10000,
599  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_20 = 0x20000,
600  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_21 = 0x40000,
601  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_24 = 0x80000,
602  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_25 = 0x100000,
603  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_33 = 0x200000,
604  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_34 = 0x400000,
605  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_35 = 0x800000,
606  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_36 = 0x1000000,
607  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_37 = 0x2000000,
608  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_38 = 0x4000000,
609  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_39 = 0x8000000,
610  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_40 = 0x10000000,
611  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_41 = 0x20000000,
612  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_42 = 0x40000000,
613  LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_43 = 0x80000000
614 }
616 
617 
618 //--------------------------------------------------------------------------------------------------
619 /**
620  * TDSCDMA Band Bit Mask
621  *
622  */
623 //--------------------------------------------------------------------------------------------------
624 typedef enum
625 {
626  LE_MRC_BITMASK_TDSCDMA_BAND_A = 0x1,
627  LE_MRC_BITMASK_TDSCDMA_BAND_B = 0x2,
628  LE_MRC_BITMASK_TDSCDMA_BAND_C = 0x4,
629  LE_MRC_BITMASK_TDSCDMA_BAND_D = 0x8,
630  LE_MRC_BITMASK_TDSCDMA_BAND_E = 0x10,
631  LE_MRC_BITMASK_TDSCDMA_BAND_F = 0x20
632 }
634 
635 
636 //--------------------------------------------------------------------------------------------------
637 /**
638  * Reference type for referring to MRC Scan Information objects.
639  */
640 //--------------------------------------------------------------------------------------------------
641 typedef struct le_mrc_ScanInformation* le_mrc_ScanInformationRef_t;
642 
643 
644 //--------------------------------------------------------------------------------------------------
645 /**
646  * Reference type for Scan Information Listing.
647  */
648 //--------------------------------------------------------------------------------------------------
649 typedef struct le_mrc_ScanInformationList* le_mrc_ScanInformationListRef_t;
650 
651 
652 //--------------------------------------------------------------------------------------------------
653 /**
654  * Reference type for referring to the Preferred Operator objects.
655  */
656 //--------------------------------------------------------------------------------------------------
657 typedef struct le_mrc_PreferredOperator* le_mrc_PreferredOperatorRef_t;
658 
659 
660 //--------------------------------------------------------------------------------------------------
661 /**
662  * Reference type for Preferred Operator Listing.
663  */
664 //--------------------------------------------------------------------------------------------------
665 typedef struct le_mrc_PreferredOperatorList* le_mrc_PreferredOperatorListRef_t;
666 
667 
668 //--------------------------------------------------------------------------------------------------
669 /**
670  * Reference type for one Cell Information.
671  */
672 //--------------------------------------------------------------------------------------------------
673 typedef struct le_mrc_CellInfo* le_mrc_CellInfoRef_t;
674 
675 
676 //--------------------------------------------------------------------------------------------------
677 /**
678  * Reference type for all Neighboring Cells Information.
679  */
680 //--------------------------------------------------------------------------------------------------
681 typedef struct le_mrc_NeighborCells* le_mrc_NeighborCellsRef_t;
682 
683 
684 //--------------------------------------------------------------------------------------------------
685 /**
686  * Reference type for the signal metrics.
687  */
688 //--------------------------------------------------------------------------------------------------
689 typedef struct le_mrc_Metrics* le_mrc_MetricsRef_t;
690 
691 
692 //--------------------------------------------------------------------------------------------------
693 /**
694  * Network Registration states.
695  */
696 //--------------------------------------------------------------------------------------------------
697 typedef enum
698 {
700  ///< Not registered and not currently searching for new operator.
702  ///< Registered, home network.
704  ///< Not registered but currently searching for a new operator.
706  ///< Registration was denied, usually because of invalid access credentials.
708  ///< Registered to a roaming network.
710  ///< Unknown state.
711 }
713 
714 
715 //--------------------------------------------------------------------------------------------------
716 /**
717  * Radio Access Technology enum
718  */
719 //--------------------------------------------------------------------------------------------------
720 typedef enum
721 {
723  ///< Unknown
725  ///< GSM network
727  ///< UMTS network
729  ///< LTE network
731  ///< CDMA network
732 }
734 
735 
736 //--------------------------------------------------------------------------------------------------
737 /**
738  * Radio Bitmask Access Technology Bit Mask
739  */
740 //--------------------------------------------------------------------------------------------------
741 typedef enum
742 {
743  LE_MRC_BITMASK_RAT_GSM = 0x1, ///< GSM RAT Bit Mask
744  LE_MRC_BITMASK_RAT_UMTS = 0x2, ///< UMTS RAT Bit Mask
745  LE_MRC_BITMASK_RAT_LTE = 0x4, ///< LTE RAT Bit Mask
746  LE_MRC_BITMASK_RAT_CDMA = 0x8, ///< CDMA RAT Bit Mask
747  LE_MRC_BITMASK_RAT_ALL = 0x10, ///< To Set all RAT preference Bit Mask
748  LE_MRC_BITMASK_RAT_MAX = 0x20
749 }
751 
752 
753 //--------------------------------------------------------------------------------------------------
754 /**
755  * Reference type used by Add/Remove functions for EVENT 'le_mrc_NetRegStateEvent'
756  */
757 //--------------------------------------------------------------------------------------------------
758 typedef struct le_mrc_NetRegStateEventHandler* le_mrc_NetRegStateEventHandlerRef_t;
759 
760 
761 //--------------------------------------------------------------------------------------------------
762 /**
763  * Reference type used by Add/Remove functions for EVENT 'le_mrc_RatChange'
764  */
765 //--------------------------------------------------------------------------------------------------
766 typedef struct le_mrc_RatChangeHandler* le_mrc_RatChangeHandlerRef_t;
767 
768 
769 //--------------------------------------------------------------------------------------------------
770 /**
771  * Reference type used by Add/Remove functions for EVENT 'le_mrc_PacketSwitchedChange'
772  */
773 //--------------------------------------------------------------------------------------------------
774 typedef struct le_mrc_PacketSwitchedChangeHandler* le_mrc_PacketSwitchedChangeHandlerRef_t;
775 
776 
777 //--------------------------------------------------------------------------------------------------
778 /**
779  * Reference type used by Add/Remove functions for EVENT 'le_mrc_SignalStrengthChange'
780  */
781 //--------------------------------------------------------------------------------------------------
782 typedef struct le_mrc_SignalStrengthChangeHandler* le_mrc_SignalStrengthChangeHandlerRef_t;
783 
784 
785 //--------------------------------------------------------------------------------------------------
786 /**
787  * Handler for Network registration state changes.
788  *
789  */
790 //--------------------------------------------------------------------------------------------------
791 typedef void (*le_mrc_NetRegStateHandlerFunc_t)
792 (
793  le_mrc_NetRegState_t state,
794  ///< Parameter ready to receive the Network Registration state.
795  void* contextPtr
796  ///<
797 );
798 
799 //--------------------------------------------------------------------------------------------------
800 /**
801  * Handler for Radio Access Technology changes.
802  *
803  */
804 //--------------------------------------------------------------------------------------------------
805 typedef void (*le_mrc_RatChangeHandlerFunc_t)
806 (
807  le_mrc_Rat_t rat,
808  ///< Parameter ready to receive the Radio Access Technology.
809  void* contextPtr
810  ///<
811 );
812 
813 //--------------------------------------------------------------------------------------------------
814 /**
815  * Handler for Packet Switched service state changes.
816  *
817  */
818 //--------------------------------------------------------------------------------------------------
820 (
821  le_mrc_NetRegState_t state,
822  ///< Parameter ready to receive the Packet Switched service state.
823  void* contextPtr
824  ///<
825 );
826 
827 //--------------------------------------------------------------------------------------------------
828 /**
829  * Handler for Signal Strength value changes.
830  *
831  */
832 //--------------------------------------------------------------------------------------------------
834 (
835  int32_t ss,
836  ///< Signal strength in dBm
837  void* contextPtr
838  ///<
839 );
840 
841 //--------------------------------------------------------------------------------------------------
842 /**
843  * Handler for cellular asynchronous network scan Sending result.
844  * Returns the reference to the List object. Null pointer if the scan failed.
845  *
846  */
847 //--------------------------------------------------------------------------------------------------
849 (
851  ///< Reference to the List object. Null pointer if the
852  ///< scan failed.
853  void* contextPtr
854  ///<
855 );
856 
857 //--------------------------------------------------------------------------------------------------
858 /**
859  * Handler for asynchronous manual selection response
860  *
861  */
862 //--------------------------------------------------------------------------------------------------
864 (
865  le_result_t result,
866  ///< Manual selection response
867  void* contextPtr
868  ///<
869 );
870 
871 //--------------------------------------------------------------------------------------------------
872 /**
873  * Add handler function for EVENT 'le_mrc_NetRegStateEvent'
874  *
875  * This event provides information on network registration state changes.
876  *
877  * @note <b>multi-app safe</b>
878  */
879 //--------------------------------------------------------------------------------------------------
881 (
883  ///< [IN]
884  void* contextPtr
885  ///< [IN]
886 );
887 
888 //--------------------------------------------------------------------------------------------------
889 /**
890  * Remove handler function for EVENT 'le_mrc_NetRegStateEvent'
891  */
892 //--------------------------------------------------------------------------------------------------
894 (
896  ///< [IN]
897 );
898 
899 //--------------------------------------------------------------------------------------------------
900 /**
901  * Add handler function for EVENT 'le_mrc_RatChange'
902  *
903  * This event provides information on Radio Access Technology changes.
904  *
905  * @note <b>multi-app safe</b>
906  */
907 //--------------------------------------------------------------------------------------------------
909 (
911  ///< [IN]
912  void* contextPtr
913  ///< [IN]
914 );
915 
916 //--------------------------------------------------------------------------------------------------
917 /**
918  * Remove handler function for EVENT 'le_mrc_RatChange'
919  */
920 //--------------------------------------------------------------------------------------------------
922 (
924  ///< [IN]
925 );
926 
927 //--------------------------------------------------------------------------------------------------
928 /**
929  * Add handler function for EVENT 'le_mrc_PacketSwitchedChange'
930  *
931  * This event provides information on Packet Switched service changes.
932  *
933  * @note <b>multi-app safe</b>
934  */
935 //--------------------------------------------------------------------------------------------------
937 (
939  ///< [IN]
940  void* contextPtr
941  ///< [IN]
942 );
943 
944 //--------------------------------------------------------------------------------------------------
945 /**
946  * Remove handler function for EVENT 'le_mrc_PacketSwitchedChange'
947  */
948 //--------------------------------------------------------------------------------------------------
950 (
952  ///< [IN]
953 );
954 
955 //--------------------------------------------------------------------------------------------------
956 /**
957  * Add handler function for EVENT 'le_mrc_SignalStrengthChange'
958  *
959  * This event provides information on Signal Strength value changes.
960  *
961  * @note <b>NOT multi-app safe</b>
962  */
963 //--------------------------------------------------------------------------------------------------
965 (
966  le_mrc_Rat_t rat,
967  ///< [IN] Radio Access Technology
968  int32_t lowerRangeThreshold,
969  ///< [IN] lower-range Signal strength threshold in dBm
970  int32_t upperRangeThreshold,
971  ///< [IN] upper-range Signal strength threshold in dBm
973  ///< [IN]
974  void* contextPtr
975  ///< [IN]
976 );
977 
978 //--------------------------------------------------------------------------------------------------
979 /**
980  * Remove handler function for EVENT 'le_mrc_SignalStrengthChange'
981  */
982 //--------------------------------------------------------------------------------------------------
984 (
986  ///< [IN]
987 );
988 
989 //--------------------------------------------------------------------------------------------------
990 /**
991  * Enable the automatic Selection Register mode.
992  *
993  * @return
994  * - LE_FAULT Function failed.
995  * - LE_OK Function succeeded.
996  *
997  * @note <b>NOT multi-app safe</b>
998  */
999 //--------------------------------------------------------------------------------------------------
1001 (
1002  void
1003 );
1004 
1005 //--------------------------------------------------------------------------------------------------
1006 /**
1007  * Set the manual Selection Register mode with the MCC/MNC parameters.
1008  *
1009  * @return
1010  * - LE_FAULT Function failed.
1011  * - LE_OK Function succeeded.
1012  *
1013  * @note If strings are not set, too long (bigger than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN digits), or too
1014  * short (less than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN-1 digits) it's a fatal error, the function
1015  * won't return.
1016  *
1017  * @note <b>NOT multi-app safe</b>
1018  */
1019 //--------------------------------------------------------------------------------------------------
1021 (
1022  const char* mcc,
1023  ///< [IN] Mobile Country Code
1024  const char* mnc
1025  ///< [IN] Mobile Network Code
1026 )
1027 __attribute__(( nonnull(1,2) ));
1028 
1029 //--------------------------------------------------------------------------------------------------
1030 /**
1031  * Set the manual selection register mode asynchronously. This function is not blocking,
1032  * the response will be returned with a handler function.
1033  *
1034  * @note If strings are not set, too long (bigger than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN digits), or too
1035  * short (less than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN-1 digits) it's a fatal error, the function
1036  * won't return.
1037  *
1038  *@note <b>NOT multi-app safe</b>
1039  *
1040  */
1041 //--------------------------------------------------------------------------------------------------
1043 (
1044  const char* mcc,
1045  ///< [IN] Mobile Country Code
1046  const char* mnc,
1047  ///< [IN] Mobile Network Code
1049  ///< [IN] handler for sending result
1050  void* contextPtr
1051  ///< [IN]
1052 )
1053 __attribute__(( nonnull(1,2) ));
1054 
1055 //--------------------------------------------------------------------------------------------------
1056 /**
1057  * Get the selected Selection Register mode.
1058  *
1059  * @return
1060  * - LE_FAULT Function failed.
1061  * - LE_OK Function succeeded.
1062  *
1063  * @note <b>multi-app safe</b>
1064  */
1065 //--------------------------------------------------------------------------------------------------
1067 (
1068  bool* isManualPtrPtr,
1069  ///< [OUT] true if the scan mode is manual, false if the scan mode is automatic.
1070  char* mccPtr,
1071  ///< [OUT] Mobile Country Code
1072  size_t mccPtrSize,
1073  ///< [IN]
1074  char* mncPtr,
1075  ///< [OUT] Mobile Network Code
1076  size_t mncPtrSize
1077  ///< [IN]
1078 );
1079 
1080 //--------------------------------------------------------------------------------------------------
1081 /**
1082  * Get the Packet Switched state.
1083  *
1084  * @return
1085  * - LE_FAULT Function failed.
1086  * - LE_OK Function succeeded.
1087  *
1088  * @note <b>multi-app safe</b>
1089  */
1090 //--------------------------------------------------------------------------------------------------
1092 (
1093  le_mrc_NetRegState_t* statePtr
1094  ///< [OUT] The current Packet switched state.
1095 );
1096 
1097 //--------------------------------------------------------------------------------------------------
1098 /**
1099  * Get the platform specific network registration error code.
1100  *
1101  * @return the platform specific registration error code
1102  *
1103  */
1104 //--------------------------------------------------------------------------------------------------
1106 (
1107  void
1108 );
1109 
1110 //--------------------------------------------------------------------------------------------------
1111 /**
1112  * Set the Radio Access Technology preferences by using a bit mask.
1113  *
1114  * @return
1115  * - LE_FAULT Function failed.
1116  * - LE_OK Function succeeded.
1117  *
1118  * @note <b>NOT multi-app safe</b>
1119  */
1120 //--------------------------------------------------------------------------------------------------
1122 (
1123  le_mrc_RatBitMask_t ratMask
1124  ///< [IN] Bit mask for the Radio Access Technology preferences.
1125 );
1126 
1127 //--------------------------------------------------------------------------------------------------
1128 /**
1129  * Get the Radio Access Technology preferences
1130  *
1131  * @return
1132  * - LE_FAULT Function failed.
1133  * - LE_OK Function succeeded.
1134  *
1135  * @note <b>multi-app safe</b>
1136  */
1137 //--------------------------------------------------------------------------------------------------
1139 (
1140  le_mrc_RatBitMask_t* ratMaskPtrPtr
1141  ///< [OUT] Bit mask for the Radio Access Technology preferences.
1142 );
1143 
1144 //--------------------------------------------------------------------------------------------------
1145 /**
1146  * Set the 2G/3G Band preferences by using a bit mask.
1147  *
1148  * @return
1149  * - LE_FAULT Function failed.
1150  * - LE_OK Function succeeded.
1151  *
1152  * @note <b>NOT multi-app safe</b>
1153  */
1154 //--------------------------------------------------------------------------------------------------
1156 (
1157  le_mrc_BandBitMask_t bandMask
1158  ///< [IN] Bit mask for 2G/3G Band preferences.
1159 );
1160 
1161 //--------------------------------------------------------------------------------------------------
1162 /**
1163  * Get the Bit mask for 2G/3G Band preferences.
1164  *
1165  * @return
1166  * - LE_FAULT Function failed.
1167  * - LE_OK Function succeeded.
1168  *
1169  * @note <b>multi-app safe</b>
1170  */
1171 //--------------------------------------------------------------------------------------------------
1173 (
1174  le_mrc_BandBitMask_t* bandMaskPtrPtr
1175  ///< [OUT] Bit mask for 2G/3G Band preferences.
1176 );
1177 
1178 //--------------------------------------------------------------------------------------------------
1179 /**
1180  * Set the LTE Band preferences by using a bit mask.
1181  *
1182  * @return
1183  * - LE_FAULT Function failed.
1184  * - LE_OK Function succeeded.
1185  *
1186  * @note <b>NOT multi-app safe</b>
1187  */
1188 //--------------------------------------------------------------------------------------------------
1190 (
1191  le_mrc_LteBandBitMask_t bandMask
1192  ///< [IN] Bit mask for LTE Band preferences.
1193 );
1194 
1195 //--------------------------------------------------------------------------------------------------
1196 /**
1197  * Get the Bit mask for LTE Band preferences.
1198  *
1199  * @return
1200  * - LE_FAULT Function failed.
1201  * - LE_OK Function succeeded.
1202  *
1203  * @note <b>multi-app safe</b>
1204  */
1205 //--------------------------------------------------------------------------------------------------
1207 (
1208  le_mrc_LteBandBitMask_t* bandMaskPtrPtr
1209  ///< [OUT] Bit mask for LTE Band preferences.
1210 );
1211 
1212 //--------------------------------------------------------------------------------------------------
1213 /**
1214  * Set the TD-SCDMA Band preferences by using a bit mask.
1215  *
1216  * @return
1217  * - LE_FAULT Function failed.
1218  * - LE_OK Function succeeded.
1219  *
1220  * @note <b>NOT multi-app safe</b>
1221  */
1222 //--------------------------------------------------------------------------------------------------
1224 (
1226  ///< [IN] Bit mask for TD-SCDMA Band preferences.
1227 );
1228 
1229 //--------------------------------------------------------------------------------------------------
1230 /**
1231  * Get the Bit mask for TD-SCDMA Band preferences.
1232  *
1233  * @return
1234  * - LE_FAULT Function failed.
1235  * - LE_OK Function succeeded.
1236  *
1237  * @note <b>multi-app safe</b>
1238  */
1239 //--------------------------------------------------------------------------------------------------
1241 (
1242  le_mrc_TdScdmaBandBitMask_t* bandMaskPtrPtr
1243  ///< [OUT] Bit mask for TD-SCDMA Band preferences.
1244 );
1245 
1246 //--------------------------------------------------------------------------------------------------
1247 /**
1248  * Add a preferred operator by specifying the MCC/MNC and the Radio Access Technology.
1249  *
1250  * @return
1251  * - LE_UNSUPPORTED List of User Preferred operators not available.
1252  * - LE_FAULT Function failed.
1253  * - LE_BAD_PARAMETER RAT mask is invalid.
1254  * - LE_OK Function succeeded.
1255  *
1256  * @note If strings are not set, too long (bigger than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN digits), or too
1257  * short (less than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN-1 digits) it's a fatal error, the function
1258  * won't return.
1259  *
1260  * @note <b>NOT multi-app safe</b>
1261  */
1262 //--------------------------------------------------------------------------------------------------
1264 (
1265  const char* mcc,
1266  ///< [IN] Mobile Country Code
1267  const char* mnc,
1268  ///< [IN] Mobile Network Code
1269  le_mrc_RatBitMask_t ratMask
1270  ///< [IN] Bit mask for the Radio Access Technology preferences.
1271 )
1272 __attribute__(( nonnull(1,2) ));
1273 
1274 //--------------------------------------------------------------------------------------------------
1275 /**
1276  * Remove a preferred operator by specifying the MCC/MNC.
1277  *
1278  * @return
1279  * - LE_UNSUPPORTED List of User Preferred operators not available.
1280  * - LE_NOT_FOUND Operator not found in the User Preferred operators list.
1281  * - LE_FAULT Function failed.
1282  * - LE_OK Function succeeded.
1283  *
1284  * @note If strings are not set, too long (bigger than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN digits), or too
1285  * short (less than LE_MRC_MCC_LEN/LE_MRC_MNC_LEN-1 digits) it's a fatal error, the function
1286  * won't return.
1287  *
1288  * @note <b>NOT multi-app safe</b>
1289  */
1290 //--------------------------------------------------------------------------------------------------
1292 (
1293  const char* mcc,
1294  ///< [IN] Mobile Country Code
1295  const char* mnc
1296  ///< [IN] Mobile Network Code
1297 )
1298 __attribute__(( nonnull(1,2) ));
1299 
1300 //--------------------------------------------------------------------------------------------------
1301 /**
1302  * This function must be called to retrieve a list of the preferred operators.
1303  *
1304  * @return
1305  * - Reference to the List object.
1306  * - Null pointer if there is no preferences list.
1307  *
1308  * @note <b>multi-app safe</b>
1309  */
1310 //--------------------------------------------------------------------------------------------------
1312 (
1313  void
1314 );
1315 
1316 //--------------------------------------------------------------------------------------------------
1317 /**
1318  * This function must be called to get the first Operator object reference in the list of the
1319  * preferred operators retrieved with le_mrc_GetPreferredOperators().
1320  *
1321  * @return
1322  * - NULL No operator information found.
1323  * - le_mrc_PreferredOperatorRef The Operator object reference.
1324  *
1325  * @note If the caller is passing a bad reference into this function, it's a fatal error, the
1326  * function won't return.
1327  *
1328  * @note <b>multi-app safe</b>
1329  */
1330 //--------------------------------------------------------------------------------------------------
1332 (
1333  le_mrc_PreferredOperatorListRef_t preferredOperatorListRef
1334  ///< [IN] The list of the preferred operators.
1335 );
1336 
1337 //--------------------------------------------------------------------------------------------------
1338 /**
1339  * This function must be called to get the next Operator object reference in the list of the
1340  * preferred operators retrieved with le_mrc_GetPreferredOperators().
1341  *
1342  * @return
1343  * - NULL No operator information found.
1344  * - le_mrc_PreferredOperatorRef The Operator object reference.
1345  *
1346  * @note If the caller is passing a bad reference into this function, it's a fatal error, the
1347  * function won't return.
1348  *
1349  * @note <b>multi-app safe</b>
1350  */
1351 //--------------------------------------------------------------------------------------------------
1353 (
1354  le_mrc_PreferredOperatorListRef_t preferredOperatorListRef
1355  ///< [IN] The list of the preferred operators.
1356 );
1357 
1358 //--------------------------------------------------------------------------------------------------
1359 /**
1360  * This function must be called to delete the list of the preferred operators retrieved with
1361  * le_mrc_GetPreferredOperators().
1362  *
1363  * @note On failure, the process exits, so you don't have to worry about checking the returned
1364  * reference for validity.
1365  *
1366  * @note <b>multi-app safe</b>
1367  */
1368 //--------------------------------------------------------------------------------------------------
1370 (
1371  le_mrc_PreferredOperatorListRef_t preferredOperatorListRef
1372  ///< [IN] The list of the preferred operators.
1373 );
1374 
1375 //--------------------------------------------------------------------------------------------------
1376 /**
1377  * This function must be called to get the Operator information details.
1378  *
1379  * @return
1380  * - LE_OK on success
1381  * - LE_OVERFLOW if the MCC or MNC would not fit in buffer
1382  * - LE_FAULT for all other errors
1383  *
1384  * @note <b>multi-app safe</b>
1385  */
1386 //--------------------------------------------------------------------------------------------------
1388 (
1389  le_mrc_PreferredOperatorRef_t preferredOperatorRef,
1390  ///< [IN] Operator object reference.
1391  char* mccPtr,
1392  ///< [OUT] Mobile Country Code.
1393  size_t mccPtrSize,
1394  ///< [IN]
1395  char* mncPtr,
1396  ///< [OUT] Mobile Network Code.
1397  size_t mncPtrSize,
1398  ///< [IN]
1399  le_mrc_RatBitMask_t* ratMaskPtr
1400  ///< [OUT] Bit mask for the RAT preferences.
1401 );
1402 
1403 //--------------------------------------------------------------------------------------------------
1404 /**
1405  * Get the network registration state.
1406  *
1407  * @return LE_FAULT The function failed to get the Network registration state.
1408  * @return LE_BAD_PARAMETER A bad parameter was passed.
1409  * @return LE_OK The function succeeded.
1410  *
1411  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1412  * function won't return.
1413  *
1414  * @note <b>multi-app safe</b>
1415  */
1416 //--------------------------------------------------------------------------------------------------
1418 (
1419  le_mrc_NetRegState_t* statePtr
1420  ///< [OUT] Network Registration state.
1421 );
1422 
1423 //--------------------------------------------------------------------------------------------------
1424 /**
1425  * Get the signal quality.
1426  *
1427  * @return LE_FAULT The function failed to get the Signal Quality information.
1428  * @return LE_BAD_PARAMETER A bad parameter was passed.
1429  * @return LE_OK The function succeeded.
1430  *
1431  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1432  * function won't return.
1433  *
1434  * @note <b>multi-app safe</b>
1435  */
1436 //--------------------------------------------------------------------------------------------------
1438 (
1439  uint32_t* qualityPtr
1440  ///< [OUT] [OUT] Received signal strength quality (0 = no signal strength,
1441  ///< 5 = very good signal strength).
1442 );
1443 
1444 //--------------------------------------------------------------------------------------------------
1445 /**
1446  * Set the power of the Radio Module.
1447  *
1448  * @return LE_BAD_PARAMETER Bad power mode specified.
1449  * @return LE_FAULT Function failed.
1450  * @return LE_OK Function succeed.
1451  *
1452  * @note <b>NOT multi-app safe</b>
1453  */
1454 //--------------------------------------------------------------------------------------------------
1456 (
1457  le_onoff_t power
1458  ///< [IN] The power state.
1459 );
1460 
1461 //--------------------------------------------------------------------------------------------------
1462 /**
1463  * Must be called to get the Radio Module power state.
1464  *
1465  * @return LE_FAULT The function failed to get the Radio Module power state.
1466  * @return LE_BAD_PARAMETER if powerPtr is NULL.
1467  * @return LE_OK The function succeed.
1468  *
1469  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1470  * function won't return.
1471  *
1472  * @note <b>multi-app safe</b>
1473  */
1474 //--------------------------------------------------------------------------------------------------
1476 (
1477  le_onoff_t* powerPtr
1478  ///< [OUT] Power state.
1479 );
1480 
1481 //--------------------------------------------------------------------------------------------------
1482 /**
1483  * This function must be called to perform a cellular network scan.
1484  *
1485  * @return Reference to the List object. Null pointer if the scan failed.
1486  *
1487  * @note <b>multi-app safe</b>
1488  */
1489 //--------------------------------------------------------------------------------------------------
1491 (
1492  le_mrc_RatBitMask_t ratMask
1493  ///< [IN] Radio Access Technology mask
1494 );
1495 
1496 //--------------------------------------------------------------------------------------------------
1497 /**
1498  * This function must be called to perform a cellular network scan asynchronously. This function
1499  * is not blocking, the response will be returned with a handler function.
1500  *
1501  *@note <b>multi-app safe</b>
1502  *
1503  */
1504 //--------------------------------------------------------------------------------------------------
1506 (
1507  le_mrc_RatBitMask_t ratMask,
1508  ///< [IN] Radio Access Technology mask
1510  ///< [IN] handler for sending result.
1511  void* contextPtr
1512  ///< [IN]
1513 );
1514 
1515 //--------------------------------------------------------------------------------------------------
1516 /**
1517  * This function must be called to get the first Scan Information object reference in the list of
1518  * scan Information retrieved with le_mrc_PerformCellularNetworkScan().
1519  *
1520  * @return NULL No scan information found.
1521  * @return le_mrc_ScanInformationRef_t The Scan Information object reference.
1522  *
1523  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1524  * function won't return.
1525  *
1526  * @note <b>multi-app safe</b>
1527  */
1528 //--------------------------------------------------------------------------------------------------
1530 (
1531  le_mrc_ScanInformationListRef_t scanInformationListRef
1532  ///< [IN] The list of scan information.
1533 );
1534 
1535 //--------------------------------------------------------------------------------------------------
1536 /**
1537  * This function must be called to get the next Scan Information object reference in the list of
1538  * scan Information retrieved with le_mrc_PerformCellularNetworkScan().
1539  *
1540  * @return NULL No scan information found.
1541  * @return le_mrc_ScanInformationRef_t The Scan Information object reference.
1542  *
1543  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1544  * function won't return.
1545  *
1546  * @note <b>multi-app safe</b>
1547  */
1548 //--------------------------------------------------------------------------------------------------
1550 (
1551  le_mrc_ScanInformationListRef_t scanInformationListRef
1552  ///< [IN] The list of scan information.
1553 );
1554 
1555 //--------------------------------------------------------------------------------------------------
1556 /**
1557  * This function must be called to delete the list of the Scan Information retrieved with
1558  * le_mrc_PerformCellularNetworkScan().
1559  *
1560  * @note
1561  * On failure, the process exits, so you don't have to worry about checking the returned
1562  * reference for validity.
1563  *
1564  * @note <b>multi-app safe</b>
1565  */
1566 //--------------------------------------------------------------------------------------------------
1568 (
1569  le_mrc_ScanInformationListRef_t scanInformationListRef
1570  ///< [IN] The list of scan information.
1571 );
1572 
1573 //--------------------------------------------------------------------------------------------------
1574 /**
1575  * This function must be called to get the Cellular Network Code [mcc:mnc]
1576  *
1577  * @return
1578  * - LE_OK on success
1579  * - LE_OVERFLOW if the MCC or MNC would not fit in buffer
1580  * - LE_FAULT for all other errors
1581  *
1582  * @note On failure, the process exits, so you don't have to worry about checking the returned
1583  * reference for validity.
1584  *
1585  * @note <b>multi-app safe</b>
1586  */
1587 //--------------------------------------------------------------------------------------------------
1589 (
1590  le_mrc_ScanInformationRef_t scanInformationRef,
1591  ///< [IN] Scan information reference
1592  char* mccPtr,
1593  ///< [OUT] Mobile Country Code
1594  size_t mccPtrSize,
1595  ///< [IN]
1596  char* mncPtr,
1597  ///< [OUT] Mobile Network Code
1598  size_t mncPtrSize
1599  ///< [IN]
1600 );
1601 
1602 //--------------------------------------------------------------------------------------------------
1603 /**
1604  * This function must be called to get the Cellular Network Name.
1605  *
1606  * @return
1607  * - LE_OK on success
1608  * - LE_OVERFLOW if the operator name would not fit in buffer
1609  * - LE_FAULT for all other errors
1610  *
1611  * @note On failure, the process exits, so you don't have to worry about checking the returned
1612  * reference for validity.
1613  *
1614  * @note <b>multi-app safe</b>
1615  */
1616 //--------------------------------------------------------------------------------------------------
1618 (
1619  le_mrc_ScanInformationRef_t scanInformationRef,
1620  ///< [IN] Scan information reference
1621  char* namePtr,
1622  ///< [OUT] Name of operator
1623  size_t namePtrSize
1624  ///< [IN]
1625 );
1626 
1627 //--------------------------------------------------------------------------------------------------
1628 /**
1629  * This function must be called to get the radio access technology of a scanInformationRef.
1630  *
1631  * @return the radio access technology
1632  *
1633  * @note On failure, the process exits.
1634  *
1635  * @note <b>multi-app safe</b>
1636  */
1637 //--------------------------------------------------------------------------------------------------
1639 (
1640  le_mrc_ScanInformationRef_t scanInformationRef
1641  ///< [IN] Scan information reference
1642 );
1643 
1644 //--------------------------------------------------------------------------------------------------
1645 /**
1646  * This function must be called to check if a cellular network is currently in use.
1647  *
1648  * @return true The network is in use
1649  * @return false The network isn't in use
1650  *
1651  * @note On failure, the process exits, so you don't have to worry about checking the returned
1652  * reference for validity.
1653  *
1654  * @note <b>multi-app safe</b>
1655  */
1656 //--------------------------------------------------------------------------------------------------
1658 (
1659  le_mrc_ScanInformationRef_t scanInformationRef
1660  ///< [IN] Scan information reference
1661 );
1662 
1663 //--------------------------------------------------------------------------------------------------
1664 /**
1665  * This function must be called to check if a cellular network is available.
1666  *
1667  * @return true The network is available
1668  * @return false The network isn't available
1669  *
1670  * @note On failure, the process exits, so you don't have to worry about checking the returned
1671  * reference for validity.
1672  *
1673  * @note <b>multi-app safe</b>
1674  */
1675 //--------------------------------------------------------------------------------------------------
1677 (
1678  le_mrc_ScanInformationRef_t scanInformationRef
1679  ///< [IN] Scan information reference
1680 );
1681 
1682 //--------------------------------------------------------------------------------------------------
1683 /**
1684  * This function must be called to check if a cellular network is currently in home mode.
1685  *
1686  * @return true The network is home
1687  * @return false The network is roaming
1688  *
1689  * @note On failure, the process exits, so you don't have to worry about checking the returned
1690  * reference for validity.
1691  *
1692  * @note <b>multi-app safe</b>
1693  */
1694 //--------------------------------------------------------------------------------------------------
1696 (
1697  le_mrc_ScanInformationRef_t scanInformationRef
1698  ///< [IN] Scan information reference
1699 );
1700 
1701 //--------------------------------------------------------------------------------------------------
1702 /**
1703  * This function must be called to check if a cellular network is forbidden by the operator.
1704  *
1705  * @return true The network is forbidden
1706  * @return false The network is allowed
1707  *
1708  * @note On failure, the process exits, so you don't have to worry about checking the returned
1709  * reference for validity.
1710  *
1711  * @note <b>multi-app safe</b>
1712  */
1713 //--------------------------------------------------------------------------------------------------
1715 (
1716  le_mrc_ScanInformationRef_t scanInformationRef
1717  ///< [IN] Scan information reference
1718 );
1719 
1720 //--------------------------------------------------------------------------------------------------
1721 /**
1722  * This function must be called to get the current network name information.
1723  *
1724  * @return
1725  * - LE_OK on success
1726  * - LE_BAD_PARAMETER if nameStr is NULL
1727  * - LE_OVERFLOW if the Home Network Name can't fit in nameStr
1728  * - LE_FAULT on any other failure
1729  *
1730  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1731  * function won't return.
1732  *
1733  * @note <b>multi-app safe</b>
1734  */
1735 //--------------------------------------------------------------------------------------------------
1737 (
1738  char* nameStr,
1739  ///< [OUT] the home network Name
1740  size_t nameStrSize
1741  ///< [IN]
1742 );
1743 
1744 //--------------------------------------------------------------------------------------------------
1745 /**
1746  * This function must be called to get the current network PLMN information.
1747  *
1748  * @return
1749  * - LE_OK on success
1750  * - LE_FAULT on any other failure
1751  *
1752  * @note <b>multi-app safe</b>
1753  */
1754 //--------------------------------------------------------------------------------------------------
1756 (
1757  char* mccStr,
1758  ///< [OUT] the mobile country code
1759  size_t mccStrSize,
1760  ///< [IN]
1761  char* mncStr,
1762  ///< [OUT] the mobile network code
1763  size_t mncStrSize
1764  ///< [IN]
1765 );
1766 
1767 //--------------------------------------------------------------------------------------------------
1768 /**
1769  * This function must be called to get the current Radio Access Technology in use.
1770  *
1771  * @return LE_FAULT Function failed to get the Radio Access Technology.
1772  * @return LE_BAD_PARAMETER A bad parameter was passed.
1773  * @return LE_OK Function succeeded.
1774  *
1775  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1776  * function won't return.
1777  *
1778  * @note <b>multi-app safe</b>
1779  */
1780 //--------------------------------------------------------------------------------------------------
1782 (
1783  le_mrc_Rat_t* ratPtr
1784  ///< [OUT] The Radio Access Technology.
1785 );
1786 
1787 //--------------------------------------------------------------------------------------------------
1788 /**
1789  * This function must be called to retrieve the Neighboring Cells information. It creates and
1790  * returns a reference to the Neighboring Cells information.
1791  *
1792  * @return A reference to the Neighboring Cells information.
1793  * @return NULL if no Cells Information are available.
1794  *
1795  * @note <b>multi-app safe</b>
1796  */
1797 //--------------------------------------------------------------------------------------------------
1799 (
1800  void
1801 );
1802 
1803 //--------------------------------------------------------------------------------------------------
1804 /**
1805  * This function must be called to delete the Neighboring Cells information.
1806  *
1807  * @note On failure, the process exits, so you don't have to worry about checking the returned
1808  * reference for validity.
1809  *
1810  * @note <b>multi-app safe</b>
1811  */
1812 //--------------------------------------------------------------------------------------------------
1814 (
1815  le_mrc_NeighborCellsRef_t ngbrCellsRef
1816  ///< [IN] Neighboring Cells reference.
1817 );
1818 
1819 //--------------------------------------------------------------------------------------------------
1820 /**
1821  * This function must be called to get the first Cell Information reference in the list of
1822  * Neighboring Cells information retrieved with le_mrc_GetNeighborCellsInfo().
1823  *
1824  * @return NULL No Cell information object found.
1825  * @return le_mrc_CellInfoRef_t The Cell information object reference.
1826  *
1827  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1828  * function won't return.
1829  *
1830  * @note <b>multi-app safe</b>
1831  */
1832 //--------------------------------------------------------------------------------------------------
1834 (
1835  le_mrc_NeighborCellsRef_t ngbrCellsRef
1836  ///< [IN] Neighboring Cells reference.
1837 );
1838 
1839 //--------------------------------------------------------------------------------------------------
1840 /**
1841  * This function must be called to get the next Cell Information reference in the list of
1842  * Neighboring Cells information retrieved with le_mrc_GetNeighborCellsInfo().
1843  *
1844  * @return NULL No Cell information object found.
1845  * @return le_mrc_CellInfoRef_t Cell information object reference.
1846  *
1847  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1848  * function won't return.
1849  *
1850  * @note <b>multi-app safe</b>
1851  */
1852 //--------------------------------------------------------------------------------------------------
1854 (
1855  le_mrc_NeighborCellsRef_t ngbrCellsRef
1856  ///< [IN] Neighboring Cells reference.
1857 );
1858 
1859 //--------------------------------------------------------------------------------------------------
1860 /**
1861  * This function must be called to get the Cell Identifier.
1862  *
1863  * @return The Cell Identifier.
1864  *
1865  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1866  * function won't return.
1867  *
1868  * @note <b>multi-app safe</b>
1869  */
1870 //--------------------------------------------------------------------------------------------------
1871 uint32_t le_mrc_GetNeighborCellId
1872 (
1873  le_mrc_CellInfoRef_t ngbrCellInfoRef
1874  ///< [IN] Cell information reference.
1875 );
1876 
1877 //--------------------------------------------------------------------------------------------------
1878 /**
1879  * This function must be called to get the Location Area Code of a cell.
1880  *
1881  * @return The Location Area Code of a cell. UINT16_MAX value is returned if the value is not
1882  * available.
1883  *
1884  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1885  * function won't return.
1886  *
1887  * @note <b>multi-app safe</b>
1888  */
1889 //--------------------------------------------------------------------------------------------------
1891 (
1892  le_mrc_CellInfoRef_t ngbrCellInfoRef
1893  ///< [IN] Cell information reference.
1894 );
1895 
1896 //--------------------------------------------------------------------------------------------------
1897 /**
1898  * This function must be called to get the signal strength of a cell.
1899  *
1900  * @return The signal strength of a cell in dBm.
1901  *
1902  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1903  * function won't return.
1904  *
1905  * @note <b>multi-app safe</b>
1906  */
1907 //--------------------------------------------------------------------------------------------------
1909 (
1910  le_mrc_CellInfoRef_t ngbrCellInfoRef
1911  ///< [IN] Cell information reference.
1912 );
1913 
1914 //--------------------------------------------------------------------------------------------------
1915 /**
1916  * This function must be called to get the Radio Access Technology of a cell.
1917  *
1918  * @return The Radio Access Technology of a cell.
1919  *
1920  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1921  * function won't return.
1922  *
1923  * @note <b>multi-app safe</b>
1924  */
1925 //--------------------------------------------------------------------------------------------------
1927 (
1928  le_mrc_CellInfoRef_t ngbrCellInfoRef
1929  ///< [IN] Cell information reference.
1930 );
1931 
1932 //--------------------------------------------------------------------------------------------------
1933 /**
1934  * This function must be called to get the Ec/Io; the received energy per chip divided by the power
1935  * density in the band measured in dBm on the primary CPICH channel of serving cell (negative value)
1936  *
1937  * @return
1938  * - The Ec/Io of a cell given in dB with 1 decimal place. (only applicable for UMTS network).
1939  * - INT32_MAX when the value isn't available.
1940  *
1941  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1942  * function won't return.
1943  *
1944  * @note <b>multi-app safe</b>
1945  */
1946 //--------------------------------------------------------------------------------------------------
1948 (
1949  le_mrc_CellInfoRef_t ngbrCellInfoRef
1950  ///< [IN] Cell information reference.
1951 );
1952 
1953 //--------------------------------------------------------------------------------------------------
1954 /**
1955  * This function must be called to get the RSRP and RSRQ of the Intrafrequency of a LTE cell.
1956  *
1957  * @return
1958  * - LE_OK on success
1959  * - LE_FAULT on failure
1960  *
1961  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1962  * function won't return.
1963  *
1964  * @note <b>multi-app safe</b>
1965  */
1966 //--------------------------------------------------------------------------------------------------
1968 (
1969  le_mrc_CellInfoRef_t ngbrCellInfoRef,
1970  ///< [IN] Cell information reference.
1971  int32_t* rsrqPtr,
1972  ///< [OUT] Reference Signal Received Quality value in dB with 1 decimal
1973  ///< place
1974  int32_t* rsrpPtr
1975  ///< [OUT] Reference Signal Receiver Power value in dBm with 1 decimal
1976  ///< place
1977 );
1978 
1979 //--------------------------------------------------------------------------------------------------
1980 /**
1981  * This function must be called to get the RSRP and RSRQ of the Interfrequency of a LTE cell.
1982  *
1983  * @return
1984  * - LE_OK on success
1985  * - LE_FAULT on failure
1986  *
1987  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
1988  * function won't return.
1989  *
1990  * @note <b>multi-app safe</b>
1991  */
1992 //--------------------------------------------------------------------------------------------------
1994 (
1995  le_mrc_CellInfoRef_t ngbrCellInfoRef,
1996  ///< [IN] Cell information reference.
1997  int32_t* rsrqPtr,
1998  ///< [OUT] Reference Signal Received Quality value in dB with 1 decimal
1999  ///< place
2000  int32_t* rsrpPtr
2001  ///< [OUT] Reference Signal Receiver Power value in dBm with 1 decimal
2002  ///< place
2003 );
2004 
2005 //--------------------------------------------------------------------------------------------------
2006 /**
2007  * This function must be called to measure the signal metrics. It creates and returns a reference
2008  * to the signal metrics.
2009  *
2010  * @return A reference to the signal metrics.
2011  * @return NULL if no signal metrics are available.
2012  *
2013  * @note <b>multi-app safe</b>
2014  */
2015 //--------------------------------------------------------------------------------------------------
2017 (
2018  void
2019 );
2020 
2021 //--------------------------------------------------------------------------------------------------
2022 /**
2023  * This function must be called to delete the the signal metrics.
2024  *
2025  * @note On failure, the process exits, so you don't have to worry about checking the returned
2026  * reference for validity.
2027  *
2028  * @note <b>multi-app safe</b>
2029  */
2030 //--------------------------------------------------------------------------------------------------
2032 (
2033  le_mrc_MetricsRef_t MetricsRef
2034  ///< [IN] Signal metrics reference.
2035 );
2036 
2037 //--------------------------------------------------------------------------------------------------
2038 /**
2039  * This function returns the Radio Access Technology of the signal metrics.
2040  *
2041  * @return The Radio Access Technology of the signal measure.
2042  *
2043  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
2044  * function won't return.
2045  *
2046  * @note <b>multi-app safe</b>
2047  */
2048 //--------------------------------------------------------------------------------------------------
2050 (
2051  le_mrc_MetricsRef_t MetricsRef
2052  ///< [IN] Signal metrics reference.
2053 );
2054 
2055 //--------------------------------------------------------------------------------------------------
2056 /**
2057  * This function returns the signal strength in dBm and the bit error rate measured on GSM network.
2058  *
2059  * @return
2060  * - LE_OK on success
2061  * - LE_FAULT on failure
2062  *
2063  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
2064  * function won't return.
2065  *
2066  * @note <b>multi-app safe</b>
2067  */
2068 //--------------------------------------------------------------------------------------------------
2070 (
2071  le_mrc_MetricsRef_t MetricsRef,
2072  ///< [IN] Signal metrics reference.
2073  int32_t* rssiPtr,
2074  ///< [OUT] Signal strength in dBm
2075  uint32_t* berPtr
2076  ///< [OUT] Bit error rate.
2077 );
2078 
2079 //--------------------------------------------------------------------------------------------------
2080 /**
2081  * This function returns the signal metrics measured on UMTS network.
2082  *
2083  * @return
2084  * - LE_OK on success
2085  * - LE_FAULT on failure
2086  *
2087  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
2088  * function won't return.
2089  *
2090  * @note <b>multi-app safe</b>
2091  */
2092 //--------------------------------------------------------------------------------------------------
2094 (
2095  le_mrc_MetricsRef_t MetricsRef,
2096  ///< [IN] Signal metrics reference.
2097  int32_t* ssPtr,
2098  ///< [OUT] Signal strength in dBm
2099  uint32_t* blerPtr,
2100  ///< [OUT] Block error rate
2101  int32_t* ecioPtr,
2102  ///< [OUT] Ec/Io value in dB with 1 decimal place (-15 = -1.5 dB) (Negative
2103  ///< value)
2104  int32_t* rscpPtr,
2105  ///< [OUT] Measured RSCP in dBm (only applicable for TD-SCDMA network,
2106  ///< negative value, value INT32_MAX means that RSCP is not available)
2107  int32_t* sinrPtr
2108  ///< [OUT] Measured SINR in dB (only applicable for TD-SCDMA network, value
2109  ///< INT32_MAX means that the SINR is not available)
2110 );
2111 
2112 //--------------------------------------------------------------------------------------------------
2113 /**
2114  * This function returns the signal metrics measured on LTE network.
2115  *
2116  * @return
2117  * - LE_OK on success
2118  * - LE_FAULT on failure
2119  * - sinrPtr and ioPtr return INT32_MAX when the value isn't available.
2120  *
2121  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
2122  * function won't return.
2123  *
2124  * @note <b>multi-app safe</b>
2125  */
2126 //--------------------------------------------------------------------------------------------------
2128 (
2129  le_mrc_MetricsRef_t MetricsRef,
2130  ///< [IN] Signal metrics reference.
2131  int32_t* ssPtr,
2132  ///< [OUT] Signal strength in dBm
2133  uint32_t* blerPtr,
2134  ///< [OUT] Block error rate
2135  int32_t* rsrqPtr,
2136  ///< [OUT] RSRQ value in dB as measured by L1 with 1 decimal place
2137  int32_t* rsrpPtr,
2138  ///< [OUT] Current RSRP in dBm as measured by L1 with 1 decimal place
2139  int32_t* sinrPtr
2140  ///< [OUT] SNR level in dB with 1 decimal place (15 = 1.5 dB)
2141 );
2142 
2143 //--------------------------------------------------------------------------------------------------
2144 /**
2145  * This function returns the signal metrics measured on CDMA network.
2146  *
2147  * @return
2148  * - LE_OK on success
2149  * - LE_FAULT on failure
2150  * - rscpPtr and sinrPtr return INT32_MAX when the value isn't available.
2151  *
2152  * @note If the caller is passing a bad pointer into this function, it's a fatal error, the
2153  * function won't return.
2154  *
2155  * @note <b>multi-app safe</b>
2156  */
2157 //--------------------------------------------------------------------------------------------------
2159 (
2160  le_mrc_MetricsRef_t MetricsRef,
2161  ///< [IN] Signal metrics reference.
2162  int32_t* ssPtr,
2163  ///< [OUT] Signal strength in dBm
2164  uint32_t* erPtr,
2165  ///< [OUT] Frame/Packet error rate
2166  int32_t* ecioPtr,
2167  ///< [OUT] ECIO value in dB with 1 decimal place (-15 = -1.5 dB) (Negative
2168  ///< value)
2169  int32_t* sinrPtr,
2170  ///< [OUT] SINR level in dB with 1 decimal place, (only applicable for
2171  ///< 1xEV-DO, value INT32_MAX means that the value is not available)
2172  int32_t* ioPtr
2173  ///< [OUT] Received IO in dBm (only applicable for 1xEV-DO, value INT32_MAX
2174  ///< means that the value is not available)
2175 );
2176 
2177 //--------------------------------------------------------------------------------------------------
2178 /**
2179  * This function must be called to get the serving Cell Identifier.
2180  *
2181  * @return The Cell Identifier. UINT32_MAX value is returned if the value is not available.
2182  *
2183  * @note <b>multi-app safe</b>
2184  */
2185 //--------------------------------------------------------------------------------------------------
2186 uint32_t le_mrc_GetServingCellId
2187 (
2188  void
2189 );
2190 
2191 //--------------------------------------------------------------------------------------------------
2192 /**
2193  * This function must be called to get the Location Area Code of the serving cell.
2194  *
2195  * @return The Location Area Code. UINT32_MAX value is returned if the value is not available.
2196  *
2197  * @note <b>multi-app safe</b>
2198  */
2199 //--------------------------------------------------------------------------------------------------
2201 (
2202  void
2203 );
2204 
2205 //--------------------------------------------------------------------------------------------------
2206 /**
2207  * This function must be called to get the Tracking Area Code of the serving cell (LTE only).
2208  *
2209  * @return The Tracking Area Code. UINT16_MAX value is returned if the value is not available.
2210  *
2211  * @note <b>multi-app safe</b>
2212  */
2213 //--------------------------------------------------------------------------------------------------
2215 (
2216  void
2217 );
2218 
2219 //--------------------------------------------------------------------------------------------------
2220 /**
2221  * Get the Bit mask for 2G/3G Band capabilities.
2222  *
2223  * @return
2224  * - LE_OK on success
2225  * - LE_FAULT on failure
2226  * - LE_UNSUPPORTED The platform does not support this operation.
2227  *
2228  * @note <b>multi-app safe</b>
2229  */
2230 //--------------------------------------------------------------------------------------------------
2232 (
2233  le_mrc_BandBitMask_t* bandMaskPtrPtr
2234  ///< [OUT] Bit mask for 2G/3G Band capabilities.
2235 );
2236 
2237 //--------------------------------------------------------------------------------------------------
2238 /**
2239  * Get the Bit mask for LTE Band capabilities.
2240  *
2241  * @return
2242  * - LE_OK on success
2243  * - LE_FAULT on failure
2244  * - LE_UNSUPPORTED The platform does not support this operation.
2245  *
2246  * @note <b>multi-app safe</b>
2247  */
2248 //--------------------------------------------------------------------------------------------------
2250 (
2251  le_mrc_LteBandBitMask_t* bandMaskPtrPtr
2252  ///< [OUT] Bit mask for LTE Band capabilities.
2253 );
2254 
2255 //--------------------------------------------------------------------------------------------------
2256 /**
2257  * Get the Bit mask for TD-SCDMA Band capabilities.
2258  *
2259  * @return
2260  * - LE_OK on success
2261  * - LE_FAULT on failure
2262  * - LE_UNSUPPORTED The platform does not support this operation.
2263  *
2264  * @note <b>multi-app safe</b>
2265  */
2266 //--------------------------------------------------------------------------------------------------
2268 (
2269  le_mrc_TdScdmaBandBitMask_t* bandMaskPtrPtr
2270  ///< [OUT] Bit mask for TD-SCDMA Band capabilities.
2271 );
2272 
2273 #endif // LE_MRC_INTERFACE_H_INCLUDE_GUARD
le_result_t le_mrc_GetLteBandCapabilities(le_mrc_LteBandBitMask_t *bandMaskPtrPtr)
uint32_t le_mrc_GetNeighborCellId(le_mrc_CellInfoRef_t ngbrCellInfoRef)
le_result_t le_mrc_GetPreferredOperatorDetails(le_mrc_PreferredOperatorRef_t preferredOperatorRef, char *mccPtr, size_t mccPtrSize, char *mncPtr, size_t mncPtrSize, le_mrc_RatBitMask_t *ratMaskPtr)
LTE RAT Bit Mask.
Definition: le_mrc_interface.h:745
le_result_t le_mrc_GetGsmSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *rssiPtr, uint32_t *berPtr)
CDMA RAT Bit Mask.
Definition: le_mrc_interface.h:746
le_result_t le_mrc_GetSignalQual(uint32_t *qualityPtr)
uint16_t le_mrc_GetServingCellLteTracAreaCode(void)
void le_mrc_DeleteNeighborCellsInfo(le_mrc_NeighborCellsRef_t ngbrCellsRef)
le_mrc_CellInfoRef_t le_mrc_GetNextNeighborCellInfo(le_mrc_NeighborCellsRef_t ngbrCellsRef)
void le_mrc_RemovePacketSwitchedChangeHandler(le_mrc_PacketSwitchedChangeHandlerRef_t handlerRef)
le_result_t le_mrc_GetNetRegState(le_mrc_NetRegState_t *statePtr)
le_mrc_RatChangeHandlerRef_t le_mrc_AddRatChangeHandler(le_mrc_RatChangeHandlerFunc_t handlerPtr, void *contextPtr)
le_result_t le_mrc_SetAutomaticRegisterMode(void)
struct le_mrc_PreferredOperatorList * le_mrc_PreferredOperatorListRef_t
Definition: le_mrc_interface.h:665
struct le_mrc_PreferredOperator * le_mrc_PreferredOperatorRef_t
Definition: le_mrc_interface.h:657
le_mrc_SignalStrengthChangeHandlerRef_t le_mrc_AddSignalStrengthChangeHandler(le_mrc_Rat_t rat, int32_t lowerRangeThreshold, int32_t upperRangeThreshold, le_mrc_SignalStrengthChangeHandlerFunc_t handlerPtr, void *contextPtr)
le_result_t le_mrc_GetRadioPower(le_onoff_t *powerPtr)
uint32_t le_mrc_GetServingCellId(void)
le_mrc_NetRegStateEventHandlerRef_t le_mrc_AddNetRegStateEventHandler(le_mrc_NetRegStateHandlerFunc_t handlerPtr, void *contextPtr)
void(* le_mrc_DisconnectHandler_t)(void *)
Definition: le_mrc_interface.h:410
le_result_t
Definition: le_basics.h:35
le_result_t le_mrc_SetRadioPower(le_onoff_t power)
le_result_t le_mrc_GetCurrentNetworkMccMnc(char *mccStr, size_t mccStrSize, char *mncStr, size_t mncStrSize)
struct le_mrc_NeighborCells * le_mrc_NeighborCellsRef_t
Definition: le_mrc_interface.h:681
le_result_t le_mrc_SetTdScdmaBandPreferences(le_mrc_TdScdmaBandBitMask_t bandMask)
void le_mrc_SetManualRegisterModeAsync(const char *mcc, const char *mnc, le_mrc_ManualSelectionHandlerFunc_t handlerPtr, void *contextPtr)
struct le_mrc_Metrics * le_mrc_MetricsRef_t
Definition: le_mrc_interface.h:689
le_result_t le_mrc_GetPacketSwitchedState(le_mrc_NetRegState_t *statePtr)
UMTS network.
Definition: le_mrc_interface.h:726
le_mrc_Rat_t le_mrc_GetRatOfSignalMetrics(le_mrc_MetricsRef_t MetricsRef)
struct le_mrc_NetRegStateEventHandler * le_mrc_NetRegStateEventHandlerRef_t
Definition: le_mrc_interface.h:758
le_result_t le_mrc_GetTdScdmaBandPreferences(le_mrc_TdScdmaBandBitMask_t *bandMaskPtrPtr)
void le_mrc_DeleteSignalMetrics(le_mrc_MetricsRef_t MetricsRef)
struct le_mrc_RatChangeHandler * le_mrc_RatChangeHandlerRef_t
Definition: le_mrc_interface.h:766
le_mrc_CellInfoRef_t le_mrc_GetFirstNeighborCellInfo(le_mrc_NeighborCellsRef_t ngbrCellsRef)
Registered to a roaming network.
Definition: le_mrc_interface.h:707
void(* le_mrc_ManualSelectionHandlerFunc_t)(le_result_t result, void *contextPtr)
Definition: le_mrc_interface.h:864
le_result_t le_mrc_GetCdmaSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *ssPtr, uint32_t *erPtr, int32_t *ecioPtr, int32_t *sinrPtr, int32_t *ioPtr)
le_result_t le_mrc_GetNeighborCellLteIntraFreq(le_mrc_CellInfoRef_t ngbrCellInfoRef, int32_t *rsrqPtr, int32_t *rsrpPtr)
struct le_mrc_ScanInformationList * le_mrc_ScanInformationListRef_t
Definition: le_mrc_interface.h:649
le_result_t le_mrc_TryConnectService(void)
void(* le_mrc_PacketSwitchedChangeHandlerFunc_t)(le_mrc_NetRegState_t state, void *contextPtr)
Definition: le_mrc_interface.h:820
LTE network.
Definition: le_mrc_interface.h:728
void(* le_mrc_RatChangeHandlerFunc_t)(le_mrc_Rat_t rat, void *contextPtr)
Definition: le_mrc_interface.h:806
le_result_t le_mrc_GetRatPreferences(le_mrc_RatBitMask_t *ratMaskPtrPtr)
struct le_mrc_CellInfo * le_mrc_CellInfoRef_t
Definition: le_mrc_interface.h:673
le_mrc_ScanInformationListRef_t le_mrc_PerformCellularNetworkScan(le_mrc_RatBitMask_t ratMask)
le_result_t le_mrc_SetBandPreferences(le_mrc_BandBitMask_t bandMask)
le_result_t le_mrc_SetRatPreferences(le_mrc_RatBitMask_t ratMask)
void le_mrc_DeleteCellularNetworkScan(le_mrc_ScanInformationListRef_t scanInformationListRef)
int32_t le_mrc_GetNeighborCellRxLevel(le_mrc_CellInfoRef_t ngbrCellInfoRef)
le_mrc_PacketSwitchedChangeHandlerRef_t le_mrc_AddPacketSwitchedChangeHandler(le_mrc_PacketSwitchedChangeHandlerFunc_t packetHandlerPtr, void *contextPtr)
le_result_t le_mrc_GetNeighborCellLteInterFreq(le_mrc_CellInfoRef_t ngbrCellInfoRef, int32_t *rsrqPtr, int32_t *rsrpPtr)
void le_mrc_RemoveSignalStrengthChangeHandler(le_mrc_SignalStrengthChangeHandlerRef_t handlerRef)
struct le_mrc_SignalStrengthChangeHandler * le_mrc_SignalStrengthChangeHandlerRef_t
Definition: le_mrc_interface.h:782
le_mrc_NeighborCellsRef_t le_mrc_GetNeighborCellsInfo(void)
le_mrc_Rat_t le_mrc_GetCellularNetworkRat(le_mrc_ScanInformationRef_t scanInformationRef)
void le_mrc_RemoveRatChangeHandler(le_mrc_RatChangeHandlerRef_t handlerRef)
Registered, home network.
Definition: le_mrc_interface.h:701
uint32_t le_mrc_GetServingCellLocAreaCode(void)
le_mrc_PreferredOperatorRef_t le_mrc_GetFirstPreferredOperator(le_mrc_PreferredOperatorListRef_t preferredOperatorListRef)
void le_mrc_PerformCellularNetworkScanAsync(le_mrc_RatBitMask_t ratMask, le_mrc_CellularNetworkScanHandlerFunc_t handlerPtr, void *contextPtr)
GSM network.
Definition: le_mrc_interface.h:724
void(* le_mrc_NetRegStateHandlerFunc_t)(le_mrc_NetRegState_t state, void *contextPtr)
Definition: le_mrc_interface.h:792
To Set all RAT preference Bit Mask.
Definition: le_mrc_interface.h:747
le_mrc_RatBitMask_t
Definition: le_mrc_interface.h:741
int32_t le_mrc_GetPlatformSpecificRegistrationErrorCode(void)
le_mrc_PreferredOperatorRef_t le_mrc_GetNextPreferredOperator(le_mrc_PreferredOperatorListRef_t preferredOperatorListRef)
CDMA network.
Definition: le_mrc_interface.h:730
le_mrc_Rat_t
Definition: le_mrc_interface.h:720
le_result_t le_mrc_GetTdScdmaBandCapabilities(le_mrc_TdScdmaBandBitMask_t *bandMaskPtrPtr)
le_result_t le_mrc_GetRegisterMode(bool *isManualPtrPtr, char *mccPtr, size_t mccPtrSize, char *mncPtr, size_t mncPtrSize)
Unknown.
Definition: le_mrc_interface.h:722
le_result_t le_mrc_SetLteBandPreferences(le_mrc_LteBandBitMask_t bandMask)
bool le_mrc_IsCellularNetworkForbidden(le_mrc_ScanInformationRef_t scanInformationRef)
struct le_mrc_ScanInformation * le_mrc_ScanInformationRef_t
Definition: le_mrc_interface.h:641
int32_t le_mrc_GetNeighborCellUmtsEcIo(le_mrc_CellInfoRef_t ngbrCellInfoRef)
le_result_t le_mrc_GetCellularNetworkMccMnc(le_mrc_ScanInformationRef_t scanInformationRef, char *mccPtr, size_t mccPtrSize, char *mncPtr, size_t mncPtrSize)
le_result_t le_mrc_RemovePreferredOperator(const char *mcc, const char *mnc)
le_mrc_ScanInformationRef_t le_mrc_GetNextCellularNetworkScan(le_mrc_ScanInformationListRef_t scanInformationListRef)
void le_mrc_SetServerDisconnectHandler(le_mrc_DisconnectHandler_t disconnectHandler, void *contextPtr)
le_result_t le_mrc_GetCurrentNetworkName(char *nameStr, size_t nameStrSize)
le_result_t le_mrc_GetRadioAccessTechInUse(le_mrc_Rat_t *ratPtr)
le_result_t le_mrc_SetManualRegisterMode(const char *mcc, const char *mnc)
le_mrc_PreferredOperatorListRef_t le_mrc_GetPreferredOperatorsList(void)
le_result_t le_mrc_GetLteBandPreferences(le_mrc_LteBandBitMask_t *bandMaskPtrPtr)
le_result_t le_mrc_GetBandCapabilities(le_mrc_BandBitMask_t *bandMaskPtrPtr)
bool le_mrc_IsCellularNetworkHome(le_mrc_ScanInformationRef_t scanInformationRef)
le_result_t le_mrc_GetCellularNetworkName(le_mrc_ScanInformationRef_t scanInformationRef, char *namePtr, size_t namePtrSize)
void le_mrc_ConnectService(void)
void le_mrc_DeletePreferredOperatorsList(le_mrc_PreferredOperatorListRef_t preferredOperatorListRef)
Not registered but currently searching for a new operator.
Definition: le_mrc_interface.h:703
le_result_t le_mrc_GetLteSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *ssPtr, uint32_t *blerPtr, int32_t *rsrqPtr, int32_t *rsrpPtr, int32_t *sinrPtr)
le_mrc_BandBitMask_t
Definition: le_mrc_interface.h:530
le_result_t le_mrc_GetUmtsSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *ssPtr, uint32_t *blerPtr, int32_t *ecioPtr, int32_t *rscpPtr, int32_t *sinrPtr)
void(* le_mrc_SignalStrengthChangeHandlerFunc_t)(int32_t ss, void *contextPtr)
Definition: le_mrc_interface.h:834
void le_mrc_DisconnectService(void)
bool le_mrc_IsCellularNetworkInUse(le_mrc_ScanInformationRef_t scanInformationRef)
void(* le_mrc_CellularNetworkScanHandlerFunc_t)(le_mrc_ScanInformationListRef_t listRef, void *contextPtr)
Definition: le_mrc_interface.h:849
le_mrc_NetRegState_t
Definition: le_mrc_interface.h:697
uint32_t le_mrc_GetNeighborCellLocAreaCode(le_mrc_CellInfoRef_t ngbrCellInfoRef)
le_result_t le_mrc_AddPreferredOperator(const char *mcc, const char *mnc, le_mrc_RatBitMask_t ratMask)
le_mrc_MetricsRef_t le_mrc_MeasureSignalMetrics(void)
le_mrc_LteBandBitMask_t
Definition: le_mrc_interface.h:580
Unknown state.
Definition: le_mrc_interface.h:709
bool le_mrc_IsCellularNetworkAvailable(le_mrc_ScanInformationRef_t scanInformationRef)
Registration was denied, usually because of invalid access credentials.
Definition: le_mrc_interface.h:705
UMTS RAT Bit Mask.
Definition: le_mrc_interface.h:744
le_mrc_TdScdmaBandBitMask_t
Definition: le_mrc_interface.h:624
Not registered and not currently searching for new operator.
Definition: le_mrc_interface.h:699
GSM RAT Bit Mask.
Definition: le_mrc_interface.h:743
le_result_t le_mrc_GetBandPreferences(le_mrc_BandBitMask_t *bandMaskPtrPtr)
struct le_mrc_PacketSwitchedChangeHandler * le_mrc_PacketSwitchedChangeHandlerRef_t
Definition: le_mrc_interface.h:774
void le_mrc_RemoveNetRegStateEventHandler(le_mrc_NetRegStateEventHandlerRef_t handlerRef)
le_mrc_ScanInformationRef_t le_mrc_GetFirstCellularNetworkScan(le_mrc_ScanInformationListRef_t scanInformationListRef)
le_mrc_Rat_t le_mrc_GetNeighborCellRat(le_mrc_CellInfoRef_t ngbrCellInfoRef)
le_onoff_t
Definition: le_basics.h:70