#include /*********************************** IMPLEMENTATION of AlarmSystemMonitorEnumProp */ template baci::AlarmSystemMonitorEnumProp::AlarmSystemMonitorEnumProp(TPROP * property, EventDispatcher * eventDispatcher) : AlarmSystemMonitor(property, eventDispatcher) { ACS_TRACE("baci::AlarmSystemMonitorEnumProp<>::AlarmSystemMonitorEnumProp"); }//AlarmSystemMonitorEnumProp template baci::AlarmSystemMonitorEnumProp::~AlarmSystemMonitorEnumProp() { ACS_TRACE("baci::AlarmSystemMonitorEnumProp<>::~AlarmSystemMonitorEnumProp"); }//~AlarmSystemMonitorEnumProp template void baci::AlarmSystemMonitorEnumProp::check(BACIValue &val, const ACSErr::Completion & c, const ACS::CBDescOut & desc ) { ACE_UNUSED_ARG(c); std::ostringstream ostr; std::string ts; ACS::pattern value = val.patternValue(); ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, templateMutex); if ( this->property_mp->checkAlarm(T(value)) && !this->alarmRaised_m ) { ostr << value << std::ends; ts = ostr.str(); // we have to make a temporary string otherwise there is problem with memory: s = ostr.str().c_str(); does not work ACS_SHORT_LOG((LM_DEBUG, "Alarm for property: %s raised. Value change to: %s", this->property_mp->name(), ts.c_str())); this->setProperty("BACI_Value", ts.c_str()); this->sendAlarm(1, true); this->alarmRaised_m = true; this->lastAlarmValue_m = val; } if (!this->property_mp->checkAlarm(T(value)) && this->alarmRaised_m ) { ostr << value << std::ends; ts = ostr.str(); // we have to make a temporary string otherwise there is problem with memory: s = ostr.str().c_str(); does not work ACS_SHORT_LOG((LM_DEBUG, "Alarm for property: %s cleared. Value change to: %s", this->property_mp->name(), ts.c_str())); this->setProperty("BACI_Value", ts.c_str()); this->clearAlarm();//=this->sendAlarm(1, false); this->alarmRaised_m = false; this->lastAlarmValue_m = val; } }//check