5#ifndef IFW_CCF_CTL_ACQ_THREAD_HPP_
6#define IFW_CCF_CTL_ACQ_THREAD_HPP_
8#include <boost/exception/diagnostic_information.hpp>
29 const double period = 0.1);
39 void SetInputQ(std::shared_ptr<ifw::ccf::common::FrameQueue>& queue);
51 bool m_allow_frame_skippping;
52 int16_t m_fr_periodicity_chk_tolerance{2};
53 bool m_fr_periodicity_chk_auto_error{
true};
54 float m_fr_periodicity_chk_min_timeout{5.0};
60 uint64_t m_iteration_count;
61 uint64_t m_iterations_since_start_count;
62 uint64_t m_frames_acquired;
64 double m_time_last_no_free_input_frames_log;
65 double m_time_for_last_cam_check;
68 double m_time_for_last_fr_reception;
69 double m_current_fr_period;
70 double m_time_for_last_fr_reception_warning;
71 bool m_fr_periodicity_warning_active;
73 bool m_exec_telemetry_after_setup{
true};
75 void GetFreeFrame(uint8_t attempts);
76 void HandleCcfTriggering();
77 void HandleCustomTrigger(
bool frame_received);
78 void ReceiveFrame(
bool& frame_received,
79 double& fr_reception_time);
80 void HandleFrameRecvStatus();
81 void SubmitAndNotify();
82 void CheckCameraHealth();
83 void CheckMessageBus(
bool& new_setup);
86 std::string& diagnostics);
87 void CheckFramePeriodicity();
88 void ResetFramePeriodicityCheckPars();
91 std::shared_ptr<ifw::ccf::common::FrameQueue> m_input_q;
94 double m_last_acq_status_check;
Frame class used to store the data and metadata for one frames received from the camera.
Definition dataFrame.hpp:18
The FrameQueue class implements a queue, to manage a set of CCF DataFrame instances as a ring buffer.
Definition frameQueue.hpp:15
Class used by the threads to store info for generating performance statistics.
Definition utilities.hpp:27
CCF Acquisition Thread, handling the reception of image data from the camera.
Definition acqThread.hpp:23
virtual ~AcqThread()
Definition acqThread.cpp:24
void SetInputQ(std::shared_ptr< ifw::ccf::common::FrameQueue > &queue)
Set reference to the Application Input Queue.
Definition acqThread.cpp:51
ifw::ccf::common::FrameStatistics & GetFrameStat()
Get reference to frame handling statistics.
Definition acqThread.cpp:423
void Initialise()
Definition acqThread.cpp:28
AcqThread(const std::string &thread_name, ifw::ccf::mptk::MessageBus &message_bus, const double period=0.1)
Acquisition Thread, handling the interfacing and data acquisition from the camera.
Definition acqThread.cpp:12
void ResetCounters()
Reset counters for the internal household.
Definition acqThread.cpp:64
virtual void UserLogic()
Acquisition Thread user logic.
Definition acqThread.cpp:83
ifw::ccf::common::FrameQueue & GetInputQ()
Get refrence to the Application Input Queue.
Definition acqThread.cpp:56
IFW CTD Multiprocessing Toolkit Message Bus.
Definition messageBus.hpp:91
IFW CTD Multiprocessing Toolkit Message class.
Definition message.hpp:24
IFW CTD Multiprocessing Toolkit Thread base class.
Definition thread.hpp:30
Definition acqThread.cpp:10
constexpr double NO_FRAME_RECV_SLEEP_TIME
Sleep to apply when no frame is available.
Definition acqThread.hpp:20
constexpr double FRAME_RECV_TIMEOUT
Timeout to apply, waiting for the next frame.
Definition acqThread.hpp:17
Status
General status variable.
Definition base.hpp:156