gllbs_distr/gllbs_hal_wlan.h File Reference

Broadcom LBS API to WLAN(WiFi) level. More...

#include "gllbs_os_types.h"
#include "gllbs_types.h"
Include dependency graph for gllbs_hal_wlan.h:

Classes

struct  GlLbsWlanApInformation
 WLAN AP Info The WLAN AP Info parameter defines the parameters of a WLAN access point [IEEE 802.11v]. More...
struct  GlLbsWlanScan
 WLAN AP Info The WLAN AP Info parameter defines the parameters of a WLAN access point [IEEE 802.11v]. More...
struct  GlLbsWlanNotifyData
 notifications data type More...
struct  GlLbsWlanCallbacks
 Structure for WLAN HAL callbacks. More...

Typedefs

typedef struct
GlLbsWlanApInformation 
GlLbsWlanApInformation
 WLAN AP Info The WLAN AP Info parameter defines the parameters of a WLAN access point [IEEE 802.11v].
typedef struct GlLbsWlanScan GlLbsWlanScan
 WLAN AP Info The WLAN AP Info parameter defines the parameters of a WLAN access point [IEEE 802.11v].
typedef enum GLLBS_WLAN_REQ_CODE GLLBS_WLAN_REQ_CODE
 request codes
typedef enum GLLBS_WLAN_DATA_CODE GLLBS_WLAN_DATA_CODE
 notifications messages codes
typedef struct GlLbsWlanNotifyData GlLbsWlanNotifyData
 notifications data type
typedef void(* GlLbsWlanReqDataCb )(GLLBS_WLAN_REQ_CODE dataCode)
 Request data from WLAN.
typedef struct GlLbsWlanCallbacks GlLbsWlanCallbacks
 Structure for WLAN HAL callbacks.

Enumerations

enum  GLLBS_WLAN_REQ_CODE {
  GLLBS_WLAN_FAST, GLLBS_WLAN_SCOUT, GLLBS_WLAN_SINGLESHOT, GLLBS_WLAN_PERIODIC,
  GLLBS_WLAN_PERIODIC_STOP, GLLBS_WLAN_BIN
}
 request codes More...
enum  GLLBS_WLAN_DATA_CODE { GLLBS_WLAN_DATA_MEAS, GLLBS_WLAN_DATA_BIN }
 notifications messages codes More...

Functions

GLLBS_ERRORS GlLbsWlanInit (const GlLbsWlanCallbacks *cb)
 Initialize LBS interface to WLAN HAL.
void GlLbsWlanNotify (const GlLbsWlanNotifyData *data)
 HAL direct calls to LBS.

Detailed Description

Broadcom LBS API to WLAN(WiFi) level.

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.

Usage notes:

1. During main initialization "GlLbsWlanInit" function must be called to specify function which can be used by LBS core library

example:

GlLbsWlanCallbacks cb; cb.cbLbsWlanDataReq = MyWlanDataReq; GlLbsWlanInit(&cb);

2. Single request example:

LBS Core will call "MyWlanDataReq" HAL function specified by cbLbsWlanDataReq variable

example implementation of "MyWlanDataReq" void MyWlanDataReq(GLLBS_WLAN_DATA_CODE dataCode) { switch(dataCode) { case GLLBS_WLAN_FAST: request to get immediately available WLAN source information in a single-shot returned information will be used to compute reference location for GPS from local WLAN database fast synchronous response is desired, but not required

Add implementation break; case GLLBS_WLAN_SCOUT: request to get extended WLAN source information in a single-shot returned information will be used for WLAN scouting purpose and will be called every time GPS location is available. In GPS navigation mode it will called be every second

Add implementation break; case GLLBS_WLAN_SINGLESHOT: request to get WLAN positioning information in a single-shot returned information will be used for WLAN based position computation

Add implementation break; case GLLBS_WLAN_PERIODIC: request to get WLAN positioning information periodically returned information will be used for WLAN based position computation

Add implementation break; case GLLBS_WLAN_PERIODIC_STOP: // Stop periodic request from GLLBS_WLAN_PERIODIC Add implementation break; } }

Then Wlan can synchronously (from MyWlanDataReq) or asynchronously call "GlLbsWlanNotify" function and provide requested data for each Wlan source that is available. When last source is reported, synchronous call should not take more that 100 ms to make sure that GPS processing not disturbed.

Example: GlLbsWlanNotifyData data; data.eType = dataCode; // dataCode from MyWlanDataReq() data.eCode = errorCode; // In case of success, errorCode should be LBS_OK for all sources, but the last one, for which it should be LBS_DATA_END to indicate the end of the response. data.wlanInfo = ...; // Fill in GlLbsWlanApInformation wlanInfo according to the rules below. GlLbsWlanNotify(&data);

NOTE !!! NOTE !!! NOTE !!! NOTE !!! NOTE !!! All LBS functions must be called from the same GPS thread !!

data.wlanInfo structure should return following information for different kinds of GLLBS_WLAN_DATA_CODE requests:

| GLLBS_WLAN_FAST | GLLBS_WLAN_SCOUT | GLLBS_WLAN_SINGLESHOT | | | | GLLBS_WLAN_PERIODIC | ____________________|___________________|__________________|_______________________| MACAddress | M | M | M | Noise | - | O | O | Rssi | - | O | O | ____________________________________________________________________________________


Typedef Documentation

typedef void(* GlLbsWlanReqDataCb)(GLLBS_WLAN_REQ_CODE dataCode)

Request data from WLAN.

Parameters:
dataCode- type of the requested data.

Enumeration Type Documentation

notifications messages codes

Enumerator:
GLLBS_WLAN_DATA_MEAS 

Request to get immediately available WLAN source information in a single-shot.

GLLBS_WLAN_DATA_BIN 

Request to get extended WLAN source information in a single-shot.

request codes

Enumerator:
GLLBS_WLAN_FAST 

Request to get immediately available WLAN source information in a single-shot.

GLLBS_WLAN_SCOUT 

Request to get extended WLAN source information in a single-shot.

GLLBS_WLAN_SINGLESHOT 

Request to get WLAN positioning information in a single-shot.

GLLBS_WLAN_PERIODIC 

Request to get WLAN positioning information periodically.

GLLBS_WLAN_PERIODIC_STOP 

Stop periodic request from GLLBS_WLAN_PERIODIC.

GLLBS_WLAN_BIN 

Request binary Information Elements.


Function Documentation

Initialize LBS interface to WLAN HAL.

Parameters:
cb- pointer to the structure for WLAN HAL callbacks.
Returns:
- LBS_OK if success, error - otherwise
void GlLbsWlanNotify ( const GlLbsWlanNotifyData data)

HAL direct calls to LBS.

Notification with the data from WLAN. Called as the result of processing cbLbsWlanDataReq.

Parameters:
data- pointer to the data buffer.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines