24 #ifndef SKA_CHEETAH_RCPT_LOW_PACKETGENERATOR_H 25 #define SKA_CHEETAH_RCPT_LOW_PACKETGENERATOR_H 26 #include "cheetah/rcpt_low/BeamFormerPacket.h" 27 #include "cheetah/rcpt_low/PacketGeneratorConfig.h" 28 #include "cheetah/data/TimeFrequency.h" 29 #include "panda/Buffer.h" 30 #include "panda/Engine.h" 31 #include <type_traits> 46 template<
class DataGenerator>
50 typedef int8_t SampleDataType;
53 typedef boost::units::quantity<ska::cheetah::data::Seconds, double> TimeType;
54 typedef boost::units::quantity<ska::cheetah::data::MegaHertz, double> FrequencyType;
65 template<
typename Handler>
68 ska::panda::Buffer<char> next();
71 std::chrono::microseconds
interval()
const;
77 typedef decltype(std::declval<Packet>().packet_count()) CounterType;
79 DataGenerator& _model;
81 DataType::ConstIterator _data_iterator;
83 std::chrono::microseconds _interval;
85 const std::size_t _max_buffers;
86 std::size_t _buffer_index;
87 std::vector<ska::panda::Buffer<char>> _buffers;
88 ska::panda::Engine _engine;
89 ska::cheetah::utils::ModifiedJulianClock::time_point _timestamp;
91 std::size_t _number_of_samples_per_packet;
92 std::size_t _number_of_channels_per_packet;
93 FrequencyType _bandwidth;
101 #include "cheetah/rcpt_low/detail/PacketGenerator.cpp" 103 #endif // SKA_CHEETAH_RCPT_LOW_PACKETGENERATOR_H
std::chrono::microseconds interval() const
The interval between packets in microsec.
void send_one(Handler &&)
send out a single packet
The incoming RF signal sample from the UDP stream.
Packs data into a UDP stream Packet Header format of the BeamFormer.
Some limits and constants for FLDO.
Configuration for the packet generator to the time seperation of the packets.