OpenDaVINCI  4.16.0
PacketPipeline.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_IO_PACKETPIPELINE_H_
21 #define OPENDAVINCI_CORE_IO_PACKETPIPELINE_H_
22 
23 #include <queue>
24 
30 #include "opendavinci/generated/odcore/data/Packet.h"
31 
32 namespace odcore {
33  namespace io {
34 
35  using namespace std;
36 
42  private:
49 
55  PacketPipeline& operator=(const PacketPipeline &);
56 
57  public:
59 
60  virtual ~PacketPipeline();
61 
62  virtual void setPacketListener(PacketListener *pl);
63 
64  virtual void nextPacket(const odcore::data::Packet &p);
65 
66  private:
67  virtual void beforeStop();
68 
69  virtual void run();
70 
74  void processQueue();
75 
76  private:
77  odcore::base::Condition m_queueCondition;
78  odcore::base::Mutex m_queueMutex;
79  queue<odcore::data::Packet> m_queue;
80 
81  odcore::base::Mutex m_packetListenerMutex;
82  PacketListener *m_packetListener;
83  };
84 
85  }
86 } // odcore::io
87 
88 #endif /*OPENDAVINCI_CORE_IO_PACKETPIPELINE_H_*/
Definition: base/Condition.h:64
Definition: PacketObserver.h:34
Definition: base/Mutex.h:49
Definition: PacketListener.h:33
Definition: Service.h:62
Definition: PacketPipeline.h:41