• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

bulkDataSendRecvImpl.h

Go to the documentation of this file.
00001 #ifndef _BULKDATA_SENDRECV_IMPL_H
00002 #define _BULKDATA_SENDRECV_IMPL_H
00003 /*******************************************************************************
00004  *    ALMA - Atacama Large Millimiter Array
00005  *    (c) European Southern Observatory, 2002
00006  *    Copyright by ESO (in the framework of the ALMA collaboration)
00007  *    and Cosylab 2002, All rights reserved
00008  *
00009  *    This library is free software; you can redistribute it and/or
00010  *    modify it under the terms of the GNU Lesser General Public
00011  *    License as published by the Free Software Foundation; either
00012  *    version 2.1 of the License, or (at your option) any later version.
00013  *
00014  *    This library is distributed in the hope that it will be useful,
00015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  *    Lesser General Public License for more details.
00018  *
00019  *    You should have received a copy of the GNU Lesser General Public
00020  *    License along with this library; if not, write to the Free Software
00021  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00022  *
00023  *
00024  * "@(#)"
00025  *
00026  * who       when      what
00027  * --------  --------  ----------------------------------------------
00028  * oat       28/01/05  created 
00029  */
00030 
00031 /************************************************************************
00032  *
00033  *----------------------------------------------------------------------
00034  */
00035 
00036 #include <baci.h>
00037 #include <baciCharacteristicComponentImpl.h>
00038 #include <maciHelper.h>
00039 #include <maciContainerServices.h>
00040 
00041 #include "bulkDataSendRecvS.h"
00042 
00043 #include "bulkDataReceiverC.h"
00044 
00045 #include "bulkDataReceiver.h"
00046 #include "bulkDataSender.h"
00047 
00048 #include "bulkDataSenderDefaultCb.h"
00049 
00050 #include "ACSBulkDataStatus.h"
00051 
00073 template<class TReceiverCallback, class TSenderCallback = BulkDataSenderDefaultCallback>
00074 class BulkDataSendRecvImpl : public virtual baci::CharacteristicComponentImpl,
00075                              public POA_bulkdata::BulkDataSendRecv
00076 {    
00077   public:
00083     BulkDataSendRecvImpl(const ACE_CString& name,maci::ContainerServices* containerServices);
00084   
00088     virtual ~BulkDataSendRecvImpl();
00089   
00090 
00091     void cleanUp();
00092 
00093 
00094     /***************************** Sender part ****************************/
00095 
00096 
00106     virtual void connect(bulkdata::BulkDataReceiver_ptr receiverObj_p);
00107 
00108     void openReceiverStream(const char * stream_name)
00109     {
00110         ACS_SHORT_LOG((LM_ERROR,"BulkDataSendRecvImpl<>::openReceiverStream NOT implemented"));
00111     }
00112 
00116     virtual void disconnect();
00117 
00127     void closeReceiverStream(const char * stream_name)
00128     {
00129         ACS_SHORT_LOG((LM_ERROR,"BulkDataSendRecvImpl<>::closeReceiverStream NOT implemented"));
00130     }
00131 
00132     virtual void startSend();
00133 
00144     virtual void paceData();
00145 
00154     virtual void stopSend();
00155 
00156     /*************************** Receiver part **********************/
00157 
00169     virtual void openReceiver(); 
00170 
00174     bulkdata::BulkDataReceiverConfig * getReceiverConfig();
00175 
00179     virtual void closeReceiver();
00180 
00184     virtual ACSErr::Completion *getCbStatus(CORBA::ULong flowNumber) 
00185         {
00186             ACS_TRACE("BulkDataSendRecvImpl::getCbStatus");
00187 
00188             ACSBulkDataStatus::AVCbReadyCompletion *comp = new ACSBulkDataStatus::AVCbReadyCompletion();
00189             
00190             return comp->returnCompletion();
00191         }
00192 
00196     virtual void setTimeout(CORBA::ULong flowNumber, CORBA::ULong timeout)
00197         {
00198         }
00199 
00203     virtual void setRecvName(const char *recvName)
00204         {
00205         }
00206 
00210     virtual void subscribeNotification(ACS::CBvoid_ptr notifCb)
00211         {
00212         }
00213 
00219     void fwdData2UserCB(CORBA::Boolean enable)
00220     {
00221         ACS_SHORT_LOG((LM_WARNING,"BulkDataDistributerImpl<>::fwdData2UserCB not implemnted!"));
00222     }
00223   private:
00224 
00225     AcsBulkdata::BulkDataSender<TSenderCallback> sender;
00226 
00227     AcsBulkdata::BulkDataReceiver<TReceiverCallback> receiver;
00228 
00229     maci::ContainerServices *containerServices_p;
00230 
00231     CDB::DAL_ptr dal_p;
00232 
00233     CDB::DAO_ptr dao_p;
00234 };
00235 
00236 
00237 #include "bulkDataSendRecvImpl.i"
00238 
00239 #endif /* _BULKDATA_SENDRECV_IMPL_H */

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0