Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

enumpropMACRO_included.idl

Go to the documentation of this file.
00001 #ifndef _ENUMPROP_MACRO_INCLUDED_IDL_ 00002 #define _ENUMPROP_MACRO_INCLUDED_IDL_ 00003 00004 /******************************************************************************* 00005 * ALMA - Atacama Large Millimiter Array 00006 * (c) European Southern Observatory, 2002 00007 * Copyright by ESO (in the framework of the ALMA collaboration) 00008 * and Cosylab 2002, 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 * 00025 * "@(#) $Id: enumpropMACRO_included.idl,v 1.2 2004/04/21 14:06:14 acaproni Exp $" 00026 * 00027 * who when what 00028 * -------- -------- ---------------------------------------------- 00029 * gchiozzi 2003-07-14 Created. SPR 2003048. 00030 * gchiozzi 2003-04-08 Added boundary ifdef 00031 * gchiozzi 2003-04-08 Renamed ENUM macro as ACS_ENUM. JacORB was complaining 00032 */ 00033 00034 /* 00035 * JacORB has problems when including twice a file with macros inside, 00036 * since it tries to parse also preprocessor directives that should 00037 * be excluded by the include guards, probably because it searches 00038 * for the #endif preprocessor directive. Weird !!!!! 00039 * See SPR ALMASW2003048 for details. 00040 * This file in included by the master enumpropMACRO.idl 00041 * file as a workaround. 00042 * In this way, we have "added one layer" so that 00043 * enumpropMACRO includes the code from an external 00044 * file only the first time it passes. 00045 * The second time guards are scanned properly. 00046 */ 00047 00048 00049 #define CALLBACK(T) interface CB##T : ACS::Callback {\ 00050 oneway void working(in T value, in ACSErr::Completion c, in ACS::CBDescOut desc); \ 00051 oneway void done(in T value, in ACSErr::Completion c, in ACS::CBDescOut desc); \ 00052 };\ 00053 typedef CB##T T##CB; 00054 00055 #define ALARM(T) interface Alarm##T : ACS::Callback {\ 00056 oneway void alarm_raised(in T value, in ACSErr::Completion c, in ACS::CBDescOut desc);\ 00057 oneway void alarm_cleared(in T value, in ACSErr::Completion c, in ACS::CBDescOut desc);\ 00058 };\ 00059 \ 00060 typedef Alarm##T T##Alarm; 00061 00062 #define PENUM(T) interface P##T: ACS::TypelessProperty {\ 00063 T get_sync(out ACSErr::Completion c);\ 00064 void get_async(in ACS::CBpattern cb, in ACS::CBDescIn desc);\ 00065 long get_history(in long n_last_values, out T##Seq vs, out ACS::TimeSeq ts);\ 00066 ACS::Monitorpattern create_monitor(in ACS::CBpattern cb, in ACS::CBDescIn desc);\ 00067 ACS::Monitor create_postponed_monitor (in ACS::Time start_time, in ACS::CBpattern cb, in ACS::CBDescIn desc);\ 00068 readonly attribute ACS::TimeInterval default_timer_trigger;\ 00069 readonly attribute ACS::TimeInterval min_timer_trigger;\ 00070 readonly attribute T default_value;\ 00071 readonly attribute ACS::stringSeq statesDescription;\ 00072 readonly attribute ACS::ConditionSeq condition;\ 00073 readonly attribute T##Seq allStates;\ 00074 } 00075 /* 00076 get_async and create_monitor and create_postponed_monitor shoudl have CB##T instead CBpattern (problem due to add to baci new type is very difficulte) 00077 Should we rename states to enum(s) or similar ? 00078 allStates - all substates supported by device (do wee need?) 00079 default_value - default_states(?) 00080 */ 00081 00082 #define ROENUM(T) interface RO##T: P##T{\ 00083 ACS::Subscription new_subscription_AlarmEnum(in ACS::Alarmpattern cb, in ACS::CBDescIn desc);\ 00084 readonly attribute T##Seq alarm_on;\ 00085 readonly attribute T##Seq alarm_off;\ 00086 } 00087 /* 00088 AlarmEnum ->Alarm##T (?) 00089 Alarmpattern -> Alarm##T 00090 alarm_on - all alarm states (if device goes into that states alram will be triggerd) 00091 alarm_off - all no alram states 00092 */ 00093 00094 #define RWENUM(T) interface RW##T: P##T {\ 00095 ACSErr::Completion set_sync(in T value);\ 00096 void set_async(in T value, in ACS::CBvoid cb, in ACS::CBDescIn desc);\ 00097 void set_nonblocking(in T value);\ 00098 } 00099 /* 00100 set_sync can raise NoSuchState or similar 00101 incrament, decrament - go to next/previous state ? 00102 */ 00103 00104 00105 #define ACS_ENUM(T) \ 00106 typedef sequence<T> T##Seq; \ 00107 CALLBACK(T)\ 00108 ALARM(T)\ 00109 PENUM(T);\ 00110 ROENUM(T);\ 00111 RWENUM(T) 00112 00113 #endif /* ENUMPROP_MACRO_INCLUDED_IDL_ */ 00114

Generated on Thu Apr 30 02:26:27 2009 for ACS IDL interfaces by doxygen 1.3.8