00001 #ifndef _BULK_DATA_NT_RECEIVER_FLOW_H_ 00002 #define _BULK_DATA_NT_RECEIVER_FLOW_H_ 00003 /******************************************************************************* 00004 * ALMA - Atacama Large Millimiter Array 00005 * (c) European Southern Observatory, 2011 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 * 00021 * "@(#) $Id: bulkDataNTReceiverFlow.h,v 1.18 2013/02/07 11:02:29 bjeram Exp $" 00022 * 00023 * who when what 00024 * -------- -------- ---------------------------------------------- 00025 * bjeram 2011-04-19 created 00026 */ 00027 #ifndef __cplusplus 00028 #error This is a C++ include file and cannot be used from plain C 00029 #endif 00030 00031 #include "bulkDataNTFlow.h" 00032 #include "bulkDataNTDDSSubscriber.h" 00033 #include "bulkDataNTStream.h" 00034 #include "bulkDataNTCallback.h" 00035 #include "bulkDataNTReaderListener.h" 00036 00037 00038 namespace AcsBulkdata 00039 { 00040 00041 class BulkDataNTReceiverStreamBase; 00042 00043 class BulkDataNTReceiverFlow : public BulkDataNTFlow 00044 { 00045 public: 00046 00047 00056 BulkDataNTReceiverFlow(BulkDataNTReceiverStreamBase *receiverStream, 00057 const char* flowName, 00058 const ReceiverFlowConfiguration &rcvCfg, 00059 BulkDataNTCallback *cb, 00060 bool releaseCB); 00061 00065 virtual ~BulkDataNTReceiverFlow(); 00066 00071 void setReceiverName(char* recvName); 00072 00077 BulkDataNTCallback* getCallbackObject() { return callback_m; } 00078 00083 template<class T> 00084 T* getCallback() { return dynamic_cast<T*>(callback_m); } 00085 00087 void enableCallingCB(); 00088 00090 void disableCallingCB(); 00091 00092 void dumpStatistics(); 00093 00094 protected: 00095 AcsBulkdata::BulkDataNTReceiverStreamBase *receiverStream_m; 00096 00097 AcsBulkdata::BulkDataNTDDSSubscriber *ddsSubscriber_m; 00098 ACSBulkData::BulkDataNTFrameDataReader *ddsDataReader_m; 00099 DDS::Topic *ddsTopic_m; 00100 BulkDataNTReaderListener *dataReaderListener_m; 00101 BulkDataNTCallback *callback_m; 00102 bool releaseCB_m; 00103 ReceiverFlowConfiguration rcvCfg_m; 00104 00106 BulkDataNTReceiverFlow(); 00108 void operator=(const BulkDataNTReceiverFlow&); 00110 BulkDataNTReceiverFlow(const BulkDataNTReceiverFlow&); 00111 };//class BulkDataSenderFlow 00112 00113 }; 00114 00115 00116 #endif