/* * BaseIUAlarmable.hh * * Base class for modules that can have alarms associated with them. * Created on: Nov 5, 2015 * Author: Hovanes Egiyan */ #ifndef BASEIUALARMABLE_HH_ #define BASEIUALARMABLE_HH_ #include class BaseIUAlarmable { private: epicsAlarmCondition baStatus; epicsAlarmSeverity baSeverity; public: BaseIUAlarmable( const epicsAlarmCondition stat = epicsAlarmNone, const epicsAlarmSeverity sevr = epicsSevNone ) : baStatus( stat ), baSeverity( sevr ) { return; } virtual ~BaseIUAlarmable() { return; } BaseIUAlarmable( const BaseIUAlarmable& objRef ) : baStatus( objRef.baStatus ), baSeverity( objRef.baSeverity ) { return; } BaseIUAlarmable& operator=( const BaseIUAlarmable& objRef ) { baStatus = objRef.baStatus; baSeverity = objRef.baSeverity; return *this; } inline virtual epicsAlarmSeverity GetSeverity() const { return baSeverity; } inline virtual void SetSeverity( const epicsAlarmSeverity baSeverity ) { this->baSeverity = baSeverity; } inline virtual epicsAlarmCondition GetStatus() const { return baStatus; } inline virtual void SetStatus( const epicsAlarmCondition baStatus ) { this->baStatus = baStatus; } inline virtual void CheckAlarm() { return; } // void SetAllAlarms( const epicsAlarmCondition status ) = 0; }; #endif /* BASEIUALARMABLE_HH_ */