diff -r 630d2f34d719 -r 07a122eea281 basebandadaptationplugins/basebandchanneladaptorforc32/c32bca2/src/C32Bca.cpp --- a/basebandadaptationplugins/basebandchanneladaptorforc32/c32bca2/src/C32Bca.cpp Tue Aug 31 16:23:08 2010 +0300 +++ b/basebandadaptationplugins/basebandchanneladaptorforc32/c32bca2/src/C32Bca.cpp Wed Sep 01 12:40:21 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-2009 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" @@ -21,12 +21,6 @@ @internalComponent */ - -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "C32BcaTraces.h" -#endif - #include "C32Bca.h" #include #include @@ -50,12 +44,14 @@ iPort(aPort) { CActiveScheduler::Add(this); + __FLOG_OPEN(KC32BcaLogFolder, KC32BcaLogFile); // Connect to the BCA logger } /** C++ destructor */ CCommBase::~CCommBase() { + __FLOG_CLOSE; } /** @@ -177,7 +173,7 @@ void CCommLinkMonitor::Setup(TUint32 aMask) { iNotifyChangeSignalMask = aMask; - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCOMMLINKMONITOR_SETUP1_1, "CommLinkMonitor setup: Notify on signal mask [0x%X]",iNotifyChangeSignalMask); + __FLOG_1(_L8("CommLinkMonitor setup: Notify on signal mask [0x%X]"),iNotifyChangeSignalMask); } /** @@ -193,7 +189,7 @@ iSavedSignalState = iPort.Signals(iNotifyChangeSignalMask) & iNotifyChangeSignalMask; iPort.NotifySignalChange(iStatus, iSignals, iNotifyChangeSignalMask); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCOMMLINKMONITOR_NOTIFYLINKDOWN1_1, "CommLinkMonitor::NotifyLinkDown: initial signals: [0x%X]", iSavedSignalState); + __FLOG_1(_L8("CommLinkMonitor::NotifyLinkDown: initial signals: [0x%X]"), iSavedSignalState); SetActive(); } @@ -203,7 +199,7 @@ */ void CCommLinkMonitor::RunL() { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCOMMLINKMONITOR_RUNL1_1, "CommLinkMonitor::RunL: Signals changed [0x%X]; new signals [0x%X]", iSignals & (~0x1F), iSignals & 0x1F); + __FLOG_2(_L8("CommLinkMonitor::RunL: Signals changed [0x%X]; new signals [0x%X]"), iSignals & (~0x1F), iSignals & 0x1F); // We report link failure if and only if a monitored line went from high to low. // Method: mask the saved signals using inverted monitored bits in the signal bitmask, @@ -224,7 +220,7 @@ Cancels notification request of link failure */ void CCommLinkMonitor::DoCancel() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCOMMLINKMONITOR_DOCANCEL1_1, "CommLinkMonitor::DoCancel: Cancelling signal change notification."); + __FLOG(_L8("CommLinkMonitor::DoCancel: Cancelling signal change notification.")); iPort.NotifySignalChangeCancel(); } @@ -237,7 +233,8 @@ */ CC32Bca::CC32Bca() { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CTOR1_1, "====== CC32Bca::CC32Bca: Shim BCA for C32 [Vesion: major= %d minor= %d] Constructed. ======", KC32BcaMajorVersionNumber, KC32BcaMinorVersionNumber); + __FLOG_OPEN(KC32BcaLogFolder,KC32BcaLogFile); + __FLOG_2(_L8("====== CC32Bca::CC32Bca: Shim BCA for C32 [Vesion: major= %d minor= %d] Constructed. ======"), KC32BcaMajorVersionNumber, KC32BcaMinorVersionNumber); } /** @@ -263,7 +260,7 @@ CC32Bca::~CC32Bca() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_DTOR1_1, "CC32Bca::~CC32Bca: releasing resources..."); + __FLOG(_L8("CC32Bca::~CC32Bca: releasing resources...")); CloseCommDbConnection(); CloseCommPort(); // Cancels reader / writer / monitor @@ -275,13 +272,14 @@ delete iWriter; delete iLinkMonitor; // Note: may have never been created. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_DTOR1_2, "CC32Bca::~CC32Bca: CC32Bca destroyed."); + __FLOG(_L8("CC32Bca::~CC32Bca: CC32Bca destroyed.")); + __FLOG_CLOSE; } /** This method deletes the BCA itself.*/ void CC32Bca::Release() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_RELEASE1_1, "CC32Bca::Release"); + __FLOG(_L8("CC32Bca::Release")); delete this; } @@ -301,7 +299,7 @@ TRequestStatus* ptrStatus = &aStatus; if(iCommPortOpen) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_1, "Warning: C32Bca is already Opened."); + __FLOG(_L8("Warning: C32Bca is already Opened.")); User::RequestComplete(ptrStatus,KErrNone); return; @@ -322,12 +320,12 @@ // So, we just log a warning. if(KErrNone == commPortErr && iCommPort.Size() == 0) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_2, "Warning: Null string read from CommDB. Will try to open Comm Port anyway."); + __FLOG(_L8("Warning: Null string read from CommDB. Will try to open Comm Port anyway.")); } if(KErrNone != commPortErr) // Fatal: we do not have a port name. Can't open RComm. { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_3, "Error: Failed to get C32 PortName from CommDB "); + __FLOG(_L8("Error: Failed to get C32 PortName from CommDB ")); CloseCommDbConnection(); User::RequestComplete(ptrStatus, commPortErr); return; @@ -340,7 +338,7 @@ if (len1 < KErrNone) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_4, "** ERROR: No :: (Double Colon) in aChannelId **"); + __FLOG(_L8("** ERROR: No :: (Double Colon) in aChannelId **")); User::RequestComplete(ptrStatus, KErrBadName); return; } @@ -371,7 +369,7 @@ { // We do not use a hardcoded value (e.g. ECUART), because the client code or the environment are // confused - it is better to fail them, rather than mask their problems. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_5, "Error: Failed to get CSY name from CommDB "); + __FLOG(_L8("Error: Failed to get CSY name from CommDB ")); CloseCommDbConnection(); User::RequestComplete(ptrStatus,getCsyErr); return; @@ -401,13 +399,13 @@ TInt ret = iCommServ.Connect(); if(ret) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_6, "Open: C32 Server connection error %d", ret); + __FLOG_1(_L8("Open: C32 Server connection error %d"), ret); User::RequestComplete(ptrStatus,ret); return; } ret = iCommServ.LoadCommModule(iCsyName); - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_7, "Open: CSY module [%S] loaded with error %d", iCsyName, ret); + __FLOG_2(_L16("Open: CSY module [%S] loaded with error %d"), &iCsyName, ret); if(ret) { @@ -424,7 +422,7 @@ ret = iComm.Open(iCommServ, iCommPort, ECommShared, iCommRole); } - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_OPEN1_8, "Open: C32 port [%S] opened with error %d", iCommPort, ret); + __FLOG_2(_L16("Open: C32 port [%S] opened with error %d"), &iCommPort, ret); if(ret) { @@ -462,7 +460,7 @@ TRequestStatus* request = &aStatus; User::RequestComplete(request, KErrNone); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_SHUTDOWN1_1, "C32Bca::Shutdown: BCA shut down with error %d", KErrNone); + __FLOG_1(_L8("C32Bca::Shutdown: BCA shut down with error %d"), KErrNone); } /** @@ -472,7 +470,7 @@ void CC32Bca::Close() { CloseCommPort(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CLOSE1_1, "C32Bca::Close:Close: BCA closed with error %d", KErrNone); + __FLOG_1(_L8("C32Bca::Close:Close: BCA closed with error %d"), KErrNone); } /** @@ -527,7 +525,7 @@ void CC32Bca:: CancelRead() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CANCELREAD_1, "CancelRead: Read is cancelled by client."); + __FLOG(_L8("CancelRead: Read is cancelled by client.")); iReader->Cancel(); if(iReadRequest != NULL) @@ -542,7 +540,7 @@ void CC32Bca::CancelWrite() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CANCELWRITE1_1, "CancelWrite: Write is cancelled by client."); + __FLOG(_L8("CancelWrite: Write is cancelled by client.")); iWriter->Cancel(); @@ -554,7 +552,7 @@ // Debug dumps: -#ifdef OST_TRACE_COMPILER_IN_USE +#ifdef __FLOG_ACTIVE _LIT8(KLitOptLevelGeneric, "KBcaOptLevelGeneric"); _LIT8(KLitOptLevelExtSerial, "KBcaOptLevelExtSerial"); @@ -639,9 +637,22 @@ return KLitOptNameUnsupported; } } -#endif // OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG +#endif // __FLOG_ACTIVE +#ifdef __FLOG_ACTIVE +/** +Print debug output of the TCommComfig parameters. + +@param The configuration whose parameters should be logged. +*/ +void CC32Bca::LogCommConfig(TCommConfig& c) + { + __FLOG_5(_L8("Rate[%d] DataBits[%d] StopBits[%d] Parity[%d] Handshake[0x%x]"), c().iRate, c().iDataBits, c().iStopBits, c().iParity, c().iHandshake); + __FLOG_4(_L8("ParityError[%d] Fifo[%d] SpecialRate[%d] terminatorCount[%d]"), c().iParityError, c().iFifo, c().iSpecialRate, c().iTerminatorCount); + __FLOG_1(_L8("Terminator[0x%x]"), c().iTerminator); + } +#endif // __FLOG_ACTIVE /** @@ -655,7 +666,7 @@ void CC32Bca::Ioctl(TRequestStatus& aStatus, TUint aOptLevel, TUint aOptName, TDes8& aOpt) { - OstTraceDefExt4(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_1, "Ioctl: Level[%s](0x%X) Name[%s](0x%X).", IoctlOptLevelStr(aOptLevel), aOptLevel, IoctlOptNameStr(aOptName), aOptName); + __FLOG_4(_L8("Ioctl: Level[%S](0x%X) Name[%S](0x%X)."), &IoctlOptLevelStr(aOptLevel), aOptLevel, &IoctlOptNameStr(aOptName), aOptName); aStatus = KRequestPending; @@ -685,7 +696,7 @@ { TUint32 tempIapId = *(reinterpret_cast(aOpt.Ptr())); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_2, "Ioctl: IAP ID [%d] specified.",tempIapId); + __FLOG_1(_L8("Ioctl: IAP ID [%d] specified."),tempIapId); if(tempIapId < 1 ) { @@ -734,15 +745,14 @@ case KSerialConfig: { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_3, "Ioctl: KSerialConfig"); + __FLOG(_L8("Ioctl: KSerialConfig")); TCommConfig cfg; iComm.Config(cfg); - OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_4, "Rate[%d] DataBits[%d] StopBits[%d]", cfg().iRate, cfg().iDataBits, cfg().iStopBits); - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_5, "Parity[%d] Handshake[0x%x]", cfg().iParity, cfg().iHandshake); - OstTraceDefExt4(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_6, "ParityError[%d] Fifo[%d] SpecialRate[%d] terminatorCount[%d]", cfg().iParityError, cfg().iFifo, cfg().iSpecialRate, cfg().iTerminatorCount); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_7, "Terminator[0x%x]", cfg().iTerminator); +#ifdef __FLOG_ACTIVE + LogCommConfig(cfg); +#endif // __FLOG_ACTIVE TPckgBuf cfgBuf(cfg); aOpt.Copy(cfgBuf); @@ -751,15 +761,13 @@ case KSerialSetConfig: { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_8, "Ioctl: KSerialSetConfig"); + __FLOG(_L8("Ioctl: KSerialSetConfig")); TCommConfig cfg(*(reinterpret_cast(aOpt.Ptr()))); - OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_9, "Rate[%d] DataBits[%d] StopBits[%d]", cfg().iRate, cfg().iDataBits, cfg().iStopBits); - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_10, "Parity[%d] Handshake[0x%x]", cfg().iParity, cfg().iHandshake); - OstTraceDefExt4(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_11, "ParityError[%d] Fifo[%d] SpecialRate[%d] terminatorCount[%d]", cfg().iParityError, cfg().iFifo, cfg().iSpecialRate, cfg().iTerminatorCount); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_12, "Terminator[0x%x]", cfg().iTerminator); - +#ifdef __FLOG_ACTIVE + LogCommConfig(cfg); +#endif // __FLOG_ACTIVE ret = iComm.SetConfig(cfg); break; @@ -779,11 +787,11 @@ reinterpret_cast(aOpt.Ptr()) )); iCsyNameOverride = ETrue; - OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_13, "Ioctl: CSY Name set to [%S]", iCsyName); + __FLOG_1(_L8("Ioctl: CSY Name set to [%S]"), &iCsyName); } else { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_14, "Ioctl: Warning: Cannot set the CSY name because the Comm Port is already open."); + __FLOG(_L8("Ioctl: Warning: Cannot set the CSY name because the Comm Port is already open.")); ret = KErrAlreadyExists; } @@ -796,11 +804,11 @@ { iCommRole = *(reinterpret_cast(aOpt.Ptr())); iCommRoleOverride = ETrue; - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_15, "Ioctl: Comm Role set to [%d]", iCommRole); + __FLOG_1(_L8("Ioctl: Comm Role set to [%d]"), iCommRole); } else { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_16, "Ioctl: Warning: Cannot set Comm Role because the Comm Port is already open."); + __FLOG(_L8("Ioctl: Warning: Cannot set Comm Role because the Comm Port is already open.")); ret = KErrAlreadyExists; } break; @@ -809,7 +817,7 @@ case KSerialSetTxRxBufferSize: { TInt bufSize = *(reinterpret_cast(aOpt.Ptr())); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_17, "Ioctl: Setting Rx Tx buffer size to [%d]", bufSize); + __FLOG_1(_L8("Ioctl: Setting Rx Tx buffer size to [%d]"), bufSize); iComm.SetReceiveBufferLength(bufSize); break; @@ -830,7 +838,7 @@ else { const TSerialSetControlLines& lines = *(reinterpret_cast(aOpt.Ptr())); - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_18, "Ioctl: Setting/clearing control lines %x/%x", lines.iSetMask, lines.iClearMask); + __FLOG_2(_L8("Ioctl: Setting/clearing control lines %x/%x"), lines.iSetMask, lines.iClearMask); iComm.SetSignals(lines.iSetMask, lines.iClearMask); ret = KErrNone; } @@ -847,7 +855,7 @@ } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_IOCTL1_19, "Ioctl completed with error %d", ret); + __FLOG_1(_L8("Ioctl completed with error %d"), ret); TRequestStatus* ptrStatus = &aStatus; User::RequestComplete(ptrStatus, ret); @@ -863,7 +871,7 @@ */ void CC32Bca::MonitorControlLinesL(TUint32 aArgMask) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_MONITORCONTROLLINESL1_1, "Ioctl: argument bitmask = [0x%X] ", aArgMask); + __FLOG_1(_L8("Ioctl: argument bitmask = [0x%X] "), aArgMask); if(iLinkMonitor) // We may have never started... { @@ -873,12 +881,12 @@ if(KMonitorOff == aArgMask) // Stop monitoring: { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_MONITORCONTROLLINESL1_2, "MonitorControlLinesL: Stopping Control Lines monitoring."); + __FLOG(_L8("MonitorControlLinesL: Stopping Control Lines monitoring.")); // We either never started, or we just cancelled above. } else // Start Monitoring, or change the monitored lines. { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_MONITORCONTROLLINESL1_3, "MonitorControlLinesL: Starting to monitor Control Lines."); + __FLOG(_L8("MonitorControlLinesL: Starting to monitor Control Lines.")); if(!iLinkMonitor) // We are starting to monitor for the first time { @@ -927,7 +935,7 @@ iLinkMonitor->Setup(lineMask); iLinkMonitor->NotifyLinkDown(); - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_MONITORCONTROLLINESL1_4, "MonitorControlLinesL: Control Lines monitoring started."); + __FLOG(_L8("MonitorControlLinesL: Control Lines monitoring started.")); } } @@ -945,7 +953,7 @@ @leave if the value could not be read */ void CC32Bca::ReadCommPortFromCommDbL(TDes& aPortName) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_READCOMMPORTFROMCOMMDBL1_1, "CC32Bca::ReadCommPortFromCommDbL()"); + __FLOG(_L8("CC32Bca::ReadCommPortFromCommDbL()")); ConnectToCommDbBearerRecordL(); TInt ret(0); @@ -958,7 +966,7 @@ if(ret!=KErrNone) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_READCOMMPORTFROMCOMMDBL1_2, "portField->LoadL(*iCommsDat) left with[%d] ", ret); + __FLOG_1(_L8("portField->LoadL(*iCommsDat) left with[%d] "), ret); User::Leave(ret); } @@ -972,7 +980,7 @@ @leave if the value could not be read */ void CC32Bca::ReadCsyNameFromCommDbL(TDes& aCsyName) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_READCSYNAMEFROMCOMMDBL1_1, "CC32Bca::ReadCsyNameFromCommDbL()"); + __FLOG(_L8("CC32Bca::ReadCsyNameFromCommDbL()")); ConnectToCommDbBearerRecordL(); TInt ret(0); @@ -985,7 +993,7 @@ if(ret!=KErrNone) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_READCSYNAMEFROMCOMMDBL1_2, "csyField->LoadL(*iCommsDat) left with[%d] ", ret); + __FLOG_1(_L8("csyField->LoadL(*iCommsDat) left with[%d] "), ret); User::Leave(ret); } @@ -1000,7 +1008,7 @@ @leave if the value could not be read */ void CC32Bca::ReadCommRoleFromCommDbL(TCommRole& aCommRole) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_READCOMMROLEFROMCOMMDBL1_1, "CC32Bca::ReadCommRoleFromCommDbL()"); + __FLOG(_L8("CC32Bca::ReadCommRoleFromCommDbL()")); ConnectToCommDbBearerRecordL(); TUint32 role(0); @@ -1013,7 +1021,7 @@ if(ret!=KErrNone) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_READCOMMROLEFROMCOMMDBL1_2, "roleField->LoadL(*iCommsDat) left with[%d] ", ret); + __FLOG_1(_L8("roleField->LoadL(*iCommsDat) left with[%d] "), ret); User::Leave(ret); } @@ -1031,7 +1039,7 @@ */ void CC32Bca::ConnectToCommDbBearerRecordL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CONNECTTOCOMMDBBEARERRECORDL1_1, "CC32Bca::ConnectToCommDbBearerRecordL()"); + __FLOG(_L8("CC32Bca::ConnectToCommDbBearerRecordL()")); if(iCommsDat != NULL) // CommDB is already open, we don't need to do anything { return; @@ -1039,7 +1047,7 @@ if(iIapId < 1) // Can't access CommDB if IAP ID is unknown { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CONNECTTOCOMMDBBEARERRECORDL1_2, "iIapId[%d] is unknown", iIapId); + __FLOG_1(_L8("iIapId[%d] is unknown"), iIapId); User::Leave(KErrNotReady); } @@ -1072,7 +1080,7 @@ TRAPD(ret,iapRecord->LoadL(*iCommsDat)); if (ret != KErrNone) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CONNECTTOCOMMDBBEARERRECORDL1_3, "iapRecord->LoadL(*iCommsDat) left with[%d] ", ret); + __FLOG_1(_L8("iapRecord->LoadL(*iCommsDat) left with[%d] "), ret); User::Leave(ret); } @@ -1092,7 +1100,7 @@ if(iModemId == 0) // ID not found. { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CONNECTTOCOMMDBBEARERRECORDL1_4, "iModemId[%d] is not found", iModemId); + __FLOG_1(_L8("iModemId[%d] is not found"), iModemId); User::Leave(KErrNotFound); } } @@ -1101,7 +1109,7 @@ /** Cancels an outstanding Ioctl, if any. */ void CC32Bca::CancelIoctl() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CANCELIOCTL1_1, "CancelIoctl(): Ioctl cancel request. No Ioctl to cancel."); + __FLOG(_L8("CancelIoctl(): Ioctl cancel request. No Ioctl to cancel.")); } @@ -1128,7 +1136,7 @@ iCommServ.Close(); iCommPortOpen = EFalse; } - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_CLOSECOMMPORT1_1, "CloseCommPort(): Session with C32 & RComm closed."); + __FLOG(_L8("CloseCommPort(): Session with C32 & RComm closed.")); } /** @@ -1137,7 +1145,7 @@ */ void C32Bca::Panic(TC32BcaPanic aPanic) { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_PANIC1_1, "%S Panic %d", KC32BcaPanic(), aPanic); + __FLOG_STATIC2(KC32BcaLogFolder,KC32BcaLogFile,_L8("%S Panic %d"), &KC32BcaPanic(), aPanic); User::Panic(KC32BcaPanic, aPanic); } @@ -1165,7 +1173,7 @@ // Upcall from the link monitor: Link has gone down. void CC32Bca::CommLinkDown(TInt aErr) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CC32BCA_COMMLINKDOWN1_1, "CommLinkDown: Warning: serial link has gone down with error[%d]. Erroring the outstanding Read & Write.", aErr); + __FLOG_1(_L8("CommLinkDown: Warning: serial link has gone down with error[%d]. Erroring the outstanding Read & Write."), aErr); __ASSERT_DEBUG(KErrNone != aErr, Panic(EGeneralLogicError)); // If KErrNone, use has no way to know that the read has failed. if(iReader->IsActive())