From 48b68668f4dcb3481925e74efd05f4e91c47d369 Mon Sep 17 00:00:00 2001 From: babic_a Date: Wed, 5 Jan 2022 23:45:45 +0100 Subject: [PATCH] bugfix order of params from json config --- core-buffer/include/BufferUtils.hpp | 6 +++--- core-buffer/src/BufferUtils.cpp | 2 +- std-udp-recv/include/UdpRecvConfig.hpp | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/core-buffer/include/BufferUtils.hpp b/core-buffer/include/BufferUtils.hpp index 7e4c393..3bc2c07 100644 --- a/core-buffer/include/BufferUtils.hpp +++ b/core-buffer/include/BufferUtils.hpp @@ -12,10 +12,10 @@ namespace BufferUtils const std::string detector_name; const std::string detector_type; const int n_modules; + const int bit_depth; const int image_height; const int image_width; const int start_udp_port; - const int bit_depth; friend std::ostream& operator <<(std::ostream& os, DetectorConfig const& det_config) @@ -23,10 +23,10 @@ namespace BufferUtils return os << det_config.detector_name << ' ' << det_config.detector_type << ' ' << det_config.n_modules << ' ' - << det_config.start_udp_port << ' ' << det_config.bit_depth << ' ' << det_config.image_height << ' ' - << det_config.image_width << ' '; + << det_config.image_width << ' ' + << det_config.start_udp_port << ' '; } }; diff --git a/core-buffer/src/BufferUtils.cpp b/core-buffer/src/BufferUtils.cpp index 6d906c2..5d91d5d 100644 --- a/core-buffer/src/BufferUtils.cpp +++ b/core-buffer/src/BufferUtils.cpp @@ -162,9 +162,9 @@ BufferUtils::DetectorConfig BufferUtils::read_json_config( config_parameters["detector_name"].GetString(), config_parameters["detector_type"].GetString(), config_parameters["n_modules"].GetInt(), + config_parameters["bit_depth"].GetInt(), config_parameters["image_height"].GetInt(), config_parameters["image_width"].GetInt(), - config_parameters["bit_depth"].GetInt(), config_parameters["start_udp_port"].GetInt(), }; } diff --git a/std-udp-recv/include/UdpRecvConfig.hpp b/std-udp-recv/include/UdpRecvConfig.hpp index c22a01b..aff5e67 100644 --- a/std-udp-recv/include/UdpRecvConfig.hpp +++ b/std-udp-recv/include/UdpRecvConfig.hpp @@ -20,6 +20,8 @@ struct UdpRecvConfig { config_parameters["detector_type"].GetString(), config_parameters["n_modules"].GetInt(), config_parameters["bit_depth"].GetInt(), + config_parameters["image_height"].GetInt(), + config_parameters["image_width"].GetInt(), config_parameters["start_udp_port"].GetInt(), }; } @@ -27,8 +29,10 @@ struct UdpRecvConfig { const std::string detector_name; const std::string detector_type; const int n_modules; - const int start_udp_port; const int bit_depth; + const int image_height; + const int image_width; + const int start_udp_port; };