gllbs_distr/gllbs_manager_api.h File Reference

Broadcom LBS Manager API. More...

#include "gllbs_types.h"
#include "gllbs_hal_os.h"
Include dependency graph for gllbs_manager_api.h:

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.

Detailed Description

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 Documentation

#define GLLBS_API_VER   5

Version number of API.


Typedef Documentation

typedef void(* GlLbsAppNotifyPositionCb)(const GlLbsPosInfo *posInfo, void *pData)

Notify about the requested position.

Callback for requests: GlLbsAppRequestLocationSingle and GlLbsAppRequestLocationPeriodic

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
result- LBS_OK in case of successful synchronization, or an error otherwise.

Function Documentation

GLLBS_ERRORS GlLbsAppRequestLocationPeriodic ( OSUINT32  ulPeriodMs,
OSINT32  lAccuracyMeters,
const GlLbsAppCallbacks pcbCallBacks,
void *  pData 
)

Request a periodic Location data from LBS.

Parameters:
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.
Returns:
- LBS_OK if success, error - otherwise
GLLBS_ERRORS GlLbsAppRequestLocationSingle ( OSINT32  lMaxDurationSec,
OSINT32  lAccuracyMeters,
OSUINT16  usMaxLocAgeSec,
const GlLbsAppCallbacks pcbCallBacks,
void *  pData 
)

Request a single Location data from LBS.

Parameters:
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.
Returns:
- LBS_OK if success, error - otherwise
GLLBS_ERRORS GlLbsAppStop ( void *  pData)

Stop previously started location request.

Parameters:
pData- pointer to the application data, which location request was created with
Returns:
- LBS_OK if success, error - otherwise

Stop all previously started location requests.

Returns:
- LBS_OK if success, error - otherwise
GLLBS_ERRORS GlLbsConfigure ( const char *  config)

Configure LBS Library.

Parameters:
config- pointer to the null terminated string containing LBS configuration parameters as NAME=VALUE in every line.
Returns:
- LBS_OK if success, error - otherwise

Force LBS Library to reload all data from the files Note: Data in memory will be overwritten.

Returns:
- LBS_OK if success, error - otherwise

Force LBS Library to save all learned data into the files.

Returns:
- LBS_OK if success, error - otherwise
GLLBS_ERRORS GlLbsInit ( const GlLbsOsCallbacks cb,
const char *  config,
void *  engine 
)

API functions.

Initialize LBS API

Parameters:
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
Returns:
- LBS_OK if success, error - otherwise

Set device ID which is required for communication with LBS server.

Parameters:
id- pointer to the structure for device identifier(s).
Returns:
- LBS_OK if success, error - otherwise
GLLBS_ERRORS GlLbsSync ( OSBOOL  syncLTO,
OSBOOL  syncCells,
GlLbsSyncDoneCb  cb 
)

Request for LBS server synchronization.

Parameters:
syncLTO- Specify if LTO download desired.
syncCells- Specify if area Cells download desired.
cb- callback will be called when sync is done.
Returns:
- LBS_OK if success, error - otherwise
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines