telephonyserverplugins/multimodetsy/test/Te_LoopBack/Te_LoopBackCDataCallCallBack.h
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1997-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 // This file has the class definitions and scripts for the "Data Call dial-up networking 
       
    15 // call-back" test in the ETel Regression test harness.  The call scripts are processed 
       
    16 // and handled by the emulator side of the test via the scripting engine.  Each line 
       
    17 // in the script represents an action that the emulator must take, either a receive 
       
    18 // action (which defines an expected string) or a transmit action with the ASCII 
       
    19 // data to be sent.  See the description of the scripting language for more information.
       
    20 // 
       
    21 //
       
    22 
       
    23 /**
       
    24  @file
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef __CDATACALLCALLBACK_H__
       
    29 #define __CDATACALLCALLBACK_H__
       
    30 
       
    31 #include "Te_LoopbackTestStepBase.h"
       
    32 #include "Te_LoopBackScriptEng.h"
       
    33 
       
    34 _LIT8(KWriteTestCallBackData,"ABCD\r\n");
       
    35 _LIT8(KWriteTestCallBackData2,"EFGH\r\n");
       
    36 
       
    37 // KCallBackDefVarDelay is the default Variable Delay value when the user did NOT enter a variable 
       
    38 // delay value to be used as a timeout by script processing when the iParam value is set -1 in a 
       
    39 // TScript script whose iCommand is an EWait.
       
    40 const TInt KCallBackDefVarDelay=15;
       
    41 
       
    42 // KCallBackMinVarDelay is Minimum Variable Delay value that can be input by the user as the timeout 
       
    43 // by script processing when iParam value is set -1 in a TScript script whose iCommand is an EWait.
       
    44 const TInt KCallBackMinVarDelay=1;
       
    45 
       
    46 // KCallBackMaxVarDelay is Maximum Variable Delay value that can be input by the user as the timeout 
       
    47 // by script processing when iParam value is set -1 in a TScript script whose iCommand is an EWait.
       
    48 const TInt KCallBackMaxVarDelay=45;
       
    49 
       
    50 // KCallBackMaxDigits is Maximum number of digits allowed to be entered by the operator when 
       
    51 // Variable Delay value that can be input by the user as the timeout by script
       
    52 // processing when the iParam value is set -1 in a TScript script whose iCommand is an EWait.
       
    53 const TInt KCallBackMaxDigits=3;
       
    54 
       
    55 const struct TScript KDataCallCallBackScriptOneSecond[]= {
       
    56 	{	ERxString,	(TText8*)"AT\r",		0, ERxEvent	},
       
    57 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    58 
       
    59 	// if RxString is found
       
    60 	{	EIfRxStringJmp, (TText8*)"AT\r",	1, 0	},
       
    61 
       
    62 	{	ERxString, (TText8*)"AT+FCLASS=?",	0, ERxEvent	},
       
    63 	{	ETxString, (TText8*)"0,1,2\r",		0, ETxEvent|EFailIfTimeOut	},
       
    64 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    65 
       
    66 //
       
    67 // The initialisation string - we don't care what it is
       
    68 //
       
    69 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
    70 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    71 
       
    72 	{	ERxString, (TText8*)"AT+CNMI=,0",   0, ERxEvent	},
       
    73 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    74 
       
    75 	{	ERxString, (TText8*)"ATS7?",		0, ERxEvent	},
       
    76 	{	ETxString, (TText8*)"050\r",		0, ETxEvent|EFailIfTimeOut	},
       
    77 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    78 
       
    79 	{	ERxString, (TText8*)"ATS0=0",		0, ERxEvent	},
       
    80 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    81 
       
    82 	{	ERxString, (TText8*)"AT+CGMI",	0, ERxEvent	},
       
    83 	{	ETxString, (TText8*)"ERICSSON\r",	0, ETxEvent|EFailIfTimeOut	},
       
    84 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    85 
       
    86 	{	ERxString, (TText8*)"AT+CGMM",	0, ERxEvent	},
       
    87 	{	ETxString, (TText8*)"1100801\r",	0, ETxEvent|EFailIfTimeOut	},
       
    88 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    89 
       
    90 	{	ERxString, (TText8*)"AT+CGMR",	0, ERxEvent	},
       
    91 	{	ETxString, (TText8*)"9808261341\r",	0, ETxEvent|EFailIfTimeOut	},
       
    92 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    93 
       
    94 	{	ERxString, (TText8*)"AT+CGSN",	0, ERxEvent	},
       
    95 	{	ETxString, (TText8*)"520002512954000\r",	0, ETxEvent|EFailIfTimeOut	},
       
    96 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
    97 
       
    98 	{	ERxString, (TText8*)"AT+CIMI",	0, ERxEvent	},
       
    99 	{	ETxString, (TText8*)"ERROR\r",	0, ETxEvent|EFailIfTimeOut	},
       
   100 
       
   101 	{	ERxString, (TText8*)"AT+CMGF=?",	0, ERxEvent	},
       
   102 	{	ETxString, (TText8*)"+CMGF: (0)\r",	0, ETxEvent|EFailIfTimeOut	},
       
   103 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   104 
       
   105 	{	ERxString, (TText8*)"AT+CMGF=0",	0, ERxEvent	},
       
   106 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   107 
       
   108 	{	ERxString, (TText8*)"AT+CPMS=?",	0, ERxEvent	},
       
   109 	{	ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r",	0, ETxEvent|EFailIfTimeOut	},
       
   110 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   111 
       
   112 	{	ERxString, (TText8*)"AT+CPMS?",	0, ERxEvent	},
       
   113 	{	ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r",	0, ETxEvent|EFailIfTimeOut	},
       
   114 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   115 
       
   116 	{	ERxString, (TText8*)"AT+CPBS=?",	0, ERxEvent	},
       
   117 	{	ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r",	0, ETxEvent|EFailIfTimeOut	},
       
   118 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   119 
       
   120 	{	ERxString, (TText8*)"AT+CREG=0",	0, ERxEvent	},
       
   121 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   122 
       
   123 	{	ERxString, (TText8*)"AT+CREG=2",	0, ERxEvent	},
       
   124 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   125 
       
   126 	{	ERxString, (TText8*)"AT+CREG=1",	0, ERxEvent	},
       
   127 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   128 
       
   129 	{	ERxString, (TText8*)"AT+CREG?",	0, ERxEvent	},
       
   130 	{	ETxString, (TText8*)"ERROR\r",	0, ETxEvent|EFailIfTimeOut	},
       
   131 	
       
   132 	{	ERxString, (TText8*)"AT+CRC=1",		0, ERxEvent	},
       
   133 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   134 
       
   135 	{	ERxString, (TText8*)"AT+COPS?",	0, ERxEvent	},
       
   136 	{	ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r",	0, ETxEvent|EFailIfTimeOut	},
       
   137 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   138 
       
   139 	{	ERxString, (TText8*)"AT+CBC",	0, ERxEvent	},
       
   140 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   141 
       
   142 	{	ERxString, (TText8*)"AT+CSQ",	0, ERxEvent	},
       
   143 	{	ETxString, (TText8*)"+CSQ: 31,99\r",		0, ETxEvent|EFailIfTimeOut	},
       
   144 	{	ETxStringOK, NULL,				0, ETxEvent|EFailIfTimeOut	},
       
   145 
       
   146 	{	ERxString, (TText8*)"AT+CGCLASS",	0, ERxEvent	},
       
   147 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   148 
       
   149 	{	ERxString, (TText8*)"AT+CGCLASS",	0, ERxEvent	},
       
   150 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   151 
       
   152 	{	ERxString, (TText8*)"AT+CGQREQ",	0, ERxEvent	},
       
   153 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   154 
       
   155 	{	ERxString, (TText8*)"AT+CGATT",	0, ERxEvent	},
       
   156 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   157 
       
   158 	{	ERxString, (TText8*)"AT+CNMI=?",	0, ERxEvent	},
       
   159 	{	ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r",	0, ETxEvent|EFailIfTimeOut	},
       
   160 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   161 
       
   162 	{	ERxString, (TText8*)"AT+CBST=?",	0, ERxEvent	},
       
   163 	{	ETxString, (TText8*)"+CBST: (0-7,12,14-16,34,36,38,39,43,47-51,65,66,68,70,71,75,79-81),(0,2),(1)\r",	0, ETxEvent|EFailIfTimeOut	},
       
   164 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   165 
       
   166 	{	ERxString, (TText8*)"AT+CSCA?",		0, ERxEvent	},
       
   167 	{	ETxString, (TText8*)"+CSCA: \"441632960000\",145",	0, ETxEvent|EFailIfTimeOut	},
       
   168 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   169 
       
   170 	{	ERxString, (TText8*)"AT+CGREG=1",	0, ERxEvent	},
       
   171 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   172 
       
   173 	{	ERxString, (TText8*)"AT*ECAM=1",	0, ERxEvent	},
       
   174 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   175 
       
   176 //
       
   177 //  Initialisation complete.
       
   178 //  Perform the Dial request
       
   179 //
       
   180 	{	ERxString, (TText8*)"AT+FCLASS=0",	0, ERxEvent	},
       
   181 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   182 
       
   183 	{	ERxString, (TText8*)"ATM0L0X3S8=0",	0, ERxEvent	},
       
   184 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   185 
       
   186 // This is the Data Init String
       
   187 	{	ERxString, (TText8*)"AT345678901234567890123456789012345678901234567890",	0, ERxEvent	},
       
   188 	{	ETxStringOK, NULL,						0, ETxEvent|EFailIfTimeOut	},
       
   189 
       
   190 // This is just another quick "AT", "OK" sequence to check we're still alright
       
   191 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   192 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   193 
       
   194 // Issue the dial command and wait for connection
       
   195 	{	ERxString, (TText8*)"ATD+1234",		0, ERxEvent	},
       
   196 // Set signal for connection
       
   197 	{	ESignalMark, NULL,					KSignalDCD, 0	},
       
   198 	{	ETxString, (TText8*)"\r\nCONNECT 28800/ARQ/V34/LAPM/V42BIS\r\n", 0, ETxEvent|EFailIfTimeOut	},
       
   199 
       
   200 // This is the Data Xfer String
       
   201 	{	ERxString, (TText8*)"ABCD\r\n",		0, ERxEvent	},
       
   202 	{	ERxString, (TText8*)"ABCD\r\n",		0, ERxEvent	},
       
   203 
       
   204 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   205 	{	ERxString, (TText8*)"+++",			0, ERxEvent	},
       
   206 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   207 
       
   208 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   209 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   210 
       
   211 //	{	ERxString, (TText8*)"ATO",			0, ERxEvent	},
       
   212 
       
   213 // Simulate Remote hangup
       
   214 // Deassert signal for no-connection
       
   215 	{	ESignalSpace, NULL,					KSignalDCD, 0	},
       
   216 	{	ETxString, (TText8*)"NO CARRIER",	0, ETxEvent	},
       
   217 
       
   218 //
       
   219 // At this point, we need to simulate a callback delay
       
   220 //
       
   221 	{	EWait,		NULL,					-1,	ETimeOutEvent	},
       
   222 
       
   223 //
       
   224 // Now we simulate an incoming data call
       
   225 //
       
   226 	
       
   227 	{	ETxString, (TText8*)"\r\n+CRING: REL ASYNC\r\n",	0, ETxEvent|EFailIfTimeOut	},
       
   228 	// The 1st +CRING will be ignored by the MMTSY as it is still trying to
       
   229 	// do a CATQuickInit after the 'NO CARRIER'. Therefore we do a +CRING again.
       
   230 	{	EWait,		NULL,					2,	ETimeOutEvent	},		// two second timeout
       
   231 	{	ETxString, (TText8*)"\r\n+CRING: REL ASYNC\r\n",	0, ETxEvent|EFailIfTimeOut	},
       
   232 
       
   233 	{	ERxString, (TText8*)"AT+FCLASS=0",	0, ERxEvent	},
       
   234 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   235 
       
   236 	{	ERxString, (TText8*)"ATM0L0X3S8=0",	0, ERxEvent	},
       
   237 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   238 
       
   239 // This is the Data Init String
       
   240 	{	ERxString, (TText8*)"AT345678901234567890123456789012345678901234567890",	0, ERxEvent	},
       
   241 	{	ETxStringOK, NULL,						0, ETxEvent|EFailIfTimeOut	},
       
   242 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   243 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   244 
       
   245 	{	ERxString, (TText8*)"ATA",			0, ERxEvent	},
       
   246 // Set signal for connection
       
   247 	{	ESignalMark, NULL,					KSignalDCD, 0	},
       
   248 	{	ETxString, (TText8*)"\r\nCONNECT 28800/ARQ/V34/LAPM/V42BIS\r\n", 0, ETxEvent|EFailIfTimeOut	},
       
   249 
       
   250 	{	ERxString, (TText8*)"EFGH\r\n",		0, ERxEvent	},
       
   251 	{	ERxString, (TText8*)"EFGH\r\n",		0, ERxEvent	},
       
   252 
       
   253 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   254 	{	ERxString, (TText8*)"+++",			0, ERxEvent	},
       
   255 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   256 
       
   257 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   258 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   259 
       
   260 // Simulate Remote hangup
       
   261 // Deassert signal for no-connection
       
   262 	{	ESignalSpace, NULL,					KSignalDCD, 0	},
       
   263 	{	ETxString, (TText8*)"NO CARRIER",	0, ETxEvent	},
       
   264 
       
   265 // Request for Phone Signal Strength
       
   266 	{	ERxString, (TText8*)"AT+CSQ",	0, ERxEvent	},
       
   267 	{	ETxString, (TText8*)"+CSQ: 31,99\r",		0, ETxEvent|EFailIfTimeOut	},
       
   268 	{	ETxStringOK, NULL,				0, ETxEvent|EFailIfTimeOut	},
       
   269 	{	EWait,		NULL,					5,	ETimeOutEvent	},		// Wait to allow TSY to receive OK
       
   270 
       
   271 	{	EComplete,	 NULL,					0, 0	}
       
   272 	};
       
   273 
       
   274 
       
   275 const struct TScript KDataCallCallBackScriptMoreThanOneSecond[]= {
       
   276 	{	ERxString,	(TText8*)"AT\r",		0, ERxEvent	},
       
   277 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   278 
       
   279 	// if RxString is found
       
   280 	{	EIfRxStringJmp, (TText8*)"AT\r",	1, 0	},
       
   281 
       
   282 	{	ERxString, (TText8*)"AT+FCLASS=?",	0, ERxEvent	},
       
   283 	{	ETxString, (TText8*)"0,1,2\r",		0, ETxEvent|EFailIfTimeOut	},
       
   284 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   285 
       
   286 //
       
   287 // The initialisation string - we don't care what it is
       
   288 //
       
   289 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   290 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   291 
       
   292 	{	ERxString, (TText8*)"AT+CNMI=,0",   0, ERxEvent	},
       
   293 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   294 
       
   295 	{	ERxString, (TText8*)"ATS7?",		0, ERxEvent	},
       
   296 	{	ETxString, (TText8*)"050\r",		0, ETxEvent|EFailIfTimeOut	},
       
   297 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   298 
       
   299 	{	ERxString, (TText8*)"ATS0=0",		0, ERxEvent	},
       
   300 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   301 
       
   302 	{	ERxString, (TText8*)"AT+CGMI",	0, ERxEvent	},
       
   303 	{	ETxString, (TText8*)"ERICSSON\r",	0, ETxEvent|EFailIfTimeOut	},
       
   304 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   305 
       
   306 	{	ERxString, (TText8*)"AT+CGMM",	0, ERxEvent	},
       
   307 	{	ETxString, (TText8*)"1100801\r",	0, ETxEvent|EFailIfTimeOut	},
       
   308 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   309 
       
   310 	{	ERxString, (TText8*)"AT+CGMR",	0, ERxEvent	},
       
   311 	{	ETxString, (TText8*)"9808261341\r",	0, ETxEvent|EFailIfTimeOut	},
       
   312 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   313 
       
   314 	{	ERxString, (TText8*)"AT+CGSN",	0, ERxEvent	},
       
   315 	{	ETxString, (TText8*)"520002512954000\r",	0, ETxEvent|EFailIfTimeOut	},
       
   316 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   317 
       
   318 	{	ERxString, (TText8*)"AT+CIMI",	0, ERxEvent	},
       
   319 	{	ETxString, (TText8*)"ERROR\r",	0, ETxEvent|EFailIfTimeOut	},
       
   320 
       
   321 	{	ERxString, (TText8*)"AT+CMGF=?",	0, ERxEvent	},
       
   322 	{	ETxString, (TText8*)"+CMGF: (0)\r",	0, ETxEvent|EFailIfTimeOut	},
       
   323 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   324 
       
   325 	{	ERxString, (TText8*)"AT+CMGF=0",	0, ERxEvent	},
       
   326 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   327 
       
   328 	{	ERxString, (TText8*)"AT+CPMS=?",	0, ERxEvent	},
       
   329 	{	ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r",	0, ETxEvent|EFailIfTimeOut	},
       
   330 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   331 
       
   332 	{	ERxString, (TText8*)"AT+CPMS?",	0, ERxEvent	},
       
   333 	{	ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r",	0, ETxEvent|EFailIfTimeOut	},
       
   334 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   335 
       
   336 	{	ERxString, (TText8*)"AT+CPBS=?",	0, ERxEvent	},
       
   337 	{	ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r",	0, ETxEvent|EFailIfTimeOut	},
       
   338 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   339 
       
   340 	{	ERxString, (TText8*)"AT+CREG=0",	0, ERxEvent	},
       
   341 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   342 
       
   343 	{	ERxString, (TText8*)"AT+CREG=2",	0, ERxEvent	},
       
   344 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   345 
       
   346 	{	ERxString, (TText8*)"AT+CREG=1",	0, ERxEvent	},
       
   347 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   348 
       
   349 	{	ERxString, (TText8*)"AT+CREG?",	0, ERxEvent	},
       
   350 	{	ETxString, (TText8*)"ERROR\r",	0, ETxEvent|EFailIfTimeOut	},
       
   351 	
       
   352 	{	ERxString, (TText8*)"AT+CRC=1",		0, ERxEvent	},
       
   353 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   354 
       
   355 	{	ERxString, (TText8*)"AT+COPS?",	0, ERxEvent	},
       
   356 	{	ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r",	0, ETxEvent|EFailIfTimeOut	},
       
   357 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   358 
       
   359 	{	ERxString, (TText8*)"AT+CBC",	0, ERxEvent	},
       
   360 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   361 
       
   362 	{	ERxString, (TText8*)"AT+CSQ",	0, ERxEvent	},
       
   363 	{	ETxString, (TText8*)"+CSQ: 31,99\r",		0, ETxEvent|EFailIfTimeOut	},
       
   364 	{	ETxStringOK, NULL,				0, ETxEvent|EFailIfTimeOut	},
       
   365 
       
   366 	{	ERxString, (TText8*)"AT+CGCLASS",	0, ERxEvent	},
       
   367 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   368 
       
   369 	{	ERxString, (TText8*)"AT+CGCLASS",	0, ERxEvent	},
       
   370 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   371 
       
   372 	{	ERxString, (TText8*)"AT+CGQREQ",	0, ERxEvent	},
       
   373 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   374 
       
   375 	{	ERxString, (TText8*)"AT+CGATT",	0, ERxEvent	},
       
   376 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   377 
       
   378 	{	ERxString, (TText8*)"AT+CNMI=?",	0, ERxEvent	},
       
   379 	{	ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r",	0, ETxEvent|EFailIfTimeOut	},
       
   380 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   381 
       
   382 	{	ERxString, (TText8*)"AT+CBST=?",	0, ERxEvent	},
       
   383 	{	ETxString, (TText8*)"+CBST: (0-7,12,14-16,34,36,38,39,43,47-51,65,66,68,70,71,75,79-81),(0,2),(1)\r",	0, ETxEvent|EFailIfTimeOut	},
       
   384 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   385 
       
   386 	{	ERxString, (TText8*)"AT+CSCA?",		0, ERxEvent	},
       
   387 	{	ETxString, (TText8*)"+CSCA: \"441632960000\",145",	0, ETxEvent|EFailIfTimeOut	},
       
   388 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   389 
       
   390 	{	ERxString, (TText8*)"AT+CGREG=1",	0, ERxEvent	},
       
   391 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   392 
       
   393 	{	ERxString, (TText8*)"AT*ECAM=1",	0, ERxEvent	},
       
   394 	{	ETxString, (TText8*)"ERROR\r",		0, ETxEvent|EFailIfTimeOut	},
       
   395 
       
   396 //
       
   397 //  Initialisation complete.
       
   398 //  Perform the Dial request
       
   399 //
       
   400 	{	ERxString, (TText8*)"AT+FCLASS=0",	0, ERxEvent	},
       
   401 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   402 
       
   403 	{	ERxString, (TText8*)"ATM0L0X3S8=0",	0, ERxEvent	},
       
   404 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   405 
       
   406 // This is the Data Init String
       
   407 	{	ERxString, (TText8*)"AT345678901234567890123456789012345678901234567890",	0, ERxEvent	},
       
   408 	{	ETxStringOK, NULL,						0, ETxEvent|EFailIfTimeOut	},
       
   409 
       
   410 // This is just another quick "AT", "OK" sequence to check we're still alright
       
   411 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   412 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   413 
       
   414 // Issue the dial command and wait for connection
       
   415 	{	ERxString, (TText8*)"ATD+1234",		0, ERxEvent	},
       
   416 // Set signal for connection
       
   417 	{	ESignalMark, NULL,					KSignalDCD, 0	},
       
   418 	{	ETxString, (TText8*)"\r\nCONNECT 28800/ARQ/V34/LAPM/V42BIS\r\n", 0, ETxEvent|EFailIfTimeOut	},
       
   419 
       
   420 // This is the Data Xfer String
       
   421 	{	ERxString, (TText8*)"ABCD\r\n",		0, ERxEvent	},
       
   422 	{	ERxString, (TText8*)"ABCD\r\n",		0, ERxEvent	},
       
   423 
       
   424 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   425 	{	ERxString, (TText8*)"+++",			0, ERxEvent	},
       
   426 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   427 
       
   428 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   429 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   430 
       
   431 // Simulate Remote hangup
       
   432 // Deassert signal for no-connection
       
   433 	{	ESignalSpace, NULL,					KSignalDCD, 0	},
       
   434 	{	ETxString, (TText8*)"NO CARRIER",	0, ETxEvent	},
       
   435 
       
   436 //
       
   437 // At this point, we need to simulate a callback delay
       
   438 //
       
   439 	{	EWait,		NULL,					-1,	ETimeOutEvent	},
       
   440 
       
   441 //
       
   442 // Now we simulate an incoming data call
       
   443 //
       
   444 	
       
   445 	{	ETxString, (TText8*)"\r\n+CRING: REL ASYNC\r\n",	0, ETxEvent|EFailIfTimeOut	},
       
   446 	// The 1st +CRING should not be ignored by MMTSY!
       
   447 
       
   448 	{	ERxString, (TText8*)"AT+FCLASS=0",	0, ERxEvent	},
       
   449 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   450 
       
   451 	{	ERxString, (TText8*)"ATM0L0X3S8=0",	0, ERxEvent	},
       
   452 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   453 
       
   454 // This is the Data Init String
       
   455 	{	ERxString, (TText8*)"AT345678901234567890123456789012345678901234567890",	0, ERxEvent	},
       
   456 	{	ETxStringOK, NULL,						0, ETxEvent|EFailIfTimeOut	},
       
   457 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   458 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   459 
       
   460 // This is the data call parameters setup command (new for MMTSY since 13/Sep/01)
       
   461 //	{	ERxString, (TText8*)"AT+CBST=0,0,1",			0, ERxEvent	},
       
   462 //	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   463 
       
   464 	{	ERxString, (TText8*)"ATA",			0, ERxEvent	},
       
   465 // Set signal for connection
       
   466 	{	ESignalMark, NULL,					KSignalDCD, 0	},
       
   467 	{	ETxString, (TText8*)"\r\nCONNECT 28800/ARQ/V34/LAPM/V42BIS\r\n", 0, ETxEvent|EFailIfTimeOut	},
       
   468 
       
   469 	{	ERxString, (TText8*)"EFGH\r\n",		0, ERxEvent	},
       
   470 	{	ERxString, (TText8*)"EFGH\r\n",		0, ERxEvent	},
       
   471 
       
   472 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   473 	{	ERxString, (TText8*)"+++",			0, ERxEvent	},
       
   474 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   475 
       
   476 	{	ERxString, (TText8*)"AT",			0, ERxEvent	},
       
   477 	{	ETxStringOK, NULL,					0, ETxEvent|EFailIfTimeOut	},
       
   478 
       
   479 // Simulate Remote hangup
       
   480 // Deassert signal for no-connection
       
   481 	{	ESignalSpace, NULL,					KSignalDCD, 0	},
       
   482 	{	ETxString, (TText8*)"NO CARRIER",	0, ETxEvent	},
       
   483 
       
   484 // Request for Phone Signal Strength
       
   485 	{	ERxString, (TText8*)"AT+CSQ",	0, ERxEvent	},
       
   486 	{	ETxString, (TText8*)"+CSQ: 31,99\r",		0, ETxEvent|EFailIfTimeOut	},
       
   487 	{	ETxStringOK, NULL,				0, ETxEvent|EFailIfTimeOut	},
       
   488 	{	EWait,		NULL,					5,	ETimeOutEvent	},		// Wait to allow TSY to receive OK
       
   489 
       
   490 	{	EComplete,	 NULL,					0, 0	}
       
   491 	};
       
   492 
       
   493 /**
       
   494  * This class is used by the client side of the test.  It contains the method DriveETelApi
       
   495  * which is the primary client side method.  This class inherits from the CTestBase class.
       
   496  * All client side test classes must contain these entries.
       
   497  */
       
   498 class CTestDriveDataCallCallBack : public CTestBase
       
   499 	{
       
   500 public:
       
   501 	static CTestDriveDataCallCallBack* NewL(const TScriptList aScriptListEntry, TInt aVarDelay);
       
   502 	// Called by the user interface from the C function PerformTestL.
       
   503 	virtual TInt RunTestL();
       
   504 
       
   505 protected:
       
   506 	// Called by the CTestBase::StartEmulator method to drive the ETel API.
       
   507 	virtual TInt DriveETelApiL();
       
   508 
       
   509 private:
       
   510 	CTestDriveDataCallCallBack(const TScriptList aScriptListEntry, TInt aVarDelay);
       
   511 
       
   512 	TScriptList iScriptListEntry;	//< Initialized by the constructor, it records the enumerated
       
   513 									//< script entry number.
       
   514 	TInt		iVarDelay;			//< Variable delay value to be used as the timeout by the 
       
   515 									//< ...script processing when the iParam value is set -1 in 
       
   516 									//< ...a TScript script whose iCommand is an EWait.
       
   517 	};
       
   518 
       
   519 /**
       
   520  * This class is used by the emulator side of the test.  It implements several virtual functions
       
   521  * which are test specific and referenced by other classes.  This class inherits from the
       
   522  * CATScriptEng class.  All Emulator side test classes should have this structure.
       
   523  */
       
   524 class CTestDataCallCallBack : public CATScriptEng
       
   525 	{
       
   526 public:
       
   527 	static CTestDataCallCallBack* NewL(const TScript* aScript);
       
   528 	static CTestDataCallCallBack* NewL(const TScript* aScript, const TInt aVarDelay);
       
   529 
       
   530 	// Called by the scripting engine to implement the EExecuteSpecial Command.
       
   531 	virtual void SpecificAlgorithmL(TInt aParam);
       
   532 
       
   533 	// Called by the scripting engine to end the execution of the script.
       
   534 	virtual void Complete(TInt aError);
       
   535 
       
   536 	// Called by the scripting engine to start the execution of the script.
       
   537 	virtual TInt Start();
       
   538 
       
   539 private:
       
   540 	CTestDataCallCallBack(const TScript* aScript);
       
   541 	CTestDataCallCallBack(const TScript* aScript, const TInt aVarDelay);
       
   542 	void ConstructL();
       
   543 
       
   544 	const TScript* iScript;			//< Pointer to the first line in the associated script.
       
   545 	};
       
   546 
       
   547 #endif