glnet_distr/inc/glsupl.h File Reference

Interface to SUPL v1.0 Library. More...

#include "glrrlps.h"
#include "glsupllocationid.h"
#include "glsuplinit.h"
Include dependency graph for glsupl.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  GLSUPL_PosTechnology
 SET Capabilities. More...
struct  GLSUPL_PosProtocol
 Positioning protocol. More...
struct  GLSUPL_SETCapabilities
 SET Capabilities. More...
struct  GLSUPL_Position
 Position. More...
struct  GLSUPL_SetID
 SET ID. More...
struct  GLSUPL_Session
 Session buffer. More...
struct  GLSUPL_Connection
 Connection. More...

Defines

SUPL API Version (implements SUPL 1.0.0 specification)
#define GLSUPL_API_VER   2
 Version number of API.
glsupl_DecodeSuplInit10 error code
#define GL_SUPL_SUPLINIT   0
 no error
#define GL_SUPL_UNEXPECTED_MSG   -2
 unexpected message
#define GL_SUPL_SMALL_TEMP_BUFFER   -3
 small temp buffer
#define GL_SUPL_CONVERSION_ERROR   -4
 conversion error

Typedefs

typedef struct GLSUPL_PosTechnology GLSUPL_PosTechnology
 SET Capabilities.
typedef enum GLSUPL_PrefMethod GLSUPL_PrefMethod
 Preferred Method.
typedef struct GLSUPL_PosProtocol GLSUPL_PosProtocol
 Positioning protocol.
typedef struct
GLSUPL_SETCapabilities 
GLSUPL_SETCapabilities
 SET Capabilities.
typedef struct GLSUPL_Position GLSUPL_Position
 Position.
typedef enum GLSUPL_SetIDType GLSUPL_SetIDType
 SET ID Type.
typedef struct GLSUPL_SetID GLSUPL_SetID
 SET ID.
typedef enum GLSUPL_StatusCode GLSUPL_StatusCode
 Status Code.
typedef struct GLSUPL_Session GLSUPL_Session
 Session buffer.
typedef enum GLSUPL_ConnectionType GLSUPL_ConnectionType
 Connection Type SLP address should be considered by client.
typedef enum
GLSUPL_ConnectionPriority 
GLSUPL_ConnectionPriority
 Connection Priority.
typedef struct GLSUPL_Connection GLSUPL_Connection
 Connection.
typedef enum GLSUPL_LOG_SEVERITY GLSUPL_LOG_SEVERITY
 Log severity.

Enumerations

enum  GLSUPL_PrefMethod
 Preferred Method. More...
enum  GLSUPL_SetIDType
 SET ID Type. More...
enum  GLSUPL_StatusCode {
  GLSUPL_unspecified = 0, GLSUPL_systemFailure = 1, GLSUPL_unexpectedMessage = 2, GLSUPL_protocolError = 3,
  GLSUPL_dataMissing = 4, GLSUPL_unexpectedDataValue = 5, GLSUPL_posMethodFailure = 6, GLSUPL_posMethodMismatch = 7,
  GLSUPL_posProtocolMismatch = 8, GLSUPL_targetSETnotReachable = 9, GLSUPL_versionNotSupported = 10, GLSUPL_resourceShortage = 11,
  GLSUPL_invalidSessionId = 12, GLSUPL_nonProxyModeNotSupported = 13, GLSUPL_proxyModeNotSupported = 14, GLSUPL_positioningNotPermitted = 15,
  GLSUPL_authNetFailure = 16, GLSUPL_authSuplinitFailure = 17, GLSUPL_consentDeniedByUser = 100, GLSUPL_consentGrantedByUser = 101,
  GLSUPL_unspecified = 0, GLSUPL_systemFailure = 1, GLSUPL_unexpectedMessage = 2, GLSUPL_protocolError = 3,
  GLSUPL_dataMissing = 4, GLSUPL_unexpectedDataValue = 5, GLSUPL_posMethodFailure = 6, GLSUPL_posMethodMismatch = 7,
  GLSUPL_posProtocolMismatch = 8, GLSUPL_targetSETnotReachable = 9, GLSUPL_versionNotSupported = 10, GLSUPL_resourceShortage = 11,
  GLSUPL_invalidSessionId = 12, GLSUPL_nonProxyModeNotSupported = 13, GLSUPL_proxyModeNotSupported = 14, GLSUPL_positioningNotPermitted = 15,
  GLSUPL_authNetFailure = 16, GLSUPL_authSuplinitFailure = 17, GLSUPL_incompatibleProtectionLevel = 18, GLSUPL_serviceNotSupported = 19,
  GLSUPL_insufficientInterval = 20, GLSUPL_noSUPLCoverage = 21, GLSUPL_consentDeniedByUser = 100, GLSUPL_consentGrantedByUser = 101,
  GLSUPL_sessionStopped = 102, GLSUPL_appIdDenied = 103
}
 Status Code. More...
enum  GLSUPL_ConnectionType { ,
  GLSUPL_CONNECTION_URL, GLSUPL_CONNECTION_IPv4, GLSUPL_CONNECTION_IPv6 , GLSUPL_CONNECTION_URL,
  GLSUPL_CONNECTION_IPv4, GLSUPL_CONNECTION_IPv6
}
 Connection Type SLP address should be considered by client. More...
enum  GLSUPL_ConnectionPriority
 Connection Priority.
enum  GLSUPL_LOG_SEVERITY {
  LOG_SUPL_EMERG, LOG_SUPL_ALERT, LOG_SUPL_CRIT, LOG_SUPL_ERR,
  LOG_SUPL_WARNING, LOG_SUPL_NOTICE, LOG_SUPL_INFO, LOG_SUPL_DEBUG,
  LOG_SUPL_EMERG, LOG_SUPL_ALERT, LOG_SUPL_CRIT, LOG_SUPL_ERR,
  LOG_SUPL_WARNING, LOG_SUPL_NOTICE, LOG_SUPL_INFO, LOG_SUPL_DEBUG
}
 Log severity. More...

Functions

SUPL API functions

GLSUPL_Sessionglsupl_Create ()
 Create SUPL session.
void glsupl_Abort (GLSUPL_Session *session)
 Abort SUPL session.
void glsupl_AbortWithStatusCode (GLSUPL_Session *session, GLSUPL_StatusCode code)
 Abort SUPL session with status code.
GLBOOL glsupl_Request (GLSUPL_Session *session, GLSUPL_QoP *qop)
 Start SUPL request.
void glsupl_RequestAssistanceData (GLSUPL_Session *session, GLRRLP_RequestedAssistData *reqData)
 Response on glcb_supl_RequestAssistanceData() or can be called after receiving positioning request to request additional assistance data.
void glsupl_SetPosition (GLSUPL_Session *session, const GLSUPL_Position *pPos)
 Response on glcb_supl_ReqPosition()
void glsupl_ReportGpsMeasurements (GLSUPL_Session *session, const GLRRLP_GPS_MeasureInfo *pMes)
 Response to MSA request.
void glsupl_ReportLocationInfo (GLSUPL_Session *session, const GLRRLP_LocationInfo *pLoc)
 Response to MSB or autonomous request.
void glsupl_NetworkRequest (GLSUPL_Session *session, const unsigned char *pucBuf, int nBytes, const unsigned char *ver)
 Initiate Network Initiated request.
void glsupl_Data (GLSUPL_Session *session, const unsigned char *pucBuf, int nBytes)
 This function should be called to deliver SUPL messages to GLL.
void glsupl_SetCapabilities (GLSUPL_Session *session, const GLSUPL_SETCapabilities *pCap)
 Sets default capabilities for GLL SUPL protocol stack.
void glsupl_GetCapabilities (GLSUPL_Session *session, GLSUPL_SETCapabilities *pCap)
 Gets capabilities from GLL SUPL protocol stack.
void glsupl_SetTimers (GLSUPL_Session *session, unsigned long ut1, unsigned long ut2, unsigned long ut3)
 Allows to customize values for timers UT1, UT2, and UT3.
void glsupl_Connect (GLSUPL_Session *session, GLBOOL bSuccess)
 Inform GLL SUPL protocol stack that SUPL connection has been established (bSuccess = 1) or not (bSuccess = 0)
void glsupl_Disconnected (GLSUPL_Session *session)
 Inform GLL SUPL protocol stack that SUPL connection has been terminated.
GLBOOL glsupl_SetID (GLSUPL_Session *session, const GLSUPL_SetID *pSuplSetID)
 Sets the SUPL ID in the GLL SUPL protocol stack.
void glsupl_VerificationRsp (GLSUPL_Session *session, GLBOOL bAllow)
 Respond to glcb_supl_NotificationVerificationReq()
void glsupl_SetLocationId (GLSUPL_Session *session, const GLSUPL_LocationId *pLocationId)
 Sets the Location Information for the LBS SUPL protocol stack.
SUPL helper functions
int glsupl_DecodeSuplInit10 (const unsigned char *pBinaryBuffer, int nBinaryBytes, unsigned char *pTempBuffer, int nTempBytes, GLSUPL_SUPLINIT *pSUPLINIT)
 Decode SUPL INIT binary message to GLSUPL_SUPLINIT structure.
SUPL callbacks to apply Assistance Data
void glcb_supl_SetReferenceTime (GLSUPL_Session *session, const GLRRLP_ReferenceTime *refTime)
 Reference Time.
void glcb_supl_SetReferenceLocation (GLSUPL_Session *session, const GLRRLP_PositionEstimate *refLoc)
 Reference Location.
void glcb_supl_SetAcquisitionAssistance (GLSUPL_Session *session, const GLRRLP_AcquisAssist *acqAssist)
 Acquisition Assistance.
void glcb_supl_SetAlmanac (GLSUPL_Session *session, const GLRRLP_Almanac *alm)
 Almanac.
void glcb_supl_SetNavModel (GLSUPL_Session *session, const GLRRLP_SeqOfNavModelElement *nav)
 Navigation Model.
void glcb_supl_SetIonosphericModel (GLSUPL_Session *session, const GLRRLP_IonosphericModel *iono)
 Ionospheric Model.
void glcb_supl_SetUTCModel (GLSUPL_Session *session, const GLRRLP_UTCModel *utc)
 UTC Model.
void glcb_supl_SetDGPSCorrections (GLSUPL_Session *session, const GLRRLP_DGPSCorrections *dgpsc)
 DGPS Corrections.
void glcb_supl_SetRTIntegrity (GLSUPL_Session *session, const GLRRLP_BadSatellites *rti)
 Real Time Integrity.
Timer functions

Returning GLFALSE will result in calling glcb_supl_DestroyTimer()

void * glcb_supl_CreateTimer (GLSUPL_Session *session)
 Create Timer.
GLBOOL glcb_supl_DisarmTimer (GLSUPL_Session *session, void *pTimer)
 Disarm Timer.
GLBOOL glcb_supl_ArmTimer (GLSUPL_Session *session, void *pTimer, unsigned long ulMs)
 Arm Timer.
void glcb_supl_DestroyTimer (GLSUPL_Session *session, void *pTimer)
 Destroy Timer.
void glsupl_Timeout (GLSUPL_Session *session, void *pTimer)
 Timer Timeout.

SUPL callback functions

typedef void(* CB_SuplNotify )(GLSUPL_Session *session, GLSUPL_MessageType code, void *data)
 Called by the SUPL engine to notify APR about all send and recieve messages.
void glcb_supl_Log (GLSUPL_LOG_SEVERITY sev, const char *fmt,...)
 Log message.
void glcb_supl_ExceptionAssert (const char *file, unsigned line, const char *msg)
 Exception Assert.
void glcb_supl_ReportFromSuplEnd (GLSUPL_Session *session, const GLSUPL_Position *pos, const GLSUPL_StatusCode *code)
 Report position and status code information to the application when it is received from SLP (SUPL) server in SUPL_END message.
void glcb_supl_SendingSuplEnd (GLSUPL_Session *session, const GLSUPL_StatusCode *code)
 Report status code information to the application before it sent to SLP (SUPL) server in SUPL_END message.
void glcb_supl_Write (GLSUPL_Session *session, const unsigned char *data, unsigned nBytes)
 Called by the SUPL engine to write the encoded bytes to the network.
void glcb_supl_ReqLocationId (GLSUPL_Session *session)
 Called by the SUPL engine to request the Cell Information.
void glcb_supl_ReqPosition (GLSUPL_Session *session, GLSUPL_PosMethod posMethod, const GLSUPL_QoP *qop)
 Called by the SUPL engine to request the position of SET.
void glcb_supl_RequestAssistanceData (GLSUPL_Session *session, GLSUPL_PosMethod method)
 Called by the SUPL engine to request the Assistance Data.
void glcb_supl_ReqConnection (GLSUPL_Session *session)
 Called by the SUPL engine to request SUPL Connection.
void glcb_supl_NotificationVerificationReq (GLSUPL_Session *session, const GLSUPL_Notification *notif)
 Called by the SUPL engine after receiving SUPL-INIT message.
void glcb_supl_EndConnection (GLSUPL_Session *session)
 Called by the SUPL engine to inform that SUPL connection is no longer necessary.
void glcb_supl_EndSession (GLSUPL_Session *session)
 Called by the SUPL engine to inform that all data associated with session is no longer necessary.
void * glcb_supl_Allocate (unsigned long size)
 Called by the SUPL engine to allocate session.
void glcb_supl_Deallocate (void *session)
 Called by the SUPL engine to deallocate session.
void glcb_supl_StartSingleShot (GLSUPL_Session *session, const GLRRLP_PositionInstruct *positionInstruct)
 Called by the SUPL engine to execute positioning request for GLL engine.
GLBOOL glcb_supl_SUPLINIT (GLSUPL_Session *session, const GLSUPL_SUPLINIT *suplInit)
 Called by the SUPL engine to notify ARP.
void glsupl_SetNotifyCB (GLSUPL_Session *session, CB_SuplNotify cb)

Detailed Description

Interface to SUPL v1.0 Library.

Copyright 2001-2011 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.

Please refer to OMA SUPL 1.0 specification and 3GPP RRLP specification for more information

SUPL: OMA-ERP-SUPL-V1_0-20070615-A RRLP: 3GPP TS 44.031 V5.12.0


Define Documentation

#define GLSUPL_API_VER   2

Version number of API.


Typedef Documentation

typedef void(* CB_SuplNotify)(GLSUPL_Session *session, GLSUPL_MessageType code, void *data)

Called by the SUPL engine to notify APR about all send and recieve messages.

Parameters:
code- type of SUPL message.
data- optional data associated with message (NULL, if not present) for SUPLEND data contains statusCode, if the code is present

Connection Type SLP address should be considered by client.

This type can be used with SET originated connections when SLP address is unknown to build-in SUPL engine.

Position.

This parameter describes the position of the SET. The parameter also contains a timestamp and optionally the velocity. timestamp format as defined in ASN.1 specification as UTCTime: yymmddhhnnssZ where: yy - year mm - month [01..12] hh - hour [00..23] nn - minutes [00..59] ss - seconds [00..59] Z - character indicating UTC (or Zulu) time.

Reference: OMA SUPL TS (Section 7.7 Position).

ASN.1 specification:

Position ::= SEQUENCE {
    timestamp           UTCTime,            -- shall include seconds and shall use UTC time.
    positionEstimate    PositionEstimate,
    velocity            Velocity            OPTIONAL,
    ...
}

Positioning protocol.

Zero or more of the following positioning protocols (bitmap):

  • RRLP
  • RRC
  • TIA-801

Reference: OMA SUPL TS (Section 7.10 SET capabilities).

ASN.1 specification:

PosProtocol ::= SEQUENCE {
  tia801 BOOLEAN,
  rrlp  BOOLEAN,
  rrc   BOOLEAN,
  ...
}

SET Capabilities.

modules.

This section contains descriptions of the SUPL library portion of the LBS.
Structures defined according to OMA-TS-SUPL-V1_0-20050223-D
Reference: OMA SUPL TS (Section 7. Parameter Definitions).

SUPL API functions
SUPL structures Positioning Technology. Defines the positioning technology. Zero or more of the following positioning technologies (bitmap):

  • SET-assisted A-GPS
  • SET-based A-GPS
  • Autonomous GPS
  • AFLT
  • E-CID
  • E-OTD

Reference: OMA SUPL TS (Section 7.10 SET capabilities).

ASN.1 specification:

PosTechnology ::= SEQUENCE {
  agpsSETassisted  BOOLEAN,
  agpsSETBased     BOOLEAN,
  autonomousGPS    BOOLEAN,
  aFLT             BOOLEAN,
  eCID             BOOLEAN,
  eOTD             BOOLEAN,
  ...
}

Preferred Method.

One of the following preferred modes:

  • A-GPS SET-assisted preferred
  • A-GPS SET-based preferred
  • No preferred mode

Reference: OMA SUPL TS (Section 7.10 SET capabilities).

ASN.1 specification:

PrefMethod ::= ENUMERATED {
    agpsSETassistedPreferred,
    agpsSETBasedPreferred,
    noPreference
}

SET Capabilities.

SET capabilities (not mutually exclusive) in terms of supported positioning technologies and positioning protocols.

Reference: OMA SUPL TS (Section 7.10 SET capabilities).

ASN.1 specification:

SETCapabilities ::= SEQUENCE {
    posTechnology   PosTechnology,
    prefMethod      PrefMethod,
    posProtocol     PosProtocol,
    ...
}
typedef struct GLSUPL_SetID GLSUPL_SetID

SET ID.

SET identity value. This parameter can be of type:

  • MSISDN
  • MDN
  • MIN
  • IMSI
  • NAI
  • IPAddress -- IPv4 -- IPv6

Reference: OMA SUPL TS (Section 7.14.1 SET Session ID).

ASN.1 specification:

SETId ::= CHOICE {
    msisdn      OCTET STRING(SIZE (8)),
    mdn         OCTET STRING(SIZE (8)),
    min         BIT STRING(SIZE (34)), -- coded according to TIA-553
    imsi        OCTET STRING(SIZE (8)),
    nai         IA5String(SIZE (1..1000)),
    iPAddress   IPAddress,
    ...
}

SET ID Type.

SET Session ID type.

Reference: OMA SUPL TS (Section 7.14.1 SET Session ID)

Status Code.

The different status codes, either error or information indicators, as described in the table below.

Reference: OMA SUPL TS (Section 7.6 Status Code)


Enumeration Type Documentation

Connection Type SLP address should be considered by client.

This type can be used with SET originated connections when SLP address is unknown to build-in SUPL engine.

Enumerator:
GLSUPL_CONNECTION_URL 

URL.

GLSUPL_CONNECTION_IPv4 

IP Address v4.

GLSUPL_CONNECTION_IPv6 

IP Address v6.

GLSUPL_CONNECTION_URL 

URL.

GLSUPL_CONNECTION_IPv4 

IP Address v4.

GLSUPL_CONNECTION_IPv6 

IP Address v6.

Log severity.

Enumerator:
LOG_SUPL_EMERG 

system is unusable

LOG_SUPL_ALERT 

action must be taken immediately

LOG_SUPL_CRIT 

critical condition

LOG_SUPL_ERR 

error conditions

LOG_SUPL_WARNING 

warning conditions

LOG_SUPL_NOTICE 

normal but significant condition

LOG_SUPL_INFO 

informational

LOG_SUPL_DEBUG 

debug-level messages

LOG_SUPL_EMERG 

system is unusable

LOG_SUPL_ALERT 

action must be taken immediately

LOG_SUPL_CRIT 

critical condition

LOG_SUPL_ERR 

error conditions

LOG_SUPL_WARNING 

warning conditions

LOG_SUPL_NOTICE 

normal but significant condition

LOG_SUPL_INFO 

informational

LOG_SUPL_DEBUG 

debug-level messages

Preferred Method.

One of the following preferred modes:

  • A-GPS SET-assisted preferred
  • A-GPS SET-based preferred
  • No preferred mode

Reference: OMA SUPL TS (Section 7.10 SET capabilities).

ASN.1 specification:

PrefMethod ::= ENUMERATED {
    agpsSETassistedPreferred,
    agpsSETBasedPreferred,
    noPreference
}

SET ID Type.

SET Session ID type.

Reference: OMA SUPL TS (Section 7.14.1 SET Session ID)

Status Code.

The different status codes, either error or information indicators, as described in the table below.

Reference: OMA SUPL TS (Section 7.6 Status Code)

Enumerator:
GLSUPL_unspecified 

The error is unknown.

GLSUPL_systemFailure 

System Failure.

GLSUPL_unexpectedMessage 

Unexpected message received.

GLSUPL_protocolError 

Protocol parsing error.

GLSUPL_dataMissing 

Needed data value is missing.

GLSUPL_unexpectedDataValue 

A datavalue takes a value that cannot be used.

GLSUPL_posMethodFailure 

The underlying positioning method returned a failure.

GLSUPL_posMethodMismatch 

No positioning method could be found matching requested QoP, SET capabilities and positioning method specified by SLP.

GLSUPL_posProtocolMismatch 

No positioning protocol could be found being available at SET and SLP.

GLSUPL_targetSETnotReachable 

The SET was not responding.

GLSUPL_versionNotSupported 

Wrong ULP version.

GLSUPL_resourceShortage 

There were not enough resources available to serve the SET.

GLSUPL_invalidSessionId 

Invalid session identity.

GLSUPL_nonProxyModeNotSupported 

The SET does not support "Non-Proxy" mode of operation.

GLSUPL_proxyModeNotSupported 

The SET does not support "Proxy" mode of operation.

GLSUPL_positioningNotPermitted 

The SET is not authorized by the SLP.

GLSUPL_authNetFailure 

The network does not authenticate the SET, only used in SUPL AUTH_RESP.

GLSUPL_authSuplinitFailure 

The SUPL INIT message is not authenticated by the SET or the SLP.

GLSUPL_consentDeniedByUser 

User denied consent for location determination session.

GLSUPL_consentGrantedByUser 

User granted consent for location determination session.

GLSUPL_unspecified 

The error is unknown.

GLSUPL_systemFailure 

System Failure.

GLSUPL_unexpectedMessage 

Unexpected message received.

GLSUPL_protocolError 

Protocol parsing error.

GLSUPL_dataMissing 

Needed data value is missing.

GLSUPL_unexpectedDataValue 

A datavalue takes a value that cannot be used.

GLSUPL_posMethodFailure 

The underlying positioning method returned a failure.

GLSUPL_posMethodMismatch 

No positioning method could be found matching requested QoP, SET capabilities and positioning method specified by SLP.

GLSUPL_posProtocolMismatch 

No positioning protocol could be found being available at SET and SLP.

GLSUPL_targetSETnotReachable 

The SET was not responding.

GLSUPL_versionNotSupported 

Wrong ULP version.

GLSUPL_resourceShortage 

There were not enough resources available to serve the SET.

GLSUPL_invalidSessionId 

Invalid session identity.

GLSUPL_nonProxyModeNotSupported 

The SET does not support "Non-Proxy" mode of operation.

GLSUPL_proxyModeNotSupported 

The SET does not support "Proxy" mode of operation.

GLSUPL_positioningNotPermitted 

The SET is not authorized by the SLP.

GLSUPL_authNetFailure 

The network does not authenticate the SET, only used in SUPL AUTH_RESP.

GLSUPL_authSuplinitFailure 

The SUPL INIT message is not authenticated by the SET or the SLP.

GLSUPL_incompatibleProtectionLevel 

The Protection Level in the SUPL INIT message is not compatible with the protection level of the SET.

GLSUPL_serviceNotSupported 

Service Capability not supported.

GLSUPL_insufficientInterval 

The requested interval between fixes is not compatible with the capabilities of either the SET or the SLP.

GLSUPL_noSUPLCoverage 

The SET lost SUPL coverage.

This status code is used for V-SLP to V-SLP handover to indicate to the H-SLP that the SET lost SUPL coverage

GLSUPL_consentDeniedByUser 

User denied consent for location determination session.

GLSUPL_consentGrantedByUser 

User granted consent for location determination session.

GLSUPL_sessionStopped 

The triggered session has been stopped by the network or the SET.

GLSUPL_appIdDenied 

The App Id was not authorized by the SLP and as a result, the requested service was denied.


Function Documentation

void* glcb_supl_Allocate ( unsigned long  size)

Called by the SUPL engine to allocate session.

Parameters:
size- size of required memory
Note:
Returned pointer should be properly aligned.
void glcb_supl_Deallocate ( void *  session)

Called by the SUPL engine to deallocate session.

Parameters:
session- pointer to previously allocated session.

Called by the SUPL engine to inform that SUPL connection is no longer necessary.

Inform that connection to SLP server can be closed.

void glcb_supl_EndSession ( GLSUPL_Session session)

Called by the SUPL engine to inform that all data associated with session is no longer necessary.

Inform that all requests can be stoped.

void glcb_supl_ExceptionAssert ( const char *  file,
unsigned  line,
const char *  msg 
)

Exception Assert.

Parameters:
file- file name.
line- line number.
msg- message.
void glcb_supl_Log ( GLSUPL_LOG_SEVERITY  sev,
const char *  fmt,
  ... 
)

Log message.

Parameters:
sev- Log level.
fmt,...- format and message (printf format)

Called by the SUPL engine after receiving SUPL-INIT message.

Inform that SLP requests for Notification & Verification

Parameters:
session-
notif- Describes the notification/verification mechanism to be applied.
Note:
Application should response with glsupl_VerificationRsp() only if notification types are: GLSUPL_notificationAndVerficationAllowedNA or GLSUPL_notificationAndVerficationDeniedNA
void glcb_supl_ReportFromSuplEnd ( GLSUPL_Session session,
const GLSUPL_Position pos,
const GLSUPL_StatusCode code 
)

Report position and status code information to the application when it is received from SLP (SUPL) server in SUPL_END message.

Parameters:
session- [in] pointer to SUPL session, can not be NULL.
pos- [in] pointer to position reported in SUPL END, can be NULL.
code- [in] pointer to status code in SUPL END, can be NULL.
Note:
This callback will return position information for SI MSA position request and for SI Cell ID position and when server position will satisfy QoP from SUPL-START message.

Called by the SUPL engine to request SUPL Connection.

SUPL Protocol stack waiting for glsupl_Connect() call which will inform about the result of this request.

void glcb_supl_SendingSuplEnd ( GLSUPL_Session session,
const GLSUPL_StatusCode code 
)

Report status code information to the application before it sent to SLP (SUPL) server in SUPL_END message.

Parameters:
session- [in] pointer to SUPL session, can not be NULL.
code- [in] pointer to status code in SUPL END, can be NULL.
void glcb_supl_SetAcquisitionAssistance ( GLSUPL_Session session,
const GLRRLP_AcquisAssist acqAssist 
)

Acquisition Assistance.

Parameters:
session-
acqAssist- GPS Acquisition Assistance.
void glcb_supl_SetAlmanac ( GLSUPL_Session session,
const GLRRLP_Almanac alm 
)

Almanac.

Parameters:
session- pointer to SUPL session.
alm- GPS Almanac.
void glcb_supl_SetDGPSCorrections ( GLSUPL_Session session,
const GLRRLP_DGPSCorrections *  dgpsc 
)

DGPS Corrections.

Parameters:
session- pointer to SUPL session.
dgpsc- GPS DGPS Corrections.

Ionospheric Model.

Parameters:
session- pointer to SUPL session.
iono- GPS Ionospheric Model.
void glcb_supl_SetNavModel ( GLSUPL_Session session,
const GLRRLP_SeqOfNavModelElement nav 
)

Navigation Model.

Parameters:
session- pointer to SUPL session.
nav- GPS Navigation Model.
void glcb_supl_SetReferenceLocation ( GLSUPL_Session session,
const GLRRLP_PositionEstimate refLoc 
)

Reference Location.

Parameters:
session- pointer to SUPL session.
refLoc- GPS Reference Location.
void glcb_supl_SetReferenceTime ( GLSUPL_Session session,
const GLRRLP_ReferenceTime refTime 
)

Reference Time.

Parameters:
session- pointer to SUPL session.
refTime- GPS Reference Time.
void glcb_supl_SetRTIntegrity ( GLSUPL_Session session,
const GLRRLP_BadSatellites rti 
)

Real Time Integrity.

Parameters:
session- pointer to SUPL session.
rti- GPS Real Time Integrity.
void glcb_supl_SetUTCModel ( GLSUPL_Session session,
const GLRRLP_UTCModel utc 
)

UTC Model.

Parameters:
session- pointer to SUPL session.
utc- GPS UTC Model.
void glcb_supl_StartSingleShot ( GLSUPL_Session session,
const GLRRLP_PositionInstruct positionInstruct 
)

Called by the SUPL engine to execute positioning request for GLL engine.

Parameters:
session- pointer to previously allocated session.
positionInstruct- parameters of positioning request.
void glcb_supl_Write ( GLSUPL_Session session,
const unsigned char *  data,
unsigned  nBytes 
)

Called by the SUPL engine to write the encoded bytes to the network.

Parameters:
session- [in] pointer to SUPL session, can not be NULL.
data- [in] address of buffer for send.
nBytes- [in] length of buffer.
void glsupl_Abort ( GLSUPL_Session session)

Abort SUPL session.

Parameters:
session- pointer to SUPL session.
Return values:
none.

Abort SUPL session with status code.

Parameters:
session- pointer to SUPL session.
code- SUPL status code.
Return values:
none.
void glsupl_Connect ( GLSUPL_Session session,
GLBOOL  bSuccess 
)

Inform GLL SUPL protocol stack that SUPL connection has been established (bSuccess = 1) or not (bSuccess = 0)

Parameters:
session- pointer to SUPL session.
bSuccess0 - unsuccessful, 1 - successful
Returns:
none
Note:
This function should be called after glcb_supl_ReqConnection() to inform SUPL protocol stack about result of this request It is not necessary to call this function, when glcb_supl_ReqConnection() returns GLFALSE

Create SUPL session.

Return values:
pointerto the newly created SUPL session.
void glsupl_Data ( GLSUPL_Session session,
const unsigned char *  pucBuf,
int  nBytes 
)

This function should be called to deliver SUPL messages to GLL.

Parameters:
session- pointer to SUPL session.
pucBuf- pointer to the buffer containing the bytes.
nBytes- number of bytes received (may be zero)
Returns:
none
Note:
This function assumes that only one complete SUPL message is passed to it at a time. In particular, the function cannot process fragments of SUPL messages or multiple SUPL messages at a time.
int glsupl_DecodeSuplInit10 ( const unsigned char *  pBinaryBuffer,
int  nBinaryBytes,
unsigned char *  pTempBuffer,
int  nTempBytes,
GLSUPL_SUPLINIT pSUPLINIT 
)

Decode SUPL INIT binary message to GLSUPL_SUPLINIT structure.

Parameters:
pBinaryBuffer[in] - pointer to SUPL INIT binary message.
nBinaryBytes[in] - size of Binary buffer.
pTempBuffer[in] - pointer to temp buffer for conversion.
nTempBytes[in] - size of temp buffer.
pSUPLINIT[in,out] - pointer to resulting structure.
Returns:
In buffer request mode: - number of bytes required for temporary buffer
In decoding mode:
GL_SUPL_SUPLINIT - SUPL INIT converted successfully.
GL_SUPL_UNEXPECTED_MSG - Unexpected message (not SUPL INIT).
GL_SUPL_SMALL_TEMP_BUFFER - temp buffer too small.
GL_SUPL_CONVERSION_ERROR - conversion error.
> 0 - one of the parameters is invalid
Attention:
This functions is not recommended to use, please use glcb_supl_SUPLINIT() instead
Note:
This function can be called in two modes: "temp buffer size request" and "decoding".

Buffer size request mode:

int nRequestedTempBufferSize = glsupl_DecodeSuplInit10(0,0,0,0,0);

Decoding mode:

int nErrorCode = glsupl_DecodeSuplInit10(pBinaryBuffer, nBinaryBytes, pTempBuffer, nTempBytes, pSUPLINIT);

void glsupl_Disconnected ( GLSUPL_Session session)

Inform GLL SUPL protocol stack that SUPL connection has been terminated.

Parameters:
session- pointer to SUPL session.
Returns:
none
Note:
This function should be called during active SUPL session to inform SUPL protocol stack that TCP/IP connection has been terminated for any reason.

Gets capabilities from GLL SUPL protocol stack.

Returns:
none
Note:
This function can be called at any time.
void glsupl_NetworkRequest ( GLSUPL_Session session,
const unsigned char *  pucBuf,
int  nBytes,
const unsigned char *  ver 
)

Initiate Network Initiated request.

Parameters:
session- pointer to SUPL session.
pucBuf- pointer to a buffer with binary coded Network initiated message.
nBytes- size of this message.
ver- can be HMAC of pucBuf(SUPL_INIT) (described in SUPL 1.0 spec), in this case MUST be 8 bytes array. Refer to GpsHalSuplInitPrepareVer() for additional information
ver- or can be key-string for calculation HMAC of pucBuf(SUPL_INIT) inside SUPL stack.
Returns:
none
Note:
Parameter 'ver' CAN NOT BE NULL.
void glsupl_ReportGpsMeasurements ( GLSUPL_Session session,
const GLRRLP_GPS_MeasureInfo pMes 
)

Response to MSA request.

Parameters:
session- pointer to SUPL session.
pMes- GPS Measurement Information.
void glsupl_ReportLocationInfo ( GLSUPL_Session session,
const GLRRLP_LocationInfo pLoc 
)

Response to MSB or autonomous request.

Parameters:
session- pointer to SUPL session.
pLoc- Location Info.
GLBOOL glsupl_Request ( GLSUPL_Session session,
GLSUPL_QoP qop 
)

Start SUPL request.

It will be SET-initiated session.

Parameters:
session- pointer to SUPL session.
qop- Desired Quality of Position.
Returns:
Returns GLTRUE, if successful

Response on glcb_supl_RequestAssistanceData() or can be called after receiving positioning request to request additional assistance data.

Parameters:
session- pointer to SUPL session.
reqData- Requested Assist Data.
void glsupl_SetCapabilities ( GLSUPL_Session session,
const GLSUPL_SETCapabilities pCap 
)

Sets default capabilities for GLL SUPL protocol stack.

Returns:
none
Note:
This function can be called at any time.
GLBOOL glsupl_SetID ( GLSUPL_Session session,
const GLSUPL_SetID pSuplSetID 
)

Sets the SUPL ID in the GLL SUPL protocol stack.

Parameters:
session- pointer to SUPL session.
pSuplSetID- pointer to structure defining SUPL SET ID
Returns:
Returns GLTRUE, if successful
Note:
This function should be called before any SUPL requests
void glsupl_SetLocationId ( GLSUPL_Session session,
const GLSUPL_LocationId pLocationId 
)

Sets the Location Information for the LBS SUPL protocol stack.

Parameters:
session- pointer to SUPL session.
pLocationId- pointer to a location information structure.
Returns:
none
Note:
1. If the location information data is available right away, this function can be called from the callback glcb_supl_ReqLocationId().
2. The location information is requested periodically to cover the case of a roaming mobile station. 3. pLocationId->cellInfo.t should be 4 (GLSUPL_CELL_INFO_CDMA + 1) when location information is not available in this case SUPL session will be terminated
void glsupl_SetPosition ( GLSUPL_Session session,
const GLSUPL_Position pPos 
)

Response on glcb_supl_ReqPosition()

Parameters:
session- pointer to SUPL session.
pPos- position of the SET.
void glsupl_SetTimers ( GLSUPL_Session session,
unsigned long  ut1,
unsigned long  ut2,
unsigned long  ut3 
)

Allows to customize values for timers UT1, UT2, and UT3.

Parameters:
session- pointer to SUPL session.
ut1- UT1 timer in milliseconds, default value is 10000 ms.
ut2- UT2 timer in milliseconds, default value is 10000 ms.
ut3- UT3 timer in milliseconds, default value is 10000 ms.
Returns:
none
Note:
Setting timer value to 0 means that this timer should not be changed. Must be called as a part of GLL initialization procedure. Please refer to SUPL specification for more information
void glsupl_VerificationRsp ( GLSUPL_Session session,
GLBOOL  bAllow 
)

Respond to glcb_supl_NotificationVerificationReq()

Parameters:
session- pointer to SUPL session.
bAllow1 - allow positioning info, 0 - deny
Returns:
none
Note:
This function should be called as a respond to glcb_supl_NotificationVerificationReq()
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines