GlEngine Class Reference

This is the main GLL class. More...

#include <glgpsapi.h>

List of all members.

Public Member Functions

virtual ~GlEngine (void)
 Define virtual destructor.
Methods to register optional callbacks
virtual void SetCbOnReady (GlEngineOnReady cbOnReady)=0
 Sets callback called once engine is fully loaded.
virtual void SetCbOnResource (GlEngineOnResourceRequest cbOnResourceRequest, GlEngineOnResourceRelease cbOnResourceRelease)=0
 Sets callback for resources. If not set, the user should use GlEngineOnStart/GlEngineOnStop to enable/disable all resource. It will not benefit of optimized resource management.
virtual void SetCbOnAsicDacData (GlEngineOnAsicDacData cbOnAsicDacData)=0
 Sets callback called on ASIC DAC data.
virtual void SetCbOnPrecTimerRq (GlEngineOnPrecTimerRq cbOnPreciseTimerRq)=0
 Sets callback called on precise timer request.
virtual void SetCbOnSysLogLine (GlEngineOnSysLogLine cbOnSysLogLine)=0
 Sets callback called on syslog line.
virtual void SetCbOnTimerSet (GlEngineOnTimerSet cbOnTimerSet)=0
 Sets callback called on time available.
virtual void SetCbOnBurstMode (GlEngineOnBurstMode cbOnBurstMode)=0
 Sets callback called on BurstMode transition.
virtual void SetCbOnFreqUpdate (GlEngineOnFreqUpdate cbOnFreqUpdate)=0
 Sets optional callback which is needed for CNTIN frequency calibration.
virtual void SetCbOnAsstStatus (GlEngineOnAsstStatus cbOnAsstStatus)=0
 Sets optional callback that will tell the status of the assistance.
virtual void SetCbOnResponse (GlEngineOnResponse cbOnResponse)=0
 Sets optional callback that will receive fix status responses.
virtual void SetCbOnSelfTestReadLine (GlEngCbOnSelfTestReadLine cbOnSelfTestReadLine)=0
 Sets optional callback that will read data from a test file.
virtual void SetCbOnSelfTestWriteLine (GlEngCbOnSelfTestWriteLine cbOnSelfTestWriteLine)=0
 Sets optional callback that will write data to a test file.
virtual void SetCbOnPPSPlatformTime (GlEngCbOnPPSPlatformTime cbOnPlatformTime)=0
 Sets optional callback to request the Platform system time when a PPS has been asserted.
virtual void SetCbOnGeofenceStatus (GlEngineOnGeofenceStatus cbOnGeofenceStatus)=0
Methods to deliver events from the hardware abstraction layer
virtual void Tick (void)=0
 Must be called on timer.
virtual void ChipData (void *pcData, short sSize)=0
 Must be called when ASIC data is available.
virtual void ComDacData (void *pcData, short sSize)=0
 Must be called when UDP DAC data is available.
virtual void RefFreqStatus (GL_FREQ *pFreqStat)=0
 Called to provide CNT_IN signal status in response to GLL invoking the callback of type GlEngineOnFreqUpdate().
virtual void EnablePowerSave (bool bEnable)=0
 Called to enable/disable power saving mode.
Methods to start and stop positioning requests
virtual bool StartRequest (GlRequest *pReq)=0
 Must be called when application wants the library to perform a request pointed to by pReq.
virtual bool StopRequest (GlRequest *pReq)=0
 Cancel an ongoing request.
virtual bool PauseRequest (GlRequest *pReq)=0
virtual bool ResumeRequest (GlRequest *pRequest, unsigned int uiMonitorTransitions)=0
virtual bool StopAllRequests (bool bAbort=false)=0
 Cancel all ongoing requests.
Methods to deliver assistance data
virtual bool SetAsstTime (GL_REF_TIME *pRefTime, unsigned long ulUncertaintyMs=1000ul)=0
 Must be called when assistance data received from network.
virtual bool SetAsstTime (GL_REF_TIME_UTC *pUtcTime, signed long long sllUtcOffsetMs=0ll, unsigned long ulUncertaintyMs=1000ul)=0
virtual bool SetAsstPreciseTime (GL_TIME *pPreciseTimeGps, GL_TIME_DIRECTION etTimeDirection)=0
 Must be called when assistance precise time received from network.
virtual bool SetAsstPreciseTime (UTC_TIME *pPreciseTimeUtc, GL_TIME_DIRECTION etTimeDirection)=0
virtual bool SetAsstPos (GL_ASS_POS_QUAL *pAsstPos, unsigned long ulAgeSec=0ul)=0
 Must be called when assistance data received from network.
virtual bool SetAsstEph (GlUncmprsdEph *pEph)=0
 Must be called when ephemeris data received from network.
virtual bool SetAsstEph (GlUncmprsdGlnEph *pEph)=0
 Must be called when GLONASS ephemeris data received from network.
virtual bool SetAsstAlm (GlAlmanac *pAlm)=0
 Must be called when almanac data received from network.
virtual bool SetAsstAlm (GlGlnsAlmanac *pAlm)=0
 Must be called when GLONASS almanac data received from network.
virtual bool SetAsstIono (GL_IONO_MODEL *pIono)=0
 Must be called when assistance data received from network.
virtual bool SetAsstUtc (GL_UTC_MODEL *pUtc)=0
 Must be called when assistance data received from network.
virtual bool SetAsstUtc (GL_GLNS_SYS_TIME *pUtc)=0
 Must be called when assistance data received from network.
virtual bool SetAsstGnssTimeModel (GL_GNSS_TIME_MODEL *pTimeModel)=0
 Must be called when GNSS Time Model assistance data received from network.
virtual bool SetAsstGlnsAuxiliaryMsg (GL_GLNS_AUXILIARY_MSG *pAuxiliaryMsg)=0
 Must be called when Glonass auxiliary message is received from network.
virtual bool SetAsstAcq (GL_ACQ_AID *pAcqAid)=0
 Must be called when assistance data received from network.
virtual bool SetAsstAcq (GANSS_ACQ_AID *pAcqAid)=0
 Must be called when assistance data received from network.
virtual bool SetRealTimeIntegrity (GL_RTI *pRealTimeIntegrity)=0
 Must be called when Real Time Integrity received from network.
virtual bool SetRealTimeIntegrity (const unsigned char *pRealTimeIntMsg, unsigned int uiRealTimeIntMsgLen)=0
 Must be called when Real Time Integrity received from network.
virtual bool SetExtSensInfo (GlExtSensInfo *pExtSensInfo)=0
 External sensor information for DR.
virtual bool SetSensRawInfo (const GlSensRaw &rSensRaw)=0
 Raw sensor information for DR Must be called when new sensor information is available.
virtual bool SetSensConfig (GlSensorsConfig *pSensorsConfig)=0
 Set sensor config.
virtual bool SetDgpsData (const plain_char *pcBuff, short sBufSize)=0
 Pass DGPS data.
virtual bool SetGyroTemp (double t, double bt)=0
 Pass GYRO and battery temperature.
virtual bool SetFixStatus (GlFixStatus *pFixStatus)=0
 Must be called to set position computed by the server in UE-Assisted case This positon will be rerouted to all requests that not reported their position yet.
virtual bool SetGeofencePauseTime (unsigned long ulTminS, unsigned long ulTmaxS, unsigned short usUserSpeedMeterPerS)=0
 Set the geofence mode pause time.
Miscellaneous methods
virtual bool SetPpsSettings (bool bEnable, long lOffsetUs, unsigned long ulWidthNs, unsigned long ulMaxUnctyNs, unsigned long ulOscDrift)=0
 change the PPS settings.
virtual bool SetPpsPlatformTime (const UTC_TIME *const pPlatformTime)=0
 Platform time when the PPS was received, we use the same struct as the one to report UTC_TIME.
virtual bool SetFlightMode (bool bEnableFlightMode)=0
 enable/disable flight mode
virtual bool WriteNvMem (void)=0
 Write NVMEM, useful on platforms that do not support graceful shutdowns.
virtual bool ForceReadLTOFile (void)=0
 Force the GLL to re-read an LTO file in the middle of a run.
virtual void SetUserData (void *pUserData)=0
 Pointer to the user data; user can use this pointer when the callback is called.
virtual void * GetUserData ()=0
 Obtain user data.
virtual void * AllocateNmeaContext (const GL_FIX_STATUS *pFixStatus)=0
 Generate NMEA Called first to allocate a context Input: Fix Status Output: Pointer to NMEA context, or NULL if none is available.
virtual bool HasNextNmeaSentence (const void *pNmeaContext)=0
 Called to check if there are more NMEA sentences Input: Pointer to NMEA context, as returned by AllocateNmeaContext.
virtual unsigned long GetNextNmeaSentence (const void *pNmeaContext, plain_char *pcOutBuff, short sBufSize)=0
 Called to get the next sentence Input: Pointer to NMEA context, as returned by AllocateNmeaContext.
virtual void FreeNmeaContext (const void *pNmeaContext)=0
 Called to free the context Input: Pointer to NMEA context, as returned by AllocateNmeaContext.
virtual bool SetAidMask (const GlAidRequest *pAidRequest)=0
 Test support: suppress GLL's use of aiding data per aid source, per constellation, per SV.
virtual void Debug (GlEngineOnDebugRead cbOnDebugRead, bool bStrict, unsigned long ulLogFacMask, unsigned long ulLogPriMask)=0
 Debug.
Performance Monitoring Interface
virtual void InitCpuLoad (GlEngCpuLoad cbPollCpuLoad, unsigned short usDataCount, const plain_char *pcCpuTitle)=0
 Initialize access to the optional PGLOR,CPU interface: provide the GLL with an [optional] callback function to collect the CPU data.

Methods to create and destroy an instance of the GL engine class

virtual void Dispose (GlOnMemFree cbOnMemFree=GL_DFLT_MEM_FREE)=0
 Dispose of a GlEngine after use.
static GlEngineInstance (GlEngineOnStart cbOnStart, GlEngineOnStop cbOnStop, GlEngineOnTimerRq cbOnTimerRq, GlEngineOnAsicData cbOnAsicData, GlEngCbOnNvStgRead cbOnNvStgRead, GlEngCbOnNvStgWrite cbOnNvStgWrite, GlEngCbOnLTOFileRead cbOnLTOFileRead, GlOnMemAlloc cbOnMemAlloc=GL_DFLT_MEM_ALLOC, GlOnMemFree cbOnMemFree=GL_DFLT_MEM_FREE, GlEngCbOnEEFileRead cbOnEEFileRead=GL_DFLT_EE_FILEREAD)
 This method creates an instance of the position engine and registers mandatory callbacks.

Detailed Description

This is the main GLL class.


Member Function Documentation

virtual void* GlEngine::AllocateNmeaContext ( const GL_FIX_STATUS pFixStatus) [pure virtual]

Generate NMEA Called first to allocate a context Input: Fix Status Output: Pointer to NMEA context, or NULL if none is available.

virtual void GlEngine::ChipData ( void *  pcData,
short  sSize 
) [pure virtual]

Must be called when ASIC data is available.

Parameters:
pcDataData received from ASIC
sSizesize of received from ASIC. The size of data should not exceed MAX_GL_COMM_PACKET_IN, otherwise the ASSERT will be generated.
virtual void GlEngine::ComDacData ( void *  pcData,
short  sSize 
) [pure virtual]

Must be called when UDP DAC data is available.

Parameters:
pcDataData received from UDP DAC port
sSizesize of received from DAC port. The size of data should not exceed MAX_GL_COMM_PACKET_IN, otherwise the ASSERT will be generated.
virtual void GlEngine::FreeNmeaContext ( const void *  pNmeaContext) [pure virtual]

Called to free the context Input: Pointer to NMEA context, as returned by AllocateNmeaContext.

virtual unsigned long GlEngine::GetNextNmeaSentence ( const void *  pNmeaContext,
plain_char *  pcOutBuff,
short  sBufSize 
) [pure virtual]

Called to get the next sentence Input: Pointer to NMEA context, as returned by AllocateNmeaContext.

Pointer to buffer, which will be used to store the next NMEA sentence. Size of buffer. Output: GL_NMEA_XXX_MASK to identify the sentence which has been stored in the buffer provided.

virtual bool GlEngine::HasNextNmeaSentence ( const void *  pNmeaContext) [pure virtual]

Called to check if there are more NMEA sentences Input: Pointer to NMEA context, as returned by AllocateNmeaContext.

Output: True if and only if there are more NMEA sentences available.

virtual void GlEngine::InitCpuLoad ( GlEngCpuLoad  cbPollCpuLoad,
unsigned short  usDataCount,
const plain_char *  pcCpuTitle 
) [pure virtual]

Initialize access to the optional PGLOR,CPU interface: provide the GLL with an [optional] callback function to collect the CPU data.

Parameters:
cbPollCpuLoadCallback to be invoked when the GLL wants CPU data.
usDataCountData count to be retrieved by the GLL
pcCpuTitleString to identify the CPU data
virtual void GlEngine::RefFreqStatus ( GL_FREQ pFreqStat) [pure virtual]

Called to provide CNT_IN signal status in response to GLL invoking the callback of type GlEngineOnFreqUpdate().

The frequency status parameter provides information on the signal driving the CNT_IN interface. See Frequency Synchronization for details.

Parameters:
pFreqStat- parameter to frequency status variable of type GL_FREQ
virtual bool GlEngine::SetAidMask ( const GlAidRequest pAidRequest) [pure virtual]

Test support: suppress GLL's use of aiding data per aid source, per constellation, per SV.

Use the GlAidRequest.eph.otEphInfo fields to identify the ucGnss and ucGnssId. The aid sources are slightly different because GL_AID_SOURCE_CAL is expected in the GL_AID_SOURCE_ALM slot.

virtual bool GlEngine::SetAsstPos ( GL_ASS_POS_QUAL pAsstPos,
unsigned long  ulAgeSec = 0ul 
) [pure virtual]

Must be called when assistance data received from network.

Parameters:
pAsstPos- Refrence location
ulAgeSec- How long ago this location was valid. If this location is received from a reliable source such as a carrier's assistance server this parameter must be left at it's default value of zero. In this case GLL will trust this location uncoditionally. If the source of this data is more questionable, then set this parameter to some non-zero value. The GLL in this case will treat this location the same way as it treats an aged location stored in NVRAM.
virtual bool GlEngine::SetDgpsData ( const plain_char *  pcBuff,
short  sBufSize 
) [pure virtual]

Pass DGPS data.

Parameters:
pcBuff- DGPS data pointer
sBufSize- Data count to be retrieved by the GLL
virtual bool GlEngine::SetGyroTemp ( double  t,
double  bt 
) [pure virtual]

Pass GYRO and battery temperature.

Parameters:
t- gyroscope temperature
bt- battery temperature
virtual bool GlEngine::SetPpsSettings ( bool  bEnable,
long  lOffsetUs,
unsigned long  ulWidthNs,
unsigned long  ulMaxUnctyNs,
unsigned long  ulOscDrift 
) [pure virtual]

change the PPS settings.

Parameters:
bEnable,:boolean to enable the PPS output (disabled by default)
lOffsetUs,:Offset in microsecond between the GPS second edge and the PPS (a positive value will delay the PPS [-500000...+500000])
ulWidthNs,:pulse width in Ns (not implemented)
ulMaxUnctyNs,:maximum uncertainty in ns
ulOscDrift,:max oscillator drift in ppb to compute growing uncertainty in no-sat situation
virtual bool GlEngine::SetSensConfig ( GlSensorsConfig *  pSensorsConfig) [pure virtual]

Set sensor config.

Parameters:
pSensorsConfigthe sensor configuration settings
virtual bool GlEngine::SetSensRawInfo ( const GlSensRaw rSensRaw) [pure virtual]

Raw sensor information for DR Must be called when new sensor information is available.

Parameters:
rSensRawData received from the sensor driver
virtual bool GlEngine::StopAllRequests ( bool  bAbort = false) [pure virtual]

Cancel all ongoing requests.

Parameters:
bAbort- If "true" then no communication happens between host and ASIC. Set to true when you know that something terrible happened to HW and no further communication is possible

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines