API to extend the GLCT with your own request handlers. More...
#include "glct_api.h"
Classes | |
struct | GlctReqParmsPeriodic |
Periodic position request parameters. More... | |
struct | GlctReqCallBkPeriodicMeas |
Periodic measurement request callbacks. More... | |
struct | GlctReqCallBkPeriodic |
Periodic position request callbacks. More... | |
struct | GlctReqParmsPeriodicMeas |
Periodic measurement request parameters. More... | |
struct | GlctReqParmsSingle |
Single shot request parameters. More... | |
struct | GlctReqParmsSingleMeas |
Single shot measurement request parameters. More... | |
struct | GlctReqCallBkSingle |
Single shot request callbacks. More... | |
struct | GlctReqCallBkSingleMeas |
Single shot measurement request callbacks. More... | |
struct | GlctReqParmsCntin |
CNTIN request parameters. More... | |
struct | GlctReqCallBkCntin |
Called back when the CNTIN is finished. More... | |
struct | GlctReqParmsSyncin |
SYNCIN request parameters. More... | |
struct | GlctReqParmsTimer |
Timer request parameters. More... | |
struct | GlctReqCallBkTimer |
Timer request callback. More... | |
struct | GlctReqCallBkSyncin |
SYNCIN request parameters. More... | |
struct | GlctReqParmsFactTest |
Factory test parameters. More... | |
struct | GlctReqParmsGeofence |
Geofence request parameters. More... | |
struct | GlctReqParmsBreadcrumb |
Breadcrumbing request parameters. More... | |
struct | GlctReqParms |
Request parameters. More... | |
struct | GlctReqCallBacks |
Request callbacks. More... | |
struct | GlctRequest |
Request structure. More... | |
Typedefs | |
typedef struct GlctReqParmsPeriodic | GlctReqParmsPeriodic |
Periodic position request parameters. | |
typedef struct GlctReqParmsPeriodicMeas | GlctReqParmsPeriodicMeas |
Periodic measurement request parameters. | |
typedef struct GlctReqParmsSingle | GlctReqParmsSingle |
Single shot request parameters. | |
typedef struct GlctReqParmsSingleMeas | GlctReqParmsSingleMeas |
Single shot measurement request parameters. | |
typedef struct GlctReqParmsCntin | GlctReqParmsCntin |
CNTIN request parameters. | |
typedef struct GlctReqParmsSyncin | GlctReqParmsSyncin |
SYNCIN request parameters. | |
typedef struct GlctReqParmsTimer | GlctReqParmsTimer |
Timer request parameters. | |
typedef struct GlctReqCallBkSyncin | GlctReqCallBkSyncin |
SYNCIN request parameters. | |
typedef struct GlctReqParmsFactTest | GlctReqParmsFactTest |
Factory test parameters. | |
typedef struct GlctReqParms | GlctReqParms |
Request parameters. | |
typedef struct GlctRequest | GlctRequest |
Request structure. | |
Measure Position callbacks | |
typedef void(* | GlctReqOnFix )(void *pGlctReq, const GL_FIX_STATUS *pFixStatus) |
Callback called when the fix information is available. | |
typedef void(* | GlctReqOnMeas )(void *pGlctReq, const GL_RES_MEAS *pResMeas, const GANSS_MEAS *pGanssMeas) |
Callback called when the meas information is available. | |
CNTIN callbacks | |
typedef void(* | GlctReqOnCntin )(void *pGlctReq, GL_CNTIN_STATUS etStatus, double dFreqOffsPpu, double dFreqUncPPB) |
The GLL is reporting some CNTIN status. | |
typedef void(* | GpsCbOnCntin )(void *pHal, GL_CNTIN_STATUS etStatus, double dFreqOffsPpu, double dFreqUncPPB) |
SYNCIN callbacks | |
typedef void(* | GlctReqOnSyncInStatus )(void *pGlctReq, GL_SYNCIN_STATUS etStatus) |
Called when SYNCIN status has changed. | |
typedef void(* | GlctReqOnSyncInReport )(void *pGlctReq, GL_SYNCIN_STATUS etStatus, GL_TIME const *pGlTime) |
Called when SYNCIN request completed. | |
typedef void(* | GlctReqOnSyncInLatched )(void *pGlctReq, GL_SYNCIN_STATUS etStatus, double dAsicLms) |
Called when SYNCIN pulse latched. | |
Timer callbacks | |
typedef void(* | GlctReqOnTimer )(void *pGlctReq) |
Factory test callbacks | |
typedef void(* | GlctReqOnFactTest )(void *pGlctReq, GL_FACT_TEST_STATUS *ptStatus) |
Called to provide factory test information results. | |
Assistance data callbacks | |
typedef void(* | GlctReqOnAsstStatus )(void *pGlctReq, GL_AID_REQUEST *pAidReq) |
Called when GLL needs assistance. | |
Gps Data callbacks | |
typedef void(* | GlctReqOnGpsData )(void *pGlctReq, GL_GPS_DATA eType, void *pData) |
Called when GLL has been instructed to send GLL internal data. | |
Geofence callback | |
typedef void(* | GlctReqOnGeofenceEvent )(void *pGlctReq, GL_REQ_GEOFENCE_CODE etCode, const GL_FIX_STATUS *pFixStatus) |
Called when GLL triggered a geofence event. | |
Callbacks common to all requests | |
typedef void(* | GlctReqOnStart )(void *pGlctReq, GL_REQ_START_CODE etCode) |
Called when a request is started. | |
typedef void(* | GlctReqOnStop )(void *pGlctReq) |
Called when request is completed or aborted. | |
typedef void(* | GlctReqOnNmea )(void *pGlctReq, plain_char *pcLine, short sSize) |
Called when new NMEA sentence is available. | |
Enumerations | |
enum | GlctRequestType |
Types of the requests that can be sent to GLL. | |
Functions | |
int | GlctEnablePowerSave (void *pGpsCtrl, int iEnable) |
Controls power saving mode. | |
int | GlCtSetPpsSettings (void *pGpsCtrl, int bEnable, long ulOffsetUs, unsigned long ulWidthNs, unsigned long ulMaxUnctyNs, unsigned long ulOscDriftPpb) |
Controls PPS settings. | |
int | GlctSetFixStatus (void *pGpsCtrl, GL_FIX_STATUS *pFixStatus) |
Provide fix status. | |
int | GlctExitAfterStop (void *pGpsCtrl, int flag) |
Have GLCT exit when GLL is not running. | |
int | GlctSetFlightMode (void *pGpsCtrl, int bEnableFlightMode) |
Allow wider, shallower searches. | |
APIs to create and start new requests | |
GlctRequest * | GlctReqCreateDefault (GlctRequestType eType, void *pGpsCtrl) |
GlctReqCreateDefault creates a request of the given type with default parameters and no callbacks. | |
GlctRequest * | GlctReqCreateWithParms (GlctReqParms *pParms, void *pGpsCtrl) |
Creates request of the given type with custom parameters and no callbacks. | |
GlctRequest * | GlctReqFind (void *pUserData, void *pGpsCtrl) |
Find the request using the pointer to the user data as the unique key. | |
int | GlctReqStart (void *pGpsCtrl, GlctRequest *pRequest) |
GlctReqStart must be called to perform a request pointed to by pRequest If the timeout is 0, then do not trust contents of pRequest after this call, as the GLL might stop it and reuse the request structure internally. | |
void | GlctReqStop (void *pGpsCtrl, GlctRequest *pRequest) |
GlctReqStop cancels an onging request. | |
void | GlctReqStopAll (void *pGpsCtrl) |
Cancel all ongoing requests. | |
void | GlctExit (void *pGpsCtrl) |
Make GLCT stop all ongoing requests and exit from GpsRun() function. | |
int | GlctAbort (void *pGpsCtrl, unsigned long ulNvStorageToClear) |
Make GLCT stop all ongoing requests and exit GpsRun(). | |
int | GlctIsIdle (void *pGpsCtrl) |
APIs to pass assistance data | |
void | GlctMarkToIgnore (void *pGpsCtrl, unsigned long ulNvStorageToIgnore) |
GlctMarkToIgnore Marks elements of nonvolatile storage to ignore next time the NVRAM is loaded. | |
void | GlctMarkToIgnoreAndSpoof (void *pGpsCtrl, unsigned long ulNvStorageToIgnore, long lRtcErrMs, signed char cPosError, unsigned long ulPosAgeSec) |
GlctMarkToIgnoreAndSpoof Marks element of nonvolatile storage to ignore next time the NVRAM is loaded and causes the time stored in RTC and position to be spoofed. | |
void | GlctMarkToIgnoreAndSpoofAll (void *pGpsCtrl, unsigned long ulNvStorageToIgnore, long lRtcErrMs, signed char cPosError, unsigned long ulPosAgeSec, unsigned long ulOscAgeSec, unsigned long ulOscUncPpb) |
GlctMarkToIgnoreAndSpoofAll extends GlctMarkToIgnoreAndSpoof by adding OscAge and OscUnc (ppb). | |
int | GlctSetReferenceTime (void *pGpsCtrl, GL_REF_TIME *pRefTime) |
GlctSetReferenceTime should be called from the HAL when assistance data is received from the network. | |
int | GlctSetReferenceTimeAndUnc (void *pGpsCtrl, GL_REF_TIME *pRefTime, unsigned long ulUncertaintyMs) |
GlctSetReferenceTimeAndUnc should be called from the HAL when assistance time and uncertainty is received from the network. | |
int | GlctSetAsstPreciseTime (void *pGpsCtrl, GL_TIME *pPreciseTimeGps, GL_TIME_DIRECTION etTimeDirection) |
GlctSetAsstPreciseTime should be called from the HAL when assistance precise time is received from the network. | |
int | GlctSetReferenceLocation (void *pGpsCtrl, GL_ASS_POS_QUAL *pAsstPos) |
GlctSetReferenceLocation should be called from the HAL when assistance reference location is received from the network. | |
int | GlctSetReferenceLocationAndAge (void *pGpsCtrl, GL_ASS_POS_QUAL *pAsstPos, unsigned long ulAgeSec) |
GlctSetReferenceLocationAndAge should be called from the HAL when assistance reference location with known age is received from the network. | |
int | GlctSetSetEphemeris (void *pGpsCtrl, GlUncmprsdEph *pEph) |
GlctSetSetEphemeris should be called from the HAL when ephemeris data is received from the network. | |
int | GlctSetSetAlmanac (void *pGpsCtrl, GlAlmanac *pAlm) |
GlctSetSetAlmanac called when almanac data is received from the network. | |
int | GlctSetAsstIono (void *pGpsCtrl, GL_IONO_MODEL *pIono) |
should be called from the HAL when almanac data is received from the network | |
int | GlctSetAsstUtc (void *pGpsCtrl, GL_UTC_MODEL *pUtc) |
GlctSetAsstUtc should be called from the HAL when almanac data is received from the network. | |
int | GlctSetAcquisitionAssistance (void *pGpsCtrl, GL_ACQ_AID *pAcqAid) |
GlctSetAcquisitionAssistance should be called from the HAL when acquisition assistance data is received from the network. | |
int | GlctSetReferenceFreq (void *pGpsCtrl, GL_FREQ *pFreqStat) |
GlctSetReferenceFreq should be called from the HAL when refrence frequency information received form handset. | |
int | GlctWriteNvMem (void *pGpsCtrl) |
GlctWriteNvMem forces a write to NVMEM; useful on platforms that do not support graceful shutdowns. | |
int | GlctForceReadLTOFile (void *pGpsCtrl) |
GlctForceReadLTOFile Force the GLL to re-read an LTO file in the middle of a run. | |
void | GlctSetPPSPlatformTime (void *pGpsCtrl, UTC_TIME *pPlatformTime) |
GlctSetPPSPlatformTime sets the platform time associated to a PPS signal. | |
void | GlctOscAgeAdd (void *pGpsCtrl, unsigned long ulSec) |
GlctOscAgeAdd Add some time to the oscillator age as it is read from NV storage. | |
void | GlctOscOffsetAdd (void *pGpsCtrl, long lPpb) |
GlctOscOffsetAdd Add or subtract some PPB from the oscillator uncertainty as it is read from NV storage. | |
Helper methods to use inside of custom handlers callbacks to get access to HAL | |
GpsHal * | GetHalFromGlctReq (GlctRequest *pGlCtReq) |
Use this function from within the request callback. | |
void | GlctSetCntinCb (void *pGpsCtrl, GpsCbOnCntin cbOnCntin) |
API to access log-enabled state | |
void | GlctSetLogEnabled (void *pGpsCtrl, int cLogEnabled) |
Use this function to enable or disable log-enabled state. |
API to extend the GLCT with your own request handlers.
For more information see How To add a Custom Request Manager
Copyright 2001-2010 Broadcom Corporation -- http://www.broadcom.com This program is the proprietary software of Broadcom Corporation and/or its licensors, and may only be used, duplicated, modified or distributed pursuant to the terms and conditions of a separate, written license agreement executed between you and Broadcom (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants no license (express or implied), right to use, or waiver of any kind with respect to the Software, and Broadcom expressly reserves all rights in and to the Software and all intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
int GlctAbort | ( | void * | pGpsCtrl, |
unsigned long | ulNvStorageToClear | ||
) |
Make GLCT stop all ongoing requests and exit GpsRun().
Expect exit code GL_STOP_ABORT. Communication to the ASIC is assumed to be not possible. Selected data is not written to NVMEM.
void GlctMarkToIgnoreAndSpoof | ( | void * | pGpsCtrl, |
unsigned long | ulNvStorageToIgnore, | ||
long | lRtcErrMs, | ||
signed char | cPosError, | ||
unsigned long | ulPosAgeSec | ||
) |
GlctMarkToIgnoreAndSpoof Marks element of nonvolatile storage to ignore next time the NVRAM is loaded and causes the time stored in RTC and position to be spoofed.
Mark element of nonvolatile storage to ignore next time the NVRAM is loaded Spoof the time stored in RTC. Spoof the position Inject a TCXO offset and set the TCXO uncertainty
int GlctReqStart | ( | void * | pGpsCtrl, |
GlctRequest * | pRequest | ||
) |
GlctReqStart must be called to perform a request pointed to by pRequest If the timeout is 0, then do not trust contents of pRequest after this call, as the GLL might stop it and reuse the request structure internally.