// // Created by epagris on 2022.05.03.. // #ifndef WFR_APP_ACQUISITIONFORMAT_H #define WFR_APP_ACQUISITIONFORMAT_H #include class AcquisitionFormat { public: size_t sampling_rate_Hz; // sampling rate size_t sample_size_b; // sample size in bits size_t sample_storage_size_B; // sample storage size in bytes size_t channel_count; // number of channels size_t mch_samples_per_packet; // number of all-channel samples per packet size_t distinct_samples_per_packet; // number of samples summed across all channel size_t sample_data_size_per_packet_B; // data size summed across the full packet size_t single_channel_data_size_per_packet_B; // data size of a single channel in the packet size_t all_channel_sample_size_B; // sample size of a full, all-channel sample double packet_period_ns; // time period encapsulated by a full packet private: bool mSettingsValid; // indicate if current settings are valid void fillDerivedFields(); // fill fields with values derived from the input data public: AcquisitionFormat(); // default contr. explicit AcquisitionFormat(const std::string& acqFormatStr); // constr. from formatt string AcquisitionFormat(size_t sampling_rate_Hz, size_t sample_size_b, size_t channel_count, size_t mch_samples_per_packet); // constr. from fields bool isValid() const; // are the fields represent a valid set of settings }; #endif //WFR_APP_ACQUISITIONFORMAT_H