12 #define epicsExportSharedSymbols 21 namespace epics {
namespace pvData {
23 string PVAlarm::noAlarmFound(
"No alarm structure found");
24 string PVAlarm::notAttached(
"Not attached to an alarm structure");
28 if(pvField->getField()->getType()!=
structure)
return false;
30 pvSeverity = pvStructure->getSubField<
PVInt>(
"severity");
31 if(pvSeverity.get()==
NULL)
return false;
32 pvStatus = pvStructure->getSubField<
PVInt>(
"status");
33 if(pvStatus.get()==
NULL) {
37 pvMessage = pvStructure->getSubField<
PVString>(
"message");
38 if(pvMessage.get()==
NULL) {
55 if(pvSeverity.get()==
NULL)
return false;
61 if(pvSeverity.get()==
NULL) {
62 throw std::logic_error(notAttached);
71 if(pvSeverity.get()==
NULL) {
72 throw std::logic_error(notAttached);
74 if(pvSeverity->isImmutable() || pvMessage->isImmutable())
return false;
77 bool returnValue =
false;
Methods for manipulating alarm.
void setMessage(std::string const &value)
shared_ptr< T > static_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
bool attach(PVFieldPtr const &pvField)
bool set(Alarm const &alarm)
TODO only here because of the Lockable.
static AlarmSeverity getSeverity(int value)
std::string getMessage() const
void get(Alarm &alarm) const
PVString is special case, since it implements SerializableArray.
void setSeverity(AlarmSeverity value)
AlarmStatus getStatus() const
Data interface for a structure,.
std::tr1::shared_ptr< PVStructure > PVStructurePtr
void setStatus(AlarmStatus value)
Class that holds the data for each possible scalar type.
std::tr1::shared_ptr< PVField > PVFieldPtr
AlarmSeverity getSeverity() const
static AlarmStatus getStatus(int value)