components/modemServices/platformAdaptor/interfaces/inc/pa_mrc.h File Reference
#include "legato.h"
#include "le_mdm_defs.h"

Go to the source code of this file.

Data Structures

struct  pa_mrc_MobileCode_t
struct  pa_mrc_PreferredNetwork_t
struct  pa_mrc_ScanInformation_t

Defines

#define PA_MRC_METWORK_MASK_GSM   1<<0
#define PA_MRC_METWORK_MASK_UTMS   1<<1
#define PA_MRC_METWORK_MASK_LTE   1<<2
#define PA_MRC_METWORK_MASK_TD_SCDMA   1<<3
#define PA_MRC_METWORK_RATMASK_GSM   1<<0
#define PA_MRC_METWORK_RATMASK_UTMS   1<<1
#define PA_MRC_METWORK_RATMASK_LTE   1<<2
#define PA_MRC_METWORK_RATMASK_GSMCOMPACT   1<<3

Typedefs

typedef void(* pa_mrc_NetworkRegHdlrFunc_t )(le_mrc_NetRegState_t *regState)

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  le_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_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 (uint32_t networkMask, le_mrc_ScanType_t scanType, le_dls_List_t *scanInformationListPtr)
le_result_t pa_mrc_GetScanInformationCode (pa_mrc_ScanInformation_t *scanInformationPtr, pa_mrc_MobileCode_t *mobileCodePtr)
le_result_t pa_mrc_GetScanInformationName (pa_mrc_ScanInformation_t *scanInformationPtr, char *namePtr, size_t nameSize)
le_result_t pa_mrc_GetScanInformationRat (pa_mrc_ScanInformation_t *scanInformationPtr, le_mrc_Rat_t *ratPtr)
le_result_t pa_mrc_GetScanInformationInUse (pa_mrc_ScanInformation_t *scanInformationPtr, bool *inUsePtr)
le_result_t pa_mrc_GetScanInformationAvailable (pa_mrc_ScanInformation_t *scanInformationPtr, bool *isAvailablePtr)
le_result_t pa_mrc_GetScanInformationHome (pa_mrc_ScanInformation_t *scanInformationPtr, bool *isHomePtr)
le_result_t pa_mrc_GetScanInformationForbidden (pa_mrc_ScanInformation_t *scanInformationPtr, bool *isForbiddenPtr)
le_result_t pa_mrc_AddPreferredNetwork (le_dls_List_t *PreferredNetworkListPtr, char mcc[LE_MRC_MCC_BYTES], char mnc[LE_MRC_MNC_BYTES], uint32_t ratMask)
le_result_t pa_mrc_ClearPreferedList (le_dls_List_t *PreferredNetworkListPtr)
le_result_t pa_mrc_SavePreferredList (le_dls_List_t *PreferredNetworkListPtr)
le_result_t pa_mrc_ConnectNetwork (const char *mccPtr, const char *mncPtr)
le_result_t pa_mrc_SetAutomaticNetworkRegistration (void)

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.


Define Documentation

#define PA_MRC_METWORK_MASK_GSM   1<<0

Network Technology mask for Network Scan.

#define PA_MRC_METWORK_RATMASK_GSM   1<<0

Radio Access Technology mask.


Typedef Documentation

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

Parameters:
regStatThe Network registration state.

Enumeration Type Documentation

Network Scan Type.

Enumerator:
PA_MRC_SCAN_PLMN 

Scan PLMN.

PA_MRC_SCAN_CSG 

Scan closed subscriber group.

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.


Function Documentation

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_AddPreferredNetwork ( le_dls_List_t PreferredNetworkListPtr,
char  mcc[LE_MRC_MCC_BYTES],
char  mnc[LE_MRC_MNC_BYTES],
uint32_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]PreferredNetworkListPtrList of preferred network
[in]mccMobile Country Code
[in]mncMobile Network Code
[in]ratMaskRadio Access Technology mask
le_result_t pa_mrc_ClearPreferedList ( le_dls_List_t PreferredNetworkListPtr)

This function must be called to clear the preferred list.

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters:
[in]PreferredNetworkListPtrList of preferred Network

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.
le_result_t pa_mrc_ConnectNetwork ( const char *  mccPtr,
const char *  mncPtr 
)

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

Returns:
LE_NOT_POSSIBLE The function failed.
LE_TIMEOUT No response was received.
LE_OK The function succeeded.
Parameters:
[in]mccPtrMobile Country Code
[in]mncPtrMobile Network Code
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

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.

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.

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_GetScanInformationAvailable ( pa_mrc_ScanInformation_t scanInformationPtr,
bool *  isAvailablePtr 
)

This function must be called to know if pa_mrc_ScanInformation_t is available

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters:
[in]scanInformationPtrThe scan information
[out]isAvailablePtravailable status

This function must be called to get the scanInformation code

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters:
[in]scanInformationPtrThe scan information
[out]mobileCodePtrthe mobile code
le_result_t pa_mrc_GetScanInformationForbidden ( pa_mrc_ScanInformation_t scanInformationPtr,
bool *  isForbiddenPtr 
)

This function must be called to know the forbidden status

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters:
[in]scanInformationPtrThe scan information
[out]isForbiddenPtrthe forbidden status
le_result_t pa_mrc_GetScanInformationHome ( pa_mrc_ScanInformation_t scanInformationPtr,
bool *  isHomePtr 
)

This function must be called to know the home status

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters:
[in]scanInformationPtrThe scan information
[out]isHomePtrthe network home status
le_result_t pa_mrc_GetScanInformationInUse ( pa_mrc_ScanInformation_t scanInformationPtr,
bool *  inUsePtr 
)

This function must be called to know if pa_mrc_ScanInformation_t is in use

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters:
[in]scanInformationPtrThe scan information
[out]inUsePtrIn Use status
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

This function must be called to know the radio access technology

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors
Parameters:
[in]scanInformationPtrThe scan information
[out]ratPtrThe radio access technology
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 ( uint32_t  networkMask,
le_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

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.
le_result_t pa_mrc_SavePreferredList ( le_dls_List_t PreferredNetworkListPtr)

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]PreferredNetworkListPtrList of preferred network

This function must be called to register automatically on network

Returns:
  • LE_OK on success
  • LE_NOT_POSSIBLE for all other errors

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.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines