le_lpt_interface.h File Reference

#include "legato.h"

Go to the source code of this file.

Typedefs

typedef void(* le_lpt_DisconnectHandler_t) (void *)
 
typedef struct le_lpt_EDrxParamsChangeHandler * le_lpt_EDrxParamsChangeHandlerRef_t
 
typedef void(* le_lpt_EDrxParamsChangeHandlerFunc_t) (le_lpt_EDrxRat_t rat, le_onoff_t activation, uint8_t eDrxValue, uint8_t pagingTimeWindow, void *contextPtr)
 

Enumerations

enum  le_lpt_EDrxRat_t {
  LE_LPT_EDRX_RAT_UNKNOWN = 0, LE_LPT_EDRX_RAT_EC_GSM_IOT = 1, LE_LPT_EDRX_RAT_GSM = 2, LE_LPT_EDRX_RAT_UTRAN = 3,
  LE_LPT_EDRX_RAT_LTE_M1 = 4, LE_LPT_EDRX_RAT_LTE_NB1 = 5, LE_LPT_EDRX_RAT_MAX = 6
}
 

Functions

void le_lpt_ConnectService (void)
 
le_result_t le_lpt_TryConnectService (void)
 
void le_lpt_SetServerDisconnectHandler (le_lpt_DisconnectHandler_t disconnectHandler, void *contextPtr)
 
void le_lpt_DisconnectService (void)
 
le_result_t le_lpt_SetEDrxState (le_lpt_EDrxRat_t rat, le_onoff_t activation)
 
le_result_t le_lpt_SetRequestedEDrxValue (le_lpt_EDrxRat_t rat, uint8_t eDrxValue)
 
le_result_t le_lpt_GetRequestedEDrxValue (le_lpt_EDrxRat_t rat, uint8_t *eDrxValuePtr)
 
le_result_t le_lpt_GetNetworkProvidedEDrxValue (le_lpt_EDrxRat_t rat, uint8_t *eDrxValuePtr)
 
le_result_t le_lpt_GetNetworkProvidedPagingTimeWindow (le_lpt_EDrxRat_t rat, uint8_t *pagingTimeWindowPtr)
 
le_lpt_EDrxParamsChangeHandlerRef_t le_lpt_AddEDrxParamsChangeHandler (le_lpt_EDrxParamsChangeHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_lpt_RemoveEDrxParamsChangeHandler (le_lpt_EDrxParamsChangeHandlerRef_t handlerRef)
 

Detailed Description

Legato Low Power Technologies include file.

Typedef Documentation

typedef void(* le_lpt_DisconnectHandler_t) (void *)

Type for handler called when a server disconnects.

typedef void(* le_lpt_EDrxParamsChangeHandlerFunc_t) (le_lpt_EDrxRat_t rat,le_onoff_t activation,uint8_t eDrxValue,uint8_t pagingTimeWindow,void *contextPtr)

Handler to report a change in the network-provided eDRX parameters.

typedef struct le_lpt_EDrxParamsChangeHandler* le_lpt_EDrxParamsChangeHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_lpt_EDrxParamsChange'

Enumeration Type Documentation

eDRX Radio Access Technology enum

Enumerator
LE_LPT_EDRX_RAT_UNKNOWN 

Unknown.

LE_LPT_EDRX_RAT_EC_GSM_IOT 

EC-GSM-IoT (A/Gb mode)

LE_LPT_EDRX_RAT_GSM 

GSM (A/Gb mode)

LE_LPT_EDRX_RAT_UTRAN 

UTRAN (Iu mode)

LE_LPT_EDRX_RAT_LTE_M1 

E-UTRAN (WB-S1 mode)

LE_LPT_EDRX_RAT_LTE_NB1 

E-UTRAN (NB-S1 mode)

LE_LPT_EDRX_RAT_MAX 

Invalid.

Function Documentation

le_lpt_EDrxParamsChangeHandlerRef_t le_lpt_AddEDrxParamsChangeHandler ( le_lpt_EDrxParamsChangeHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_lpt_EDrxParamsChange'

Event to report a change in the network-provided eDRX parameters.

Parameters
[in]handlerPtr
[in]contextPtr
void le_lpt_ConnectService ( void  )

Connect the current client thread to the service providing this API. Block until the service is available.

For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.

This function is created automatically.

void le_lpt_DisconnectService ( void  )

Disconnect the current client thread from the service providing this API.

Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.

This function is created automatically.

le_result_t le_lpt_GetNetworkProvidedEDrxValue ( le_lpt_EDrxRat_t  rat,
uint8_t *  eDrxValuePtr 
)

Get the network-provided eDRX cycle value for the given Radio Access Technology. The eDRX cycle value is defined in 3GPP TS 24.008 Release 13 section 10.5.5.32.

Returns
  • LE_OK The function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_UNSUPPORTED eDRX is not supported by the platform.
  • LE_UNAVAILABLE No network-provided eDRX cycle value.
  • LE_FAULT The function failed.
Parameters
[in]ratRadio Access Technology.
[out]eDrxValuePtrNetwork-provided eDRX cycle value, defined in 3GPP TS 24.008 Rel-13 section 10.5.5.32.
le_result_t le_lpt_GetNetworkProvidedPagingTimeWindow ( le_lpt_EDrxRat_t  rat,
uint8_t *  pagingTimeWindowPtr 
)

Get the network-provided Paging Time Window for the given Radio Access Technology. The Paging Time Window is defined in 3GPP TS 24.008 Release 13 section 10.5.5.32.

Returns
  • LE_OK The function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_UNSUPPORTED eDRX is not supported by the platform.
  • LE_UNAVAILABLE No defined Paging Time Window.
  • LE_FAULT The function failed.
Parameters
[in]ratRadio Access Technology.
[out]pagingTimeWindowPtrNetwork-provided Paging Time Window, defined in 3GPP TS 24.008 Rel-13 section 10.5.5.32.
le_result_t le_lpt_GetRequestedEDrxValue ( le_lpt_EDrxRat_t  rat,
uint8_t *  eDrxValuePtr 
)

Get the requested eDRX cycle value for the given Radio Access Technology. The eDRX cycle value is defined in 3GPP TS 24.008 Release 13 section 10.5.5.32.

Returns
  • LE_OK The function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_UNSUPPORTED eDRX is not supported by the platform.
  • LE_UNAVAILABLE No requested eDRX cycle value.
  • LE_FAULT The function failed.
Parameters
[in]ratRadio Access Technology.
[out]eDrxValuePtrRequested eDRX cycle value, defined in 3GPP TS 24.008 Rel-13 section 10.5.5.32.
void le_lpt_RemoveEDrxParamsChangeHandler ( le_lpt_EDrxParamsChangeHandlerRef_t  handlerRef)

Remove handler function for EVENT 'le_lpt_EDrxParamsChange'

Parameters
[in]handlerRef
le_result_t le_lpt_SetEDrxState ( le_lpt_EDrxRat_t  rat,
le_onoff_t  activation 
)

Set the eDRX activation state for the given Radio Access Technology.

Returns
  • LE_OK The function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_UNSUPPORTED eDRX is not supported by the platform.
  • LE_FAULT The function failed.
Parameters
[in]ratRadio Access Technology.
[in]activationeDRX activation state.
le_result_t le_lpt_SetRequestedEDrxValue ( le_lpt_EDrxRat_t  rat,
uint8_t  eDrxValue 
)

Set the requested eDRX cycle value for the given Radio Access Technology. The eDRX cycle value is defined in 3GPP TS 24.008 Release 13 section 10.5.5.32.

Returns
  • LE_OK The function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_UNSUPPORTED eDRX is not supported by the platform.
  • LE_FAULT The function failed.
Parameters
[in]ratRadio Access Technology.
[in]eDrxValueRequested eDRX cycle value, defined in 3GPP TS 24.008 Rel-13 section 10.5.5.32.
void le_lpt_SetServerDisconnectHandler ( le_lpt_DisconnectHandler_t  disconnectHandler,
void *  contextPtr 
)

Set handler called when server disconnection is detected.

When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.

le_result_t le_lpt_TryConnectService ( void  )

Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.

For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.

This function is created automatically.

Returns
  • LE_OK if the client connected successfully to the service.
  • LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
  • LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
  • LE_COMM_ERROR if the Service Directory cannot be reached.