8#ifndef DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_MODELS_SOURCEEMULATORMODEL_HPP_
9#define DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_MODELS_SOURCEEMULATORMODEL_HPP_
41namespace datahandlinglibs {
66template<
class ReadoutType>
72 uint64_t time_tick_diff,
74 double frame_error_rate,
76 uint16_t frames_per_tick=1)
94 void scrap(
const nlohmann::json& )
101 void start(
const nlohmann::json& );
102 void stop(
const nlohmann::json& );
void stop(const nlohmann::json &)
uint m_frame_errors_length
uint64_t m_pattern_generator_previous_ts
uint32_t m_this_link_number
bool is_configured() override
virtual void generate_opmon_data() override
void scrap(const nlohmann::json &)
utilities::ReusableThread m_producer_thread
uint32_t m_this_apa_number
std::unique_ptr< RateLimiter > m_rate_limiter
std::shared_ptr< raw_sender_ct > m_raw_data_sender
SourceEmulatorModel(std::string name, std::atomic< bool > &run_marker, uint64_t time_tick_diff, double dropout_rate, double frame_error_rate, double rate_khz, uint16_t frames_per_tick=1)
std::vector< bool > m_dropouts
daqdataformats::SourceID m_sourceid
void start(const nlohmann::json &)
SourceEmulatorPatternGenerator m_pattern_generator
std::vector< bool > m_frame_errors
std::atomic< bool > & m_run_marker
ErrorBitGenerator m_error_bit_generator
void conf(const confmodel::DetectorStream *stream_conf, const appmodel::StreamEmulationParameters *emu_conf)
void set_sender(const std::string &conn_name)
uint16_t m_frames_per_tick
std::atomic< int > m_packet_count_tot
std::chrono::milliseconds m_raw_sender_timeout_ms
std::atomic< int > m_packet_count
uint64_t m_time_tick_diff
bool m_generate_periodic_adc_pattern
double m_frame_error_rate
std::unique_ptr< FileSourceBuffer > m_file_source
std::vector< int > m_channel
SourceEmulatorPatternGenerator()
~SourceEmulatorPatternGenerator()
std::atomic< bool > run_marker
Global atomic for process lifetime.