本文整理汇总了C++中LOGTEXT函数的典型用法代码示例。如果您正苦于以下问题:C++ LOGTEXT函数的具体用法?C++ LOGTEXT怎么用?C++ LOGTEXT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOGTEXT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LOGTEXT
inline TInt DMemSamplerImpl::EncodeChunkData(DThread& t)
{
LOGTEXT("MemSamplerImpl::EncodeChunkData - entry");
//LOGSTRING2("MemSamplerImpl::EncodeChunkData - processing thread 0x%x ",&t);
// the size of the following name is in the first byte
TUint8* size = &sample[0];
*size = 0;
this->sampleDescriptor.Zero();
LOGTEXT("MemSamplerImpl::EncodeChunkData - cleared");
this->sampleDescriptor.Append((TUint8*)&(t.iId),sizeof(TUint));
*size += sizeof(TUint);
// copy the total amount of memory allocated for user side stack
this->sampleDescriptor.Append((TUint8*)&(t.iUserStackSize),sizeof(TInt));
*size += sizeof(TInt);
TInt zero(0);
// append the cell amount allocated (zero, not in use here)
this->sampleDescriptor.Append((TUint8*)&zero,sizeof(TInt));
*size += sizeof(TInt);
// append the chunk size (this is not a chunk)
this->sampleDescriptor.Append((TUint8*)&(zero),sizeof(TUint));
*size += sizeof(TUint);
// append user stack (max) size
this->sampleDescriptor.Append((TUint8*)&(t.iUserStackSize),sizeof(TInt));
*size += sizeof(TInt);
LOGSTRING2("Data -> %d",*size);
return ((TInt)(*size))+1;
}
示例2: ret
TInt CATBase::ValidateExpectString()
/**
* New version ValidateExpectStringL which returns an error code
* as opposed to leaving.
* Use of this new code should hopefully remove alot of
* unesseccary TRAP harness in the TSY.
*/
{
TInt ret(KErrNone);
if(iIo->FoundChatString()!=iOKExpectString)
{
if(iIo->FoundChatString()==iErrorExpectString)
{
LOGTEXT(_L8("Modem returned ERROR in response to command"));
ret=KErrGeneral;
}
else
{
LOGTEXT(_L8("Modem returned unexpected response to command"));
ret=KErrUnknown;
}
}
return ret;
}
示例3: LOGTEXT2
void CLogServBackupManager::RunL()
//
// This method does two things
//
// 1) Keeps trying to create a backup object - which may fail on device
// bootup until the ui framework starts the backup server.
//
// 2) Handles the case where the server fails to restart correctly after a backup - it keeps trying
//
{
LOGTEXT2("CLogServBackupManager::RunL(%d)", iStatus.Int());
if (!iBackup)
{
LOGTEXT("CLogServBackupManager::RunL() - trying to create backup object");
// Keep trying to create backup object
iBackup = CreateBackupL(*iDatabaseName);
LOGTEXT("CLogServBackupManager::RunL() - backup object created okay");
}
else
{
// This branch is executed if we failed to create the backup object on our first
// attempt in BISetDatabaseNameL
LOGTEXT("CLogServBackupManager::RunL() - notifying observers about dummy backup ended event");
NotifyObservers(MLogServBackupObserver::EBackupEnded);
}
LOGTEXT("CLogServBackupManager::RunL() - end");
}
示例4: LOGTEXT
void CATCommands::Complete(TInt aError,TEventSource /*aSource*/)
//
// Should be called by all Complete()'s before ReqCompleted()
//
{
LOGTEXT(_L8("CATCommands::Complete called"));
if (aError==KErrTimedOut)
{
LOGTEXT(_L8("CATCommands::Complete KErrTimedOut error, setting EPhoneNotIntialised"));
iPhoneGlobals->iPhoneStatus.iInitStatus = EPhoneNotInitialised;
}
// Clear the flow control flag to show no AT commands are writing to the
// serial port.
iPhoneGlobals->iEventSignalActive = EFalse;
// Allow the CReceiveSmsQueue object to read PDUs from the phones memory, if needed
if(iPhoneGlobals->iReceiveSmsQueuePtr)
iPhoneGlobals->iReceiveSmsQueuePtr->ReadPDUFromPhone();
// Check the flow control flag, as the previous lines may have started off a
// AT command.
// If the flow control is clear then allow the Check ForChangeOfNetwork to have
// a go at updating its status and writing to the serial port.
if (!(iPhoneGlobals->iEventSignalActive))
iPhoneGlobals->CheckForChangeOfNetwork();
}
示例5: LOGTEXT
// ---------------------------------------------------------------------------
// CUnsolicitedEventMonitor::NotifyEveryObserver
// other items were commented in a header
// ---------------------------------------------------------------------------
void CUnsolicitedEventMonitor::NotifyEveryObserver()
{
LOGTEXT(_L8("[Ltsy] Starting CUnsolicitedEventMonitor::NotifyEveryObserver()"));
CAtCommandBase *cAtBase(NULL);
TRAPD(err, cAtBase = &GetAtCommandByAtTypeL(ELtsyAT_General_WIND));
if (err == KErrNoMemory)
{
return;
}
CATUnsolicited* unsolicited = dynamic_cast<CATUnsolicited*>(cAtBase);
if (unsolicited == NULL)
{
LOGTEXT(_L8("[Ltsy] Dynamic cast class CAtCommandBase to class CATUnsolicited failing"));
return;
}
if (unsolicited->GetParserResult() != KErrNone)
{
LOGTEXT(_L8("[Ltsy] parse unsolicited command error"));
return;
}
TUnsolicitedParams::TUnsolicitedParamsPckgBuf* pckg = (TUnsolicitedParams::TUnsolicitedParamsPckgBuf*)(&(unsolicited->GetUnsolicitedParams()));
TInt nEvent = (*pckg)().iEvent;
TInt count = iArray.Count();
for (TInt n = 0; n < count; n++)
{
MLtsyUnsolicitedCommandObserver* observer = iArray[n];
observer->UnsolicitedCommandArriving(nEvent, (*pckg));
}
}
示例6: releaseResources
int CDirectXRenderLayer::initDevice(unsigned int adapter, TRasterizationType rasterization, const TDisplayMode& displayMode)
{
if (mD3DInterface)
{
D3DDEVTYPE devType;
releaseResources();
devType = convertRasterizationTypeToDevType(rasterization);
// Filling present parameters...
memcpy(&mDeviceDisplayMode, &displayMode, sizeof(TDisplayMode));
mCurrentFormat = convertTFormatToD3DFormat(displayMode.mFormat);
ZeroMemory(&mPresentParams, sizeof(mPresentParams));
mPresentParams.Windowed = FALSE;
mPresentParams.BackBufferWidth = displayMode.mWidth;
mPresentParams.BackBufferHeight = displayMode.mHeight;
mPresentParams.BackBufferCount = 1;
mPresentParams.FullScreen_RefreshRateInHz = displayMode.mRefreshRate;
mPresentParams.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
mPresentParams.BackBufferFormat = mCurrentFormat;
/* TODO: Try to use D3DSWAPEFFECT_FLIP for better performance.
Maybe store pointers to two back buffers and then swap them
right after presentScene(). */
mPresentParams.SwapEffect = D3DSWAPEFFECT_COPY;
mPresentParams.Flags = 0;
// Creating device...
if (FAILED(mD3DInterface->CreateDevice(adapter, devType, mHwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &mPresentParams, &mD3DDevice)))
{
LOGTEXT("CDirectXRenderLayer: CreateDevice() with hardware vertex processing failed");
if (FAILED(mD3DInterface->CreateDevice(adapter, devType, mHwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &mPresentParams, &mD3DDevice)))
{
LOGTEXT("CDirectXRenderLayer: CreateDevice() with software vertex processing failed");
releaseResources();
return E_FAILED;
}
}
// Retrieving device capabilities...
if (FAILED(mD3DInterface->GetDeviceCaps(adapter, devType, &mDeviceCaps)))
{
LOGTEXT("CDirectXRenderLayer: GetDeviceCaps() failed");
releaseResources();
return E_FAILED;
}
mMaxPrimitiveCount = XMATH_MIN(mDeviceCaps.MaxPrimitiveCount, MAX_SPRITES_PER_TEXTURE * 2);
// Creating font sprite...
if (FAILED(D3DXCreateSprite(mD3DDevice, &mD3DFontSprite)))
{
LOGTEXT("CDirectXRenderLayer: D3DXCreateSprite() for font failed");
releaseResources();
return E_FAILED;
}
return resetDevice();
}
LOGTEXT("CDirectXRenderLayer: initDevice() failed");
return E_FAILED;
}
示例7: LOGTEXT
void CATBase::ParseBufferLC()
//
// Parses buffer
//
/**
* This function is currently not used by the Etel regression test harness.
*/ {
LOGTEXT(_S8("CATBase Parse the Buffer List"));
iBuffer.Set(iIo->GetRxBufferLC(iBufferMarker));
TInt pos=iBuffer.FindF(KOKString);
if(pos==KErrNotFound)
{
LOGTEXT(_S8("CATBase Error - Cannot find OK'"));
User::Leave(pos);
}
// Place everything before the OK into buffer
iBuffer.Set(iBuffer.Left(pos));
TLex8 yyLex(iBuffer);
TChar peek;
// Look for '=' sign and move seeker cursor to the right of it if it exists
pos=iBuffer.Find(_L8("="));
if (pos!=KErrNotFound)
{
yyLex.Inc(pos+1);
}
// Move cursor past any spaces or open brackets
yyLex.SkipSpace();
peek=yyLex.Peek();
if ((TUint)peek=='(' || (TUint)peek=='[' || (TUint)peek=='{')
yyLex.Inc();
yyLex.SkipSpace();
peek = yyLex.Peek();
do
{
// Search for the next character that is not a comma, and mark it. Keep looking at
// subsequent characters until it is a space,comma,closing bracket or end of string.
// Store the string (between marked character and current character) as an item in
// an array of CATParamListEntry object pointers.
if (peek!=',')
{
yyLex.Mark();
do
{
yyLex.Inc();
peek=yyLex.Peek();
}
while (peek!=',' && !peek.IsSpace() && peek!=')'&& peek!=']'&& peek!='}' && !yyLex.Eos());
CATParamListEntry* aParamListEntry = new (ELeave) CATParamListEntry(yyLex.MarkedToken());
iRxResults.AddLast(*aParamListEntry);
}
// Move cursor to the next non-space character, and end the loop if it is a closing
// bracket or the end of the buffer.
yyLex.Inc();
yyLex.SkipSpace();
peek = yyLex.Peek();
}
while (!yyLex.Eos() && peek!=')'&& peek!=']'&& peek!='}');
}
示例8: LOGTEXT
// ---------------------------------------------------------------------------
// CCommEngine::CommReadComplete
// other items were commented in a header
// ---------------------------------------------------------------------------
void CCommEngine::CommReadComplete(TInt aStatus)
{
LOGTEXT(_L8("[Ltsy] Starting CCommEngine::CommReadComplete()"));
LOGTEXT2(_L8("[Ltsy] aStatus = %d"), aStatus);
LOGTEXT2(_L8("Received %d"),iRxBuf.Length());
LOGTEXTREL2(_L8("Rx:\t%S"),&iRxBuf);
if (KErrNone == aStatus)
{
if (NULL != iStringParse)
{
iStringParse->ProcessReadString(iRxBuf);
}
CommReadOneOrMore();
}
else
{
if (NULL != iEngineObserver)
{
iEngineObserver->ReadOrWriteComplete(EReadCompletion, aStatus);
}
}
LOGTEXT(_L8("[Ltsy] End CCommEngine::CommReadComplete()"));
}
示例9: __ASSERT_ALWAYS
void CATSubscriberId::Stop(TTsyReqHandle aTsyReqHandle)
{
__ASSERT_ALWAYS(aTsyReqHandle == iReqHandle, Panic(EIllegalTsyReqHandle));
LOGTEXT(_L8("MmTsy:\tCATSubscriberId:\tCancel called."));
switch(iState)
{
case EATNotInProgress:
case EATImsiWaitForWriteComplete:
{
LOGTEXT2(_L8("Current state TSY is cancelling from %d"), iState);
Complete(KErrCancel, EReadCompletion);
}
break;
default:
{
LOGTEXT(_L8("MmTsy:\tCATSubscriberId:\tStop, now waiting for expected modem response"));
AddStdExpectStrings();
iIo->SetTimeOut(this);
iState = EATWaitForStopState;
}
break;
}
}
示例10: LOGTEXT
void CProfilerPowerListener::Sample()
{
LOGTEXT(_L("CProfilerPowerListener::Sample() - entry"));
TRequestStatus status;
CHWRMPower::TBatteryConsumptionData consumptionData;
iPowerAPI->GetBatteryInfo(status, consumptionData);
User::WaitForRequest(status);
// Data is valid only if status == KErrNone
if (status.Int() != KErrNone)
{
LOGSTRING2("CProfilerPowerListener::Sample() - Getting battery info failed with code: ", status.Int());
iNominalCapa = 0;
}
else
{
iNominalCapa = consumptionData.iNominalCapacity;
}
// Space for GPP sample time
//TUint32 sampleTime = iSampler->iStream->iSampler->GetSampleTime();
TUint32 sampleTime = User::NTickCount() - iSampleStartTime;
LOGSTRING2("CProfilerPowerListener::Sample() - Sample time: %d", sampleTime);
LOGSTRING2("CProfilerPowerListener::Sample() - Nominal capacitance: %d", iNominalCapa);
LOGSTRING2("CProfilerPowerListener::Sample() - Voltage: %d", iVoltage);
LOGSTRING2("CProfilerPowerListener::Sample() - Current: %d", iCurrent);
#ifdef PWR_SAMPLER_BACKLIGHT
LOGSTRING2("CProfilerPowerListener::Sample() - Backlight status: %d", (TUint8)iBackLightStatus);
#endif
iSample[0] = iNominalCapa;
iSample[1] = iNominalCapa >> 8;
iSample[2] = iVoltage;
iSample[3] = iVoltage >> 8;
iSample[4] = iCurrent;
iSample[5] = iCurrent >> 8;
iSample[6] = iCurrent >> 16;
iSample[7] = iCurrent >> 24;
#ifdef PWR_SAMPLER_BACKLIGHT
iSample[8] = (TUint8)iBackLightStatus;
iSample[9] = sampleTime;
iSample[10] = sampleTime >> 8;
iSample[11] = sampleTime >> 16;
iSample[12] = sampleTime >> 24;
iSampler->AddSample(iSample, 13, 0);
#else
iSample[8] = sampleTime;
iSample[9] = sampleTime >> 8;
iSample[10] = sampleTime >> 16;
iSample[11] = sampleTime >> 24;
iSampler->AddSample(iSample, 12, 0);
#endif
LOGTEXT(_L("CProfilerPowerListener::Sample() - exit"));
}
示例11: LOGTEXT
TInt CMobilePhonebookStore::Read(TTsyReqHandle aTsyReqHandle, RMobilePhoneBookStore::TPBIndexAndNumEntries* aIndexAndEntries, TDes8* aPBData)
/** Read one or a number of Phone Book Enties
*
* This function reads the phone book entries from the current
* phone book store.
* @param aTsyReqHandle Handle to the request ID.
* @param aIndexAndEntries is a pointer to an index and a number of entries.
* @param aPBData is a pointer to a packet.
* @return error code.
*/
{
LOGTEXT(_L8("CMobilePhonebookStore::Read called"));
if (!(iReadWriteAccess&RMobilePhoneStore::KCapsReadAccess))
{
LOGTEXT(_L8("CMobilePhonebookStore::Read Completing with KErrAccessDenied as read access is not allowed"));
ReqCompleted(aTsyReqHandle,KErrAccessDenied);
return KErrNone;
}
iRead->SetPBData(aPBData);
// Store index & number of entries so we can modify/truncate it if required
iIndexAndEntries=*aIndexAndEntries;
// If we already have information about this phonebook
// Check client has supplied valid locations - otherwise send command anyway
if (iInfo->Completed())
{
// Allow CATPhoneBookInfo to map our clients index value (1..x)
// the this specific phone store index values (1+y..x+y)
// For the Motorola T260 SM phone book store y will be 100
LOGTEXT(_L8("CMobilePhonebookStore::Read Mapping clients index to phone index"));
iInfo->MapClientIndexToPhoneIndex(iIndexAndEntries.iIndex);
if (iInfo->IsValidPhoneIndex(iIndexAndEntries.iIndex))
{
if (!iInfo->IsValidPhoneIndex(iIndexAndEntries.iIndex+iIndexAndEntries.iNumSlots-1))
{
// Invalid finishing index - truncate to last valid one
iIndexAndEntries.iNumSlots = iInfo->TotalEntries()-iIndexAndEntries.iIndex+1 ;
}
}
else
{
// Invalid starting index - complete request with error
LOGTEXT(_L8("CMobilePhonebookStore::Read\t Index out of range"));
ReqCompleted(aTsyReqHandle,KErrArgument); // The Index is out of range.
return KErrNone;
}
}
// We either have valid index or entries - or are trying anyway
iRead->ExecuteCommand(aTsyReqHandle, &iIndexAndEntries);
return KErrNone;
}
示例12: LOGTEXT
/**
Creates config and string LogEng caches. Finishes the initialization of the event types cache.
@leave KErrNoMemory, an out of memory condition has occurred;
Note that the function may leave with database specific errors or
other system-wide error codes.
*/
void CLogServDatabaseMarshall::CreateCachesL()
{
// Create other cache objects (these require the database to be already opened)
LOGTEXT("CLogServDatabaseMarshall::DatabaseOpenL() - creating config cache");
iCacheConfig = CLogServCacheConfig::NewL(*this);
LOGTEXT("CLogServDatabaseMarshall::DatabaseOpenL() - creating string cache");
iCacheStrings = CLogServCacheStrings::NewL(*this);
// Finish the type cache initialization
LOGTEXT("CLogServDatabaseMarshall::DatabaseOpenL() - initializing type cache");
iCacheTypes->InitializeL();
}
示例13: LOGTEXT
void CStringParser::ProcessReadString(const TDesC8& aReadString)
{
LOGTEXT(_L8("[Ltsy] Starting CStringParse::ProcessReadString()"));
LOGTEXT2(_L8("[Ltsy] Read String = %S"), &aReadString);
for (TInt nBufferOffset = 0; nBufferOffset < aReadString.Length(); nBufferOffset++)
{
TText8 tChar = aReadString[nBufferOffset];
// we have already found a char which is a delimiter of the Line
// so would dismiss any of delimiter following this one already found
if (iInDelimiter && (tChar == '\r' || tChar == '\n'))
{
continue;
}
// move on lastchar
*iLastChar++ = tChar;
// Diacarding characters if our buffer was overflowed
if (iLastChar >= iBufferEnd)
{
iLastChar = iBufferEnd;
}
// we anyway to find out the delimiter and notify the obser the line was found
if (tChar == '\r' || tChar == '\n')
{
iInDelimiter = ETrue;
TPtrC8 tLine(CurrentLine());
LOGTEXT2(_L8("[Ltsy] Line Content = %S"), &tLine);
TRAPD(err, iReadLineNotify->NotifyOneLineFoundL(KErrNone, tLine));
if (err != KErrNone)
{
ClearCurrentLine();
}
}
else
{
if(iInDelimiter) // the last char is a delimiter
{
iInDelimiter=EFalse;
iLineStart=iLastChar-1;
if(tChar == '>')
{
TPtrC8 tLine(CurrentLine());
TRAPD(err, iReadLineNotify->NotifyOneLineFoundL(KErrNone, tLine));
if (err != KErrNone)
{
ClearCurrentLine();
}
}
}
}
}
LOGTEXT(_L8("[Ltsy] End CStringParse::ProcessReadString()"));
}
示例14: LOGTEXT
void CATGprsDetach::Stop(TTsyReqHandle aTsyReqHandle)
/**
* This function attempts to cancel the AT state machine
*/
{
LOGTEXT(_L8("CATGprsDetach::Stop called"));
if(iState!=EATNotInProgress && aTsyReqHandle==iReqHandle)
{
LOGTEXT(_L8("CATGprsDetach::Stop Completing client request with KErrCancel"));
Complete(KErrCancel,ETimeOutCompletion);
}
}
示例15: LOGTEXT3
// ---------------------------------------------------------------------------
// CAtPhbkEnGetInfo::EventSignal
// other items were commented in a header
// ---------------------------------------------------------------------------
void CAtPhbkEnGetInfo::EventSignal(TAtEventSource aEventSource, TInt aStatus)
{
LOGTEXT3(_L8("CAtPhbkEnGetInfo::EventSignal aStatus=%D iSource=%D"),aStatus,aEventSource);
if(aStatus != KErrNone)
{
Complete();
iPhoneGlobals.iEventSignalActive = EFalse;
iCtsyDispatcherCallback.CallbackPhonebookEnStoreGetInfoComp(aStatus,iUsed);
}
else
{
if( aEventSource == EWriteCompletion )
{
LOGTEXT(_L8("CAtPhbkEnGetInfo::EventSignal,EWriteCompletion!"));
if( iState==ESetEnStore )
{
iState = ESetEnStoreComplete;
}
else if( iState==EGetEnStoreInfo )
{
iState = EGetEnStoreInfoComplete;
}
}
else
{
LOGTEXT(_L8("CAtPhbkEnGetInfo::EventSignal,EReadCompletion!"));
if( iState == ESetEnStoreComplete )
{
Complete();
iPhoneGlobals.iEventSignalActive = EFalse;
if(iError == KErrNone)
{
iState = EGetEnStoreInfo;
GetEnStoreInfo();
}
else
{
iCtsyDispatcherCallback.CallbackPhonebookEnStoreGetInfoComp(iError,iUsed);
}
}
else if( iState == EGetEnStoreInfoComplete )
{
Complete();
iPhoneGlobals.iEventSignalActive = EFalse;
iCtsyDispatcherCallback.CallbackPhonebookEnStoreGetInfoComp(iError,iUsed);
}
}
}
}