v1.0.0-rc.35

This commit is contained in:
2025-04-22 14:42:14 +02:00
parent 2a1807f4bd
commit 9bec33290c
144 changed files with 526 additions and 306 deletions
@@ -123,6 +123,22 @@ namespace {
return ret;
}
std::map<std::string, float> ProcessThresholdEnergy(CborValue &value) {
if (!cbor_value_is_map(&value))
throw JFJochException(JFJochExceptionCategory::CBORError, "Map expected");
std::map<std::string, float> ret;
CborValue map_value;
cborErr(cbor_value_enter_container(&value, &map_value));
while (!cbor_value_at_end(&map_value)) {
auto key = GetCBORString(map_value);
auto val = GetCBORFloat(map_value);
ret[key] = val;
}
cborErr(cbor_value_leave_container(&value, &map_value));
return ret;
}
UnitCell ProcessUnitCellElement(CborValue &value) {
UnitCell unit_cell{};
@@ -845,6 +861,8 @@ namespace {
message.unit_cell = ProcessUnitCellElement(value);
else if (key == "max_spot_count")
message.max_spot_count = GetCBORUInt(value);
else if (key == "threshold_energy")
message.threshold_energy = ProcessThresholdEnergy(value);
else if (key == "image_dtype") {
auto val = GetCBORString(value);
if (val == "uint8") {