glnet_distr/inc/glsupllogapi.h File Reference

CMCC SuplLog. More...

This graph shows which files directly or indirectly include this file:

Defines

#define GPS_HAL_SUPL_LOG_INVALID_HANDLE_VALUE   ((GpsHalSuplLogHandle) -1)
 Constant for invalid handles.

Typedefs

typedef void * GpsHalSuplLogHandle
 Opaque handle that is meant to be used for whatever underlying data type the SuplLog implementor might desire to use.
typedef void(* GpsHalSuplLogPrintCb )(void *pHal, CMCC_LOG_MESSAGE_TYPE messagetype, const char *logMsg, int flush)
 Each customer HAL must provide a means to report formatted SUPL Log messages.
typedef void *(* GpsHalSuplLogGetSuplLogHandleCb )(GLSUPL_Session *pSession)
 Each customer HAL must provide a means to report the SuplLogHandle.
typedef int(* GpsHalSuplLogGetSuplSessionTypeCb )(GLSUPL_Session *pSession, int posMethod)
 Each customer HAL must provide a means to report the type of SuplSession (MSA, MSB) GL_POS_UE_ASSISTED_AGPS, GL_POS_UE_BASED_AGPS, GL_POS_AUTONOMOUS.
typedef int(* GpsHalSuplLogGetSuplSessionTypeFromSessionNrCb )(int localSessionNr, int posMethod)
 Each customer HAL must provide a means to report the type of SuplSession (MSA, MSB) GL_POS_UE_ASSISTED_AGPS, GL_POS_UE_BASED_AGPS, GL_POS_AUTONOMOUS.
typedef void(* GPSHalSplPrintCb )(const unsigned char *msg, int size)
 Hal callback function for output PGLOR,SPL message.

Functions

void * GpsHalSuplLogCreate (const char *acFullPathName, GpsHalSuplLogPrintCb printer, GpsHalSuplLogGetSuplLogHandleCb pGetSuplHandle, GpsHalSuplLogGetSuplSessionTypeCb pGetSuplSessionType, GpsHalSuplLogGetSuplSessionTypeFromSessionNrCb pGetSuplSessionTypeFromSessionNr, GLSUPL_Session *pSession, unsigned int formatter, GPSHalSplPrintCb splPrinter)
 Creates SuplLog library In this function the application can perform any needed initialization of the SuplLog library.
void GpsHalSuplLogDestroy (void *suplLogHandle)
 Destroys SuplLog library; in this function the application can clean up the impl.
void GpsHalSuplLog_DecodeSuplData (int localSessionNr, int SuplSessionType, const unsigned char *pBuffer, int nBytes)
 Decode SUPL binary message and write to log in CMC format.
int GpsHalSuplLogGpsFormatMessage (void *suplLogHandle, int local_session_num, CMCC_LOG_MESSAGE_TYPE messagetype, char *message1, char *message2, int flush)
 Format a GPS log message for CMCC log format.
int GpsHalSuplLogFormatMessage (void *suplLogHandle, CMCC_LOG_MESSAGE_TYPE messagetype, char *message, int size_message, int flush)
 Format a SUPL log message for CMCC log format.

Detailed Description

CMCC SuplLog.

glsupllogapi.h provide callback capabilitie to log SUPL workflows

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


Typedef Documentation

typedef void(* GPSHalSplPrintCb)(const unsigned char *msg, int size)

Hal callback function for output PGLOR,SPL message.

Parameters:
msg- PGLOR,SPL message to gllog.
size- the message length
typedef void*(* GpsHalSuplLogGetSuplLogHandleCb)(GLSUPL_Session *pSession)

Each customer HAL must provide a means to report the SuplLogHandle.

Parameters:
pSession- GLSUPL_Session pointer to SUPL Session the SuplLLogHandle is stored inside SuplData which can be accessed thanks to GLSUPL_Session
typedef int(* GpsHalSuplLogGetSuplSessionTypeCb)(GLSUPL_Session *pSession, int posMethod)

Each customer HAL must provide a means to report the type of SuplSession (MSA, MSB) GL_POS_UE_ASSISTED_AGPS, GL_POS_UE_BASED_AGPS, GL_POS_AUTONOMOUS.

Parameters:
pSession- GLSUPL_Session pointer to SUPL Session
posMethod- GL_POS_UE_ASSISTED_AGPS, GL_POS_UE_BASED_AGPS, GL_POS_AUTONOMOUS
typedef int(* GpsHalSuplLogGetSuplSessionTypeFromSessionNrCb)(int localSessionNr, int posMethod)

Each customer HAL must provide a means to report the type of SuplSession (MSA, MSB) GL_POS_UE_ASSISTED_AGPS, GL_POS_UE_BASED_AGPS, GL_POS_AUTONOMOUS.

Parameters:
localsessionNr- SuplLog localsessionNr.
posMethod- GL_POS_UE_ASSISTED_AGPS, GL_POS_UE_BASED_AGPS, GL_POS_AUTONOMOUS
typedef void* GpsHalSuplLogHandle

Opaque handle that is meant to be used for whatever underlying data type the SuplLog implementor might desire to use.

The (HAL) implementations will not try to understand what it is, just pass them back to the SuplLog library when needed.

See also:
GPS_HAL_SUPL_LOG_INVALID_HANDLE_VALUE for reserved value to denote invalid handle.
typedef void(* GpsHalSuplLogPrintCb)(void *pHal, CMCC_LOG_MESSAGE_TYPE messagetype, const char *logMsg, int flush)

Each customer HAL must provide a means to report formatted SUPL Log messages.

Parameters:
pHal- Handle to HAL instance passed as argument to GpsHalSuplLogCreate
logMsg- zero-terminated string containing log message in desired format
flush- flush the file after write operation

Function Documentation

void GpsHalSuplLog_DecodeSuplData ( int  localSessionNr,
int  SuplSessionType,
const unsigned char *  pBuffer,
int  nBytes 
)

Decode SUPL binary message and write to log in CMC format.

Parameters:
localSessionNr- SuplLog localsessionNr.
SuplSessionType- SUPL SessionType MSA/MSB.
pBuffer- pointer to SUPL binary message.
nBytes- size of the message.
void* GpsHalSuplLogCreate ( const char *  acFullPathName,
GpsHalSuplLogPrintCb  printer,
GpsHalSuplLogGetSuplLogHandleCb  pGetSuplHandle,
GpsHalSuplLogGetSuplSessionTypeCb  pGetSuplSessionType,
GpsHalSuplLogGetSuplSessionTypeFromSessionNrCb  pGetSuplSessionTypeFromSessionNr,
GLSUPL_Session pSession,
unsigned int  formatter,
GPSHalSplPrintCb  splPrinter 
)

Creates SuplLog library In this function the application can perform any needed initialization of the SuplLog library.

Parameters:
acFullPathName- Full path to SuplLog file name
printer- pointer to callback function that implements actual output as desired by HAL (into file(s), debug port, something)
pGetSuplHandle- pointer to callback function that return stored pointer to GpsHalSuplLogHandle inside
pGetSuplSessionType- pointer to callback function that return the SuplSessionType (MSA,MSB) passing pointer to GLSUPL_Session *
pGetSuplSessionTypeFromSessionNr- pointer to callback function that return the SuplSessionType (MSA,MSB) passing LocalSessionNr
pSession- SUPL session to attache logger too
formatter- Allows to select particular SUPL formatting engine used by SuplLog library Currently not used default to 0. \ return Handle to library instance, GPS_HAL_SUPL_LOG_INVALID_HANDLE_VALUE upon failure \ Handle must be stored in order to be available through ARP or SUPLDATA using GLSUPL_Session
void GpsHalSuplLogDestroy ( void *  suplLogHandle)

Destroys SuplLog library; in this function the application can clean up the impl.

as needed

Parameters:
suplLogHandle- Handle to SuplLog instance retrieved through prior call to GpsHalSuplLogCreate().
int GpsHalSuplLogFormatMessage ( void *  suplLogHandle,
CMCC_LOG_MESSAGE_TYPE  messagetype,
char *  message,
int  size_message,
int  flush 
)

Format a SUPL log message for CMCC log format.

messagetype must be provided at all time

Parameters:
suplLogHandle- Handle to SuplLog instance retrieved through prior call to GpsHalSuplLogCreate().
messagetype- Enum for message type (fomatted internally unless message is not NULL and size_message is set EG for QOP or POSITION
message- (optional) can be NULL
size_message- size of message string (strsafe)
flush- (optional) Flush the the SuplLog
int GpsHalSuplLogGpsFormatMessage ( void *  suplLogHandle,
int  local_session_num,
CMCC_LOG_MESSAGE_TYPE  messagetype,
char *  message1,
char *  message2,
int  flush 
)

Format a GPS log message for CMCC log format.

messagetype must be provided at all time

Parameters:
suplLogHandle- Handle to SuplLog instance retrieved through prior call to GpsHalSuplLogCreate().
local_session_num- SuplLog localsessionNr.
messagetype- Enum for message type (fomatted internally unless message is not NULL and size_message is set EG for QOP or POSITION
message1- (optional) can be NULL
message2- (optional) can be NULL
flush- (optional) Flush the the SuplLog
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines