• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

ASIMessage.h

Go to the documentation of this file.
00001 #ifndef ASI_MESSAGE_H
00002 #define ASI_MESSAGE_H
00003 
00004 /*******************************************************************************
00005  * ALMA - Atacama Large Millimeter Array
00006  * Copyright (c) ESO - European Southern Observatory, 2011
00007  * (in the framework of the ALMA collaboration).
00008  * All rights reserved.
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  * 
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00023  *******************************************************************************/
00024 #include <memory>
00025 #include <string>
00026 #include <vector>
00027 #include "Timestamp.h"
00028 #include "FaultState.h"
00029 
00030 namespace acsalarm
00031 {
00032         /*
00033          * The class which encapsulates the data for one or more fault states (FaultState)
00034          * to be sent to the laser alarm server.
00035          */
00036         class ASIMessage
00037         {
00038                 public:
00039                         ASIMessage();
00040                         ASIMessage(std::auto_ptr<std::vector<acsalarm::FaultState> > & faults);
00041                         virtual ~ASIMessage();
00042 
00043                         std::vector<acsalarm::FaultState> & getFaultStates() { return *faultStates; }
00044                         void setFaultStates(std::auto_ptr<std::vector<acsalarm::FaultState> > & faults) { faultStates = faults; }
00045 
00046                         bool getBackup() { return backup; }
00047                         void setBackup(bool bkup) { backup = bkup; }
00048 
00049                         std::string getVersion() { return version; }
00050                         void setVersion(std::string ver) { version = ver; }
00051 
00052                         std::string getSourceName() { return sourceName; }
00053                         void setSourceName(std::string name) { sourceName = name; }
00054 
00055                         std::string getSourceHostname() { return sourceHostname; }
00056                         void setSourceHostname(std::string name) { sourceHostname = name; }
00057 
00058                         const acsalarm::Timestamp & getSourceTimestamp() { return *sourceTimestamp; }
00059                         void setSourceTimestamp(std::auto_ptr<acsalarm::Timestamp> ts) { sourceTimestamp = ts; }
00060 
00061                 private:
00062                         std::auto_ptr<std::vector<acsalarm::FaultState> > faultStates;
00063                         bool backup;
00064                         std::string version;
00065                         std::string sourceName;
00066                         std::string sourceHostname;
00067 
00068                 protected:
00069                         std::auto_ptr<acsalarm::Timestamp> sourceTimestamp;
00070         };
00071 };
00072 #endif

Generated on Mon May 4 2015 08:27:42 for ACS-2015.4 C++ API by  doxygen 1.7.0