#ifndef _FRIDGE_IDL_ #define _FRIDGE_IDL_ /******************************************************************************* * ALMA - Atacama Large Millimiter Array * (c) European Southern Observatory, 2002 * Copyright by ESO (in the framework of the ALMA collaboration) * and Cosylab 2002, All rights reserved * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * "@(#) $Id: acsexmplFridge.midl,v 1.2 2006/11/21 14:51:16 hsommer Exp $" * * who when what * -------- -------- ---------------------------------------------- * gchiozzi 2003-05-19 Put back ACS_ENUM * */ #include #include #pragma prefix "alma" /** @file acsexmplFridge.idl * FridgeControl's IDL File */ module FRIDGE { /** * The fridge can be either on or off. */ enum OnOffStates { ON, OFF }; ACS_ENUM(OnOffStates); /** * The fridge's door can be open or closed. */ enum OpClStates { OPEN, CLOSE }; ACS_ENUM(OpClStates); /** * The actual temperature (i.e., currTemperature) of the fridge can be * over/at/below the desired temperature (i.e., refTemperature). * Since this enumeration will not be used with BACI properties, the * ACS_ENUM macro need not be utilized. */ enum TemperatureStatus { OVERREF, ATREF, BELOWREF}; /** * This defines the block of data that will be sent over the notification * channel. A temperatureDataBlockEvent can be considered to be an event. */ struct temperatureDataBlockEvent { /** * |(currTemperature - refTemperature)| */ float absoluteDiff; /** * The overall status of the fridge's temperature. */ TemperatureStatus status; }; /** * This defines the channel name for use with all event suppliers * and consumers for the FridgeControl component. */ const string CHANNELNAME_FRIDGE = "fridge"; /** @interface FridgeControl * Interface FridgeControl is a semi-complicated interface in the fact * that it utilizes enums along with double properties. */ interface FridgeControl : ACS::CharacteristicComponent { /** * Simply turns the fridge on. * @return void * @htmlonly *

* @endhtmlonly */ void on(); /** * Simply turns the fridge off. * @return void * @htmlonly *

* @endhtmlonly */ void off(); /** * Opens the fridge's door as a pure CORBA asynchronous method. As * soon as a client invokes this method, control is returned. * @return void * @htmlonly *

* @endhtmlonly */ oneway void open(); /** * Closes the fridge's door as a pure CORBA asynchronous method. As * soon as a client invokes this method, control is returned. * @return void * @htmlonly *

* @endhtmlonly */ oneway void close(); /** This property is the temperature we want the fridge to be. */ readonly attribute ACS::RWdouble refTemperature; /** The fridge is either on or off. */ readonly attribute ROOnOffStates powerStatus; /** The fridge's door is either open or closed. */ readonly attribute ROOpClStates doorStatus; /** This property is the fridge's actual temperature. */ readonly attribute ACS::ROdouble currTemperature; /** * In order to test notification channel issues with scopes and Java packages etc, * we also define an event struct inside an interface. */ struct NestedFridgeEvent { TemperatureStatus status; }; typedef sequence NestedFridgeEventSeq; }; }; #endif