00001 /* 00002 * ALMA - Atacama Large Millimiter Array 00003 * (c) European Southern Observatory, 2002 00004 * Copyright by ESO (in the framework of the ALMA collaboration), 00005 * All rights reserved 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00020 * MA 02111-1307 USA 00021 */ 00022 #ifndef _ACSALARMSERVICE_IDL_ 00023 #define _ACSALARMSERVICE_IDL_ 00024 00025 #include <logging_idl.idl> 00026 #include <CosProperty.idl> 00027 #include <acscommon.idl> 00028 #include <ACSErrTypeCommon.idl> 00029 00030 #pragma prefix "alma" 00031 00032 module alarmsystem 00033 { 00034 /* 00035 * The string used to register the alarm service in the naming 00036 * service 00037 */ 00038 const string AlarmServiceName="AcsAlarmService"; 00039 00040 /* 00041 * The triplet 00042 */ 00043 struct Triplet 00044 { 00045 string faultFamily; 00046 string faultMember; 00047 long faultCode; 00048 }; 00049 00050 /* 00051 * The ACS alarm service. 00052 * 00053 * It is a fake process that does nothing but waiting for shutdown. 00054 * 00055 * Having this servant is useful to uniform the behaviour of the system that does 00056 not need to be aware of the implementation currently running. 00057 * 00058 */ 00059 interface AlarmService : Logging::LoggingConfigurable 00060 { 00064 oneway void shutdown(); 00065 /* 00066 * Return the type of alarm service: true means ACS implementation 00067 * false means CERN implementation 00068 */ 00069 boolean isACSAlarmService(); 00070 00071 /* 00072 * Submit an alarm bypassing the NC 00073 * 00074 * This method allows to send alarms even when the Notify Service 00075 * is down or not working properly and it is meant for this purpose 00076 * only: normally alarms must be sent through the API of your 00077 * preferred programming language because it offers more functionalities 00078 * then this method 00079 */ 00080 void submitAlarm( 00081 in alarmsystem::Triplet myTriplet, 00082 in boolean active, 00083 in string sourceHostName, 00084 in string sourceName, 00085 in ACS::Time sourceTimestamp, 00086 in CosPropertyService::Properties alarmProperties) 00087 raises (ACSErrTypeCommon::BadParameterEx, ACSErrTypeCommon::UnexpectedExceptionEx); 00088 }; 00089 00090 }; 00091 00092 #endif