39 #include "cheetah/rcpt_low/PacketGenerator.h" 40 #include "cheetah/rcpt/PacketGenerator.h" 41 #include "cheetah/data/TimeFrequency.h" 42 #include "cheetah/emulator/EmulatorAppConfig.h" 43 #include "cheetah/emulator/Factory.h" 44 #include "cheetah/emulator/Config.h" 45 #include "panda/BasicAppConfig.h" 46 #include "panda/Log.h" 50 template<
typename PacketGeneratorType>
53 typedef typename PacketGeneratorType::SampleDataType NumericalRep;
57 template<
typename EmulatorConfig,
typename StreamConfig>
59 int run(EmulatorConfig
const& config, StreamConfig&& stream_config) {
61 FactoryType factory(config, generator_factory);
62 std::unique_ptr<typename FactoryType::EmulatorType> emulator(factory.create(config.generator(), std::forward<StreamConfig>(stream_config)));
63 PANDA_LOG <<
"emulator using generator: '" << config.generator() <<
"'";
66 return emulator->run();
70 int main(
int argc,
char** argv)
81 if( (rv=app_config.parse(argc, argv)) )
return rv;
85 typedef ska::cheetah::emulator::EmulatorAppConfig::Stream Stream;
86 if(stream_type == Stream::SkaLow)
91 if(stream_type == Stream::SkaMid)
99 catch(std::exception
const& e) {
100 std::cerr <<
"Emulator: " << e.what() << std::endl;;
103 std::cerr <<
"Emulator: unknown exception caught" << std::endl;
construct a suitable generatro object
Packs data into a UDP stream Packet Header format of the BeamFormer.
factory to construct emulators
cheetah::generators::Config const & generators_config() const
the configuration block for generators
Packs data into a UDP stream Packet Header format of the BeamFormer.
Configuration options for the Emulator.
Top level configuration for the emulator app.
Stream stream_type() const
the type of UDP stream to generate
std::size_t number_of_channels() const
the number of channels to generato
void set_generator_list(std::vector< std::string > const &generator_names)
set the known generators