added parsing of period and exptime

This commit is contained in:
Erik Fröjdh
2025-12-18 13:50:25 +01:00
parent 520d86cec8
commit a8225faa17
7 changed files with 229 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
#include <fmt/format.h>
#include <fstream>
#include <optional>
#include <chrono>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
@@ -84,6 +85,9 @@ class RawMasterFile {
size_t m_bitdepth{};
uint8_t m_quad = 0;
std::chrono::nanoseconds m_exptime{0};
std::chrono::nanoseconds m_period{0};
xy m_geometry{};
xy m_udp_interfaces_per_module{1, 1};
@@ -140,6 +144,9 @@ class RawMasterFile {
ScanParameters scan_parameters() const;
std::chrono::nanoseconds exptime() const { return m_exptime; }
std::chrono::nanoseconds period() const { return m_period; }
private:
void parse_json(const std::filesystem::path &fpath);
void parse_raw(const std::filesystem::path &fpath);