Download Bulk Data Transfer
Transcript
ALMA ACS Bulk Data Transfer Two different ways of implementing the Receivers are used in this example. Only the first Receiver is a template. The following code shows the relevant part of the implementation of the first receiver: File bulkDataReceiverDistr1Impl.h: template<class TCallback> class BulkDataReceiverDistr1Impl : public virtual BulkDataReceiverImpl<TCallback>, public virtual POA_bulkdatadistr::BulkDataReceiverDistr1 The class BulkDataReceiverDistr1Impl is a template class, taking the callback as template parameter. This callback is also passed as parameter to the template base class BulkDataReceiverImpl. File bulkDataReceiverDistr1Impl.cpp: #include <maciACSComponentDefines.h> MACI_DLL_SUPPORT_FUNCTIONS(BulkDataReceiverDistr1Impl<BulkDataReceiverCbDistr1>) The specific callback is passed when the class BulkDataReceiverDistr1Impl is istantiated inside the file containing the callback implementation. The following code shows the relevant part of the implementation of the second receiver: File bulkDataReceiverDistr1Impl.h: class BulkDataReceiverDistr2Impl : public virtual BulkDataReceiverImpl<BulkDataReceiverCbDistr2>, public virtual POA_bulkdatadistr::BulkDataReceiverDistr2 The class BulkDataReceiverDistr2Impl is not a template, and the callback is passed directly as template parameter of the base class. File bulkDataReceiverDistr2Impl.cpp #include <maciACSComponentDefines.h> MACI_DLL_SUPPORT_FUNCTIONS(BulkDataReceiverDistr2Impl) In this case the class BulkDataReceiverDistr2Impl is not more a template and therefore is instantiated in the usual way. Known issue: Also in this case the disconnection order is important for the correct shutdown of the connection. The two Receivers must be disconnected from the Distributer after the Sender: Create Date:20041111 ACS_Bulk_Data_Transfer Author: Roberto Cirami Page 31 of 44