00001 /* @(#) $Id: enumpropTestDeviceImpl.h,v 1.41 2009/10/02 14:00:28 bjeram Exp $ 00002 */ 00003 /* 00004 * DeviceImpl.h - ALMA Device interface implementation. 00005 * ALMA - Atacama Large Millimiter Array 00006 * (c) Associated Universities Inc., 2001 00007 * (c) European Southern Observatory, 2002 00008 * Copyright by ESO (in the framework of the ALMA collaboration) 00009 * and Cosylab 2002, All rights reserved 00010 * 00011 * This library is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU Lesser General Public 00013 * License as published by the Free Software Foundation; either 00014 * version 2.1 of the License, or (at your option) any later version. 00015 * 00016 * This library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this library; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 */ 00025 #ifndef _ENUM_PROP_TEST_DEVICE_IMPL_H_ 00026 #define _ENUM_PROP_TEST_DEVICE_IMPL_H_ 00027 00028 00029 #include <acsutil.h> 00030 00031 #include <baci.h> 00032 #include "enumpropTestDeviceS.h" 00033 #include "enumpropROImpl.h" 00034 #include "enumpropRWImpl.h" 00035 #include "baciCharacteristicComponentImpl.h" 00036 00037 NAMESPACE_USE(baci) 00038 NAMESPACE_USE(ENUMPROP_TEST) 00039 00040 class enumpropTestDeviceImpl : public POA_ENUMPROP_TEST::enumpropTestDevice, 00041 public baci::CharacteristicComponentImpl 00042 { 00043 public: 00044 //Constructor 00045 enumpropTestDeviceImpl ( 00046 const ACE_CString& name, 00047 maci::ContainerServices* containerServices); 00048 00049 //Destructor 00050 virtual ~enumpropTestDeviceImpl(void); 00051 00052 /* ----------------------------------------------------------------*/ 00053 /* --------------------- [ CORBA interface ] ----------------------*/ 00054 /* ----------------------------------------------------------------*/ 00055 ENUMPROP_TEST::ROStates_ptr currentState (); 00056 00057 /* 00058 * @throw ENUMPROP_TEST::StateMachine::NoSuchTransition 00059 */ 00060 virtual ACSErr::Completion * enable (); 00061 00062 /* 00063 * @throw ENUMPROP_TEST::StateMachine::NoSuchTransition 00064 */ 00065 virtual ACSErr::Completion * disable (); 00066 00067 /* 00068 * @throw ENUMPROP_TEST::StateMachine::NoSuchTransition 00069 */ 00070 virtual ACSErr::Completion * diagnose (); 00071 00072 /* 00073 * @throw ENUMPROP_TEST::StateMachine::NoSuchTransition 00074 */ 00075 virtual ACSErr::Completion * shutdown (); 00076 00077 /* 00078 * @throw ENUMPROP_TEST::StateMachine::NoSuchTransition 00079 */ 00080 virtual ACSErr::Completion * init (); 00081 00082 /* 00083 * @throw ENUMPROP_TEST::StateMachine::NoSuchTransition 00084 */ 00085 virtual ACSErr::Completion * on (); 00086 00087 /* 00088 * @throw ENUMPROP_TEST::StateMachine::NoSuchTransition 00089 */ 00090 virtual ACSErr::Completion * off (); 00091 00092 ENUMPROP_TEST::RWStates_ptr currentStateRW (); 00093 00094 void serverShutdown (); 00095 00099 void changeAlarmFFFM(const char*, const char*); 00100 00101 private: 00102 ROEnumImpl<ACS_ENUM_T(ENUMPROP_TEST::States), POA_ENUMPROP_TEST::ROStates> *m_currentState; 00103 RWEnumImpl<ACS_ENUM_T(ENUMPROP_TEST::States), POA_ENUMPROP_TEST::RWStates> *m_currentStateRW; 00104 }; 00105 00106 00107 #endif 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117