gllbs_distr/gllbs_hal_gps.h File Reference

Broadcom LBS API to GPS. More...

#include "gllbs_types.h"
Include dependency graph for gllbs_hal_gps.h:

Classes

struct  GlLbsGpsCallbacks
 Structure for GPS HAL callbacks. More...

Typedefs

typedef void *(* GlLbsGpsReqLocationSingleCb )(OSINT32 lMaxDurationSec, OSINT32 lAccuracyMeters, OSUINT16 usMaxLocAgeSec, void *pData)
 Request to get a single location from GPS.
typedef void *(* GlLbsGpsReqLocationPeriodicCb )(OSUINT32 ulPeriodMs, OSINT32 lAccuracyMeters, void *pData)
 Request to get periodic location updates from GPS.
typedef void(* GlLbsGpsReqLocationStopCb )(void *pData)
 Request to stop location request in GPS.
typedef void(* GlLbsGpsSetAssistanceDataCb )(const GlLbsGpsAssistanceData *data)
 Apply Assistance data to GPS.
typedef struct GlLbsGpsCallbacks GlLbsGpsCallbacks
 Structure for GPS HAL callbacks.

Functions

GLLBS_ERRORS GlLbsGpsInit (const GlLbsGpsCallbacks *cb)
 Initialize LBS interface to GPS HAL.
void GlLbsGpsNotifyPosition (const GlLbsPosInfo *posInfo)
 Notification with a single location from GPS.
void GlLbsGpsNotifyNmea (const char *pcLine, short sSize)
 Notification with NMEA string from GPS.
void GlLbsGpsNotifyStart (void)
 Notification from GPS layer that GPS functionality has started.
void GlLbsGpsNotifyStop (void)
 Notification from GPS layer that GPS functionality has stopped.
void GlLbsGpsRequestAssistantData (OSBOOL immediate, OSUINT16 mask)
 Request Assistance data from LBS.

Detailed Description

Broadcom LBS API to GPS.

Copyright (c) 2009 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 "GlLbsGpsInit" function must be called to specify function which can be used by LBS core library

example:

GlLbsGpsCallbacks cb; cb.cbLbsGpsSetAssistantData = MyGpsSetAssistantData; GlLbsGpsInit(&cb);

2. Assistance data will be requested by "GlLbsGpsRequestAssistantData" function

3. example of "MyGpsSetAssistantData" implementation

void MyGpsSetAssistanceData(const GlLbsGpsAssistanceData* data) { switch(data->data_type) { case GLLBS_GPS_AD_REFTIME: apply reference time to GPS break; case GLLBS_GPS_AD_REFLOCATION: apply reference location to GPS break; } }


Typedef Documentation

typedef void*(* GlLbsGpsReqLocationPeriodicCb)(OSUINT32 ulPeriodMs, OSINT32 lAccuracyMeters, void *pData)

Request to get periodic location updates from GPS.

Parameters:
ulPeriodMs- location update time in ms.
lAccuracyMeters- location accuracy in meters.
pData- pointer to the application data, which will be passed to the callback cbAppSetLocation.
Returns:
- GPS request handle if success, NULL - otherwise
typedef void*(* GlLbsGpsReqLocationSingleCb)(OSINT32 lMaxDurationSec, OSINT32 lAccuracyMeters, OSUINT16 usMaxLocAgeSec, void *pData)

Request to get a single location from GPS.

Parameters:
lMaxDurationSec- location receive time in ms.
lAccuracyMeters- location accuracy in meters.
usMaxLocAgeSec- location maximum aging time in seconds.
pData- pointer to the application data, which will be passed to the callback cbAppSetLocation.
Returns:
- GPS request handle if success, NULL - otherwise
typedef void(* GlLbsGpsReqLocationStopCb)(void *pData)

Request to stop location request in GPS.

Parameters:
pData- pointer to the application data.
Returns:
- TRUE if success, error - otherwise

Apply Assistance data to GPS.

Parameters:
data- ptr to data buffer.

Function Documentation

Initialize LBS interface to GPS HAL.

Parameters:
cb- pointer to the structure for GPS HAL callbacks.
Returns:
- LBS_OK if success, error - otherwise
void GlLbsGpsNotifyNmea ( const char *  pcLine,
short  sSize 
)

Notification with NMEA string from GPS.

Parameters:
pcLine- NMEA string
sSize- number of characters in the NMEA string
void GlLbsGpsNotifyPosition ( const GlLbsPosInfo posInfo)

Notification with a single location from GPS.

Called as the result of processing cbGPSLocationReq or cbGPSLocationPeriodicReq.

Parameters:
posInfo- GPS Position information.
void GlLbsGpsRequestAssistantData ( OSBOOL  immediate,
OSUINT16  mask 
)

Request Assistance data from LBS.

Parameters:
immediate- TRUE - only locally available information should be provided FALSE - LBS can request AD from the server
mask- type of the assistant data (see GLLBS_GPS_AD_CODE)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines