Broadcom LBS Manager API. More...
Classes | |
struct | GlLbsAppCallbacks |
Structure for Application layer callbacks. More... | |
Defines | |
LBS API Version | |
#define | GLLBS_API_VER 5 |
Version number of API. | |
Typedefs | |
typedef void(* | GlLbsSyncDoneCb )(GLLBS_ERRORS result) |
Notify about the end of the database synchronization with LBS server. | |
typedef void(* | GlLbsAppNotifyPositionCb )(const GlLbsPosInfo *posInfo, void *pData) |
Notify about the requested position. | |
typedef void(* | GlLbsAppOnNmeaCb )(void *pData, const char *pcLine, OSUINT16 sSize) |
Notify when new NMEA sentence is available. | |
typedef void(* | GlLbsAppOnStartCb )(void *pData, GLLBS_ERRORS result) |
Notify when request processing is started by LBS core. | |
typedef void(* | GlLbsAppOnStopCb )(void *pData) |
Notify when request processing is completed or aborted by LBS core. | |
typedef struct GlLbsAppCallbacks | GlLbsAppCallbacks |
Structure for Application layer callbacks. | |
Functions | |
GLLBS_ERRORS | GlLbsInit (const GlLbsOsCallbacks *cb, const char *config, void *engine) |
API functions. | |
GLLBS_ERRORS | GlLbsConfigure (const char *config) |
Configure LBS Library. | |
GLLBS_ERRORS | GlLbsForceSave () |
Force LBS Library to save all learned data into the files. | |
GLLBS_ERRORS | GlLbsForceReload () |
Force LBS Library to reload all data from the files Note: Data in memory will be overwritten. | |
GLLBS_ERRORS | GlLbsSetDeviceId (const GlLbsDeviceId *id) |
Set device ID which is required for communication with LBS server. | |
GLLBS_ERRORS | GlLbsSync (OSBOOL syncLTO, OSBOOL syncCells, GlLbsSyncDoneCb cb) |
Request for LBS server synchronization. | |
GLLBS_ERRORS | GlLbsAppRequestLocationSingle (OSINT32 lMaxDurationSec, OSINT32 lAccuracyMeters, OSUINT16 usMaxLocAgeSec, const GlLbsAppCallbacks *pcbCallBacks, void *pData) |
Request a single Location data from LBS. | |
GLLBS_ERRORS | GlLbsAppRequestLocationPeriodic (OSUINT32 ulPeriodMs, OSINT32 lAccuracyMeters, const GlLbsAppCallbacks *pcbCallBacks, void *pData) |
Request a periodic Location data from LBS. | |
void | GlLbsTick () |
GlLbsTick function should be called every 1 second to generate 1PPS signal. | |
GLLBS_ERRORS | GlLbsAppStop (void *pData) |
Stop previously started location request. | |
GLLBS_ERRORS | GlLbsAppStopAll () |
Stop all previously started location requests. | |
void | GlLbsDone (void) |
De-Initialize LBS API. |
Broadcom LBS Manager API.
Copyright (c) 2009,2010 by Broadcom Corp. All Rights Reserved.
The information contained herein is confidential property of Broadcom. The use, copying, transfer or disclosure of such information is prohibited except by express written agreement with Broadcom.
Using notes:
1. During main initialization "GlLbsInit" function must be called to specify function which can be used by LBS core library
example:
GlLbsOsCallbacks cb;
specify all callback functions ...
GlLbsInit(&cb, 0, 0);
2. Requests can be called to LBS core library at any time after GlLbsInit initialization. Following requests are supported:
GlLbsSync() - to synchronize the database with LBS server: LTO, Cell ID database, WiFi database, etc. GlLbsAppRequestLocationSingle() - request a single location from LBS GlLbsAppRequestLocationPeriodic() - request a periodic location update from LBS (see detailed description of each request below)
#define GLLBS_API_VER 5 |
Version number of API.
typedef void(* GlLbsAppNotifyPositionCb)(const GlLbsPosInfo *posInfo, void *pData) |
Notify about the requested position.
Callback for requests: GlLbsAppRequestLocationSingle and GlLbsAppRequestLocationPeriodic
posInfo | - requested position. |
pData | - pointer to the application data, which was passed in application request GlLbsAppRequestLocationSingle or GlLbsAppRequestLocationPeriodic. |
typedef void(* GlLbsAppOnNmeaCb)(void *pData, const char *pcLine, OSUINT16 sSize) |
Notify when new NMEA sentence is available.
Callback for requests: GlLbsAppRequestLocationSingle and GlLbsAppRequestLocationPeriodic
pData | - pointer to the application data, which was passed in application request GlLbsAppRequestLocationSingle or GlLbsAppRequestLocationPeriodic. |
pcLine | - NMEA string |
sSize | - number of characters in the NMEA string |
typedef void(* GlLbsAppOnStartCb)(void *pData, GLLBS_ERRORS result) |
Notify when request processing is started by LBS core.
Callback for requests: GlLbsAppRequestLocationSingle and GlLbsAppRequestLocationPeriodic
pData | - pointer to the application data, which was passed in application request GlLbsAppRequestLocationSingle or GlLbsAppRequestLocationPeriodic. |
result | - result of the start: LBS_OK, when started. An error, otherwise |
typedef void(* GlLbsAppOnStopCb)(void *pData) |
Notify when request processing is completed or aborted by LBS core.
Callback for requests: GlLbsAppRequestLocationSingle and GlLbsAppRequestLocationPeriodic
pData | - pointer to the application data, which was passed in application request GlLbsAppRequestLocationSingle or GlLbsAppRequestLocationPeriodic. |
typedef void(* GlLbsSyncDoneCb)(GLLBS_ERRORS result) |
Notify about the end of the database synchronization with LBS server.
Callback for request: GlLbsSync
result | - LBS_OK in case of successful synchronization, or an error otherwise. |
GLLBS_ERRORS GlLbsAppRequestLocationPeriodic | ( | OSUINT32 | ulPeriodMs, |
OSINT32 | lAccuracyMeters, | ||
const GlLbsAppCallbacks * | pcbCallBacks, | ||
void * | pData | ||
) |
Request a periodic Location data from LBS.
ulPeriodMs | - location update time in ms. |
lAccuracyMeters | - location accuracy in meters. |
pcbCallBacks | - callbacks to be called when the data becomes available. |
pData | - pointer to the application data, which will be passed to the callback cbAppSetLocation. |
GLLBS_ERRORS GlLbsAppRequestLocationSingle | ( | OSINT32 | lMaxDurationSec, |
OSINT32 | lAccuracyMeters, | ||
OSUINT16 | usMaxLocAgeSec, | ||
const GlLbsAppCallbacks * | pcbCallBacks, | ||
void * | pData | ||
) |
Request a single Location data from LBS.
lMaxDurationSec | - location receive time in ms. |
lAccuracyMeters | - location accuracy in meters. |
usMaxLocAgeSec | - location maximum aging time in seconds. |
pcbCallBacks | - callbacks to be called when the data becomes available. |
pData | - pointer to the application data, which will be passed to the callback cbAppSetLocation. |
GLLBS_ERRORS GlLbsAppStop | ( | void * | pData | ) |
Stop previously started location request.
pData | - pointer to the application data, which location request was created with |
Stop all previously started location requests.
GLLBS_ERRORS GlLbsConfigure | ( | const char * | config | ) |
Configure LBS Library.
config | - pointer to the null terminated string containing LBS configuration parameters as NAME=VALUE in every line. |
Force LBS Library to reload all data from the files Note: Data in memory will be overwritten.
Force LBS Library to save all learned data into the files.
GLLBS_ERRORS GlLbsInit | ( | const GlLbsOsCallbacks * | cb, |
const char * | config, | ||
void * | engine | ||
) |
API functions.
Initialize LBS API
cb | - pointer to the structure for OS HAL callbacks. |
config | - pointer to the null terminated string containing initial LBS configuration parameters as NAME=VALUE in every line. |
engine | - Pointer to GlEngine or 0 if not present |
GLLBS_ERRORS GlLbsSetDeviceId | ( | const GlLbsDeviceId * | id | ) |
Set device ID which is required for communication with LBS server.
id | - pointer to the structure for device identifier(s). |
GLLBS_ERRORS GlLbsSync | ( | OSBOOL | syncLTO, |
OSBOOL | syncCells, | ||
GlLbsSyncDoneCb | cb | ||
) |
Request for LBS server synchronization.
syncLTO | - Specify if LTO download desired. |
syncCells | - Specify if area Cells download desired. |
cb | - callback will be called when sync is done. |