9 #include "cmdline_systemmode.h"
10 #include "ct_threadpool.h"
11 #include "ps_parameter.h"
15 namespace mcx::parameter_server {
19 enum class ExceptionListType { NO_EXCEPTIONS = 0, REGARD_ALL_EXCEPT = 1, IGNORE_ALL_EXCEPT = 2 };
20 using ExceptionList =
const std::vector<Parameter*>&;
21 using ExceptionPair = std::pair<ExceptionListType, ExceptionList>;
23 virtual std::future<bool> save(
const std::string& file_name,
Parameter* root,
size_t max_number_of_trials,
24 size_t delay_us,
bool force_update) = 0;
26 virtual std::future<bool> load(
const std::string& file_name,
Parameter* root, cmd_line::SystemMode system_mode,
27 bool is_relative) = 0;
31 static size_t decodeValues(
Parameter* param,
const char* str_cursor,
size_t str_len,
char* decode_buf,
32 size_t decode_buf_size);
35 bool load(
const std::string& file_name,
Parameter* root,
bool is_relative =
false);
37 bool load(
const std::string& file_name,
Parameter* root, cmd_line::SystemMode system_mode,
bool is_relative =
false);
39 bool save(
const std::string& file_name,
Parameter* root,
size_t max_number_of_trials = 2,
size_t delay_us = 2000,
40 bool force_update =
true);