ifw-ccf 6.0.0
 
Loading...
Searching...
No Matches
frameQueue.hpp
Go to the documentation of this file.
1
6
7#ifndef CCF_COMMON_FRAME_QUEUE_HPP_H_
8#define CCF_COMMON_FRAME_QUEUE_HPP_H_
9
12
13
14namespace ifw::ccf::common {
15
17 class FrameQueue: public Base {
18 public:
19
21 FrameQueue(const std::string& name,
22 const uint16_t nb_of_buffers);
23
25
27 void Reset();
28
30 const std::string& GetName() const;
31
35 void GetFreeFrame(const uint16_t consumers,
36 DataFrame** frame);
37
39 void GetFrame(uint16_t frame_number,
40 DataFrame** frame);
41
43 uint16_t GetNbOfBuffers() const;
44
46 uint16_t GetNbOfFreeBuffers();
47
48 protected:
49
50 private:
51 void Allocate(const uint16_t buffers);
52
53 std::string m_name;
54 std::vector<DataFrame> m_frames;
55 uint16_t m_frame_index;
56
57 std::recursive_mutex m_q_mtx;
58 };
59
60}
61
62#endif // CCF_COMMON_FRAME_QUEUE_HPP_H_
Base()
Definition base.cpp:121
Frame class used to store the data and metadata for one frames received from the camera.
Definition dataFrame.hpp:20
void Reset()
Reset the Frame Queue object. This means in practice to reset/free the DataFrame objects in the queue...
Definition frameQueue.cpp:29
uint16_t GetNbOfFreeBuffers()
Return the number of free buffers in the queue.
Definition frameQueue.cpp:89
uint16_t GetNbOfBuffers() const
Return the number of buffers in the queue.
Definition frameQueue.cpp:84
const std::string & GetName() const
Return the name of the Frame Queue.
Definition frameQueue.cpp:24
void GetFreeFrame(const uint16_t consumers, DataFrame **frame)
Definition frameQueue.cpp:57
~FrameQueue()
Definition frameQueue.cpp:20
void GetFrame(uint16_t frame_number, DataFrame **frame)
Get reference to the given frame number in the queue.
Definition frameQueue.cpp:42
FrameQueue(const std::string &name, const uint16_t nb_of_buffers)
Instantiate a Frame Queue with the given name and the given number of buffers (DataFrame instances).
Definition frameQueue.cpp:12
Definition appBase.cpp:10