00001 #ifndef MULTIPLEXCONVERGENCELAYER_H_ 00002 #define MULTIPLEXCONVERGENCELAYER_H_ 00003 00004 #include "core/ConvergenceLayer.h" 00005 #include "core/BundleReceiver.h" 00006 #include "utils/Service.h" 00007 #include "utils/MutexLock.h" 00008 #include "utils/Mutex.h" 00009 00010 #include <queue> 00011 #include <list> 00012 00013 using namespace dtn::data; 00014 using namespace dtn::utils; 00015 00016 namespace dtn 00017 { 00018 namespace core 00019 { 00024 class MultiplexConvergenceLayer : public ConvergenceLayer, public BundleReceiver 00025 { 00026 public: 00030 MultiplexConvergenceLayer(); 00031 00035 virtual ~MultiplexConvergenceLayer(); 00036 00040 virtual TransmitReport transmit(const Bundle &b); 00041 00045 virtual TransmitReport transmit(const Bundle &b, const Node &node); 00046 00050 void add(ConvergenceLayer *cl); 00051 00052 void received(const ConvergenceLayer &cl, const dtn::data::Bundle &b); 00053 00054 void initialize(); 00055 void terminate(); 00056 00057 private: 00058 list<ConvergenceLayer*> m_clayers; 00059 dtn::utils::Mutex m_receivelock; 00060 }; 00061 } 00062 } 00063 00064 #endif /*MULTIPLEXCONVERGENCELAYER_H_*/
1.5.6