os/boardsupport/haitest/bspsvs/suite/e32/src/T_TCommConfigV01Data.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/e32/src/T_TCommConfigV01Data.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,737 @@
     1.4 +/*
     1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +#include "T_TCommConfigV01Data.h"
    1.22 +
    1.23 +/*@{*/
    1.24 +_LIT(KStrNull,								" ");
    1.25 +
    1.26 +_LIT(KCmdConstructor,						"new");
    1.27 +_LIT(KCmdDestructor,						"~");
    1.28 +_LIT(KCmdiDataBits,							"iDataBits");
    1.29 +_LIT(KCmdiFifo,								"iFifo");
    1.30 +_LIT(KCmdiHandshake,						"iHandshake");
    1.31 +_LIT(KCmdiParity,							"iParity");
    1.32 +_LIT(KCmdiParityError,						"iParityError");
    1.33 +_LIT(KCmdiParityErrorChar,					"iParityErrorChar");
    1.34 +_LIT(KCmdiRate,								"iRate");
    1.35 +_LIT(KCmdiSIREnable,						"iSIREnable");
    1.36 +_LIT(KCmdiSIRSettings,						"iSIRSettings");
    1.37 +_LIT(KCmdiSpecialRate,						"iSpecialRate");
    1.38 +_LIT(KCmdiStopBits,							"iStopBits");
    1.39 +_LIT(KCmdiTerminator,						"iTerminator");
    1.40 +_LIT(KCmdiTerminatorCount,					"iTerminatorCount");
    1.41 +_LIT(KCmdiXoffChar,							"iXoffChar");
    1.42 +_LIT(KCmdiXonChar,							"iXonChar");
    1.43 +
    1.44 +_LIT(KFldExpected,							"expected");
    1.45 +_LIT(KFldExpectedIndex,						"expected%d");
    1.46 +_LIT(KFldValue,								"value");
    1.47 +_LIT(KFldValueIndex,						"value%d");
    1.48 +
    1.49 +_LIT(KLogError,								"Error=%d");
    1.50 +_LIT(KLogErrorExpectedValue,				"Expected Value does not match actual");
    1.51 +/*@}*/
    1.52 +
    1.53 +_LIT(KStrEData5,							"EData5");
    1.54 +_LIT(KStrEData6,							"EData6");
    1.55 +_LIT(KStrEData7,							"EData7");
    1.56 +_LIT(KStrEData8,							"EData8");
    1.57 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableDataBits[] =
    1.58 +	{
    1.59 +//	Enum as a descriptor					Enum
    1.60 +	KStrEData5,								EData5,
    1.61 +	KStrEData6,								EData6,
    1.62 +	KStrEData7,								EData7,
    1.63 +	KStrEData8,								EData8,
    1.64 +	KStrNull,								-1
    1.65 +	};
    1.66 +
    1.67 +_LIT(KStrEFifoEnable,						"EFifoEnable");
    1.68 +_LIT(KStrEFifoDisable,						"KStrEFifoDisable");
    1.69 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableFifo[] =
    1.70 +	{
    1.71 +//	Enum as a descriptor					Enum
    1.72 +	KStrEFifoEnable,						EFifoEnable,
    1.73 +	KStrEFifoDisable,						EFifoDisable,
    1.74 +	KStrNull,								-1
    1.75 +	};
    1.76 +
    1.77 +_LIT(KStrKConfigObeyXoff,					"KConfigObeyXoff");
    1.78 +_LIT(KStrKConfigSendXoff,					"KConfigSendXoff");
    1.79 +_LIT(KStrKConfigObeyCTS,					"KConfigObeyCTS");
    1.80 +_LIT(KStrKConfigFailCTS,					"KConfigFailCTS");
    1.81 +_LIT(KStrKConfigObeyDSR,					"KConfigObeyDSR");
    1.82 +_LIT(KStrKConfigFailDSR,					"KConfigFailDSR");
    1.83 +_LIT(KStrKConfigObeyDCD,					"KConfigObeyDCD");
    1.84 +_LIT(KStrKConfigFailDCD,					"KConfigFailDCD");
    1.85 +_LIT(KStrKConfigFreeRTS,					"KConfigFreeRTS");
    1.86 +_LIT(KStrKConfigFreeDTR,					"KConfigFreeDTR");
    1.87 +_LIT(KStrKConfigObeyDTR,					"KConfigObeyDTR");
    1.88 +_LIT(KStrKConfigFailDTR,					"KConfigFailDTR");
    1.89 +_LIT(KStrKConfigObeyRTS,					"KConfigObeyRTS");
    1.90 +_LIT(KStrKConfigFailRTS,					"KConfigFailRTS");
    1.91 +_LIT(KStrKConfigFreeDSR,					"KConfigFreeDSR");
    1.92 +_LIT(KStrKConfigFreeCTS,					"KConfigFreeCTS");
    1.93 +_LIT(KStrKConfigFreeDCD,					"KConfigFreeDCD");
    1.94 +_LIT(KStrKConfigFreeRI,						"KConfigFreeRI");
    1.95 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableHandshake[] =
    1.96 +	{
    1.97 +//	Enum as a descriptor					Enum
    1.98 +	KStrKConfigObeyXoff,					KConfigObeyXoff,
    1.99 +	KStrKConfigSendXoff,					KConfigSendXoff,
   1.100 +	KStrKConfigObeyCTS,						KConfigObeyCTS,
   1.101 +	KStrKConfigFailCTS,						KConfigFailCTS,
   1.102 +	KStrKConfigObeyDSR,						KConfigObeyDSR,
   1.103 +	KStrKConfigFailDSR,						KConfigFailDSR,
   1.104 +	KStrKConfigObeyDCD,						KConfigObeyDCD,
   1.105 +	KStrKConfigFailDCD,						KConfigFailDCD,
   1.106 +	KStrKConfigFreeRTS,						KConfigFreeRTS,
   1.107 +	KStrKConfigFreeDTR,						KConfigFreeDTR,
   1.108 +	KStrKConfigObeyDTR,						KConfigObeyDTR,
   1.109 +	KStrKConfigFailDTR,						KConfigFailDTR,
   1.110 +	KStrKConfigObeyRTS,						KConfigObeyRTS,
   1.111 +	KStrKConfigFailRTS,						KConfigFailRTS,
   1.112 +	KStrKConfigFreeDSR,						KConfigFreeDSR,
   1.113 +	KStrKConfigFreeCTS,						KConfigFreeCTS,
   1.114 +	KStrKConfigFreeDCD,						KConfigFreeDCD,
   1.115 +	KStrKConfigFreeRI,						KConfigFreeRI,
   1.116 +	KStrNull,								-1
   1.117 +	};
   1.118 +
   1.119 +_LIT(KStrEParityNone,						"EParityNone");
   1.120 +_LIT(KStrEParityEven,						"EParityEven");
   1.121 +_LIT(KStrEParityOdd,						"EParityOdd");
   1.122 +_LIT(KStrEParityMark,						"EParityMark");
   1.123 +_LIT(KStrEParitySpace,						"EParitySpace");
   1.124 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableParity[] =
   1.125 +	{
   1.126 +//	Enum as a descriptor					Enum
   1.127 +	KStrEParityNone,						EParityNone,
   1.128 +	KStrEParityEven,						EParityEven,
   1.129 +	KStrEParityOdd,							EParityOdd,
   1.130 +	KStrEParityMark,						EParityMark,
   1.131 +	KStrEParitySpace,						EParitySpace,
   1.132 +	KStrNull,								-1
   1.133 +	};
   1.134 +
   1.135 +_LIT(KStrKConfigParityErrorFail,			"KConfigParityErrorFail");
   1.136 +_LIT(KStrKConfigParityErrorIgnore,			"KConfigParityErrorIgnore");
   1.137 +_LIT(KStrKConfigParityErrorReplaceChar,		"KConfigParityErrorReplaceChar");
   1.138 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableParityError[] =
   1.139 +	{
   1.140 +//	Enum as a descriptor					Enum
   1.141 +	KStrKConfigParityErrorFail,				KConfigParityErrorFail,
   1.142 +	KStrKConfigParityErrorIgnore,			KConfigParityErrorIgnore,
   1.143 +	KStrKConfigParityErrorReplaceChar,		KConfigParityErrorReplaceChar,
   1.144 +	KStrNull,								-1
   1.145 +	};
   1.146 +
   1.147 +_LIT(KStrEBps50,							"EBps50");
   1.148 +_LIT(KStrEBps75,							"EBps75");
   1.149 +_LIT(KStrEBps110,							"EBps110");
   1.150 +_LIT(KStrEBps134,							"EBps134");
   1.151 +_LIT(KStrEBps150,							"EBps150");
   1.152 +_LIT(KStrEBps300,							"EBps300");
   1.153 +_LIT(KStrEBps600,							"EBps600");
   1.154 +_LIT(KStrEBps1200,							"EBps1200");
   1.155 +_LIT(KStrEBps1800,							"EBps1800");
   1.156 +_LIT(KStrEBps2000,							"EBps2000");
   1.157 +_LIT(KStrEBps2400,							"EBps2400");
   1.158 +_LIT(KStrEBps3600,							"EBps3600");
   1.159 +_LIT(KStrEBps4800,							"EBps4800");
   1.160 +_LIT(KStrEBps7200,							"EBps7200");
   1.161 +_LIT(KStrEBps9600,							"EBps9600");
   1.162 +_LIT(KStrEBps19200,							"EBps19200");
   1.163 +_LIT(KStrEBps38400,							"EBps38400");
   1.164 +_LIT(KStrEBps57600,							"EBps57600");
   1.165 +_LIT(KStrEBps115200,						"EBps115200");
   1.166 +_LIT(KStrEBps230400,						"EBps230400");
   1.167 +_LIT(KStrEBps460800,						"EBps460800");
   1.168 +_LIT(KStrEBps576000,						"EBps576000");
   1.169 +_LIT(KStrEBps1152000,						"EBps1152000");
   1.170 +_LIT(KStrEBps4000000,						"EBps4000000");
   1.171 +_LIT(KStrEBps921600,						"EBps921600");
   1.172 +_LIT(KStrEBpsAutobaud,						"EBpsAutobaud");
   1.173 +_LIT(KStrEBpsSpecial,						"EBpsSpecial");
   1.174 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableRate[] =
   1.175 +	{
   1.176 +//	Enum as a descriptor					Enum
   1.177 +	KStrEBps50,								EBps50,
   1.178 +	KStrEBps75,								EBps75,
   1.179 +	KStrEBps110,							EBps110,
   1.180 +	KStrEBps134,							EBps134,
   1.181 +	KStrEBps150,							EBps150,
   1.182 +	KStrEBps300,							EBps300,
   1.183 +	KStrEBps600,							EBps600,
   1.184 +	KStrEBps1200,							EBps1200,
   1.185 +	KStrEBps1800,							EBps1800,
   1.186 +	KStrEBps2000,							EBps2000,
   1.187 +	KStrEBps2400,							EBps2400,
   1.188 +	KStrEBps3600,							EBps3600,
   1.189 +	KStrEBps4800,							EBps4800,
   1.190 +	KStrEBps7200,							EBps7200,
   1.191 +	KStrEBps9600,							EBps9600,
   1.192 +	KStrEBps19200,							EBps19200,
   1.193 +	KStrEBps38400,							EBps38400,
   1.194 +	KStrEBps57600,							EBps57600,
   1.195 +	KStrEBps115200,							EBps115200,
   1.196 +	KStrEBps230400,							EBps230400,
   1.197 +	KStrEBps460800,							EBps460800,
   1.198 +	KStrEBps576000,							EBps576000,
   1.199 +	KStrEBps1152000,						EBps1152000,
   1.200 +	KStrEBps4000000,						EBps4000000,
   1.201 +	KStrEBps921600,							EBps921600,
   1.202 +	KStrEBpsAutobaud,						EBpsAutobaud,
   1.203 +	KStrEBpsSpecial,						EBpsSpecial,
   1.204 +	KStrNull,								-1
   1.205 +	};
   1.206 +
   1.207 +_LIT(KStrESIREnable,						"ESIREnable");
   1.208 +_LIT(KStrESIRDisable,						"ESIRDisable");
   1.209 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableSir[] =
   1.210 +	{
   1.211 +//	Enum as a descriptor					Enum
   1.212 +	KStrESIREnable,							ESIREnable,
   1.213 +	KStrESIRDisable,						ESIRDisable,
   1.214 +	KStrNull,								-1
   1.215 +	};
   1.216 +
   1.217 +_LIT(KStrKConfigSIRPulseWidthMaximum,		"KConfigSIRPulseWidthMaximum");
   1.218 +_LIT(KStrKConfigSIRPulseWidthMinimum,		"KConfigSIRPulseWidthMinimum");
   1.219 +_LIT(KStrKConfigSIRShutDown,				"KConfigSIRShutDown");
   1.220 +_LIT(KStrKConfigSIRMinimumRange,			"KConfigSIRMinimumRange");
   1.221 +_LIT(KStrKConfigSIRMediumRange,				"KConfigSIRMediumRange");
   1.222 +_LIT(KStrKConfigSIRMaximumRange,			"KConfigSIRMaximumRange");
   1.223 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableSirSetting[] =
   1.224 +	{
   1.225 +//	Enum as a descriptor					Enum
   1.226 +	KStrKConfigSIRPulseWidthMaximum,		KConfigSIRPulseWidthMaximum,
   1.227 +	KStrKConfigSIRPulseWidthMinimum,		KConfigSIRPulseWidthMinimum,
   1.228 +	KStrKConfigSIRShutDown,					KConfigSIRShutDown,
   1.229 +	KStrKConfigSIRMinimumRange,				KConfigSIRMinimumRange,
   1.230 +	KStrKConfigSIRMediumRange,				KConfigSIRMediumRange,
   1.231 +	KStrKConfigSIRMaximumRange,				KConfigSIRMaximumRange,
   1.232 +	KStrNull,								-1
   1.233 +	};
   1.234 +
   1.235 +_LIT(KStrEStop1,							"EStop1");
   1.236 +_LIT(KStrEStop2,							"EStop2");
   1.237 +const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableStopBits[] =
   1.238 +	{
   1.239 +//	Enum as a descriptor					Enum
   1.240 +	KStrEStop1,								EStop1,
   1.241 +	KStrEStop2,								EStop2,
   1.242 +	KStrNull,								-1
   1.243 +	};
   1.244 +
   1.245 +//////////////////////////////////////////////////////////////////////
   1.246 +// Construction/Destruction
   1.247 +//////////////////////////////////////////////////////////////////////
   1.248 +
   1.249 +CT_TCommConfigV01Data::CT_TCommConfigV01Data()
   1.250 +:	CDataWrapperBase()
   1.251 +,	iCommConfig(NULL)
   1.252 +	{
   1.253 +	}
   1.254 +
   1.255 +CT_TCommConfigV01Data::~CT_TCommConfigV01Data()
   1.256 +/**
   1.257 + * Public destructor
   1.258 + */
   1.259 +	{
   1.260 +	DestroyData();
   1.261 +	}
   1.262 +
   1.263 +void CT_TCommConfigV01Data::DestroyData()
   1.264 +	{
   1.265 +	delete iCommConfig;
   1.266 +	iCommConfig=NULL;
   1.267 +	}
   1.268 +
   1.269 +TDes8* CT_TCommConfigV01Data::Descriptor()
   1.270 +/**
   1.271 + * Return a pointer to the buffer
   1.272 + *
   1.273 + * @return	pointer to the buffer
   1.274 + */
   1.275 +	{
   1.276 +	return iCommConfig;
   1.277 +	}
   1.278 +
   1.279 +TAny* CT_TCommConfigV01Data::GetObject()
   1.280 +/**
   1.281 + * Return a pointer to the object that the data wraps
   1.282 + *
   1.283 + * @return	pointer to the object that the data wraps
   1.284 + */
   1.285 +	{
   1.286 +	return iCommConfig;
   1.287 +	}
   1.288 +
   1.289 +TBool CT_TCommConfigV01Data::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
   1.290 +/**
   1.291 + * Process a command read from the ini file
   1.292 + *
   1.293 + * @param aCommand			The command to process
   1.294 + * @param aSection			The section in the ini containing data for the command
   1.295 + * @param aAsyncErrorIndex	Command index for async calls to return errors to
   1.296 + *
   1.297 + * @return					ETrue if the command is processed
   1.298 + *
   1.299 + * @leave					System wide error
   1.300 + */
   1.301 +	{
   1.302 +	TBool	ret=ETrue;
   1.303 +	TInt	err=KErrNone;
   1.304 +
   1.305 +	if ( aCommand==KCmdConstructor )
   1.306 +		{
   1.307 +		err=DoCmdConstructor();
   1.308 +		}
   1.309 +	else if ( aCommand==KCmdDestructor )
   1.310 +		{
   1.311 +		DoCmdDestructor();
   1.312 +		}
   1.313 +	else if ( aCommand==KCmdiDataBits )
   1.314 +		{
   1.315 +		DoCmdiDataBits(aSection);
   1.316 +		}
   1.317 +	else if ( aCommand==KCmdiFifo )
   1.318 +		{
   1.319 +		DoCmdiFifo(aSection);
   1.320 +		}
   1.321 +	else if ( aCommand==KCmdiHandshake )
   1.322 +		{
   1.323 +		DoCmdiHandshake(aSection);
   1.324 +		}
   1.325 +	else if ( aCommand==KCmdiParity )
   1.326 +		{
   1.327 +		DoCmdiParity(aSection);
   1.328 +		}
   1.329 +	else if ( aCommand==KCmdiParityError )
   1.330 +		{
   1.331 +		DoCmdiParityError(aSection);
   1.332 +		}
   1.333 +	else if ( aCommand==KCmdiParityErrorChar )
   1.334 +		{
   1.335 +		DoCmdiParityErrorChar(aSection);
   1.336 +		}
   1.337 +	else if ( aCommand==KCmdiRate )
   1.338 +		{
   1.339 +		DoCmdiRate(aSection);
   1.340 +		}
   1.341 +	else if ( aCommand==KCmdiSIREnable )
   1.342 +		{
   1.343 +		DoCmdiSIREnable(aSection);
   1.344 +		}
   1.345 +	else if ( aCommand==KCmdiSIRSettings )
   1.346 +		{
   1.347 +		DoCmdiSIRSettings(aSection);
   1.348 +		}
   1.349 +	else if ( aCommand==KCmdiSpecialRate )
   1.350 +		{
   1.351 +		DoCmdiSpecialRate(aSection);
   1.352 +		}
   1.353 +	else if ( aCommand==KCmdiStopBits )
   1.354 +		{
   1.355 +		DoCmdiStopBits(aSection);
   1.356 +		}
   1.357 +	else if ( aCommand==KCmdiTerminator )
   1.358 +		{
   1.359 +		DoCmdiTerminator(aSection);
   1.360 +		}
   1.361 +	else if ( aCommand==KCmdiTerminatorCount )
   1.362 +		{
   1.363 +		DoCmdiTerminatorCount(aSection);
   1.364 +		}
   1.365 +	else if ( aCommand==KCmdiXoffChar )
   1.366 +		{
   1.367 +		DoCmdiXoffChar(aSection);
   1.368 +		}
   1.369 +	else if ( aCommand==KCmdiXonChar )
   1.370 +		{
   1.371 +		DoCmdiXonChar(aSection);
   1.372 +		}
   1.373 +	else
   1.374 +		{
   1.375 +		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
   1.376 +		}
   1.377 +
   1.378 +	if ( err!=KErrNone )
   1.379 +		{
   1.380 +		ERR_PRINTF2(KLogError, err);
   1.381 +		SetError(err);
   1.382 +		}
   1.383 +
   1.384 +	return ret;
   1.385 +	}
   1.386 +
   1.387 +TCommConfigV01& CT_TCommConfigV01Data::GetCommConfigV01()
   1.388 +	{
   1.389 +	return (*iCommConfig)();
   1.390 +	}
   1.391 +
   1.392 +TInt CT_TCommConfigV01Data::DoCmdConstructor()
   1.393 +	{
   1.394 +	DestroyData();
   1.395 +	TRAPD(err, iCommConfig=new (ELeave) TCommConfig());
   1.396 +	iCommConfig->FillZ();
   1.397 +	return err;
   1.398 +	}
   1.399 +
   1.400 +void CT_TCommConfigV01Data::DoCmdDestructor()
   1.401 +	{
   1.402 +	DestroyData();
   1.403 +	}
   1.404 +
   1.405 +void CT_TCommConfigV01Data::DoCmdiDataBits(const TDesC& aSection)
   1.406 +	{
   1.407 +	TDataBits	actual=GetCommConfigV01().iDataBits;
   1.408 +	INFO_PRINTF2(_L("iDataBits : %d"), actual);
   1.409 +
   1.410 +	TInt	expected;
   1.411 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableDataBits, expected) )
   1.412 +		{
   1.413 +		if ( expected!=actual )
   1.414 +			{
   1.415 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.416 +			SetBlockResult(EFail);
   1.417 +			}
   1.418 +		}
   1.419 +
   1.420 +	TInt	value;
   1.421 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableDataBits, value) )
   1.422 +		{
   1.423 +		GetCommConfigV01().iDataBits=(TDataBits)value;
   1.424 +		}
   1.425 +	}
   1.426 +
   1.427 +void CT_TCommConfigV01Data::DoCmdiFifo(const TDesC& aSection)
   1.428 +	{
   1.429 +	TFifo	actual=(TFifo)GetCommConfigV01().iFifo;
   1.430 +	INFO_PRINTF2(_L("iFifo : %d"), actual);
   1.431 +
   1.432 +	TInt	expected;
   1.433 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableFifo, expected) )
   1.434 +		{
   1.435 +		if ( expected!=actual )
   1.436 +			{
   1.437 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.438 +			SetBlockResult(EFail);
   1.439 +			}
   1.440 +		}
   1.441 +
   1.442 +	TInt	value;
   1.443 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableFifo, value) )
   1.444 +		{
   1.445 +		GetCommConfigV01().iFifo=(TUint)value;
   1.446 +		}
   1.447 +	}
   1.448 +
   1.449 +void CT_TCommConfigV01Data::DoCmdiHandshake(const TDesC& aSection)
   1.450 +	{
   1.451 +	TUint	actual=GetCommConfigV01().iHandshake;
   1.452 +	INFO_PRINTF2(_L("iHandshake : %d"), actual);
   1.453 +
   1.454 +	TUint	expected;
   1.455 +	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableHandshake, expected) )
   1.456 +		{
   1.457 +		if ( expected!=actual )
   1.458 +			{
   1.459 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.460 +			SetBlockResult(EFail);
   1.461 +			}
   1.462 +		}
   1.463 +
   1.464 +	TUint	value;
   1.465 +	if ( GetOrFromConfig(aSection, KFldValue(), iEnumTableHandshake, value) )
   1.466 +		{
   1.467 +		GetCommConfigV01().iHandshake=value;
   1.468 +		}
   1.469 +	}
   1.470 +
   1.471 +void CT_TCommConfigV01Data::DoCmdiParity(const TDesC& aSection)
   1.472 +	{
   1.473 +	TParity	actual=GetCommConfigV01().iParity;
   1.474 +	INFO_PRINTF2(_L("iParity : %d"), actual);
   1.475 +
   1.476 +	TInt	expected;
   1.477 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableParity, expected) )
   1.478 +		{
   1.479 +		if ( expected!=actual )
   1.480 +			{
   1.481 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.482 +			SetBlockResult(EFail);
   1.483 +			}
   1.484 +		}
   1.485 +
   1.486 +	TInt	value;
   1.487 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableParity, value) )
   1.488 +		{
   1.489 +		GetCommConfigV01().iParity=(TParity)value;
   1.490 +		}
   1.491 +	}
   1.492 +
   1.493 +void CT_TCommConfigV01Data::DoCmdiParityError(const TDesC& aSection)
   1.494 +	{
   1.495 +	TUint	actual=GetCommConfigV01().iParityError;
   1.496 +	INFO_PRINTF2(_L("iParityError : %d"), actual);
   1.497 +
   1.498 +	TInt	expected;
   1.499 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableParityError, expected) )
   1.500 +		{
   1.501 +		if ( expected!=(TInt)actual )
   1.502 +			{
   1.503 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.504 +			SetBlockResult(EFail);
   1.505 +			}
   1.506 +		}
   1.507 +
   1.508 +	TInt	value;
   1.509 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableParityError, value) )
   1.510 +		{
   1.511 +		GetCommConfigV01().iParityError=(TUint)value;
   1.512 +		}
   1.513 +	}
   1.514 +
   1.515 +void CT_TCommConfigV01Data::DoCmdiParityErrorChar(const TDesC& aSection)
   1.516 +	{
   1.517 +	TText8	actual=GetCommConfigV01().iParityErrorChar;
   1.518 +	INFO_PRINTF2(_L("iParityErrorChar : 0x%x"), (TUint)actual);
   1.519 +
   1.520 +	TInt	expected;
   1.521 +	if ( GetHexFromConfig(aSection, KFldExpected(), expected) )
   1.522 +		{
   1.523 +		if ( expected!=(TInt)actual )
   1.524 +			{
   1.525 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.526 +			SetBlockResult(EFail);
   1.527 +			}
   1.528 +		}
   1.529 +
   1.530 +	TInt	value;
   1.531 +	if ( GetHexFromConfig(aSection, KFldValue(), value) )
   1.532 +		{
   1.533 +		GetCommConfigV01().iParityErrorChar=(TText8)value;
   1.534 +		}
   1.535 +	}
   1.536 +
   1.537 +void CT_TCommConfigV01Data::DoCmdiRate(const TDesC& aSection)
   1.538 +	{
   1.539 +	TBps	actual=GetCommConfigV01().iRate;
   1.540 +	INFO_PRINTF2(_L("iRate : %d"), actual);
   1.541 +
   1.542 +	TInt	expected;
   1.543 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableRate, expected) )
   1.544 +		{
   1.545 +		if ( expected!=(TInt)actual )
   1.546 +			{
   1.547 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.548 +			SetBlockResult(EFail);
   1.549 +			}
   1.550 +		}
   1.551 +
   1.552 +	TInt	value;
   1.553 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableRate, value) )
   1.554 +		{
   1.555 +		GetCommConfigV01().iRate=(TBps)value;
   1.556 +		}
   1.557 +	}
   1.558 +
   1.559 +void CT_TCommConfigV01Data::DoCmdiSIREnable(const TDesC& aSection)
   1.560 +	{
   1.561 +	TSir	actual=GetCommConfigV01().iSIREnable;
   1.562 +	INFO_PRINTF2(_L("iSIREnable : %d"), actual);
   1.563 +
   1.564 +	TInt	expected;
   1.565 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableSir, expected) )
   1.566 +		{
   1.567 +		if ( expected!=(TInt)actual )
   1.568 +			{
   1.569 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.570 +			SetBlockResult(EFail);
   1.571 +			}
   1.572 +		}
   1.573 +
   1.574 +	TInt	value;
   1.575 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableSir, value) )
   1.576 +		{
   1.577 +		GetCommConfigV01().iSIREnable=(TSir)value;
   1.578 +		}
   1.579 +	}
   1.580 +
   1.581 +void CT_TCommConfigV01Data::DoCmdiSIRSettings(const TDesC& aSection)
   1.582 +	{
   1.583 +	TUint	actual=GetCommConfigV01().iSIRSettings;
   1.584 +	INFO_PRINTF2(_L("iSIRSettings : %d"), actual);
   1.585 +
   1.586 +	TInt	expected;
   1.587 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableSirSetting, expected) )
   1.588 +		{
   1.589 +		if ( expected!=(TInt)actual )
   1.590 +			{
   1.591 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.592 +			SetBlockResult(EFail);
   1.593 +			}
   1.594 +		}
   1.595 +
   1.596 +	TInt	value;
   1.597 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableSirSetting, value) )
   1.598 +		{
   1.599 +		GetCommConfigV01().iSIRSettings=(TUint)value;
   1.600 +		}
   1.601 +	}
   1.602 +
   1.603 +void CT_TCommConfigV01Data::DoCmdiSpecialRate(const TDesC& aSection)
   1.604 +	{
   1.605 +	TInt	actual=GetCommConfigV01().iSpecialRate;
   1.606 +	INFO_PRINTF2(_L("iSpecialRate : %d"), actual);
   1.607 +
   1.608 +	TInt	expected;
   1.609 +	if ( GetIntFromConfig(aSection, KFldExpected(), expected) )
   1.610 +		{
   1.611 +		if ( expected!=actual )
   1.612 +			{
   1.613 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.614 +			SetBlockResult(EFail);
   1.615 +			}
   1.616 +		}
   1.617 +
   1.618 +	TInt	value;
   1.619 +	if ( GetIntFromConfig(aSection, KFldValue(), value) )
   1.620 +		{
   1.621 +		GetCommConfigV01().iSpecialRate=value;
   1.622 +		}
   1.623 +	}
   1.624 +
   1.625 +void CT_TCommConfigV01Data::DoCmdiStopBits(const TDesC& aSection)
   1.626 +	{
   1.627 +	TStopBits	actual=GetCommConfigV01().iStopBits;
   1.628 +	INFO_PRINTF2(_L("iStopBits : %d"), actual);
   1.629 +
   1.630 +	TInt	expected;
   1.631 +	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableStopBits, expected) )
   1.632 +		{
   1.633 +		if ( expected!=actual )
   1.634 +			{
   1.635 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.636 +			SetBlockResult(EFail);
   1.637 +			}
   1.638 +		}
   1.639 +
   1.640 +	TInt	value;
   1.641 +	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableStopBits, value) )
   1.642 +		{
   1.643 +		GetCommConfigV01().iStopBits=(TStopBits)value;
   1.644 +		}
   1.645 +	}
   1.646 +
   1.647 +void CT_TCommConfigV01Data::DoCmdiTerminator(const TDesC& aSection)
   1.648 +	{
   1.649 +	TBuf<KMaxTestExecuteCommandLength>	tempStore;
   1.650 +
   1.651 +	for ( TInt index=0; index<KConfigMaxTerminators; ++index )
   1.652 +		{
   1.653 +		TText8	actual=GetCommConfigV01().iTerminator[index];
   1.654 +		INFO_PRINTF3(_L("iTerminator[%d] : 0x%x"), index, (TUint)actual);
   1.655 +
   1.656 +		tempStore.Format(KFldExpectedIndex(), index);
   1.657 +		TInt	expected;
   1.658 +		if ( GetHexFromConfig(aSection, tempStore, expected) )
   1.659 +			{
   1.660 +			if ( expected!=(TInt)actual )
   1.661 +				{
   1.662 +				ERR_PRINTF1(KLogErrorExpectedValue);
   1.663 +				SetBlockResult(EFail);
   1.664 +				}
   1.665 +			}
   1.666 +
   1.667 +		tempStore.Format(KFldValueIndex(), index);
   1.668 +		TInt	value;
   1.669 +		if ( GetHexFromConfig(aSection, tempStore, value) )
   1.670 +			{
   1.671 +			GetCommConfigV01().iTerminator[index]=(TText8)value;
   1.672 +			}
   1.673 +		}
   1.674 +	}
   1.675 +
   1.676 +void CT_TCommConfigV01Data::DoCmdiTerminatorCount(const TDesC& aSection)
   1.677 +	{
   1.678 +	TInt	actual=GetCommConfigV01().iTerminatorCount;
   1.679 +	INFO_PRINTF2(_L("iTerminatorCount : %d"), actual);
   1.680 +
   1.681 +	TInt	expected;
   1.682 +	if ( GetIntFromConfig(aSection, KFldExpected(), expected) )
   1.683 +		{
   1.684 +		if ( expected!=actual )
   1.685 +			{
   1.686 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.687 +			SetBlockResult(EFail);
   1.688 +			}
   1.689 +		}
   1.690 +
   1.691 +	TInt	value;
   1.692 +	if ( GetIntFromConfig(aSection, KFldValue(), value) )
   1.693 +		{
   1.694 +		GetCommConfigV01().iTerminatorCount=value;
   1.695 +		}
   1.696 +	}
   1.697 +
   1.698 +void CT_TCommConfigV01Data::DoCmdiXoffChar(const TDesC& aSection)
   1.699 +	{
   1.700 +	TText8	actual=GetCommConfigV01().iXoffChar;
   1.701 +	INFO_PRINTF2(_L("iXoffChar : 0x%x"), (TUint)actual);
   1.702 +
   1.703 +	TInt	expected;
   1.704 +	if ( GetHexFromConfig(aSection, KFldExpected(), expected) )
   1.705 +		{
   1.706 +		if ( expected!=(TInt)actual )
   1.707 +			{
   1.708 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.709 +			SetBlockResult(EFail);
   1.710 +			}
   1.711 +		}
   1.712 +
   1.713 +	TInt	value;
   1.714 +	if ( GetHexFromConfig(aSection, KFldValue(), value) )
   1.715 +		{
   1.716 +		GetCommConfigV01().iXoffChar=(TText8)value;
   1.717 +		}
   1.718 +	}
   1.719 +
   1.720 +void CT_TCommConfigV01Data::DoCmdiXonChar(const TDesC& aSection)
   1.721 +	{
   1.722 +	TText8	actual=GetCommConfigV01().iXonChar;
   1.723 +	INFO_PRINTF2(_L("iXonChar : 0x%x"), (TUint)actual);
   1.724 +
   1.725 +	TInt	expected;
   1.726 +	if ( GetHexFromConfig(aSection, KFldExpected(), expected) )
   1.727 +		{
   1.728 +		if ( expected!=(TInt)actual )
   1.729 +			{
   1.730 +			ERR_PRINTF1(KLogErrorExpectedValue);
   1.731 +			SetBlockResult(EFail);
   1.732 +			}
   1.733 +		}
   1.734 +
   1.735 +	TInt	value;
   1.736 +	if ( GetHexFromConfig(aSection, KFldValue(), value) )
   1.737 +		{
   1.738 +		GetCommConfigV01().iXonChar=(TText8)value;
   1.739 +		}
   1.740 +	}