From aaafacaa33826a9804e5ed886a6df57887a0ab8f Mon Sep 17 00:00:00 2001 From: gscalamera <graziano.scalamera@elettra.eu> Date: Fri, 26 Mar 2021 16:36:02 +0100 Subject: [PATCH] Fix DevEnum support --- src/event_table.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/event_table.cpp b/src/event_table.cpp index af43aa8..f01ca83 100644 --- a/src/event_table.cpp +++ b/src/event_table.cpp @@ -1396,6 +1396,7 @@ void EventCallBack::extract_values(Tango::DeviceAttribute *attr_value, vector<do vector<Tango::DevBoolean> v_bo; vector<Tango::DevLong64> v_lo64; vector<Tango::DevULong64> v_ulo64; + vector<Tango::DevEnum> v_enum; vector<string> v_string; val_string = string(""); @@ -1478,6 +1479,11 @@ void EventCallBack::extract_values(Tango::DeviceAttribute *attr_value, vector<do for(vector<Tango::DevULong64>::iterator it = v_ulo64.begin(); it != v_ulo64.end(); it++) val.push_back((double)(*it)); //convert all to double type = Tango::DEV_ULONG64; + } else if (attr_value->get_type() == Tango::DEV_ENUM) { + *(attr_value) >> v_enum; + for(vector<Tango::DevEnum>::iterator it = v_enum.begin(); it != v_enum.end(); it++) + val.push_back((double)(*it)); //convert all to double + type = Tango::DEV_ENUM; } else if (attr_value->get_type() == Tango::DEV_STRING) { *(attr_value) >> v_string; val_string = *(v_string.begin()); //TODO: support string spectrum attrbutes -- GitLab