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

bulkDataNTSenderImpl.h

Go to the documentation of this file.
00001 #ifndef _BULKDATANT_SENDER_IMPL_H
00002 #define _BULKDATANT_SENDER_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 <bulkDataSenderS.h>
00042 #include <bulkDataReceiverC.h>
00043 
00044 #include "bulkDataNTConfigurationParser.h"
00045 #include "bulkDataNTSenderStream.h"
00046 
00047 
00069 // probably we do not need template
00070 //template<class TSenderCallback=BulkDataSenderDefaultCallback>
00071 class BulkDataNTSenderImpl : public baci::CharacteristicComponentImpl,
00072                            public virtual POA_bulkdata::BulkDataSender
00073 {    
00074   public:
00080         BulkDataNTSenderImpl(const ACE_CString& name,maci::ContainerServices* containerServices);
00081   
00085     virtual ~BulkDataNTSenderImpl();
00086   
00087     virtual void initialize();
00088 
00089     virtual void cleanUp();
00090 
00100     virtual void connect(bulkdata::BulkDataReceiver_ptr receiverObj_p);
00101 
00105     virtual void disconnect();
00106 
00113     virtual AcsBulkdata::BulkDataNTSenderStream *getSenderStream(const char *name);
00114 
00121     virtual AcsBulkdata::BulkDataNTSenderStream *getSenderStream();
00122 
00131     virtual void startSend()  =0;
00132 
00143     virtual void paceData()  =0;
00144 
00153     virtual void stopSend() =0;
00154 
00155 
00156 
00157   protected:
00158 
00163     virtual bool usesOldConfigurationMechanism();
00164 
00165  
00166   private:
00167 
00168     // The XML parser object, responsible of retrieving the configuration objects for a given XML document
00169     AcsBulkdata::BulkDataConfigurationParser *parser_m;
00170 
00171     // Used to store the number of flows to create, as specified with the old config mechanism
00172     int defaultFlowsCount_m;
00173 
00174     // map<name, stream>
00175     typedef std::map<std::string, AcsBulkdata::BulkDataNTSenderStream *> StreamMap;
00176 
00177     // Map that stores the stream objects that are actually created
00178     StreamMap senderStreams_m;
00179 
00184     virtual void openSenders();
00185 
00186     // Creates a new sender stream, given a name
00187     AcsBulkdata::BulkDataNTSenderStream* createSenderStream(const char *stream_name);
00188 
00189     // Create a new default sender stream
00190     AcsBulkdata::BulkDataNTSenderStream* createDefaultSenderStream();
00191 
00192     // Close a stream, given an iterator of the stream map
00193     void closeStream(StreamMap::iterator &it);
00194 
00195 };
00196 /*
00197 typedef BulkDataSenderImpl<> BulkDataSenderDefaultImpl;
00198 
00199 #include "bulkDataSenderImpl.i"
00200 */
00201 #endif /* _BULKDATANT_SENDER_IMPL_H */

Generated on Mon May 4 2015 08:27:43 for ACS-2015.4 C++ API by  doxygen 1.7.0