source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/Helper/GeneralConfigurationParams.h @ 35

Last change on this file since 35 was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 5.1 KB
Line 
1/**
2 * @file GeneralConfigurationParams.h
3 * Provides a class storage for TTCN-3 message GeneralConfigureReq
4 * @author Yann garcia
5 * @version 1.0
6 * @date 24/07/2009
7 */
8
9#ifndef STF_370_GeneralConfigurationParams
10#define STF_370_GeneralConfigurationParams
11
12#include <boost/shared_ptr.hpp>
13#include <string>
14#include <vector>
15#include <map>
16#include <iostream>
17#include <iomanip>
18
19/*! Class EutIPInterface
20 * \brief This class provides a storage for EUTS IP interface.
21 */
22class EutIPInterface
23{
24private:
25  std::string m_eut;
26  std::string m_eutAddress;
27  int m_eutPort;
28public:
29  std::string& Eut() { return m_eut; };
30  std::string& EutAddress() { return m_eutAddress; };
31  int EutPort() { return m_eutPort; };
32public:
33  EutIPInterface(
34    std::string eut,
35    std::string eutAddress,
36    int eutPort)
37  {
38    m_eut = eut;
39    m_eutAddress = eutAddress;
40    m_eutPort = eutPort;
41  };
42  ~EutIPInterface() { std::clog << "~EutIPInterface" << std::endl; };
43 };
44 
45/*! Class GeneralConfigurationParams
46 * \brief This class provides a class storage for TTCN-3 message GeneralConfigureReq.
47 */
48class GeneralConfigurationParams
49{
50private:
51  std::string m_captureModuleAddress; /**< IP address of the TrafficCapture process */
52  int m_captureModulePort; /**< Port number of the TrafficCapture listener */
53  std::vector<std::string> m_ifaces; /**<  */
54  unsigned char m_mode; /**< Capture mode: offline or online */
55  int m_pcapTimeStampSeconds; /**< Pcap time stamps description */
56  int m_pcapTimeStampMicroseconds; /**< Pcap time stamps description */
57  unsigned char m_record; /**< Record mode (online mode only) */
58  std::string m_pcapMergeTool; /**< Full path file name of the PCAP meger tool (offline mode only) */
59  std::string m_fileToPlay; /**< PCAP file to play (offline mode only) */
60  std::vector<std::string> m_mergerFileList; /**< List of the PCAP file to merge (offline mode only) */
61  std::string m_mergerFilePath; /**< Directory path where the PCAP file to merge to merge are located (offline mode only) */
62  std::vector<boost::shared_ptr<EutIPInterface> > m_eutIpInterfaceList; /**< List of the IP addresses/port numbers of the EUT equipments (online mode only) */
63 
64public:
65  std::string& CaptureModuleAddress() { return m_captureModuleAddress; }; /**< Gets the IP address of the TrafficCapture process */
66  int CaptureModulePort() { return m_captureModulePort; }; /**< Gets the port number of the TrafficCapture listener */
67  std::vector<std::string>& Ifaces() { return m_ifaces; }; /**< Gets the list of the network interfaces to monitor */
68  unsigned char Mode() { return m_mode; }; /**< Gets the capture mode */
69  int PcapTimeStampSeconds() { return m_pcapTimeStampSeconds; }; /**< Gets the Pcap time stamps description */
70  int PcapTimeStampMicroseconds() { return m_pcapTimeStampMicroseconds; }; /**< Gets the Pcap time stamps description */
71  unsigned char Record() { return m_record; }; /**< Gets the record mode */
72  std::string& PcapMergeTool() { return m_pcapMergeTool; }; /**< Gets the full path file name of the PCAP meger tool */
73  std::string& FileToPlay() { return m_fileToPlay; }; /**< Gets the PCAP file to play */
74  std::vector<std::string>& MergerFileList() { return m_mergerFileList; }; /**< Gets the list of the PCAP file to merge */
75  std::string& MergerFilePath() { return m_mergerFilePath; }; /**< Gets the directory path where the PCAP file to merge to merge are located */
76  std::vector<boost::shared_ptr<EutIPInterface> >& EutIpInterfaceList() { return m_eutIpInterfaceList; }; /**< Gets the list of the IP addresses/port numbers of the EUT equipments */
77 
78public:
79  GeneralConfigurationParams() {};
80  ~GeneralConfigurationParams() { std::clog << "~GeneralConfigurationParams" << std::endl; };
81 
82  void Initialize(
83      std::string captureModuleAddress,
84      int captureModulePort,
85      std::vector<std::string> ifaces,
86      unsigned char mode,
87      unsigned char record,
88      std::vector<boost::shared_ptr<EutIPInterface> > eutIpInterfaceList) {
89    m_captureModuleAddress = captureModuleAddress;
90    m_captureModulePort = captureModulePort;
91    m_ifaces = ifaces;
92    m_mode = mode;
93    m_pcapTimeStampSeconds = 0;
94    m_pcapTimeStampMicroseconds = 0;
95    m_record = record;
96    m_eutIpInterfaceList = eutIpInterfaceList;
97  }; // ConnectToCaptureServerParams ctor
98  void Initialize(
99      std::string captureModuleAddress,
100      int captureModulePort,
101      unsigned char mode,
102      int pcapTimeStampSeconds,
103      int pcapTimeStampMicroseconds,
104      std::string pcapMergeTool,
105      std::string fileToPlay,
106      std::vector<std::string>& mergerFileList,
107      std::string mergerFilePath) {
108    m_captureModuleAddress = captureModuleAddress;
109    m_captureModulePort = captureModulePort;
110    m_mode = mode;
111    m_pcapTimeStampSeconds = pcapTimeStampSeconds;
112    m_pcapTimeStampMicroseconds = pcapTimeStampMicroseconds;
113    m_record = 0xff;
114    m_pcapMergeTool = pcapMergeTool;
115    m_fileToPlay = fileToPlay;
116    m_mergerFileList = mergerFileList;
117    m_mergerFilePath = mergerFilePath;
118  }; // ConnectToCaptureServerParams ctor
119};
120
121#endif // STF_370_GeneralConfigurationParams
Note: See TracBrowser for help on using the repository browser.