This commit is contained in:
2024-10-29 17:36:16 +03:00
parent 4e3e3ec60e
commit 6a4278c247
7 changed files with 101 additions and 35 deletions

View File

@@ -158,7 +158,7 @@ protected:
if constexpr (std::same_as<serialized_t, val_t> || std::convertible_to<val_t, serialized_t>) {
return val;
} else {
// !!!!!!!! TODO: val_t maust be a char range
// !!!!!!!! TODO: val_t must be a char range
return serialized_t{val.begin(), val.end()};
}
};
@@ -199,7 +199,7 @@ protected:
}
};
static DeviceWrapper nullDevice;
static inline DeviceWrapper nullDevice{};
std::unordered_map<void*, DeviceWrapper> _devices;
@@ -324,7 +324,7 @@ public:
attrs = msg.template attrs<attr_vec_t>(0, 1);
if (attrs.size()) {
auto val = _bindDevice.getAttr(get_elem(0));
msg.ack(get_elem(0), {val.begin(), val.end()});
msg.ack(get_elem(0), serialized_t{val.begin(), val.end()});
} else { // no attr name!
msg.err(std::make_error_code(AdcDeviceNetServerSessionError::ERROR_NO_PROTO_ATTRNAME));
}