#include "legato.h"
Go to the source code of this file.
Macros | |
#define | LE_MRC_MCC_LEN 3 |
#define | LE_MRC_MCC_BYTES (LE_MRC_MCC_LEN+1) |
#define | LE_MRC_MNC_LEN 3 |
#define | LE_MRC_MNC_BYTES (LE_MRC_MNC_LEN+1) |
#define | LE_MRC_BITMASK_RAT_CDMA 0x01 |
#define | LE_MRC_BITMASK_RAT_GSM 0x02 |
#define | LE_MRC_BITMASK_RAT_UMTS 0x04 |
#define | LE_MRC_BITMASK_RAT_LTE 0x08 |
#define | LE_MRC_BITMASK_BAND_CLASS_0_A_SYSTEM 0x0000000000000001 |
#define | LE_MRC_BITMASK_BAND_CLASS_0_B_SYSTEM 0x0000000000000002 |
#define | LE_MRC_BITMASK_BAND_CLASS_1_ALL_BLOCKS 0x0000000000000004 |
#define | LE_MRC_BITMASK_BAND_CLASS_2_PLACEHOLDER 0x0000000000000008 |
#define | LE_MRC_BITMASK_BAND_CLASS_3_A_SYSTEM 0x0000000000000010 |
#define | LE_MRC_BITMASK_BAND_CLASS_4_ALL_BLOCKS 0x0000000000000020 |
#define | LE_MRC_BITMASK_BAND_CLASS_5_ALL_BLOCKS 0x0000000000000040 |
#define | LE_MRC_BITMASK_BAND_CLASS_6 0x0000000000000080 |
#define | LE_MRC_BITMASK_BAND_CLASS_7 0x0000000000000100 |
#define | LE_MRC_BITMASK_BAND_CLASS_8 0x0000000000000200 |
#define | LE_MRC_BITMASK_BAND_CLASS_9 0x0000000000000400 |
#define | LE_MRC_BITMASK_BAND_CLASS_10 0x0000000000000800 |
#define | LE_MRC_BITMASK_BAND_CLASS_11 0x0000000000001000 |
#define | LE_MRC_BITMASK_BAND_CLASS_12 0x0000000000002000 |
#define | LE_MRC_BITMASK_BAND_CLASS_14 0x0000000000004000 |
#define | LE_MRC_BITMASK_BAND_CLASS_15 0x0000000000008000 |
#define | LE_MRC_BITMASK_BAND_CLASS_16 0x0000000000010000 |
#define | LE_MRC_BITMASK_BAND_CLASS_17 0x0000000000020000 |
#define | LE_MRC_BITMASK_BAND_CLASS_18 0x0000000000040000 |
#define | LE_MRC_BITMASK_BAND_CLASS_19 0x0000000000080000 |
#define | LE_MRC_BITMASK_BAND_GSM_DCS_1800 0x0000000000100000 |
#define | LE_MRC_BITMASK_BAND_EGSM_900 0x0000000000200000 |
#define | LE_MRC_BITMASK_BAND_PRI_GSM_900 0x0000000000400000 |
#define | LE_MRC_BITMASK_BAND_GSM_450 0x0000000000800000 |
#define | LE_MRC_BITMASK_BAND_GSM_480 0x0000000001000000 |
#define | LE_MRC_BITMASK_BAND_GSM_750 0x0000000002000000 |
#define | LE_MRC_BITMASK_BAND_GSM_850 0x0000000004000000 |
#define | LE_MRC_BITMASK_BAND_GSMR_900 0x0000000008000000 |
#define | LE_MRC_BITMASK_BAND_GSM_PCS_1900 0x0000000010000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_EU_J_CH_IMT_2100 0x0000000020000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_US_PCS_1900 0x0000000040000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_EU_CH_DCS_1800 0x0000000080000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_US_1700 0x0000000100000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_US_850 0x0000000200000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_J_800 0x0000000400000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_EU_2600 0x0000000800000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_EU_J_900 0x0000001000000000 |
#define | LE_MRC_BITMASK_BAND_WCDMA_J_1700 0x0000002000000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_1 0x0000000000000001 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_2 0x0000000000000002 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_3 0x0000000000000004 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_4 0x0000000000000008 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_5 0x0000000000000010 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_6 0x0000000000000020 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_7 0x0000000000000040 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_8 0x0000000000000080 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_9 0x0000000000000100 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_10 0x0000000000000200 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_11 0x0000000000000400 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_12 0x0000000000000800 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_13 0x0000000000001000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_14 0x0000000000002000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_17 0x0000000000004000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_18 0x0000000000008000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_19 0x0000000000010000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_20 0x0000000000020000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_21 0x0000000000040000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_24 0x0000000000080000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_25 0x0000000000100000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_33 0x0000000000200000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_34 0x0000000000400000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_35 0x0000000000800000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_36 0x0000000001000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_37 0x0000000002000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_38 0x0000000004000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_39 0x0000000008000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_40 0x0000000010000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_41 0x0000000020000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_42 0x0000000040000000 |
#define | LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_43 0x0000000080000000 |
#define | LE_MRC_BITMASK_TDSCDMA_BAND_A 0x01 |
#define | LE_MRC_BITMASK_TDSCDMA_BAND_B 0x02 |
#define | LE_MRC_BITMASK_TDSCDMA_BAND_C 0x04 |
#define | LE_MRC_BITMASK_TDSCDMA_BAND_D 0x08 |
#define | LE_MRC_BITMASK_TDSCDMA_BAND_E 0x10 |
#define | LE_MRC_BITMASK_TDSCDMA_BAND_F 0x20 |
Typedefs | |
typedef struct le_mrc_ScanInformation * | le_mrc_ScanInformationRef_t |
typedef struct le_mrc_ScanInformationList * | le_mrc_ScanInformationListRef_t |
typedef struct le_mrc_CellInfo * | le_mrc_CellInfoRef_t |
typedef struct le_mrc_NeighborCells * | le_mrc_NeighborCellsRef_t |
typedef struct le_mrc_NetRegStateHandler * | le_mrc_NetRegStateHandlerRef_t |
typedef struct le_mrc_RatChangeHandler * | le_mrc_RatChangeHandlerRef_t |
typedef void(* | le_mrc_NetRegStateHandlerFunc_t )(le_mrc_NetRegState_t state, void *contextPtr) |
typedef void(* | le_mrc_RatChangeHandlerFunc_t )(le_mrc_Rat_t rat, void *contextPtr) |
Enumerations | |
enum | le_mrc_NetRegState_t { LE_MRC_REG_NONE = 0, LE_MRC_REG_HOME = 1, LE_MRC_REG_SEARCHING = 2, LE_MRC_REG_DENIED = 3, LE_MRC_REG_ROAMING = 5, LE_MRC_REG_UNKNOWN = 4 } |
enum | le_mrc_Rat_t { LE_MRC_RAT_UNKNOWN = 0, LE_MRC_RAT_GSM = 1<<0, LE_MRC_RAT_UMTS = 1<<1, LE_MRC_RAT_LTE = 1<<2, LE_MRC_RAT_CDMA = 1<<3, LE_MRC_RAT_ALL } |
Legato Modem Radio Control include file.
Copyright (C) Sierra Wireless, Inc. 2013. All rights reserved. Use of this work is subject to license.
#define LE_MRC_BITMASK_BAND_CLASS_0_A_SYSTEM 0x0000000000000001 |
Band Bit Mask
#define LE_MRC_BITMASK_LTE_BAND_E_UTRA_OP_BAND_1 0x0000000000000001 |
LTE Band Bit Mask
#define LE_MRC_BITMASK_RAT_CDMA 0x01 |
Radio Access Technology Bit Mask
#define LE_MRC_BITMASK_TDSCDMA_BAND_A 0x01 |
TDSCDMA Band Bit Mask
typedef struct le_mrc_CellInfo* le_mrc_CellInfoRef_t |
Reference type for one Cell Information.
typedef struct le_mrc_NeighborCells* le_mrc_NeighborCellsRef_t |
Reference type for all Neighboring Cells Information.
typedef void(* le_mrc_NetRegStateHandlerFunc_t)(le_mrc_NetRegState_t state, void *contextPtr) |
Prototype for handler functions used to report that the network registration state has changed.
state | Parameter ready to receive the Network Registration state. |
contextPtr | Context information the event handler may require. |
typedef struct le_mrc_NetRegStateHandler* le_mrc_NetRegStateHandlerRef_t |
Reference type for Network Registration State's Changes Handler references.
typedef void(* le_mrc_RatChangeHandlerFunc_t)(le_mrc_Rat_t rat, void *contextPtr) |
Prototype for handler functions used to report that the Radio Access Technology has changed.
rat | Parameter ready to receive the Radio Access Technology. |
contextPtr | Context information the event handler may require. |
typedef struct le_mrc_RatChangeHandler* le_mrc_RatChangeHandlerRef_t |
Reference type for Radio Access Technology changes Handler references.
typedef struct le_mrc_ScanInformationList* le_mrc_ScanInformationListRef_t |
Reference type for Scan Information Listing.
typedef struct le_mrc_ScanInformation* le_mrc_ScanInformationRef_t |
Declare a reference type for referring to MRC Scan Information objects.
enum le_mrc_NetRegState_t |
Network Registration states.
enum le_mrc_Rat_t |
le_mrc_NetRegStateHandlerRef_t le_mrc_AddNetRegStateHandler | ( | le_mrc_NetRegStateHandlerFunc_t | handlerFuncPtr, |
void * | contextPtr | ||
) |
Register an handler for network registration state change.
[in] | handlerFuncPtr | The handler function. |
[in] | contextPtr | The handler's context. |
le_mrc_RatChangeHandlerRef_t le_mrc_AddRatChangeHandler | ( | le_mrc_RatChangeHandlerFunc_t | handlerFuncPtr, |
void * | contextPtr | ||
) |
This function must be called to register an handler for Radio Access Technology changes.
[in] | handlerFuncPtr | The handler function. |
[in] | contextPtr | The handler's context. |
void le_mrc_DeleteCellularNetworkScan | ( | le_mrc_ScanInformationListRef_t | scanInformationListRef | ) |
This function must be called to delete the list of the Scan Information retrieved with le_mrc_PerformNetworkScan().
[in] | scanInformationListRef | The list of scan information. |
void le_mrc_DeleteNeighborCellsInfo | ( | le_mrc_NeighborCellsRef_t | ngbrCellsRef | ) |
This function must be called to delete the Neighboring Cells information.
[in] | ngbrCellsRef | The Neighboring Cells reference |
le_result_t le_mrc_GetCellularNetworkMccMnc | ( | le_mrc_ScanInformationRef_t | scanInformationRef, |
char * | mccPtr, | ||
size_t | mccPtrSize, | ||
char * | mncPtr, | ||
size_t | mncPtrSize | ||
) |
This function must be called to get the Cellular Network Code [mcc:mnc]
[in] | scanInformationRef | Scan information reference |
[out] | mccPtr | Mobile Country Code |
[in] | mccPtrSize | mccPtr buffer size |
[out] | mncPtr | Mobile Network Code |
[in] | mncPtrSize | mncPtr buffer size |
le_result_t le_mrc_GetCellularNetworkName | ( | le_mrc_ScanInformationRef_t | scanInformationRef, |
char * | namePtr, | ||
size_t | nameSize | ||
) |
This function must be called to get the Cellular Network Name.
[in] | scanInformationRef | Scan information reference |
[out] | namePtr | Name of operator |
[in] | nameSize | The size in bytes of the namePtr buffer |
le_mrc_ScanInformationRef_t le_mrc_GetFirstCellularNetworkScan | ( | le_mrc_ScanInformationListRef_t | scanInformationListRef | ) |
This function must be called to get the first Scan Information object reference in the list of scan Information retrieved with le_mrc_PerformNetworkScan().
[in] | scanInformationListRef | The list of scan information. |
le_mrc_CellInfoRef_t le_mrc_GetFirstNeighborCellInfo | ( | le_mrc_NeighborCellsRef_t | ngbrCellsRef | ) |
This function must be called to get the first Cell Information reference in the list of Neighboring Cells information retrieved with le_mrc_GetNeighborCellsInfo().
[in] | ngbrCellsRef | The Neighboring Cells reference |
le_result_t le_mrc_GetHomeNetworkName | ( | char * | nameStr, |
size_t | nameStrSize | ||
) |
This function must be called to get the Home Network Name information.
[out] | nameStr | the home network Name |
[in] | nameStrSize | the nameStr size |
uint32_t le_mrc_GetNeighborCellId | ( | le_mrc_CellInfoRef_t | ngbrCellInfoRef | ) |
This function must be called to get the Cell Identifier.
[in] | ngbrCellInfoRef | The Cell information reference |
uint32_t le_mrc_GetNeighborCellLocAreaCode | ( | le_mrc_CellInfoRef_t | ngbrCellInfoRef | ) |
This function must be called to get the Location Area Code of a cell.
[in] | ngbrCellInfoRef | The Cell information reference |
int32_t le_mrc_GetNeighborCellRxLevel | ( | le_mrc_CellInfoRef_t | ngbrCellInfoRef | ) |
This function must be called to get the signal strength of a cell.
[in] | ngbrCellInfoRef | The Cell information reference |
le_mrc_NeighborCellsRef_t le_mrc_GetNeighborCellsInfo | ( | void | ) |
This function must be called to retrieve the Neighboring Cells information. It creates and returns a reference to the Neighboring Cells information.
le_result_t le_mrc_GetNetRegState | ( | le_mrc_NetRegState_t * | statePtr | ) |
Get the network registration state.
[out] | statePtr | Network Registration state. |
le_mrc_ScanInformationRef_t le_mrc_GetNextCellularNetworkScan | ( | le_mrc_ScanInformationListRef_t | scanInformationListRef | ) |
This function must be called to get the next Scan Information object reference in the list of scan Information retrieved with le_mrc_PerformNetworkScan().
[in] | scanInformationListRef | The list of scan information. |
le_mrc_CellInfoRef_t le_mrc_GetNextNeighborCellInfo | ( | le_mrc_NeighborCellsRef_t | ngbrCellsRef | ) |
This function must be called to get the next Cell Information reference in the list of Neighboring Cells information retrieved with le_mrc_GetNeighborCellsInfo().
[in] | ngbrCellsRef | The Neighboring Cells reference |
le_result_t le_mrc_GetRadioAccessTechInUse | ( | le_mrc_Rat_t * | ratPtr | ) |
This function must be called to get the current Radio Access Technology in use.
[out] | ratPtr | The Radio Access Technology. |
le_result_t le_mrc_GetRadioPower | ( | le_onoff_t * | powerPtr | ) |
Must be called to get the Radio Module power state.
[out] | powerPtr | Power state. |
le_result_t le_mrc_GetSignalQual | ( | uint32_t * | qualityPtr | ) |
Get the signal quality.
[out] | qualityPtr | Received signal strength quality (0 = no signal strength, 5 = very good signal strength). |
bool le_mrc_IsCellularNetworkAvailable | ( | le_mrc_ScanInformationRef_t | scanInformationRef | ) |
This function must be called to check if a cellular network is available.
[in] | scanInformationRef | Scan information reference |
bool le_mrc_IsCellularNetworkForbidden | ( | le_mrc_ScanInformationRef_t | scanInformationRef | ) |
This function must be called to check if a cellular network is forbidden by the operator.
[in] | scanInformationRef | Scan information reference |
bool le_mrc_IsCellularNetworkHome | ( | le_mrc_ScanInformationRef_t | scanInformationRef | ) |
This function must be called to check if a cellular network is currently in home mode.
[in] | scanInformationRef | Scan information reference |
bool le_mrc_IsCellularNetworkInUse | ( | le_mrc_ScanInformationRef_t | scanInformationRef | ) |
This function must be called to check if a cellular network is currently in use.
[in] | scanInformationRef | Scan information reference |
bool le_mrc_IsCellularNetworkRatAvailable | ( | le_mrc_ScanInformationRef_t | scanInformationRef, |
le_mrc_Rat_t | rat | ||
) |
This function must be called to know if the radio control access is in scanInformationRef.
[in] | scanInformationRef | Scan information reference |
[in] | rat | The Radio Access Technology |
le_mrc_ScanInformationListRef_t le_mrc_PerformCellularNetworkScan | ( | le_mrc_Rat_t | ratMask | ) |
This function must be called to perform a cellular network scan.
[in] | ratMask | Technology mask |
le_result_t le_mrc_RegisterCellularNetwork | ( | const char * | mccPtr, |
const char * | mncPtr | ||
) |
This function must be called to register on a cellular network [mcc;mnc]
[in] | mccPtr | Mobile Country Code |
[in] | mncPtr | Mobile Network Code |
void le_mrc_RemoveNetRegStateHandler | ( | le_mrc_NetRegStateHandlerRef_t | handlerRef | ) |
Remove a handler for network registration state changes.
[in] | handlerRef | The handler reference. |
void le_mrc_RemoveRatChangeHandler | ( | le_mrc_RatChangeHandlerRef_t | handlerRef | ) |
This function must be called to remove an handler for Radio Access Technology changes.
[in] | handlerRef | The handler reference. |
le_result_t le_mrc_SetRadioPower | ( | le_onoff_t | power | ) |
Set the power of the Radio Module.
[in] | power | The power state. |