laserSource::CERNASIMessage − |
#include <CERNASIMessage.h> |
Public Member Functions |
CERNASIMessage (acsalarm::ASIMessage &message) |
std::string toXML () |
std::string timestampToXML (const acsalarm::Timestamp *timestamp, std::string elementName, int amountToIndent) const |
std::string faultStateToXML (acsalarm::FaultState *state, int amountToIndent=3) |
std::string propertiesToXML (acsalarm::Properties props, int amountToIndent=6) |
Private Attributes |
acsalarm::ASIMessage & m_message |
CERNASIMessage holds a reference to ASIMessage to build the XML of the source alarms that will be published into the NC. The reason to have this method here is that in ACS/LGPL/CommonSoftware the ASI-Message name space is not yet known neither needed because the ACS implementation only logs a message for each alarm. |
laserSource::CERNASIMessage::CERNASIMessage (acsalarm::ASIMessage & message) Constructor |
Parameters: |
message The (not NULL) ASIMessage to produce the XML |
std::string laserSource::CERNASIMessage::faultStateToXML (acsalarm::FaultState * state, int amountToIndent = 3) Returns an XML representation of the fault state. NOTE: this will not be a complete XML document, but just a fragment. |
Parameters: |
state The FaultState to format |
For example: <fault-state family=’AlarmSource’ member=’ALARM_SOURCE_ANTENNA’ code=’1’> <descriptor>TERMINATE</descriptor> <user-properties> <property name=’ASI_PREFIX’ value=’prefix’> <property name=’TEST_PROPERTY’ value=’TEST_VALUE’> <property name=’ASI_SUFFIX’ value=’suffix’> </user-properties> <user-timestamp seconds=’1129902763’ microseconds=’105000’/> </fault-state> |
std::string laserSource::CERNASIMessage::propertiesToXML (acsalarm::Properties props, int amountToIndent = 6) Returns an XML fragment (NOT a complete document) representing all of the properties contained in this table, for use in the message transported from an alarm source to the alarm server. |
Parameters: |
amountToIndent - used to specify a level of indentation (in spaces) for readability |
std::string laserSource::CERNASIMessage::timestampToXML (const acsalarm::Timestamp * timestamp, std::string elementName, int amountToIndent) const Returns an XML fragment (NOT a complete document) representing the timestamp, for use in the message that is transported from alarm source to alarm server. |
Parameters: |
timestamp The timestamp |
For example: <source-timestamp>2014-10-07T13:39:34.658</source-timestamp> Parameters: |
amountToIndent - used to specify a level of indentation (in spaces) for readability |
std::string laserSource::CERNASIMessage::toXML () builds the xml representation of the message which will be sent to the alarm server |
acsalarm::ASIMessage& laserSource::CERNASIMessage::m_message [private] The (not NULL) ASIMessage to produce the XML |
Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code. |