source: trunk/ETSI-Testsuites/ETSI_auto_IOT/codec/c++/EchoPort.h @ 32

Last change on this file since 32 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#ifndef EchoPort_h
42#define EchoPort_h
43
44#include <t3devlib/t3devlib.h>
45
46/** Implementation of an echo port
47 *
48 * This class implements a TTCN-3 system port whose role is just to repeat all
49 * the traffic sent to it. Thus triSend() triggers immediately a
50 * triEnqueueMsg() call to the originating component, repeating the same
51 * message.
52 *
53 * Echo port is useful for testing a codec. For example to test the decoder
54 * one can send a raw message (octetstring, charstring...) and receive the
55 * same message but decoded using another type (eg. SipMessage).
56 *
57 */
58class EchoPort : public t3devlib::Port
59{
60public:
61        EchoPort (t3devlib::PortId& id);
62        ~EchoPort();
63               
64protected:
65        bool Map (const t3devlib::PortId& port_id);
66        bool Unmap (const t3devlib::PortId& port_id);
67        bool Send (const t3devlib::ComponentId& from, const t3devlib::Bitstring& msg);
68               
69};
70
71
72#endif
Note: See TracBrowser for help on using the repository browser.