Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Config.h
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef SKA_CHEETAH_EMULATOR_CONFIG_H
25 #define SKA_CHEETAH_EMULATOR_CONFIG_H
26 
27 
28 #include "cheetah/utils/Config.h"
29 #include "cheetah/generators/Config.h"
30 #include "cheetah/rcpt_low/PacketGeneratorConfig.h"
31 #include "panda/EndpointConfig.h"
32 #include "panda/Engine.h"
33 #include "panda/ServerConfig.h"
34 #include <boost/asio/ip/udp.hpp>
35 #include <string>
36 #include <vector>
37 
38 namespace ska {
39 namespace cheetah {
40 namespace emulator {
41 
51 {
52  public:
53  typedef boost::asio::ip::udp::endpoint EndPointType;
54 
55  public:
56  Config();
57  ~Config();
58 
62  EndPointType fixed_end_point() const;
63 
67  void fixed_address(panda::IpAddress const&);
68 
72  std::string const& generator() const;
73 
74 
75  rcpt_low::PacketGeneratorConfig const& ska_low_config() const;
76 
80  std::size_t number_of_channels() const;
81  void number_of_channels(std::size_t n);
82 
87 
88  panda::Engine& engine() const;
89  panda::ServerConfig const& server_config() const;
90 
91 
92  protected:
93  void add_options(OptionsDescriptionEasyInit& add_options) override;
94 
95  private:
96  std::string _generator;
97  std::size_t _number_of_channels;
98  cheetah::generators::Config _generators_config;
100  panda::ServerConfig _server_config;
101  ska::panda::EndpointConfig _endpoint_config;
102 
103 };
104 
105 } // namespace emulator
106 } // namespace cheetah
107 } // namespace ska
108 
109 #endif // SKA_CHEETAH_EMULATOR_CONFIG_H
EndPointType fixed_end_point() const
the address to stream UDP packets to
Definition: Config.cpp:59
Base class for module configuration.
Definition: Config.h:42
cheetah::generators::Config const & generators_config() const
the configuration block for generators
Definition: Config.cpp:69
Generator Configuration file.
Definition: Config.h:46
Some limits and constants for FLDO.
Definition: Brdz.h:35
Configuration options for the Emulator.
Definition: Config.h:50
void fixed_address(panda::IpAddress const &)
set the address to stream UDP packets to
Definition: Config.cpp:64
std::string const & generator() const
the name of the data generator to use
Definition: Config.cpp:94
Configuration for the packet generator to the time seperation of the packets.
std::size_t number_of_channels() const
the number of channels to generato
Definition: Config.cpp:84