serialserver/serialportcsy/ECUARTLOG.CPP
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2006-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 #include <e32std.h>
       
    17 #include "ECUARTLOG.H"
       
    18 
       
    19 #if (defined __FLOG_ACTIVE)
       
    20 
       
    21 _LIT8(KLitEBadUnit,              "EBadUnit");
       
    22 _LIT8(KLitECancelNotOutstanding, "ECancelNotOutstanding");
       
    23 _LIT8(KLitEWrongRole,            "EWrongRole");
       
    24 _LIT8(KLitENegativeCount,        "ENegativeCount");
       
    25 _LIT8(KLitFaultUnspecified,      "**FaultUnspecified**");
       
    26 
       
    27 /**
       
    28 Returns a string for a TCommFault reason
       
    29 
       
    30 @param aFault TCommFault reason
       
    31 @return String name representation of aFault
       
    32 */
       
    33 const TDesC8& TECUARTLOG::CommFaultStr(const TCommFault& aFault)
       
    34 	{
       
    35 	switch(aFault)
       
    36 		{
       
    37 	case EBadUnit:
       
    38 		return KLitEBadUnit;
       
    39 	case ECancelNotOutstanding:
       
    40 		return KLitECancelNotOutstanding;
       
    41 	case EWrongRole:
       
    42 		return KLitEWrongRole;
       
    43 	case ENegativeCount:
       
    44 		return KLitENegativeCount;
       
    45 	default:
       
    46 		return KLitFaultUnspecified;
       
    47 		}
       
    48 	}
       
    49 	
       
    50 #endif // __FLOG_ACTIVE
       
    51 
       
    52 
       
    53 
       
    54