Skip to content
Snippets Groups Projects
Commit 55e38802 authored by Giulio Gaio's avatar Giulio Gaio
Browse files

Changed statmask type to DevLong

parent 1112bd33
No related branches found
No related tags found
No related merge requests found
...@@ -210,7 +210,7 @@ void Ionpump::always_executed_hook() ...@@ -210,7 +210,7 @@ void Ionpump::always_executed_hook()
sprintf(mask,"StatMask%d",channel); sprintf(mask,"StatMask%d",channel);
string stat_attr(mask); string stat_attr(mask);
long statmask = 0; Tango::DevLong statmask = 0;
try { try {
devps->read_attribute(stat_attr) >> statmask; devps->read_attribute(stat_attr) >> statmask;
...@@ -218,13 +218,15 @@ void Ionpump::always_executed_hook() ...@@ -218,13 +218,15 @@ void Ionpump::always_executed_hook()
if ((statmask & 0x4) || (statmask & 0xE0)) { if ((statmask & 0x4) || (statmask & 0xE0)) {
set_state(Tango::FAULT); set_state(Tango::FAULT);
s << "Ion pump ERROR" << endl; s << "Ion pump ERROR" << endl;
} else if (statmask & 0x1) {
set_state(Tango::ON);
s << "Ion pump is ON" << endl;
} else { } else {
set_state(Tango::OFF); if (statmask & 0x1) {
s << "Ion pump is OFF" << endl; set_state(Tango::ON);
} s << "Ion pump is ON" << endl;
} else {
set_state(Tango::OFF);
s << "Ion pump is OFF" << endl;
}
}
} catch(Tango::DevFailed &e) { } catch(Tango::DevFailed &e) {
set_state(Tango::FAULT); set_state(Tango::FAULT);
s << "Error reading PS status" << endl; s << "Error reading PS status" << endl;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment