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

baciTestClassImpl.h

Go to the documentation of this file.
00001 #ifndef baciTestClassImpl_h 00002 #define baciTestClassImpl_h 00003 00004 /******************************************************************************* 00005 * ALMA - Atacama Large Millimiter Array 00006 * (c) European Southern Observatory, 2004 00007 * 00008 *This library is free software; you can redistribute it and/or 00009 *modify it under the terms of the GNU Lesser General Public 00010 *License as published by the Free Software Foundation; either 00011 *version 2.1 of the License, or (at your option) any later version. 00012 * 00013 *This library is distributed in the hope that it will be useful, 00014 *but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 *Lesser General Public License for more details. 00017 * 00018 *You should have received a copy of the GNU Lesser General Public 00019 *License along with this library; if not, write to the Free Software 00020 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * "@(#) $Id: baciTestClassImpl.h,v 1.113 2008/10/01 02:26:45 cparedes Exp $" 00023 * 00024 * who when what 00025 * -------- -------- ---------------------------------------------- 00026 * msekoran 2002-02-10 Added new properties for test 00027 * msekoran 2002-01-03 Added new properties for test 00028 * gchiozzi 2001-10-18 Added new properties for test 00029 * gchiozzi 2001-10-17 Added warning on virtual inheritance from PortableServer::RefCountServantBase 00030 * gchiozzi 2001-02-15 Added declaration of get_interface() method for Object Explorer 00031 * gchiozzi 2001-02-15 created created standard header 00032 * msekoran 2001-03-10 integrated with new BACI; ALMA coding convention used; doc. 00033 */ 00034 00040 #ifndef __cplusplus 00041 #error This is a C++ include file and cannot be used from plain C 00042 #endif 00043 00044 #include <acsutil.h> 00045 00046 #include <baci.h> 00047 #include <baciTestS.h> 00048 00049 #include <baciROdouble.h> 00050 #include <baciRWdouble.h> 00051 #include <baciROfloat.h> 00052 #include <baciRWfloat.h> 00053 #include <baciROlong.h> 00054 #include <baciRWlong.h> 00055 #include <baciROpattern.h> 00056 #include <baciRWpattern.h> 00057 #include <baciROstring.h> 00058 #include <baciRWstring.h> 00059 00060 #include <baciROdoubleSeq.h> 00061 #include <baciRWdoubleSeq.h> 00062 #include <baciROfloatSeq.h> 00063 #include <baciRWfloatSeq.h> 00064 00065 #include <baciROlongSeq.h> 00066 #include <baciRWlongSeq.h> 00067 00068 #include <baciCharacteristicComponentImpl.h> 00069 00070 #include <baciSmartPropertyPointer.h> 00071 00077 class BaciTestClassImpl: public baci::CharacteristicComponentImpl, 00078 public POA_BACI_TEST::BaciTestClass, 00079 public baci::ActionImplementator 00080 { 00081 00082 public: 00083 // Constructors & Destructors 00084 BaciTestClassImpl( 00085 const ACE_CString& name, 00086 maci::ContainerServices *, 00087 bool monitoring=true); 00088 00092 virtual ~BaciTestClassImpl(); 00093 00094 /* --------------- [ Action implementator interface ] -------------- */ 00095 00113 virtual baci::ActionRequest invokeAction(int function, 00114 baci::BACIComponent* component_p, const int &callbackID, 00115 const CBDescIn& descIn, baci::BACIValue* value, 00116 Completion& completion, CBDescOut& descOut); 00117 00118 /*** 00119 * Implementation of async. on() method 00120 */ 00121 virtual baci::ActionRequest onAction(baci::BACIComponent* component_p, int callbackID, 00122 const CBDescIn& descIn, baci::BACIValue* value, 00123 Completion& completion, CBDescOut& descOut); 00124 00125 /*** 00126 * Implementation of async. off() method 00127 */ 00128 virtual baci::ActionRequest offAction(baci::BACIComponent* component_p, int callbackID, 00129 const CBDescIn& descIn, baci::BACIValue* value, 00130 Completion& completion, CBDescOut& descOut); 00131 00132 /*** 00133 * Implementation of async. reset() method 00134 */ 00135 virtual baci::ActionRequest resetAction(baci::BACIComponent* component_p, int callbackID, 00136 const CBDescIn& descIn, baci::BACIValue* value, 00137 Completion& completion, CBDescOut& descOut); 00138 00139 /* ----------------------------------------------------------------*/ 00140 /* --------------------- [ CORBA interface ] ----------------------*/ 00141 /* ----------------------------------------------------------------*/ 00142 00146 virtual void shutdown (); 00147 00155 virtual void on ( 00156 ACS::CBvoid_ptr cb, 00157 const ACS::CBDescIn & desc 00158 ); 00159 00167 virtual void off ( 00168 ACS::CBvoid_ptr cb, 00169 const ACS::CBDescIn & desc 00170 ); 00171 00179 virtual void reset ( 00180 ACS::CBvoid_ptr cb, 00181 const ACS::CBDescIn & desc 00182 ); 00183 00187 virtual void turnOnMonitoring() 00188 { 00189 try 00190 { 00191 startPropertiesMonitoring(); 00192 } 00193 catch(ACSErr::ACSbaseExImpl &ex) 00194 { 00195 ex.log(); 00196 } 00197 00198 }//turnOnMonitoring 00199 00203 virtual void turnOffMonitoring() 00204 { 00205 try 00206 { 00207 stopPropertiesMonitoring(); 00208 } 00209 catch(ACSErr::ACSbaseExImpl &ex) 00210 { 00211 ex.log(); 00212 } 00213 }//turnOffMonitoring 00214 00218 virtual CORBA::Boolean isPropertiesMonitoringActive(); 00219 00224 virtual ACS::RWdouble_ptr RWdoubleWithErrorDevIOProp (); 00225 00230 virtual ACS::RWdouble_ptr RWdoubleWithDevIOProp (); 00231 00236 virtual ACS::RWdouble_ptr RWdoubleProp (); 00237 00242 virtual ACS::ROdouble_ptr ROdoubleProp (); 00243 00248 virtual ACS::RWfloat_ptr RWfloatProp (); 00249 00254 virtual ACS::ROfloat_ptr ROfloatProp (); 00255 00260 virtual ACS::RWlong_ptr RWlongProp (); 00261 00266 virtual ACS::ROlong_ptr ROlongProp (); 00267 00272 virtual ACS::ROpattern_ptr ROpatternProp (); 00273 00278 virtual ACS::RWpattern_ptr RWpatternProp (); 00279 00283 virtual ACS::ROstring_ptr ROstringProp (); 00284 00288 virtual ACS::RWstring_ptr RWstringProp (); 00289 00290 00295 virtual ACS::RWdoubleSeq_ptr RWdoubleSeqProp (); 00296 00301 virtual ACS::ROdoubleSeq_ptr ROdoubleSeqProp (); 00302 00307 virtual ACS::RWfloatSeq_ptr RWfloatSeqProp (); 00308 00313 virtual ACS::ROfloatSeq_ptr ROfloatSeqProp (); 00314 00319 virtual ACS::RWlongSeq_ptr RWlongSeqProp (); 00320 00325 virtual ACS::ROlongSeq_ptr ROlongSeqProp (); 00326 00327 00328 00329 private: 00330 00334 typedef baci::ActionRequest (BaciTestClassImpl::*ActionFunction)(baci::BACIComponent* component_p, int callbackID, 00335 const CBDescIn& descIn, baci::BACIValue* value, 00336 Completion& completion, CBDescOut& descOut); 00337 00339 bool m_shutdown; 00340 00342 ActionFunction m_actions[3]; 00343 00345 baci::SmartPropertyPointer<baci::RWdouble> m_RWdoubleWithErrorDevIOProp_sp; 00346 baci::SmartPropertyPointer<baci::RWdouble> m_RWdoubleWithDevIOProp_sp; 00347 baci::SmartPropertyPointer<baci::ROdouble> m_ROdoubleProp_sp; 00348 baci::SmartPropertyPointer<baci::RWdouble> m_RWdoubleProp_sp; 00349 baci::SmartPropertyPointer<baci::ROfloat> m_ROfloatProp_sp; 00350 baci::SmartPropertyPointer<baci::RWfloat> m_RWfloatProp_sp; 00351 baci::SmartPropertyPointer<baci::ROlong> m_ROlongProp_sp; 00352 baci::SmartPropertyPointer<baci::RWlong> m_RWlongProp_sp; 00353 baci::SmartPropertyPointer<baci::ROpattern> m_ROpatternProp_sp; 00354 baci::SmartPropertyPointer<baci::RWpattern> m_RWpatternProp_sp; 00355 baci::SmartPropertyPointer<baci::ROstring> m_ROstringProp_sp; 00356 baci::SmartPropertyPointer<baci::RWstring> m_RWstringProp_sp; 00357 00358 baci::SmartPropertyPointer<baci::ROdoubleSeq> m_ROdoubleSeqProp_sp; 00359 baci::SmartPropertyPointer<baci::RWdoubleSeq> m_RWdoubleSeqProp_sp; 00360 baci::SmartPropertyPointer<baci::ROfloatSeq> m_ROfloatSeqProp_sp; 00361 baci::SmartPropertyPointer<baci::RWfloatSeq> m_RWfloatSeqProp_sp; 00362 baci::SmartPropertyPointer<baci::ROlongSeq> m_ROlongSeqProp_sp; 00363 baci::SmartPropertyPointer<baci::RWlongSeq> m_RWlongSeqProp_sp; 00364 00365 }; 00366 00367 #endif /* baciTestClassImpl_h */ 00368 00369 00370 00371 00372 00373

Generated on Thu Apr 30 02:30:50 2009 for ACS C++ API by doxygen 1.3.8