48
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@internalTechnology
|
|
19 |
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef SUPL_DEV_LOGGER_MACROS_H
|
|
23 |
#define SUPL_DEV_LOGGER_MACROS_H
|
|
24 |
|
|
25 |
#include "supldevlogger.h"
|
|
26 |
|
|
27 |
#if defined(ENABLE_SUPL_DEV_LOGGER) && (defined(_DEBUG)||defined(__WINS__))
|
|
28 |
/**
|
|
29 |
-----------------------
|
|
30 |
Standard Logging Macros
|
|
31 |
-----------------------
|
|
32 |
**/
|
|
33 |
#define SUPLLOG_BEGIN() SUPLLOG(ELogP9, "StartSP\n");
|
|
34 |
#define SUPLNEWLOG(L) SuplDevLogger::OverWrite(_L(L))
|
|
35 |
#define SUPLLOG(L1,L2) SuplDevLogger::Write(ELogNormal, L1, _L(L2))
|
|
36 |
#define SUPLLOG2(L1,L2,L3) SuplDevLogger::Write(ELogNormal, L1, _L(L2), L3)
|
|
37 |
#define SUPLLOG3(L1,L2,L3,L4) SuplDevLogger::Write(ELogNormal, L1, _L(L2), L3, L4)
|
|
38 |
#define SUPLLOG4(L1,L2,L3,L4,L5) SuplDevLogger::Write(ELogNormal, L1, _L(L2), L3, L4, L5)
|
|
39 |
#define SUPLLOG5(L1,L2,L3,L4,L5,L6) SuplDevLogger::Write(ELogNormal, L1, _L(L2), L3, L4, L5, L6)
|
|
40 |
#define SUPLLOG6(L1,L2,L3,L4,L5,L6,L7) SuplDevLogger::Write(ELogNormal, L1, _L(L2), L3, L4, L5, L6, L7)
|
|
41 |
#define SUPLLOGHEX(L1,L2,L3) SuplDevLogger::HexDump(L1,L2,L3)
|
|
42 |
|
|
43 |
#define SUPLLOG2_L8(L1,L2,L3) SuplDevLogger::Write(ELogNormal, L1, _L8(L2), L3)
|
|
44 |
#define SUPLLOG3_L8(L1,L2,L3,L4) SuplDevLogger::Write(ELogNormal, L1, _L8(L2), L3, L4)
|
|
45 |
#define SUPLLOG4_L8(L1,L2,L3,L4,L5) SuplDevLogger::Write(ELogNormal, L1, _L8(L2), L3, L4, L5)
|
|
46 |
|
|
47 |
#define SUPLLOG_ERR(L1,L2) SuplDevLogger::Write(ELogError, L1, _L(L2))
|
|
48 |
#define SUPLLOG_ERR2(L1,L2,L3) SuplDevLogger::Write(ELogError, L1, _L(L2), L3)
|
|
49 |
#define SUPLLOG_ERR3(L1,L2,L3,L4) SuplDevLogger::Write(ELogError, L1, _L(L2), L3, L4)
|
|
50 |
#define SUPLLOG_ERR4(L1,L2,L3,L4,L5) SuplDevLogger::Write(ELogError, L1, _L(L2), L3, L4, L5)
|
|
51 |
#define SUPLLOG_ERR5(L1,L2,L3,L4,L5,L6) SuplDevLogger::Write(ELogError, L1, _L(L2), L3, L4, L5, L6)
|
|
52 |
#define SUPLLOG_ERR6(L1,L2,L3,L4,L5,L6,L7) SuplDevLogger::Write(ELogError, L1, _L(L2), L3, L4, L5, L6, L7)
|
|
53 |
|
|
54 |
#define SUPLLOG_WARN(L1,L2) SuplDevLogger::Write(ELogWarning, L1, _L(L2))
|
|
55 |
#define SUPLLOG_WARN2(L1,L2,L3) SuplDevLogger::Write(ELogWarning, L1, _L(L2), L3)
|
|
56 |
#define SUPLLOG_WARN3(L1,L2,L3,L4) SuplDevLogger::Write(ELogWarning, L1, _L(L2), L3, L4)
|
|
57 |
#define SUPLLOG_WARN4(L1,L2,L3,L4,L5) SuplDevLogger::Write(ELogWarning, L1, _L(L2), L3, L4, L5)
|
|
58 |
#define SUPLLOG_WARN5(L1,L2,L3,L4,L5,L6) SuplDevLogger::Write(ELogWarning, L1, _L(L2), L3, L4, L5, L6)
|
|
59 |
#define SUPLLOG_WARN6(L1,L2,L3,L4,L5,L6,L7) SuplDevLogger::Write(ELogWarning, L1, _L(L2), L3, L4, L5, L6, L7)
|
|
60 |
|
|
61 |
//Macro for getting the processname
|
|
62 |
#define SUPLLOG_GETPROCESSNAME(L1,L2) SuplDevLogger::GetMessageProcessName(L1,L2)
|
|
63 |
|
|
64 |
//Macro for logging contents of ObjSys Data Structures (not for general use)
|
|
65 |
#define SUPLLOG_PDU(L1) L1->Print()
|
|
66 |
|
|
67 |
/**
|
|
68 |
-------------------------------------------------
|
|
69 |
Common logging macros (for logging large values)
|
|
70 |
-------------------------------------------------
|
|
71 |
**/
|
|
72 |
|
|
73 |
// Logs TLbsNetSessionId
|
|
74 |
#define SUPLLOG_SESSIONID(L1) \
|
|
75 |
{ \
|
|
76 |
SUPLLOG2(ELogP9, " - TUid iSessionOwner = 0x%08X\n", L1.SessionOwner().iUid); \
|
|
77 |
SUPLLOG2(ELogP9, " - TUint32 iSessionNum = %u\n", L1.SessionNum()); \
|
|
78 |
}
|
|
79 |
|
|
80 |
/* Logs TPositionInfoBase
|
|
81 |
* This also logs the variables for all of the derived classes (if Applicable):
|
|
82 |
* - TPositionInfo
|
|
83 |
* - TPositionCourseInfo
|
|
84 |
* - TPositionSatelliteInfo
|
|
85 |
* - TPositionGpsMeasurementInfo
|
|
86 |
*/
|
|
87 |
#define SUPLLOG_TPOSITIONINFOBASE(L1) \
|
|
88 |
{ \
|
|
89 |
/* Find out what the class type is*/ \
|
|
90 |
TUint32 classTypeM = L1.PositionClassType(); \
|
|
91 |
/* Log the TPositionInfoBase information */ \
|
|
92 |
SUPLLOG2(ELogP9, " - TUint32 iPositionClassType = 0x%08X\n", classTypeM); \
|
|
93 |
SUPLLOG2(ELogP9, " - TPositionModuleId iModuleId = 0x%08X\n", L1.ModuleId().iUid); \
|
|
94 |
SUPLLOG2(ELogP9, " - TUint32 iUpdateType = %u\n", L1.UpdateType()); \
|
|
95 |
SUPLLOG2(ELogP9, " - TPositionModuleInfo::TTechnologyType iPositionMode = 0x%04X\n", L1.PositionMode()); \
|
|
96 |
SUPLLOG2(ELogP9, " - TPositionModeReason iPositionModeReason = %u\n", L1.PositionModeReason()); \
|
|
97 |
/* Log the TPositionInfo information*/ \
|
|
98 |
if(classTypeM & EPositionInfoClass) \
|
|
99 |
{ \
|
|
100 |
const TPositionInfo& posInfoM = (reinterpret_cast<const TPositionInfo&>(L1)); \
|
|
101 |
TPosition posM; \
|
|
102 |
posInfoM.GetPosition(posM); \
|
|
103 |
TTime timeM = posM.Time(); \
|
|
104 |
SUPLLOG5(ELogP9, " - TTime iTime = %02d:%02d:%02d.%06d\n", timeM.DateTime().Hour(), \
|
|
105 |
timeM.DateTime().Minute(), \
|
|
106 |
timeM.DateTime().Second(), \
|
|
107 |
timeM.DateTime().MicroSecond()); \
|
|
108 |
SUPLLOG2(ELogP9, " - TReal32 iHorizontalAccuracy = %3.6g\n", posM.HorizontalAccuracy()); \
|
|
109 |
SUPLLOG2(ELogP9, " - TReal32 iVerticalAccuracy = %3.6g\n", posM.VerticalAccuracy()); \
|
|
110 |
SUPLLOG2(ELogP9, " - TReal64 iLatitude = %3.6g\n", posM.Latitude()); \
|
|
111 |
SUPLLOG2(ELogP9, " - TReal64 iLongitude = %3.6g\n", posM.Longitude()); \
|
|
112 |
SUPLLOG2(ELogP9, " - TReal32 iAltitude = %3.6g\n", posM.Altitude()); \
|
|
113 |
SUPLLOG2(ELogP8, " - TPositionDatumId iDatum = 0x%08X\n", posM.Datum()); \
|
|
114 |
} \
|
|
115 |
/* Log the TPositionCourseInfo information*/ \
|
|
116 |
if(classTypeM & EPositionCourseInfoClass) \
|
|
117 |
{ \
|
|
118 |
const TPositionCourseInfo& courseInfoM = (reinterpret_cast<const TPositionCourseInfo&>(L1)); \
|
|
119 |
TCourse courseM; \
|
|
120 |
courseInfoM.GetCourse(courseM); \
|
|
121 |
SUPLLOG2(ELogP8, " - TReal32 iSpeed = %3.6g\n", courseM.Speed()); \
|
|
122 |
SUPLLOG2(ELogP8, " - TReal32 iHeading = %3.6g\n", courseM.Heading()); \
|
|
123 |
SUPLLOG2(ELogP8, " - TReal32 iSpeedAccuracy = %3.6g\n", courseM.SpeedAccuracy()); \
|
|
124 |
SUPLLOG2(ELogP8, " - TReal32 iHeadingAccuracy = %3.6g\n", courseM.HeadingAccuracy()); \
|
|
125 |
} \
|
|
126 |
/* Log the TPositionSatelliteInfo information*/ \
|
|
127 |
if(classTypeM & EPositionSatelliteInfoClass) \
|
|
128 |
{ \
|
|
129 |
const TPositionSatelliteInfo& satInfoM = (reinterpret_cast<const TPositionSatelliteInfo&>(L1)); \
|
|
130 |
TInt numSatInViewM = satInfoM.NumSatellitesInView(); \
|
|
131 |
SUPLLOG2(ELogP8, " - TUint iNumSatellitesInView = %u\n", numSatInViewM); \
|
|
132 |
SUPLLOG2(ELogP8, " - TUint iNumSatellitesUsed = %u\n", satInfoM.NumSatellitesUsed()); \
|
|
133 |
SUPLLOG2(ELogP8, " - TReal32 iHorizontalDoPValue = %3.6g\n", satInfoM.HorizontalDoP()); \
|
|
134 |
SUPLLOG2(ELogP8, " - TReal32 iVerticalDoPValue = %3.6g\n", satInfoM.VerticalDoP()); \
|
|
135 |
SUPLLOG2(ELogP8, " - TReal32 iTimeDoPValue = %3.6g\n", satInfoM.TimeDoP()); \
|
|
136 |
for(TInt satNumM=0; ((satNumM < numSatInViewM) && (satNumM < KPositionMaxSatellitesInView)); ++satNumM) \
|
|
137 |
{ \
|
|
138 |
TSatelliteData satDataM; \
|
|
139 |
satInfoM.GetSatelliteData(satNumM, satDataM); \
|
|
140 |
SUPLLOG2(ELogP8, " - TSatelliteData iSatellitesInView[%d] =\n", satNumM); \
|
|
141 |
SUPLLOG2(ELogP8, " - TInt iSatelliteId = %d\n", satDataM.SatelliteId()); \
|
|
142 |
SUPLLOG2(ELogP8, " - TReal32 iAzimuth = %3.6g\n", satDataM.Azimuth()); \
|
|
143 |
SUPLLOG2(ELogP8, " - TReal32 iElevation = %3.6g\n", satDataM.Elevation()); \
|
|
144 |
SUPLLOG2(ELogP8, " - TBool iIsUsed = %d\n", satDataM.IsUsed()); \
|
|
145 |
SUPLLOG2(ELogP8, " - TInt iSignalStrength = %d\n", satDataM.SignalStrength()); \
|
|
146 |
} \
|
|
147 |
} \
|
|
148 |
/* Log the TPositionGpsMeasurementInfo*/ \
|
|
149 |
if(classTypeM & EPositionGpsMeasurementInfoClass) \
|
|
150 |
{ \
|
|
151 |
const TPositionGpsMeasurementInfo& gpsInfoM = (reinterpret_cast<const TPositionGpsMeasurementInfo&>(L1)); \
|
|
152 |
TInt numMeasurementsM = gpsInfoM.NumMeasurements(); \
|
|
153 |
SUPLLOG2(ELogP8, " - TInt iGpsTimeOfWeek = %d\n", gpsInfoM.GpsTimeOfWeek()); \
|
|
154 |
SUPLLOG2(ELogP8, " - TUint iNumMeasurements = %d\n", numMeasurementsM); \
|
|
155 |
for(TInt gpsNumM=0; ((gpsNumM < numMeasurementsM) && (gpsNumM < KPositionGpsMaxMeasurements)); ++gpsNumM) \
|
|
156 |
{ \
|
|
157 |
TPositionGpsMeasurementData tempGpsDataM; \
|
|
158 |
gpsInfoM.GetMeasurementData(gpsNumM, tempGpsDataM); \
|
|
159 |
SUPLLOG2(ELogP8, " - TPositionGpsMeasurementData iMeasurementData[%d] = \n", gpsNumM); \
|
|
160 |
SUPLLOG2(ELogP8, " - TInt iSatelliteId = %d\n", tempGpsDataM.SatelliteId()); \
|
|
161 |
SUPLLOG2(ELogP8, " - TInt iCarrierNoiseRatio = %d\n", tempGpsDataM.CarrierNoiseRatio()); \
|
|
162 |
SUPLLOG2(ELogP8, " - TInt iDoppler = %d\n", tempGpsDataM.Doppler()); \
|
|
163 |
SUPLLOG2(ELogP8, " - TInt iWholeGpsChips = %d\n", tempGpsDataM.WholeGpsChips()); \
|
|
164 |
SUPLLOG2(ELogP8, " - TInt iFractionalGpsChips = %d\n", tempGpsDataM.FractionalGpsChips()); \
|
|
165 |
SUPLLOG2(ELogP8, " - TMultiPathIndicator iMultiPathIndicator = %d\n", tempGpsDataM.MultiPathIndicator()); \
|
|
166 |
SUPLLOG2(ELogP8, " - TUint iPseudoRangeRmsError = %u\n", tempGpsDataM.PseudoRangeRmsError()); \
|
|
167 |
} \
|
|
168 |
} \
|
|
169 |
}
|
|
170 |
|
|
171 |
// Logs TPositionQuality
|
|
172 |
#define SUPLLOG_TPOSITIONQUALITY(L1) \
|
|
173 |
{ \
|
|
174 |
SUPLLOG2(ELogP9, " - TReal32 iHorizontalAccuracy = %3.6g\n", L1.HorizontalAccuracy()); \
|
|
175 |
SUPLLOG2(ELogP9, " - TReal32 iVerticalAccuracy = %3.6g\n", L1.VerticalAccuracy()); \
|
|
176 |
SUPLLOG2(ELogP9, " - TTimeIntervalMicroSeconds iTimeToFirstFix = %ld\n", L1.TimeToFirstFix().Int64()); \
|
|
177 |
SUPLLOG2(ELogP9, " - TTimeIntervalMicroSeconds iTimeToNextFix = %ld\n", L1.TimeToNextFix().Int64()); \
|
|
178 |
SUPLLOG2(ELogP9, " - TCostIndicator iCostIndicator = %d\n", L1.CostIndicator()); \
|
|
179 |
SUPLLOG2(ELogP9, " - TPowerConsumption iPowerConsumption = %d\n", L1.PowerConsumption()); \
|
|
180 |
}
|
|
181 |
|
|
182 |
// Logs TPositionModuleInfo
|
|
183 |
#define SUPLLOG_TPOSITIONMODULE(L1) \
|
|
184 |
{ \
|
|
185 |
if(L1.PositionClassType() & EPositionModuleInfoClass) \
|
|
186 |
{ \
|
|
187 |
const TPositionModuleInfo& positionInfoM = (reinterpret_cast<const TPositionModuleInfo&>(L1)); \
|
|
188 |
SUPLLOG2(ELogP9, " - TPositionModuleId iModuleId = 0x%08X\n", positionInfoM.ModuleId().iUid); \
|
|
189 |
SUPLLOG2(ELogP9, " - TBool iIsAvailable = %d\n", positionInfoM.IsAvailable()); \
|
|
190 |
TBuf<KPositionMaxModuleName> tempModuleNameM; \
|
|
191 |
positionInfoM.GetModuleName(tempModuleNameM); \
|
|
192 |
SUPLLOG2(ELogP9, " - TBuf iModuleName = %S\n", &tempModuleNameM); \
|
|
193 |
TPositionQuality tempPositionQualityM; \
|
|
194 |
positionInfoM.GetPositionQuality(tempPositionQualityM); \
|
|
195 |
SUPLLOG_TPOSITIONQUALITY(tempPositionQualityM); \
|
|
196 |
SUPLLOG2(ELogP9, " - TTechnologyType iTechnologyType = %x02X\n", positionInfoM.TechnologyType()); \
|
|
197 |
SUPLLOG2(ELogP9, " - TDeviceLocation iDeviceLocation = %x02X\n", positionInfoM.DeviceLocation()); \
|
|
198 |
SUPLLOG2(ELogP9, " - TCapabilities iCapabilities = %x04X\n", positionInfoM.Capabilities()); \
|
|
199 |
SUPLLOG4(ELogP9, " - TVersion iVersion = (%d %d %d)\n", positionInfoM.Version().iMajor, \
|
|
200 |
positionInfoM.Version().iMinor, \
|
|
201 |
positionInfoM.Version().iBuild);\
|
|
202 |
} \
|
|
203 |
}
|
|
204 |
|
|
205 |
// Logs TLbsExternalRequestInfo
|
|
206 |
#define SUPLLOG_TLBSEXTERNALREQ(L1) \
|
|
207 |
{ \
|
|
208 |
/* Find out what the class type is*/ \
|
|
209 |
TUint32 classTypeM = L1.ClassType(); \
|
|
210 |
/* Output shared info */ \
|
|
211 |
SUPLLOG2(ELogP9, " - TNetworkType iNetworkType = %x02X\n", L1.NetworkType()); \
|
|
212 |
SUPLLOG2(ELogP9, " - TRequestType iRequestType = %x02X\n", L1.RequestType()); \
|
|
213 |
SUPLLOG2(ELogP9, " - TFormatIndicator iRequesterIdFormat = %x02X\n", L1.RequesterIdFormat()); \
|
|
214 |
SUPLLOG2(ELogP9, " - TFormatIndicator iClientNameFormat = %x02X\n", L1.ClientNameFormat()); \
|
|
215 |
TBuf8<KLbsMaxClientExternalIdSize> externalSizeM; \
|
|
216 |
L1.GetClientExternalId(externalSizeM); \
|
|
217 |
SUPLLOG2_L8(ELogP9, " - TLbsClientExternalId iClientExternalId = %S", &externalSizeM); \
|
|
218 |
/* Output type specific info */ \
|
|
219 |
if (classTypeM == EExternalRequestInfoClass) \
|
|
220 |
{ \
|
|
221 |
const TLbsExternalRequestInfo& info = reinterpret_cast<const TLbsExternalRequestInfo&>(L1); \
|
|
222 |
TBuf8<KLbsMaxRequesterIdSize> requesterIdM; \
|
|
223 |
info.GetRequesterId(requesterIdM); \
|
|
224 |
TBuf8<KLbsMaxClientNameSize> clientNameM; \
|
|
225 |
info.GetClientName(clientNameM); \
|
|
226 |
SUPLLOG2_L8(ELogP9, " - TLbsRequesterId iRequesterId = %S", &requesterIdM); \
|
|
227 |
SUPLLOG2_L8(ELogP9, " - TLbsClientName iClientName = %S", &clientNameM); \
|
|
228 |
SUPLLOG2(ELogP9, " - TFormatIndicator iRequesterIdCodingScheme = %x02X\n", info.RequesterIdCodingScheme()); \
|
|
229 |
SUPLLOG2(ELogP9, " - TFormatIndicator iClientNameCodingScheme = %x02X\n", info.ClientNameCodingScheme()); \
|
|
230 |
} \
|
|
231 |
else if (classTypeM == (EExternalRequestInfoClass | EExternalRequestInfoClass2)) \
|
|
232 |
{ \
|
|
233 |
const TLbsExternalRequestInfo2& info = reinterpret_cast<const TLbsExternalRequestInfo2&>(L1); \
|
|
234 |
TBuf16<KLbsMaxRequesterIdSize2> requesterIdM; \
|
|
235 |
info.GetRequesterId(requesterIdM); \
|
|
236 |
TBuf16<KLbsMaxClientNameSize2> clientNameM; \
|
|
237 |
info.GetClientName(clientNameM); \
|
|
238 |
SUPLLOG2(ELogP9, " - TLbsRequesterId iRequesterId = %S", &requesterIdM); \
|
|
239 |
SUPLLOG2(ELogP9, " - TLbsClientName iClientName = %S", &clientNameM); \
|
|
240 |
} \
|
|
241 |
}
|
|
242 |
|
|
243 |
// Logs TLbsNetPosRequestOptionsAssistance
|
|
244 |
#define SUPLLOG_REQUESTOPTIONSASSISTANCE(L1) \
|
|
245 |
{ \
|
|
246 |
SUPLLOG2(ELogP9, " - TLbsAsistanceDataGroup iDataRequestMask = 0x%08X\n", L1.DataRequestMask()); \
|
|
247 |
SUPLLOG2(ELogP9, " - TPositionModuleInfo::TTechnologyType iPosMode = 0x%04X\n", L1.PosMode()); \
|
|
248 |
}
|
|
249 |
|
|
250 |
// Logs TLbsNetPosRequestPrivacy
|
|
251 |
#define SUPLLOG_POSREQUESTPRIVACY(L1) \
|
|
252 |
{ \
|
|
253 |
SUPLLOG2(ELogP9, " - TLbsRequestAction iAction = %d", L1.RequestAction()); \
|
|
254 |
SUPLLOG2(ELogP9, " - TLbsRequestAdvice iAdvice = %d", L1.RequestAdvice()); \
|
|
255 |
}
|
|
256 |
|
|
257 |
// Logs TLbsNetPosRequestQuality
|
|
258 |
#define SUPLLOG_POSREQUESTQUALITY(L1) \
|
|
259 |
{ \
|
|
260 |
SUPLLOG2(ELogP9, " - TReal32 iMinHorizontalAccuracy = %3.6g\n", L1.MinHorizontalAccuracy()); \
|
|
261 |
SUPLLOG2(ELogP9, " - TReal32 iMinVerticalAccuracy = %3.6g\n", L1.MinVerticalAccuracy()); \
|
|
262 |
SUPLLOG2(ELogP9, " - TTimeIntervalMicroSeconds iMaxFixTime = %ld\n", L1.MaxFixTime().Int64()); \
|
|
263 |
SUPLLOG2(ELogP9, " - TTimeIntervalMicroSeconds iMaxFixAge = %ld\n", L1.MaxFixAge().Int64()); \
|
|
264 |
}
|
|
265 |
|
|
266 |
// Logs TLbsNetPosRequestOptions
|
|
267 |
#define SUPLLOG_POSREQUESTOPTIONS(L1) \
|
|
268 |
{ \
|
|
269 |
SUPLLOG2(ELogP9, " - TBool iNewClient = %d\n", L1.NewClientConnected()); \
|
|
270 |
TLbsNetPosRequestQuality qualityM; \
|
|
271 |
L1.GetRequestQuality(qualityM); \
|
|
272 |
SUPLLOG_POSREQUESTQUALITY(qualityM); \
|
|
273 |
}
|
|
274 |
|
|
275 |
// Logs TPositionUpdateOptionsBase
|
|
276 |
#define SUPLLOG_POSITIONOPTIONBASE(L1) \
|
|
277 |
{ \
|
|
278 |
SUPLLOG2(ELogP9, " - TTimeIntervalMicroSeconds iUpdateInterval = %ld\n", L1.UpdateInterval().Int64()); \
|
|
279 |
SUPLLOG2(ELogP9, " - TTimeIntervalMicroSeconds iUpdateTimeOut = %ld\n", L1.UpdateTimeOut().Int64()); \
|
|
280 |
SUPLLOG2(ELogP9, " - TTimeIntervalMicroSeconds iMaxUpdateAge = %ld\n", L1.MaxUpdateAge().Int64()); \
|
|
281 |
}
|
|
282 |
|
|
283 |
// Logs TPositionCriteriaBase
|
|
284 |
#define SUPLLOG_POSITIONCRITERIABASE(L1) \
|
|
285 |
{ \
|
|
286 |
SUPLLOG2(ELogP9, " - TPositionModuleInfo::TCapabilities iRequiredCaps = 0x%04X\n", L1.RequiredCapabilities()); \
|
|
287 |
TPositionQuality tempPositionQualityM; \
|
|
288 |
L1.GetRequiredQuality(tempPositionQualityM); \
|
|
289 |
SUPLLOG_TPOSITIONQUALITY(tempPositionQualityM); \
|
|
290 |
}
|
|
291 |
|
|
292 |
// Logs TPositionModuleStatusBase
|
|
293 |
#define SUPLLOG_POSMODULESTATUS(L1) \
|
|
294 |
{ \
|
|
295 |
if(L1.PositionClassType() & EPositionModuleStatusClass) \
|
|
296 |
{ \
|
|
297 |
const TPositionModuleStatus& positionStatusM = (reinterpret_cast<const TPositionModuleStatus&>(L1)); \
|
|
298 |
SUPLLOG2(ELogP9, " - TDeviceStatus iDeviceStatus = %d\n", positionStatusM.DeviceStatus()); \
|
|
299 |
SUPLLOG2(ELogP9, " - TDataQualityStatus iDataQualityStatus = %d\n", positionStatusM.DataQualityStatus()); \
|
|
300 |
} \
|
|
301 |
}
|
|
302 |
|
|
303 |
// Logs TPositionModuleStatusEventBase
|
|
304 |
#define SUPLLOG_POSMODULESTATUSEVENT(L1) \
|
|
305 |
{ \
|
|
306 |
SUPLLOG2(ELogP9, " - TModuleEvent iRequestedEvents = %u\n", L1.RequestedEvents()); \
|
|
307 |
SUPLLOG2(ELogP9, " - TModuleEvent iOccurredEvents = %u\n", L1.OccurredEvents()); \
|
|
308 |
SUPLLOG2(ELogP9, " - TSystemModuleEvent iSystemModuleEvent = %u\n", L1.SystemModuleEvent()); \
|
|
309 |
SUPLLOG2(ELogP9, " - TPositionModuleId iModuleId = 0x%08X\n", L1.ModuleId().iUid); \
|
|
310 |
}
|
|
311 |
|
|
312 |
// Logs TLbsNetPosRequestMethod
|
|
313 |
#define SUPLLOG_POSREQUESTMETHOD(L1) \
|
|
314 |
{ \
|
|
315 |
TInt numPosMethodsM = L1.NumPosMethods(); \
|
|
316 |
SUPLLOG2(ELogP9, " - TInt iNumPosMethods = %d\n", numPosMethodsM); \
|
|
317 |
TLbsNetPosMethod posMethodM; \
|
|
318 |
for(TInt posNumM=0; ((posNumM < numPosMethodsM) && ( posNumM < KLbsMaxNetPosMethods)); ++posNumM) \
|
|
319 |
{ \
|
|
320 |
SUPLLOG2(ELogP9, " - TLbsNetPosMethod posMethod[%d]\n", posNumM); \
|
|
321 |
if((L1.GetPosMethod(posNumM, posMethodM))) \
|
|
322 |
{ \
|
|
323 |
SUPLLOG2(ELogP9, " - TUid iPosMeans = 0x%08X\n", posMethodM.PosMeans()); \
|
|
324 |
SUPLLOG2(ELogP9, " - TPositionModuleInfo::TTechnologyType iPosMode = %d\n", posMethodM.PosMode()); \
|
|
325 |
} \
|
|
326 |
} \
|
|
327 |
}
|
|
328 |
|
|
329 |
// Logs TLbsGpsOptions
|
|
330 |
#define SUPLLOG_TLBSGPSOPTIONS(L1) \
|
|
331 |
{ \
|
|
332 |
SUPLLOG2(ELogP9, " - CLbsAdmin::TGpsMode iGpsMode = 0x%02X\n", L1.GpsMode()); \
|
|
333 |
if (L1.ClassType() & ELbsGpsOptionsArrayClass) \
|
|
334 |
{ \
|
|
335 |
const TLbsGpsOptionsArray& optionsArrayM = (reinterpret_cast<const TLbsGpsOptionsArray&>(L1)); \
|
|
336 |
TInt numOptionsM = optionsArrayM.NumOptionItems(); \
|
|
337 |
SUPLLOG2(ELogP9, " - TUint iNumItems = %u\n", numOptionsM); \
|
|
338 |
for(TInt optionsNumM=0; ((optionsNumM < numOptionsM) && (optionsNumM < KLbsMaxGpsOptions)); ++optionsNumM) \
|
|
339 |
{ \
|
|
340 |
TLbsGpsOptionsItem tempOptionsM; \
|
|
341 |
optionsArrayM.GetOptionItem(optionsNumM, tempOptionsM); \
|
|
342 |
SUPLLOG2(ELogP9, " - TLbsGpsOptionsItem iOptions[%d] =\n", optionsNumM); \
|
|
343 |
SUPLLOG2(ELogP9, " - TPosUpdateType iPosUpdateType = %d", tempOptionsM.PosUpdateType()); \
|
|
344 |
} \
|
|
345 |
} \
|
|
346 |
}
|
|
347 |
|
|
348 |
#else
|
|
349 |
/**
|
|
350 |
Standard Logging Macros
|
|
351 |
**/
|
|
352 |
#define SUPLLOG_BEGIN()
|
|
353 |
#define SUPLNEWLOG(L)
|
|
354 |
#define SUPLLOG(L1,L2)
|
|
355 |
#define SUPLLOG2(L1,L2,L3)
|
|
356 |
#define SUPLLOG3(L1,L2,L3,L4)
|
|
357 |
#define SUPLLOG4(L1,L2,L3,L4,L5)
|
|
358 |
#define SUPLLOG5(L1,L2,L3,L4,L5,L6)
|
|
359 |
#define SUPLLOG6(L1,L2,L3,L4,L5,L6,L7)
|
|
360 |
#define SUPLLOGHEX(L1,L2,L3)
|
|
361 |
|
|
362 |
#define SUPLLOG2_L8(L1,L2,L3)
|
|
363 |
#define SUPLLOG3_L8(L1,L2,L3,L4)
|
|
364 |
#define SUPLLOG4_L8(L1,L2,L3,L4,L5)
|
|
365 |
|
|
366 |
#define SUPLLOG_ERR(L1,L2)
|
|
367 |
#define SUPLLOG_ERR2(L1,L2,L3)
|
|
368 |
#define SUPLLOG_ERR3(L1,L2,L3,L4)
|
|
369 |
#define SUPLLOG_ERR4(L1,L2,L3,L4,L5)
|
|
370 |
#define SUPLLOG_ERR5(L1,L2,L3,L4,L5,L6)
|
|
371 |
#define SUPLLOG_ERR6(L1,L2,L3,L4,L5,L6,L7)
|
|
372 |
|
|
373 |
#define SUPLLOG_WARN(L1,L2)
|
|
374 |
#define SUPLLOG_WARN2(L1,L2,L3)
|
|
375 |
#define SUPLLOG_WARN3(L1,L2,L3,L4)
|
|
376 |
#define SUPLLOG_WARN4(L1,L2,L3,L4,L5)
|
|
377 |
#define SUPLLOG_WARN5(L1,L2,L3,L4,L5,L6)
|
|
378 |
#define SUPLLOG_WARN6(L1,L2,L3,L4,L5,L6,L7)
|
|
379 |
|
|
380 |
/**
|
|
381 |
Common logging macros (for logging large values)
|
|
382 |
**/
|
|
383 |
#define SUPLLOG_SESSIONID(L1)
|
|
384 |
#define SUPLLOG_TPOSITIONINFOBASE(L1)
|
|
385 |
#define SUPLLOG_TPOSITIONQUALITY(L1)
|
|
386 |
#define SUPLLOG_TPOSITIONMODULE(L1)
|
|
387 |
#define SUPLLOG_TLBSEXTERNALREQ(L1)
|
|
388 |
#define SUPLLOG_REQUESTOPTIONSASSISTANCE(L1)
|
|
389 |
#define SUPLLOG_POSREQUESTPRIVACY(L1)
|
|
390 |
#define SUPLLOG_POSREQUESTQUALITY(L1)
|
|
391 |
#define SUPLLOG_POSREQUESTOPTIONS(L1)
|
|
392 |
#define SUPLLOG_POSITIONOPTIONBASE(L1)
|
|
393 |
#define SUPLLOG_POSITIONCRITERIABASE(L1)
|
|
394 |
#define SUPLLOG_POSMODULESTATUS(L1)
|
|
395 |
#define SUPLLOG_POSMODULESTATUSEVENT(L1)
|
|
396 |
#define SUPLLOG_POSREQUESTMETHOD(L1)
|
|
397 |
#define SUPLLOG_TLBSGPSOPTIONS(L1)
|
|
398 |
|
|
399 |
#define SUPLLOG_GETPROCESSNAME(L1,L2)
|
|
400 |
|
|
401 |
#define SUPLLOG_PDU(L1)
|
|
402 |
|
|
403 |
#endif // ENABLE_SUPL_DEV_LOGGER
|
|
404 |
|
|
405 |
#endif //SUPL_DEV_LOGGER_MACROS_H
|
|
406 |
|