8 std::pair<bool, std::string>
12 std::string resultString =
"success";
16 if (
value.is_null()) {
18 resultString =
"Found null value for parameter " +
key;
25 auto iter = configParamList.find(
key);
26 if (
iter == configParamList.end()) {
28 resultString =
"Found unknown parameter: " +
key +
": JSON=" +
config.dump();
32 auto paramType = std::get<0>(
iter->second);
33 auto paramSize = std::get<1>(
iter->second);
34 auto paramSingleOnly = !std::get<2>(
iter->second);
38 if (paramSingleOnly) {
41 resultString =
"Incorrect JSON type for parameter " +
key;
64 resultString = std::move(ppcResultString);
71 resultString =
"Incorrect JSON type for parameter " +
key;
84 return {
result, resultString};
87 template<
typename T> std::pair<bool, std::string>
91 std::string resultString =
"success";
93 for (
auto [
key,
value] : paramValue.items()) {
110 if (
value.size() == 1) {
117 resultString =
"Incorrect JSON type for parameter " +
key;
126 size_t elementSize =
value[0].size();
127 size_t arrayLength =
value.size();
134 else if (arrayLength == paramSize) {
142 resultString =
"Invalid value format for array parameter " + paramKey +
" on side " +
m_sideLabels[
side];
157 resultString =
"Invalid array length for parameter " + paramKey +
" on side " +
m_sideLabels[
side];
167 resultString =
"Incorrect JSON type for parameter " + paramKey +
"paramType = " +
182 int chanIndex = std::stoi(keyRemainder);
185 resultString =
"Invalid channel specifier in values for parameter " +
key;
191 resultString =
"Incorrect JSON type for parameter " +
key;
199 resultString =
"Invalid channel specifier for parameter " +
key;
209 resultString =
"Exception caught while parsing key " +
key;
213 return {
result, resultString};