Go to the documentation of this file.00001 #ifndef _BULKDATA_SENDRECV_IMPL_H
00002 #define _BULKDATA_SENDRECV_IMPL_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
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
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. The method is implemented just in bulkDataNT!"));
00111 }
00112
00113 void openReceiverStreamCfg (const char * stream_name, const char * stream_cfg)
00114 {
00115 ACS_SHORT_LOG((LM_ERROR,"BulkDataSendRecvImpl<>::openReceiverStreamCfg NOT implemented. The method is implemented just in bulkDataNT!"));
00116 }
00117
00118 void openReceiverFlow (const char * stream_name, const char * flow_name)
00119 {
00120 ACS_SHORT_LOG((LM_ERROR,"BulkDataSendRecvImpl<>::openReceiverFlow NOT implemented. The method is implemented just in bulkDataNT!"));
00121 }
00122
00123 void openReceiverFlowCfg (const char * stream_name, const char * flow_name, const char * flow_cfg)
00124 {
00125 ACS_SHORT_LOG((LM_ERROR,"BulkDataSendRecvImpl<>::openReceiverFlowCfg NOT implemented. The method is implemented just in bulkDataNT!"));
00126 }
00127
00128
00132 virtual void disconnect();
00133
00143 void closeReceiverStream(const char * stream_name)
00144 {
00145 ACS_SHORT_LOG((LM_ERROR,"BulkDataSendRecvImpl<>::closeReceiverStream NOT implemented"));
00146 }
00147
00148 virtual void startSend();
00149
00160 virtual void paceData();
00161
00170 virtual void stopSend();
00171
00172
00173
00185 virtual void openReceiver();
00186
00190 bulkdata::BulkDataReceiverConfig * getReceiverConfig();
00191
00195 virtual void closeReceiver();
00196
00200 virtual ACSErr::Completion *getCbStatus(CORBA::ULong flowNumber)
00201 {
00202 ACS_TRACE("BulkDataSendRecvImpl::getCbStatus");
00203
00204 ACSBulkDataStatus::AVCbReadyCompletion *comp = new ACSBulkDataStatus::AVCbReadyCompletion();
00205
00206 return comp->returnCompletion();
00207 }
00208
00212 virtual void setTimeout(CORBA::ULong flowNumber, CORBA::ULong timeout)
00213 {
00214 }
00215
00219 virtual void setRecvName(const char *recvName)
00220 {
00221 }
00222
00226 virtual void subscribeNotification(ACS::CBvoid_ptr notifCb)
00227 {
00228 }
00229
00235 void fwdData2UserCB(CORBA::Boolean enable)
00236 {
00237 ACS_SHORT_LOG((LM_WARNING,"BulkDataDistributerImpl<>::fwdData2UserCB not implemnted!"));
00238 }
00239 private:
00240
00241 AcsBulkdata::BulkDataSender<TSenderCallback> sender;
00242
00243 AcsBulkdata::BulkDataReceiver<TReceiverCallback> receiver;
00244
00245 maci::ContainerServices *containerServices_p;
00246
00247 CDB::DAL_ptr dal_p;
00248
00249 CDB::DAO_ptr dao_p;
00250 };
00251
00252
00253 #include "bulkDataSendRecvImpl.i"
00254
00255 #endif