--- a/telephonyserverplugins/simtsy/src/CSimSignalStrength.cpp Thu May 27 14:05:07 2010 +0300
+++ b/telephonyserverplugins/simtsy/src/CSimSignalStrength.cpp Fri Jun 11 14:49:29 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -20,10 +20,16 @@
@file
*/
+
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "CSimSignalStrengthTraces.h"
+#endif
+
#include <testconfigfileparser.h>
#include "CSimSignalStrength.h"
#include "CSimPhone.h"
-#include "Simlog.h"
#include "simtsyglobalproperties.h"
const TInt KSignalStrengthGranularity=5; // < Granularity for signal strength list array
@@ -67,7 +73,7 @@
iTimer=CSimTimer::NewL(iPhone);
iSignalStrengthInfo=new(ELeave) CArrayFixFlat<TSignalStrengthInfo>(KSignalStrengthGranularity);
- LOGSS1("Starting to parse Signal Strength config parameters...");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_CONSTRUCTL_1, "Starting to parse Signal Strength config parameters...");
const CTestConfigItem* item=NULL;
TInt ret=KErrNone;
@@ -104,19 +110,19 @@
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration);
if(ret!=KErrNone)
{
- LOGPARSERR("duration",ret,0,&KSSLevel);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element DURATION returned %d (element no. %d) from tag %s.",ret,0,KSSLevel);
continue;
}
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,ss);
if(ret!=KErrNone)
{
- LOGPARSERR("ss",ret,1,&KSSLevel);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_CONSTRUCTL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element SS returned %d (element no. %d) from tag %s.",ret,1,KSSLevel);
continue;
}
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,ssb);
if(ret!=KErrNone)
{
- LOGPARSERR("ssb",ret,2,&KSSLevel);
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_CONSTRUCTL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element SSB returned %d (element no. %d) from tag %s.",ret,2,KSSLevel);
continue;
}
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,err);
@@ -126,7 +132,7 @@
}
else
{
- LOGPARSERRANGE("ssb",ret,3,&KSSLevel,"0 or -1");
+ OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_CONSTRUCTL_5, "Reading element SSB returned %d (element no. %d) from tag %s expected 0 or -1" ,ret,3,KSSLevel);
}
TSignalStrengthInfo ssInfo;
@@ -137,7 +143,7 @@
iSignalStrengthInfo->AppendL(ssInfo);
}
- LOGSS1("...Finished parsing Signal Strength config parameters...");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_CONSTRUCTL_6, "...Finished parsing Signal Strength config parameters...");
if(iSignalStrengthInfo->Count()!=0)
{
@@ -216,7 +222,7 @@
* @return TInt Standard error value.
*/
{
- LOGSS1(">>CSimSignalStrength::GetSignalStrength");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_GETSIGNALSTRENGTH_1, ">>CSimSignalStrength::GetSignalStrength");
TPckg<TInt32>* ssPckg=(TPckg<TInt32>*)aPckg1;
TInt32& ss=(*ssPckg)();
TPckg<TInt8>* ssbPckg=(TPckg<TInt8>*)aPckg2;
@@ -230,7 +236,7 @@
ss=iCurrentLevel;
ssb=iCurrentBar;
- LOGSS3("<<CSimSignalStrength::GetSignalStrength with level=%d dB and bar=%d",iCurrentLevel,iCurrentBar);
+ OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_GETSIGNALSTRENGTH_2, "<<CSimSignalStrength::GetSignalStrength with level=%d dB and bar=%d",(TInt)iCurrentLevel,(TInt)iCurrentBar);
iPhone->ReqCompleted(aReqHandle,iCurrentError);
return KErrNone;
}
@@ -248,7 +254,7 @@
* @return TInt Standard error value.
*/
{
- LOGSS1(">>CSimSignalStrength::NotifySignalStrengthChange");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_NOTIFYSIGNALSTRENGTHCHANGE_1, ">>CSimSignalStrength::NotifySignalStrengthChange");
TPckg<TInt32>* ssPckg=(TPckg<TInt32>*)aPckg1;
TInt32& ss=(*ssPckg)();
TPckg<TInt8>* ssbPckg=(TPckg<TInt8>*)aPckg2;
@@ -275,12 +281,12 @@
{
if(iSSChangeNotificationPending)
{
- LOGSS1("CSimSignalStrength::NotifySignalStrengthChange has been cancelled");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_NOTIFYSIGNALSTRENGTHCHANGECANCEL_1, "CSimSignalStrength::NotifySignalStrengthChange has been cancelled");
iSSChangeNotificationPending=EFalse;
iPhone->ReqCompleted(iSSChangeNotificationReqHandle,KErrCancel);
}
else
- LOGSS1("CSimSignalStrength::NotifySignalStrengthChange was not outstanding and hasn't been cancelled");
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_NOTIFYSIGNALSTRENGTHCHANGECANCEL_2, "CSimSignalStrength::NotifySignalStrengthChange was not outstanding and hasn't been cancelled");
}
void CSimSignalStrength::TimerCallBack(TInt /*aId*/)
@@ -308,7 +314,7 @@
iSSChangeNotificationPending=EFalse;
*iSSChangeNotificationSSLevel=iCurrentLevel;
*iSSChangeNotificationSSBarLevel=iCurrentBar;
- LOGSS3("<<CSimSignalStrength::NotifySignalStrengthChange with level=%d dB and bar=%d",iCurrentLevel,iCurrentBar);
+ OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_TIMERCALLBACK_1, "<<CSimSignalStrength::NotifySignalStrengthChange with level=%d dB and bar=%d",(TInt)iCurrentLevel,(TInt)iCurrentBar);
iPhone->ReqCompleted(iSSChangeNotificationReqHandle,iCurrentError);
}
iTimer->Start(iSignalStrengthInfo->At(iSSIndex).iDuration,this);
@@ -331,7 +337,7 @@
*/
void CSimSignalStrength::PubSubCallback(TInt aNewVal)
{
- LOGSS2("CSimSignalStrength::SignalStrengthChangeCallBack newVal=%d", aNewVal);
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_PUBSUBCALLBACK_1, "CSimSignalStrength::SignalStrengthChangeCallBack newVal=%d", aNewVal);
if (iCurrentBar == aNewVal)
{
return;
@@ -342,7 +348,7 @@
iSSChangeNotificationPending=EFalse;
*iSSChangeNotificationSSLevel=iCurrentLevel;
*iSSChangeNotificationSSBarLevel=iCurrentBar;
- LOGSS3("<<CSimSignalStrength::NotifySignalStrengthChange with level=%d dB and bar=%d",iCurrentLevel,iCurrentBar);
+ OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSIGNALSTRENGTH_PUBSUBCALLBACK_2, "<<CSimSignalStrength::NotifySignalStrengthChange with level=%d dB and bar=%d",(TInt)iCurrentLevel,(TInt)iCurrentBar);
iPhone->ReqCompleted(iSSChangeNotificationReqHandle,iCurrentError);
}
}