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 <CosProperty.idl> 00026 #include <acscommon.idl> 00027 #include <ACSErrTypeCommon.idl> 00028 00029 #pragma prefix "alma" 00030 00031 module alarmsystem 00032 { 00033 /* 00034 * The string used to register the alarm service in the naming 00035 * service 00036 */ 00037 const string AlarmServiceName="AcsAlarmService"; 00038 00039 /* 00040 * The triplet 00041 */ 00042 struct Triplet 00043 { 00044 string faultFamily; 00045 string faultMember; 00046 long faultCode; 00047 }; 00048 00049 /* 00050 * The ACS alarm service. 00051 * 00052 * It is a fake process that does nothing but waiting for shutdown. 00053 * 00054 * Having this servant is useful to uniform the behaviour of the system that does 00055 not need to be aware of the implementation currently running. 00056 * 00057 */ 00058 interface AlarmService 00059 { 00063 void shutdown(); 00064 /* 00065 * Return the type of alarm service: true means ACS implementation 00066 * false means CERN implementation 00067 */ 00068 boolean isACSAlarmService(); 00069 00070 /* 00071 * Submit an alarm bypassing the NC 00072 * 00073 * This method allows to send alarms even when the Notify Service 00074 * is down or not working properly and it is meant for this purpose 00075 * only: normally alarms must be sent through the API of your 00076 * preferred programming language because it offers more functionalities 00077 * then this method 00078 */ 00079 void submitAlarm( 00080 in alarmsystem::Triplet triplet, 00081 in boolean active, 00082 in string sourceHostName, 00083 in string sourceName, 00084 in ACS::Time sourceTimestamp, 00085 in CosPropertyService::Properties alarmProperties) 00086 raises (ACSErrTypeCommon::BadParameterEx, ACSErrTypeCommon::UnexpectedExceptionEx); 00087 }; 00088 00089 }; 00090 00091 #endif