le_gnss_interface.h File Reference
#include "legato.h"

Go to the source code of this file.

Macros

#define LE_GNSS_MAX_SUPL_SERVER_URL_LEN   256
 
#define LE_GNSS_MAX_SUPL_CERTIFICATE_LEN   2000
 

Enumerations

enum  le_gnss_AssistedMode_t { LE_GNSS_STANDALONE_MODE, LE_GNSS_MS_BASED_MODE, LE_GNSS_MS_ASSISTED_MODE }
 
enum  le_gnss_ConstellationBitMask_t { LE_GNSS_CONSTELLATION_GPS = 0x1, LE_GNSS_CONSTELLATION_GLONASS = 0x2 }
 

Functions

void le_gnss_ConnectService (void)
 
void le_gnss_DisconnectService (void)
 
le_result_t le_gnss_SetConstellation (le_gnss_ConstellationBitMask_t constellationMask)
 
le_result_t le_gnss_GetConstellation (le_gnss_ConstellationBitMask_t *constellationMaskPtr)
 
le_result_t le_gnss_EnableExtendedEphemerisFile (void)
 
le_result_t le_gnss_DisableExtendedEphemerisFile (void)
 
le_result_t le_gnss_LoadExtendedEphemerisFile (int fd)
 
le_result_t le_gnss_GetExtendedEphemerisValidity (le_clk_Time_t *startTimePtr, le_clk_Time_t *stopTimePtr)
 
le_result_t le_gnss_Start (void)
 
le_result_t le_gnss_Stop (void)
 
le_result_t le_gnss_ForceHotRestart (void)
 
le_result_t le_gnss_ForceWarmRestart (void)
 
le_result_t le_gnss_ForceColdRestart (void)
 
le_result_t le_gnss_ForceFactoryRestart (void)
 
le_result_t le_gnss_GetTtff (uint32_t *ttffPtr)
 
le_result_t le_gnss_Enable (void)
 
le_result_t le_gnss_Disable (void)
 
le_result_t le_gnss_SetSuplAssistedMode (le_gnss_AssistedMode_t assistedMode)
 
le_result_t le_gnss_GetSuplAssistedMode (le_gnss_AssistedMode_t *assistedModePtr)
 
le_result_t le_gnss_SetSuplServerUrl (const char *suplServerUrl)
 
le_result_t le_gnss_InjectSuplCertificate (uint8_t suplCertificateId, uint16_t suplCertificateLen, const char *suplCertificate)
 
le_result_t le_gnss_DeleteSuplCertificate (uint8_t suplCertificateId)
 

Detailed Description

Legato GNSS include file.

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.

Macro Definition Documentation

#define LE_GNSS_MAX_SUPL_CERTIFICATE_LEN   2000

Maximum SUPL certificate size.

#define LE_GNSS_MAX_SUPL_SERVER_URL_LEN   256

Maximum length of the SUP Server URL string.

Enumeration Type Documentation

Assisted-GNSS mode

Enumerator
LE_GNSS_STANDALONE_MODE 

Standalone mode.

LE_GNSS_MS_BASED_MODE 

MS-Based mode.

LE_GNSS_MS_ASSISTED_MODE 

MS-Assisted mode.

GNSS constellation Bit Mask (8 bits) indicating the GNSS constellation(s) used in solution.

Enumerator
LE_GNSS_CONSTELLATION_GPS 

GPS constellation used in solution.

LE_GNSS_CONSTELLATION_GLONASS 

GLONASS constellation used in solution.

Function Documentation

void le_gnss_ConnectService ( void  )

Connect the client to the service

le_result_t le_gnss_DeleteSuplCertificate ( uint8_t  suplCertificateId)

This function deletes the SUPL certificate.

Returns
  • LE_OK on success
  • LE_FAULT on failure
  • LE_BUSY service is busy
  • LE_TIMEOUT a time-out occurred
Parameters
[in]suplCertificateIdCertificate ID of the SUPL certificate. Certificate ID range is 0 to 9
le_result_t le_gnss_Disable ( void  )

This function disables the GNSS device.

Returns
LE_FAULT The function failed.
LE_DUPLICATE If the GNSS device is already disabled.
LE_NOT_PERMITTED If the GNSS device is not initialized or started.
LE_OK The function succeeded.
le_result_t le_gnss_DisableExtendedEphemerisFile ( void  )

This function disables the use of the 'Extended Ephemeris' file into the GNSS device.

Returns
LE_FAULT The function failed.
LE_OK The function succeeded.
void le_gnss_DisconnectService ( void  )

Disconnect the client from the service

le_result_t le_gnss_Enable ( void  )

This function enables the GNSS device.

Returns
LE_FAULT The function failed.
LE_DUPLICATE If the GNSS device is already enabled.
LE_NOT_PERMITTED If the GNSS device is not initialized.
LE_OK The function succeeded.
le_result_t le_gnss_EnableExtendedEphemerisFile ( void  )

This function enables the use of the 'Extended Ephemeris' file into the GNSS device.

Returns
LE_FAULT The function failed.
LE_OK The function succeeded.
le_result_t le_gnss_ForceColdRestart ( void  )

This function performs a "COLD" restart of the GNSS device.

Returns
LE_FAULT The function failed.
LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
LE_OK The function succeeded.
le_result_t le_gnss_ForceFactoryRestart ( void  )

This function performs a "FACTORY" restart of the GNSS device.

Returns
LE_FAULT The function failed.
LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
LE_OK The function succeeded.
le_result_t le_gnss_ForceHotRestart ( void  )

This function performs a "HOT" restart of the GNSS device.

Returns
LE_FAULT The function failed.
LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
LE_OK The function succeeded.
le_result_t le_gnss_ForceWarmRestart ( void  )

This function performs a "WARM" restart of the GNSS device.

Returns
LE_FAULT The function failed.
LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
LE_OK The function succeeded.
le_result_t le_gnss_GetConstellation ( le_gnss_ConstellationBitMask_t constellationMaskPtr)

Get the GNSS constellation bit mask

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[out]constellationMaskPtrGNSS constellation used in solution.
le_result_t le_gnss_GetExtendedEphemerisValidity ( le_clk_Time_t startTimePtr,
le_clk_Time_t stopTimePtr 
)

This function must be called to get the validity of the last injected Extended Ephemeris.

Returns
LE_FAULT The function failed to get the validity
LE_OK The function succeeded.
Parameters
[out]startTimePtrStart time
[out]stopTimePtrStop time
le_result_t le_gnss_GetSuplAssistedMode ( le_gnss_AssistedMode_t assistedModePtr)

This function gets the SUPL Assisted-GNSS mode.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[out]assistedModePtrAssisted-GNSS mode.
le_result_t le_gnss_GetTtff ( uint32_t *  ttffPtr)

Get the TTFF in milliseconds

Returns
LE_BUSY The position is not fixed and TTFF can't be measured.
LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
LE_OK Function succeeded.
Parameters
[out]ttffPtrTTFF in milliseconds
le_result_t le_gnss_InjectSuplCertificate ( uint8_t  suplCertificateId,
uint16_t  suplCertificateLen,
const char *  suplCertificate 
)

This function injects the SUPL certificate to be used in A-GNSS sessions.

Returns
  • LE_OK on success
  • LE_FAULT on failure
  • LE_BUSY service is busy
  • LE_TIMEOUT a time-out occurred
Parameters
[in]suplCertificateIdCertificate ID of the SUPL certificate. Certificate ID range is 0 to 9
[in]suplCertificateLenSUPL certificate size in Bytes.
[in]suplCertificateSUPL certificate contents.
le_result_t le_gnss_LoadExtendedEphemerisFile ( int  fd)

This function must be called to load an 'Extended Ephemeris' file into the GNSS device.

Returns
LE_FAULT The function failed to inject the 'Extended Ephemeris' file.
LE_TIMEOUT A time-out occurred.
LE_FORMAT_ERROR 'Extended Ephemeris' file format error.
LE_OK The function succeeded.
Parameters
[in]fdExtended ephemeris file descriptor
le_result_t le_gnss_SetConstellation ( le_gnss_ConstellationBitMask_t  constellationMask)

Set the GNSS constellation bit mask

Returns
LE_FAULT The function failed.
LE_UNSUPPORTED If the request is not supported.
LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
LE_OK The function succeeded.
Parameters
[in]constellationMaskGNSS constellation used in solution.
le_result_t le_gnss_SetSuplAssistedMode ( le_gnss_AssistedMode_t  assistedMode)

This function sets the SUPL Assisted-GNSS mode.

Returns
  • LE_OK on success
  • LE_FAULT on failure
  • LE_UNSUPPORTED request not supported
  • LE_TIMEOUT a time-out occurred
Parameters
[in]assistedModeAssisted-GNSS mode.
le_result_t le_gnss_SetSuplServerUrl ( const char *  suplServerUrl)

This function sets the SUPL server URL. That server URL is a NULL-terminated string with a maximum string length (including NULL terminator) equal to 256. Optionally the port number is specified after a colon.

Returns
  • LE_OK on success
  • LE_FAULT on failure
  • LE_BUSY service is busy
  • LE_TIMEOUT a time-out occurred
Parameters
[in]suplServerUrlSUPL server URL.
le_result_t le_gnss_Start ( void  )

This function starts the GNSS device.

Returns
LE_FAULT The function failed.
LE_DUPLICATE If the GNSS device is already started.
LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
LE_OK The function succeeded.
le_result_t le_gnss_Stop ( void  )

This function stops the GNSS device.

Returns
LE_FAULT The function failed.
LE_DUPLICATE If the GNSS device is already stopped.
LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
LE_OK The function succeeded.