All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pa_mrc.h File Reference
#include "legato.h"
#include "interfaces.h"

Go to the source code of this file.

Data Structures

struct  pa_mrc_CellInfo_t
 
struct  pa_mrc_MobileCode_t
 
struct  pa_mrc_PreferredNetwork_t
 
struct  pa_mrc_ScanInformation_t
 

Typedefs

typedef void(* pa_mrc_NetworkRegHdlrFunc_t )(le_mrc_NetRegState_t *regStatePtr)
 
typedef void(* pa_mrc_RatChangeHdlrFunc_t )(le_mrc_Rat_t *ratPtr)
 

Enumerations

enum  pa_mrc_NetworkRegSetting_t { PA_MRC_DISABLE_REG_NOTIFICATION = 0, PA_MRC_ENABLE_REG_NOTIFICATION = 1, PA_MRC_ENABLE_REG_LOC_NOTIFICATION = 2 }
 
enum  pa_mrc_ScanType_t { PA_MRC_SCAN_PLMN = 0, PA_MRC_SCAN_CSG }
 

Functions

le_result_t pa_mrc_SetRadioPower (le_onoff_t power)
 
le_result_t pa_mrc_GetRadioPower (le_onoff_t *powerPtr)
 
le_event_HandlerRef_t pa_mrc_SetRatChangeHandler (pa_mrc_RatChangeHdlrFunc_t handlerFuncPtr)
 
void pa_mrc_RemoveRatChangeHandler (le_event_HandlerRef_t handlerRef)
 
le_event_HandlerRef_t pa_mrc_AddNetworkRegHandler (pa_mrc_NetworkRegHdlrFunc_t regStateHandler)
 
le_result_t pa_mrc_RemoveNetworkRegHandler (le_event_HandlerRef_t handlerRef)
 
le_result_t pa_mrc_ConfigureNetworkReg (pa_mrc_NetworkRegSetting_t setting)
 
le_result_t pa_mrc_GetNetworkRegConfig (pa_mrc_NetworkRegSetting_t *settingPtr)
 
le_result_t pa_mrc_GetNetworkRegState (le_mrc_NetRegState_t *statePtr)
 
le_result_t pa_mrc_GetSignalQuality (int32_t *rssiPtr)
 
le_result_t pa_mrc_GetHomeNetworkName (char *nameStr, size_t nameStrSize)
 
void pa_mrc_DeleteScanInformation (le_dls_List_t *scanInformationListPtr)
 
le_result_t pa_mrc_PerformNetworkScan (le_mrc_Rat_t networkMask, pa_mrc_ScanType_t scanType, le_dls_List_t *scanInformationListPtr)
 
le_result_t pa_mrc_GetScanInformationName (pa_mrc_ScanInformation_t *scanInformationPtr, char *namePtr, size_t nameSize)
 
le_result_t pa_mrc_AddPreferredOperators (le_dls_List_t *PreferredOperatorsListPtr, char mcc[LE_MRC_MCC_BYTES], char mnc[LE_MRC_MNC_BYTES], le_mrc_Rat_t ratMask)
 
void pa_mrc_DeletePreferredOperators (le_dls_List_t *PreferredOperatorsListPtr)
 
le_result_t pa_mrc_SavePreferredOperators (le_dls_List_t *PreferredOperatorsListPtr)
 
le_result_t pa_mrc_RegisterNetwork (const char *mccPtr, const char *mncPtr)
 
le_result_t pa_mrc_SetAutomaticNetworkRegistration (void)
 
le_result_t pa_mrc_GetRadioAccessTechInUse (le_mrc_Rat_t *ratPtr)
 
le_result_t pa_mrc_SetRatPreference (uint8_t rats)
 
le_result_t pa_mrc_SetBandPreference (uint64_t bands)
 
le_result_t pa_mrc_SetLteBandPreference (uint64_t bands)
 
le_result_t pa_mrc_SetTdScdmaBandPreference (uint8_t tdsCdmaBands)
 
int32_t pa_mrc_GetNeighborCellsInfo (le_dls_List_t *cellInfoListPtr)
 
void pa_mrc_DeleteNeighborCellsInfo (le_dls_List_t *cellInfoListPtr)
 

Detailed Description

Legato Modem Radio Control Platform Adapter API include file.

Copyright (C) Sierra Wireless, Inc. 2013. All rights reserved. Use of this work is subject to license.

Typedef Documentation

typedef void(* pa_mrc_NetworkRegHdlrFunc_t)(le_mrc_NetRegState_t *regStatePtr)

Prototype for handler functions used to report the Network registration state.

Parameters
regStatePtrThe Network registration state.
typedef void(* pa_mrc_RatChangeHdlrFunc_t)(le_mrc_Rat_t *ratPtr)

Prototype for handler functions used to report the Radio Access Technology change.

Parameters
ratPtrThe Radio Access Technology.

Enumeration Type Documentation

Network Registration setting.

Enumerator
PA_MRC_DISABLE_REG_NOTIFICATION 

Disable network registration notification result code.

PA_MRC_ENABLE_REG_NOTIFICATION 

Enable network registration notification code.

PA_MRC_ENABLE_REG_LOC_NOTIFICATION 

Enable network registration and location information notification result code if there is a change of network cell.

Network Scan Type.

Enumerator
PA_MRC_SCAN_PLMN 

Scan PLMN.

PA_MRC_SCAN_CSG 

Scan closed subscriber group.

Function Documentation

le_event_HandlerRef_t pa_mrc_AddNetworkRegHandler ( pa_mrc_NetworkRegHdlrFunc_t  regStateHandler)

This function must be called to register a handler for Network registration state handling.

Returns
A handler reference, which is only needed for later removal of the handler.
Note
Doesn't return on failure, so there's no need to check the return value for errors.
Parameters
[in]regStateHandlerThe handler function to handle the Network registration state.
le_result_t pa_mrc_AddPreferredOperators ( le_dls_List_t PreferredOperatorsListPtr,
char  mcc[LE_MRC_MCC_BYTES],
char  mnc[LE_MRC_MNC_BYTES],
le_mrc_Rat_t  ratMask 
)

This function must be called to add a new mobile country/network code in the list

Returns
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters
[out]PreferredOperatorsListPtrList of preferred network operator
[in]mccMobile Country Code
[in]mncMobile Network Code
[in]ratMaskRadio Access Technology mask
le_result_t pa_mrc_ConfigureNetworkReg ( pa_mrc_NetworkRegSetting_t  setting)

This function configures the Network registration setting.

Returns
LE_NOT_POSSIBLE The function failed.
LE_TIMEOUT No response was received.
LE_OK The function succeeded.
Parameters
[in]settingThe selected Network registration setting.
void pa_mrc_DeleteNeighborCellsInfo ( le_dls_List_t cellInfoListPtr)

This function must be called to delete the list of neighboring cells information.

Parameters
[in]cellInfoListPtrlist of pa_mrc_CellInfo_t
void pa_mrc_DeletePreferredOperators ( le_dls_List_t PreferredOperatorsListPtr)

This function must be called to clear the preferred list.

Parameters
[in]PreferredOperatorsListPtrList of preferred network operator
void pa_mrc_DeleteScanInformation ( le_dls_List_t scanInformationListPtr)

This function must be called to delete the list of Scan Information

Parameters
[in]scanInformationListPtrlist of pa_mrc_ScanInformation_t
le_result_t pa_mrc_GetHomeNetworkName ( char *  nameStr,
size_t  nameStrSize 
)

This function must be called to get the Home Network Name information.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the Home Network Name can't fit in nameStr
  • LE_NOT_POSSIBLE on any other failure
Parameters
[out]nameStrthe home network Name
[in]nameStrSizethe nameStr size
int32_t pa_mrc_GetNeighborCellsInfo ( le_dls_List_t cellInfoListPtr)

This function retrieves the Neighboring Cells information. Each cell information is queued in the list specified with the IN/OUT parameter. Neither add nor remove of elements in the list can be done outside this function.

Returns
LE_FAULT The function failed to retrieve the Neighboring Cells information.
a positive value The function succeeded. The number of cells which the information have been retrieved.
Parameters
[in,out]cellInfoListPtrThe Neighboring Cells information.
le_result_t pa_mrc_GetNetworkRegConfig ( pa_mrc_NetworkRegSetting_t settingPtr)

This function gets the Network registration setting.

Returns
LE_NOT_POSSIBLE The function failed to get the Network registration setting.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[out]settingPtrThe selected Network registration setting.
le_result_t pa_mrc_GetNetworkRegState ( le_mrc_NetRegState_t statePtr)

This function gets the Network registration state.

Returns
LE_NOT_POSSIBLE The function failed to get the Network registration state.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[out]statePtrThe network registration state.
le_result_t pa_mrc_GetRadioAccessTechInUse ( le_mrc_Rat_t ratPtr)

This function gets the Radio Access Technology currently in use.

Returns
LE_FAULT The function failed to get the Radio Access Technology.
LE_OK The function succeeded.
Parameters
[out]ratPtrThe Radio Access Technology.
le_result_t pa_mrc_GetRadioPower ( le_onoff_t powerPtr)

This function must be called to get the Radio Module power state.

Returns
LE_FAULT The function failed.
LE_OK The function succeed.
Parameters
[out]powerPtrThe power state.
le_result_t pa_mrc_GetScanInformationName ( pa_mrc_ScanInformation_t scanInformationPtr,
char *  namePtr,
size_t  nameSize 
)

This function must be called to perform a network scan.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the operator name would not fit in buffer
  • LE_NOT_POSSIBLE for all other errors
Parameters
[in]scanInformationPtrThe scan information
[out]namePtrName of operator
[in]nameSizeThe size in bytes of the namePtr buffer
le_result_t pa_mrc_GetSignalQuality ( int32_t *  rssiPtr)

This function gets the Signal Quality information.

Returns
LE_OUT_OF_RANGE The signal quality values are not known or not detectable.
LE_NOT_POSSIBLE The function failed.
LE_TIMEOUT No response was received.
LE_OK The function succeeded.
Parameters
[out]rssiPtrThe received signal strength (in dBm).
le_result_t pa_mrc_PerformNetworkScan ( le_mrc_Rat_t  networkMask,
pa_mrc_ScanType_t  scanType,
le_dls_List_t scanInformationListPtr 
)

This function must be called to perform a network scan.

Returns
LE_FAULT The function failed.
LE_TIMEOUT No response was received.
LE_COMM_ERROR Radio link failure occurred.
LE_OK The function succeeded.
Parameters
[in]networkMaskThe network mask
[in]scanTypethe scan type
[out]scanInformationListPtrlist of pa_mrc_ScanInformation_t
le_result_t pa_mrc_RegisterNetwork ( const char *  mccPtr,
const char *  mncPtr 
)

This function must be called to register on a mobile network [mcc;mnc]

Returns
LE_NOT_POSSIBLE The function failed to register.
LE_OK The function succeeded to register,
Parameters
[in]mccPtrMobile Country Code
[in]mncPtrMobile Network Code
le_result_t pa_mrc_RemoveNetworkRegHandler ( le_event_HandlerRef_t  handlerRef)

This function must be called to unregister the handler for Network registration state handling.

Note
Doesn't return on failure, so there's no need to check the return value for errors.
void pa_mrc_RemoveRatChangeHandler ( le_event_HandlerRef_t  handlerRef)

This function must be called to unregister the handler for Radio Access Technology change handling.

le_result_t pa_mrc_SavePreferredOperators ( le_dls_List_t PreferredOperatorsListPtr)

This function must be called to apply the preferred list into the modem

Returns
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters
[in]PreferredOperatorsListPtrList of preferred network operator
le_result_t pa_mrc_SetAutomaticNetworkRegistration ( void  )

This function must be called to register automatically on network

Returns
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
le_result_t pa_mrc_SetBandPreference ( uint64_t  bands)

Set the Band Preference

Returns
LE_OK on success
LE_FAULT on failure
Parameters
[in]bandsA bit mask to set the Band preference.
le_result_t pa_mrc_SetLteBandPreference ( uint64_t  bands)

Set the LTE Band Preference

Returns
LE_OK on success
LE_FAULT on failure
Parameters
[in]bandsA bit mask to set the LTE Band preference.
le_result_t pa_mrc_SetRadioPower ( le_onoff_t  power)

This function must be called to set the power of the Radio Module.

Returns
LE_FAULT The function failed.
LE_OK The function succeed.
Parameters
[in]powerThe power state.
le_event_HandlerRef_t pa_mrc_SetRatChangeHandler ( pa_mrc_RatChangeHdlrFunc_t  handlerFuncPtr)

This function must be called to register a handler for Radio Access Technology change handling.

Returns
A handler reference, which is only needed for later removal of the handler.
Note
Doesn't return on failure, so there's no need to check the return value for errors.
Parameters
[in]handlerFuncPtrThe handler function.
le_result_t pa_mrc_SetRatPreference ( uint8_t  rats)

Set the Radio Access Technology Preference

Returns
LE_OK on success
LE_FAULT on failure
Parameters
[in]ratsA bit mask to set the Radio Access Technology preference.
le_result_t pa_mrc_SetTdScdmaBandPreference ( uint8_t  tdsCdmaBands)

Set the TD-SCDMA Band Preference

Returns
LE_OK on success
LE_FAULT on failure
Parameters
[in]tdsCdmaBandsA bit mask to set the TD-SCDMA Band preference.