source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/init.cpp @ 55

Last change on this file since 55 was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 3.9 KB
Line 
1/****************************************************************************/
2/* $Id$             */
3/*                                                                          */
4/*   (c) 2009  Universite de Rennes 1                                       */
5/*                                                                          */
6/* Contributors:                                                            */
7/*  - Anthony BAIRE                                                         */
8/*                                                                          */
9/* Contact address: <t3devkit@irisa.fr>                                     */
10/*                                                                          */
11/*                                                                          */
12/* This file is part of application examples provided along with T3DevKit,  */
13/* a free toolkit for building TTCN-3 tests.                                */
14/*                                                                          */
15/* This software is governed by the CeCILL-B license under French law and   */
16/* abiding by the rules of distribution of free software.  You can  use,    */
17/* modify and/or redistribute the software under the terms of the CeCILL-B  */
18/* license as circulated by CEA, CNRS and INRIA at the following URL        */
19/* "http://www.cecill.info".                                                */
20/*                                                                          */
21/* As a counterpart to the access to the source code and  rights to copy,   */
22/* modify and redistribute granted by the license, users are provided only  */
23/* with a limited warranty  and the software's author,  the holder of the   */
24/* economic rights,  and the successive licensors  have only  limited       */
25/* liability.                                                               */
26/*                                                                          */
27/* In this respect, the user's attention is drawn to the risks associated   */
28/* with loading,  using,  modifying and/or developing or reproducing the    */
29/* software by the user in light of its specific status of free software,   */
30/* that may mean  that it is complicated to manipulate,  and  that  also    */
31/* therefore means  that it is reserved for developers  and  experienced    */
32/* professionals having in-depth computer knowledge. Users are therefore    */
33/* encouraged to load and test the software's suitability as regards their  */
34/* requirements in conditions enabling the security of their systems and/or */
35/* data to be ensured and,  more generally, to use and operate it in the    */
36/* same conditions as regards security.                                     */
37/*                                                                          */
38/* The fact that you are presently reading this means that you have had     */
39/* knowledge of the CeCILL-B license and that you accept its terms.         */
40/****************************************************************************/
41#include <t3devlib/t3devlib.h>
42
43#include "Ports/DataPort.h"
44#include "Ports/AdapterConfigPort.h"
45#include "Ports/EquipmentAccessPort.h"
46#include <fstream>
47
48namespace t3devlib {
49 
50  void PAInit()
51  {
52  }
53 
54  void SAInit()
55  {
56    static std::ofstream log_file ("mmagic_adapter_log.txt");
57   
58    // replace the buffer in cout, cerr and clog
59    std::cout.rdbuf (log_file.rdbuf());
60    std::cerr.rdbuf (log_file.rdbuf());         
61    std::clog.rdbuf (log_file.rdbuf());         
62
63    // Do not forget to check for TTCN-3 modele name!!
64    Port::RegisterType("AtsImsIot_TestSystem", "DataPort", &createPort<DataPort>);
65    Port::RegisterType("LibIot_TestInterface", "EquipmentAccessPort", &createPort<EquipmentAccessPort>);
66    Port::RegisterType("LibIot_TestInterface", "AdapterConfigPort", &createPort<AdapterConfigPort>);
67  }
68 
69  void CDInit()
70  {
71  }
72 
73  void PAReset()
74  {
75  }
76 
77  void SAReset()
78  {
79  }
80}
Note: See TracBrowser for help on using the repository browser.