Gleb Klochkov / Mbed OS Climatcontroll_Main

Dependencies:   esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers test_athandler.cpp Source File

test_athandler.cpp

00001 /*
00002  * Copyright (c) 2018, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 #include "CppUTest/TestHarness.h"
00018 #include "test_athandler.h"
00019 #include <string.h>
00020 #include "AT_CellularNetwork.h"
00021 #include "EventQueue.h"
00022 #include "ATHandler.h"
00023 #include "AT_CellularStack.h"
00024 #include "FileHandle_stub.h"
00025 #include "CellularLog.h"
00026 #include "mbed_poll_stub.h"
00027 
00028 #include "Timer_stub.h"
00029 
00030 using namespace mbed;
00031 using namespace events;
00032 
00033 void urc_callback()
00034 {
00035 }
00036 
00037 Test_ATHandler::Test_ATHandler()
00038 {
00039 
00040 }
00041 
00042 Test_ATHandler::~Test_ATHandler()
00043 {
00044 }
00045 
00046 void Test_ATHandler::test_ATHandler_constructor()
00047 {
00048     EventQueue que;
00049     FileHandle_stub fh1;
00050 
00051     ATHandler *at = new ATHandler(&fh1, que, 0, ",");
00052 
00053     delete at;
00054 
00055     at = new ATHandler(&fh1, que, 0, NULL);
00056 
00057     delete at;
00058 }
00059 
00060 void Test_ATHandler::test_ATHandler_get_file_handle()
00061 {
00062     EventQueue que;
00063     FileHandle_stub fh1;
00064 
00065     ATHandler at(&fh1, que, 0, ",");
00066     CHECK_EQUAL(&fh1, at.get_file_handle());
00067 }
00068 
00069 void Test_ATHandler::test_ATHandler_set_file_handle()
00070 {
00071     EventQueue que;
00072     FileHandle_stub fh1, fh2;
00073 
00074     ATHandler at(&fh1, que, 0, ",");
00075 
00076     at.set_file_handle(&fh2);
00077 }
00078 
00079 void Test_ATHandler::test_ATHandler_lock()
00080 {
00081     EventQueue que;
00082     FileHandle_stub fh1;
00083 
00084     ATHandler at(&fh1, que, 0, ",");
00085 
00086     at.lock();
00087 }
00088 
00089 void Test_ATHandler::test_ATHandler_unlock()
00090 {
00091     EventQueue que;
00092     FileHandle_stub fh1;
00093 
00094     ATHandler at(&fh1, que, 0, ",");
00095     filehandle_stub_short_value_counter = 1;
00096     fh1.short_value = POLLIN;
00097     at.unlock();
00098 }
00099 
00100 void Test_ATHandler::test_ATHandler_unlock_return_error()
00101 {
00102     EventQueue que;
00103     FileHandle_stub fh1;
00104 
00105     ATHandler at(&fh1, que, 0, ",");
00106     CHECK(NSAPI_ERROR_OK  == at.unlock_return_error());
00107 }
00108 
00109 void Test_ATHandler::test_ATHandler_set_urc_handler()
00110 {
00111     EventQueue que;
00112     FileHandle_stub fh1;
00113 
00114     ATHandler at(&fh1, que, 0, ",");
00115     const char ch[] = "testtesttesttest";
00116     at.set_urc_handler(ch, &urc_callback);
00117 }
00118 
00119 void Test_ATHandler::test_ATHandler_get_last_error()
00120 {
00121     EventQueue que;
00122     FileHandle_stub fh1;
00123 
00124     ATHandler at(&fh1, que, 0, ",");
00125     CHECK(NSAPI_ERROR_OK  == at.get_last_error());
00126 }
00127 
00128 void Test_ATHandler::test_ATHandler_get_last_device_error()
00129 {
00130     EventQueue que;
00131     FileHandle_stub fh1;
00132 
00133     ATHandler at(&fh1, que, 0, ",");
00134     CHECK(0 == at.get_last_device_error().errCode);
00135 }
00136 
00137 void Test_ATHandler::test_ATHandler_inc_ref_count()
00138 {
00139     EventQueue que;
00140     FileHandle_stub fh1;
00141 
00142     ATHandler at(&fh1, que, 0, ",");
00143     at.inc_ref_count();
00144 }
00145 
00146 void Test_ATHandler::test_ATHandler_dec_ref_count()
00147 {
00148     EventQueue que;
00149     FileHandle_stub fh1;
00150 
00151     ATHandler at(&fh1, que, 0, ",");
00152     at.dec_ref_count();
00153 }
00154 
00155 void Test_ATHandler::test_ATHandler_get_ref_count()
00156 {
00157     EventQueue que;
00158     FileHandle_stub fh1;
00159 
00160     ATHandler at(&fh1, que, 0, ",");
00161     CHECK(1 == at.get_ref_count());
00162 
00163     at.inc_ref_count();
00164     CHECK(2 == at.get_ref_count());
00165 
00166     at.inc_ref_count();
00167     CHECK(3 == at.get_ref_count());
00168 
00169     at.dec_ref_count();
00170     at.dec_ref_count();
00171     CHECK(1 == at.get_ref_count());
00172 }
00173 
00174 void Test_ATHandler::test_ATHandler_set_at_timeout()
00175 {
00176     EventQueue que;
00177     FileHandle_stub fh1;
00178 
00179     ATHandler at(&fh1, que, 0, ",");
00180     at.set_at_timeout(8);
00181 
00182     at.set_at_timeout(80, true);
00183 }
00184 
00185 void Test_ATHandler::test_ATHandler_restore_at_timeout()
00186 {
00187     EventQueue que;
00188     FileHandle_stub fh1;
00189 
00190     ATHandler at(&fh1, que, 0, ",");
00191     at.set_at_timeout(80, true);
00192     at.set_at_timeout(800);
00193     at.restore_at_timeout();
00194 }
00195 
00196 void Test_ATHandler::test_ATHandler_clear_error()
00197 {
00198     EventQueue que;
00199     FileHandle_stub fh1;
00200 
00201     ATHandler at(&fh1, que, 0, ",");
00202     at.clear_error();
00203 }
00204 
00205 void Test_ATHandler::test_ATHandler_process_oob()
00206 {
00207     EventQueue que;
00208     FileHandle_stub fh1;
00209 
00210     ATHandler at(&fh1, que, 0, ",");
00211     filehandle_stub_short_value_counter = 1;
00212     fh1.short_value = POLLIN;
00213     at.set_urc_handler("s", &urc_callback);
00214     at.process_oob();
00215 
00216     filehandle_stub_short_value_counter = 2;
00217     at.process_oob();
00218 
00219     //at.fill_buffer();
00220     uint8_t buf[5];
00221     at.clear_error();
00222     char table[] = "ssssssssssssssssssssssssssssssss\0";
00223     filehandle_stub_table = table;
00224     filehandle_stub_table_pos = 0;
00225     at.read_bytes(buf, 5);
00226 
00227     filehandle_stub_short_value_counter = 2;
00228     at.process_oob();
00229 
00230     at.clear_error();
00231     timer_stub_value = 0;
00232     filehandle_stub_table_pos = 0;
00233     at.read_bytes(buf, 5);
00234 
00235     filehandle_stub_short_value_counter = 1;
00236     at.process_oob();
00237 
00238     char table2[4];
00239     table2[0] = '\r';
00240     table2[1] = '\r';
00241     table2[2] = '\n';
00242     table2[3] = 0;
00243     filehandle_stub_table = table2;
00244 
00245     at.clear_error();
00246     timer_stub_value = 0;
00247     filehandle_stub_table_pos = 0;
00248     at.read_bytes(buf, 1);
00249 
00250     filehandle_stub_short_value_counter = 1;
00251     at.process_oob();
00252 
00253 
00254     filehandle_stub_table = table;
00255 
00256 
00257     filehandle_stub_short_value_counter = 0;
00258     filehandle_stub_table_pos = 0;
00259     filehandle_stub_table = NULL;
00260 }
00261 
00262 void Test_ATHandler::test_ATHandler_set_filehandle_sigio()
00263 {
00264     EventQueue que;
00265     FileHandle_stub fh1;
00266 
00267     ATHandler at(&fh1, que, 0, ",");
00268     at.set_filehandle_sigio();
00269 }
00270 
00271 void Test_ATHandler::test_ATHandler_flush()
00272 {
00273     EventQueue que;
00274     FileHandle_stub fh1;
00275 
00276     ATHandler at(&fh1, que, 0, ",");
00277     filehandle_stub_short_value_counter = 1;
00278     fh1.short_value = POLLIN;
00279     at.flush();
00280 }
00281 
00282 void Test_ATHandler::test_ATHandler_cmd_start()
00283 {
00284     EventQueue que;
00285     FileHandle_stub fh1;
00286 
00287     ATHandler at(&fh1, que, 0, ",");
00288     mbed_poll_stub::revents_value = POLLOUT;
00289     mbed_poll_stub::int_value = 1;
00290     fh1.size_value = 1;
00291     at.cmd_start("s");
00292     mbed_poll_stub::revents_value = POLLIN;
00293     mbed_poll_stub::int_value = 0;
00294 
00295     at.cmd_start("s");
00296 
00297     at.cmd_start("s");
00298 }
00299 
00300 void Test_ATHandler::test_ATHandler_write_int()
00301 {
00302     EventQueue que;
00303     FileHandle_stub fh1;
00304 
00305     ATHandler at(&fh1, que, 0, ",");
00306     at.write_int(4);
00307 
00308     at.clear_error();
00309     mbed_poll_stub::revents_value = POLLOUT;
00310     mbed_poll_stub::int_value = 1;
00311     fh1.size_value = 1;
00312     at.write_int(4);
00313 
00314     at.write_int(2147483647);
00315 
00316     at.write_int(2147483647+1);
00317 
00318 //    at.at_error(0, DeviceErrorType(0));
00319 //    at.write_int(4);
00320 }
00321 
00322 void Test_ATHandler::test_ATHandler_write_string()
00323 {
00324     EventQueue que;
00325     FileHandle_stub fh1;
00326 
00327     ATHandler at(&fh1, que, 0, ",");
00328     at.write_string("help");
00329     CHECK(NSAPI_ERROR_DEVICE_ERROR  == at.get_last_error());
00330 
00331     at.clear_error();
00332     mbed_poll_stub::revents_value = POLLOUT;
00333     mbed_poll_stub::int_value = 1;
00334     fh1.size_value = 1;
00335     at.cmd_start("s");
00336     at.write_string("help", true);
00337     CHECK(NSAPI_ERROR_DEVICE_ERROR  == at.get_last_error());
00338 
00339     at.clear_error();
00340     mbed_poll_stub::revents_value = POLLOUT;
00341     mbed_poll_stub::int_value = 1;
00342     fh1.size_value = 3;
00343     at.write_string("help", true);
00344     CHECK(NSAPI_ERROR_DEVICE_ERROR  == at.get_last_error());
00345 
00346     at.clear_error();
00347     mbed_poll_stub::revents_value = POLLOUT;
00348     mbed_poll_stub::int_value = 1;
00349     fh1.size_value = 7;
00350     at.write_string("help", true);
00351     CHECK(NSAPI_ERROR_OK  == at.get_last_error());
00352 }
00353 
00354 void Test_ATHandler::test_ATHandler_cmd_stop()
00355 {
00356     EventQueue que;
00357     FileHandle_stub fh1;
00358 
00359     ATHandler at(&fh1, que, 0, ",");
00360     at.cmd_stop();
00361 
00362     at.write_string("help", true);
00363 
00364     at.cmd_stop();
00365     CHECK(NSAPI_ERROR_DEVICE_ERROR  == at.get_last_error());
00366 }
00367 
00368 void Test_ATHandler::test_ATHandler_write_bytes()
00369 {
00370     EventQueue que;
00371     FileHandle_stub fh1;
00372 
00373     ATHandler at(&fh1, que, 0, ",");
00374     uint8_t data[] = "data";
00375     at.write_bytes(data, 4);
00376 
00377     at.write_bytes(data, 4);
00378     CHECK(NSAPI_ERROR_DEVICE_ERROR  == at.get_last_error());
00379 }
00380 
00381 void Test_ATHandler::test_ATHandler_set_stop_tag()
00382 {
00383     EventQueue que;
00384     FileHandle_stub fh1;
00385 
00386     ATHandler at(&fh1, que, 0, ",");
00387     at.set_stop_tag("s");
00388 }
00389 
00390 void Test_ATHandler::test_ATHandler_set_delimiter()
00391 {
00392     EventQueue que;
00393     FileHandle_stub fh1;
00394 
00395     ATHandler at(&fh1, que, 0, ",");
00396     at.set_delimiter('+');
00397 }
00398 
00399 void Test_ATHandler::test_ATHandler_skip_param()
00400 {
00401     EventQueue que;
00402     FileHandle_stub fh1;
00403 
00404     ATHandler at(&fh1, que, 0, ",");
00405     at.skip_param();
00406 
00407     char table[] = "ssssssssssssssssssssssssssssOK\r\n\0";
00408     filehandle_stub_table = table;
00409     filehandle_stub_table_pos = 0;
00410 
00411     at.flush();
00412     at.clear_error();
00413     at.resp_start();
00414     at.skip_param();
00415     CHECK(at.get_last_error() == NSAPI_ERROR_DEVICE_ERROR );
00416 
00417     char table1[] = "ss,sssssssssssss,sssssssssssOK\r\n\0";
00418     filehandle_stub_table = table1;
00419     filehandle_stub_table_pos = 0;
00420 
00421     at.flush();
00422     at.clear_error();
00423     at.resp_start();
00424     at.skip_param();
00425 
00426     char table2[] = "sssOK\r\n\0";
00427     filehandle_stub_table = table2;
00428     filehandle_stub_table_pos = 0;
00429 
00430     at.flush();
00431     at.clear_error();
00432     at.resp_start();
00433     at.skip_param();
00434 
00435     char table3[] = "sssssssOK\nssss\0";
00436     filehandle_stub_table = table3;
00437     filehandle_stub_table_pos = 0;
00438 
00439     //Need to create a new instance because stop tag already found
00440     ATHandler at2(&fh1, que, 0, ",");
00441     at2.flush();
00442     at2.clear_error();
00443     at2.resp_start();
00444     at2.skip_param();
00445 
00446     at2.skip_param(4, 3);
00447 
00448     filehandle_stub_table = table3;
00449     filehandle_stub_table_pos = 0;
00450 
00451     at2.flush();
00452     at2.clear_error();
00453     at2.resp_start();
00454     at2.skip_param(4, 3);
00455 
00456     filehandle_stub_table = table3;
00457     filehandle_stub_table_pos = 0;
00458 
00459     at2.flush();
00460     at2.clear_error();
00461     at2.resp_start();
00462     at2.skip_param(24, 17);
00463 }
00464 
00465 void Test_ATHandler::test_ATHandler_read_bytes()
00466 {
00467     EventQueue que;
00468     FileHandle_stub fh1;
00469 
00470     ATHandler at(&fh1, que, 0, ",");
00471     uint8_t buf[5];
00472     CHECK(-1 == at.read_bytes(buf, 25));
00473 
00474     CHECK(-1 == at.read_bytes(buf, 5));
00475 
00476     char table[] = "ssssssssssssssssssssssssssssOK\r\n\0";
00477     filehandle_stub_table = table;
00478     filehandle_stub_table_pos = 0;
00479 
00480     at.clear_error();
00481     CHECK(5 == at.read_bytes(buf, 5));
00482 }
00483 
00484 void Test_ATHandler::test_ATHandler_read_string()
00485 {
00486     EventQueue que;
00487     FileHandle_stub fh1;
00488 
00489     ATHandler at(&fh1, que, 0, ",");
00490 
00491     char table[] = "\"s,\"OK\r\n\0";
00492     filehandle_stub_table = table;
00493     filehandle_stub_table_pos = 0;
00494 
00495     char buf[5];
00496     uint8_t buf2[5];
00497     at.flush();
00498     at.clear_error();
00499     at.resp_start();
00500     at.read_bytes(buf2, 5);
00501     CHECK(-1 == at.read_string(buf, 15));
00502 
00503     filehandle_stub_table = table;
00504     filehandle_stub_table_pos = 0;
00505 
00506     at.flush();
00507     at.clear_error();
00508     at.resp_start();
00509     at.read_bytes(buf2, 1);
00510     CHECK(1 == at.read_string(buf, 5, true));
00511 
00512     char table2[] = "\"s\"OK\r\n\0";
00513     filehandle_stub_table = table2;
00514     filehandle_stub_table_pos = 0;
00515 
00516     at.flush();
00517     at.clear_error();
00518     at.resp_start();
00519     at.read_bytes(buf2, 1);
00520     CHECK(1 == at.read_string(buf, 5, true));
00521 
00522     char table3[] = "sss\rsss\0";
00523     filehandle_stub_table = table3;
00524     filehandle_stub_table_pos = 0;
00525 
00526     at.flush();
00527     at.clear_error();
00528     at.resp_start("s");
00529     at.read_string(buf, 5, true);
00530 
00531     char table4[] = "\"s\"\0";
00532     filehandle_stub_table = table4;
00533     filehandle_stub_table_pos = 0;
00534 
00535     at.flush();
00536     at.clear_error();
00537     at.resp_start("s");
00538     at.read_string(buf, 5, true);
00539 
00540     filehandle_stub_table = NULL;
00541     filehandle_stub_table_pos = 0;
00542 }
00543 
00544 void Test_ATHandler::test_ATHandler_read_int()
00545 {
00546     EventQueue que;
00547     FileHandle_stub fh1;
00548 
00549     ATHandler at(&fh1, que, 0, ",");
00550 
00551     int32_t ret= at.read_int();
00552     CHECK(-1 == ret);
00553 
00554     char table[] = "\",\"OK\r\n\0";
00555     filehandle_stub_table = table;
00556     filehandle_stub_table_pos = 0;
00557 
00558     at.flush();
00559     at.clear_error();
00560     at.resp_start();
00561 
00562     ret= at.read_int();
00563     CHECK(-1 == ret);
00564 
00565     char table2[] = "\"2,\"OK\r\n\0";
00566     filehandle_stub_table = table2;
00567     filehandle_stub_table_pos = 0;
00568 
00569     at.flush();
00570     at.clear_error();
00571     at.resp_start();
00572 
00573     ret= at.read_int();
00574     CHECK(2 == ret);
00575 
00576 }
00577 
00578 void Test_ATHandler::test_ATHandler_resp_start()
00579 {
00580     EventQueue que;
00581     FileHandle_stub fh1;
00582 
00583     filehandle_stub_table = NULL;
00584     filehandle_stub_table_pos = 0;
00585 
00586     ATHandler at(&fh1, que, 0, ",");
00587     at.resp_start();
00588     at.resp_start();
00589 
00590     char table2[] = "\"2,\"OK\r\n\0";
00591     filehandle_stub_table = table2;
00592     filehandle_stub_table_pos = 0;
00593 
00594     at.flush();
00595     at.clear_error();
00596     at.resp_start("ssssaaaassssaaaassss"); //too long prefix
00597 
00598     char table3[] = "+CME ERROR: 108\0";
00599     filehandle_stub_table = table3;
00600     filehandle_stub_table_pos = 0;
00601 
00602     at.flush();
00603     at.clear_error();
00604     at.resp_start();
00605 
00606     filehandle_stub_table_pos = 0;
00607 
00608     at.flush();
00609     at.clear_error();
00610     at.resp_start();
00611 
00612     char table4[] = "+CMS ERROR: 6\0";
00613     filehandle_stub_table = table4;
00614     filehandle_stub_table_pos = 0;
00615 
00616     at.flush();
00617     at.clear_error();
00618     at.resp_start();
00619 
00620     char table5[] = "ERROR\r\n\0";
00621     filehandle_stub_table = table5;
00622     filehandle_stub_table_pos = 0;
00623 
00624     at.flush();
00625     at.clear_error();
00626     at.resp_start();
00627 
00628     char table6[] = "OK\r\n\0";
00629     filehandle_stub_table = table6;
00630     filehandle_stub_table_pos = 0;
00631 
00632     at.flush();
00633     at.clear_error();
00634     at.resp_start();
00635 
00636     char table7[] = "ssssss\0";
00637     filehandle_stub_table = table7;
00638     filehandle_stub_table_pos = 0;
00639 
00640     at.flush();
00641     at.clear_error();
00642     at.set_urc_handler("ss", NULL);
00643     at.resp_start();
00644 }
00645 
00646 void Test_ATHandler::test_ATHandler_resp_stop()
00647 {
00648     EventQueue que;
00649     FileHandle_stub fh1;
00650 
00651     ATHandler at(&fh1, que, 0, ",");
00652 
00653     char table[] = "21 OK\r\n\0";
00654     filehandle_stub_table = table;
00655     filehandle_stub_table_pos = 0;
00656 
00657     at.info_elem('2');
00658     at.set_stop_tag("OK\r\n");
00659     at.resp_stop();
00660 
00661     char table3[] = "+CME ERROR: 108\0";
00662     filehandle_stub_table = table3;
00663     filehandle_stub_table_pos = 0;
00664 
00665     at.flush();
00666     at.clear_error();
00667     at.resp_start();
00668 
00669     at.resp_stop();
00670 
00671     char table7[] = "ssssss\0";
00672     filehandle_stub_table = table7;
00673     filehandle_stub_table_pos = 0;
00674 
00675     at.flush();
00676     at.clear_error();
00677     at.resp_start("ss", false);
00678     at.resp_stop();
00679 }
00680 
00681 void Test_ATHandler::test_ATHandler_info_resp()
00682 {
00683     EventQueue que;
00684     FileHandle_stub fh1;
00685 
00686     filehandle_stub_table = NULL;
00687 
00688     ATHandler at(&fh1, que, 0, ",");
00689     CHECK(at.info_resp());
00690 
00691     at.resp_start();
00692     CHECK(!at.info_resp());
00693 
00694     char table2[] = "21 OK\r\n\0";
00695     filehandle_stub_table = table2;
00696     filehandle_stub_table_pos = 0;
00697 
00698     at.flush();
00699     at.clear_error();
00700     at.resp_start("21");
00701     CHECK(at.info_resp());
00702 
00703     CHECK(!at.info_resp());
00704 
00705     char table3[] = "21 OK\r\n\0";
00706     filehandle_stub_table = table3;
00707     filehandle_stub_table_pos = 0;
00708 
00709     at.flush();
00710     at.clear_error();
00711     CHECK(at.info_resp());
00712 }
00713 
00714 void Test_ATHandler::test_ATHandler_info_elem()
00715 {
00716     EventQueue que;
00717     FileHandle_stub fh1;
00718 
00719     char table[] = "21 OK\r\n\0";
00720     filehandle_stub_table = table;
00721     filehandle_stub_table_pos = 0;
00722 
00723     ATHandler at(&fh1, que, 0, ",");
00724     CHECK(!at.info_elem(char(79)));
00725 
00726     char table2[] = "21 OK\r\n\0";
00727     filehandle_stub_table = table2;
00728     filehandle_stub_table_pos = 0;
00729 
00730     at.flush();
00731     at.clear_error();
00732     at.resp_start("21");
00733     CHECK(at.info_elem(char(79)));
00734 
00735     CHECK(at.info_elem('2'));
00736 
00737     filehandle_stub_table = NULL;
00738     filehandle_stub_table_pos = 0;
00739 
00740     at.flush();
00741     at.clear_error();
00742     at.resp_start("21");
00743     CHECK(!at.info_elem('2'));
00744 }
00745 
00746 void Test_ATHandler::test_ATHandler_consume_to_stop_tag()
00747 {
00748     EventQueue que;
00749     FileHandle_stub fh1;
00750 
00751     ATHandler at(&fh1, que, 0, ",");
00752     CHECK(at.consume_to_stop_tag());
00753 }
00754 
00755 void Test_ATHandler::test_ATHandler_enable_debug()
00756 {
00757     EventQueue que;
00758     FileHandle_stub fh1;
00759 
00760     ATHandler at(&fh1, que, 0, ",");
00761     at.enable_debug(true);
00762 
00763     at.enable_debug(false);
00764 }
00765 
00766 void Test_ATHandler::test_ATHandler_get_3gpp_error()
00767 {
00768     EventQueue que;
00769     FileHandle_stub fh1;
00770 
00771     ATHandler at(&fh1, que, 0, ",");
00772     int ret = at.get_3gpp_error();
00773 }