glct/glct_evt_proc.cpp File Reference

GLCT Libary main entry point. More...

#include "glct_crt_lib.h"
#include "glgpsapi.h"
#include "glgps_hal.h"
#include "glct_evt_proc.h"
#include "glct_req_list.h"
#include "glct_data.h"
#include "glct_evt_cbks.h"
#include "glct_api.h"
#include "gltoolsapi.h"
#include <new>
Include dependency graph for glct_evt_proc.cpp:

Functions

void GlctSetLogEnabled (void *pGpsCtrl, int cLogEnabled)
 Use this function to enable or disable log-enabled state.
GlctComps & GetGlctComps ()
void * GlctOnLoad (const plain_char *pcConfigString, const plain_char *szBrmJobName, short sExtraParmNum, const plain_char *apcExtraParms[])
 This function used internally in GpsRun to create a GpsEngine instance.
GL_STOP_CODE GlctOnExit (void *pEngPtr)
 Function used internally in GpsRun to clean up and exit.
void GlctOnAssert ()
 Function used to cleanup GLCT on assert.
signed long GlctGetSleepTimeout (void *pGpsCtrl)
 Returns time in ms GLCT can be idle.
int GlctProcessEvent (void *pGpsCtrl, GPSCTRL_EVENT *potEvent)
 Function used internally in GpsRun to process events.
int GlctPutPendingEvent (GPSCTRL_EVENT *potEvent)
 Put the event into event queue, potEvent will be processed by next call of GlctProcessEvent() The caller of GlctPutPendingEvent() must guarantee that memory referenced by potEvent->pData is available when GlctProcessEvent() is called.
void GlctExit (void *pEngPtr)
 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 GlctExitAfterStop (void *pGpsCtrl, int flag)
 Have GLCT exit when GLL is not running.

Detailed Description

GLCT Libary main entry point.

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.


Function Documentation

GlctComps& GetGlctComps ( )

The GLCT component object is needed the whole life of GPS task. It contains:

  • pointer to the HAL parameter
  • GLL configuration
  • Name of QA job to perfrorm
  • Startup request to excute in case if no QA job was specified
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.

signed long GlctGetSleepTimeout ( void *  pGpsCtrl)

Returns time in ms GLCT can be idle.

When this timeout expires the application must invoke GLCT GlctProcessEvent API to wake it up.

Parameters:
pGpsCtrl- pointer to the GPS engine
GL_STOP_CODE GlctOnExit ( void *  pGpsCtrl)

Function used internally in GpsRun to clean up and exit.

Parameters:
pGpsCtrl- pointer to the GPS engine
void* GlctOnLoad ( const plain_char *  pcConfigString,
const plain_char *  pcQAjobToExecute,
short  sExtraParmNum,
const plain_char *  apcExtraParms[] 
)

This function used internally in GpsRun to create a GpsEngine instance.

Parameters:
pcConfigString- XML configuration string either read from file or hard-coded. See the GL XML configuration file GL XML Config file description for description of XML file format.
pcConfigString- Name of the XML file.
pcQAjobToExecute- "normal", "cold" or some other job name defined in the XML config string.
sExtraParmNum- number of extra parameters in apcExtraParms
apcExtraParms- parm=value strings to be passed directly to GpsHalSetCfgValue().
Note:
Call this function to create GpsEngine, most likely in OnLoad event

Sets callback called on time available

Sets callback called on time available

int GlctProcessEvent ( void *  pGpsCtrl,
GPSCTRL_EVENT potEvent 
)

Function used internally in GpsRun to process events.

Parameters:
pGpsCtrl- pointer to the value returned from GlctOnLoad. (It is the GPS engine).
potEvent- pointer to an incoming event.
Return values:
1- Processing done, shutdown application
0- Wait for another event

At this point we got some events from HAL This event either goes directly to the GlEngine or it's teh input data for some request manager

The events for GlEngine consumption

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines