...
This commit is contained in:
@@ -283,7 +283,7 @@ public:
|
||||
float,
|
||||
double,
|
||||
long double>
|
||||
arithmetic_t{};
|
||||
arithmetic_types{};
|
||||
|
||||
typedef DEV_ID_T device_id_t;
|
||||
typedef ATTR_ID_T attr_id_t;
|
||||
@@ -326,6 +326,14 @@ public:
|
||||
std::tuple<attr_t<VTs>...>{});
|
||||
}
|
||||
|
||||
// add attribute of one of arithmetic type
|
||||
template <typename GT, typename ST>
|
||||
requires std::is_arithmetic_v<snplib_attr_value_deduced_t<GT, ST>>
|
||||
void addArithAttr(ATTR_ID_T id, GT&& getter, ST&& setter)
|
||||
{
|
||||
addAttr(std::move(id), std::forward<GT>(getter), std::forward<ST>(setter), AdcGenericDevice::arithmetic_types);
|
||||
}
|
||||
|
||||
adc_error_t operator()(CMD_ID_T id)
|
||||
{
|
||||
if (auto it = _commands.find(id); it != _commands.end()) {
|
||||
|
||||
Reference in New Issue
Block a user