7#ifndef IFW_CCF_CTL_ACQ_THREAD_HPP_
8#define IFW_CCF_CTL_ACQ_THREAD_HPP_
10#include <boost/exception/diagnostic_information.hpp>
31 const double period = 0.1);
41 void SetInputQ(std::shared_ptr<ifw::ccf::common::FrameQueue>& queue);
53 bool m_allow_frame_skippping;
54 int16_t m_fr_periodicity_chk_tolerance{2};
55 bool m_fr_periodicity_chk_auto_error{
true};
56 float m_fr_periodicity_chk_min_timeout{5.0};
62 uint64_t m_iteration_count;
63 uint64_t m_iterations_since_start_count;
64 uint64_t m_frames_acquired;
66 double m_time_last_no_free_input_frames_log;
67 double m_time_for_last_cam_check;
70 double m_time_for_last_fr_reception;
71 double m_current_fr_period;
72 double m_time_for_last_fr_reception_warning;
73 bool m_fr_periodicity_warning_active;
75 bool m_exec_telemetry_after_setup{
true};
77 void GetFreeFrame(uint8_t attempts);
78 void HandleCcfTriggering();
79 void HandleCustomTrigger(
bool frame_received);
80 void ReceiveFrame(
bool& frame_received,
81 double& fr_reception_time);
82 void HandleFrameRecvStatus();
83 void SubmitAndNotify();
84 void CheckCameraHealth();
85 void CheckMessageBus(
bool& new_setup);
88 std::string& diagnostics);
89 void CheckFramePeriodicity();
90 void ResetFramePeriodicityCheckPars();
93 std::shared_ptr<ifw::ccf::common::FrameQueue> m_input_q;
96 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:20
The FrameQueue class implements a queue, to manage a set of CCF DataFrame instances as a ring buffer.
Definition frameQueue.hpp:17
Class used by the threads to store info for generating performance statistics.
Definition utilities.hpp:29
virtual ~AcqThread()
Definition acqThread.cpp:25
void SetInputQ(std::shared_ptr< ifw::ccf::common::FrameQueue > &queue)
Set reference to the Application Input Queue.
Definition acqThread.cpp:52
ifw::ccf::common::FrameStatistics & GetFrameStat()
Get reference to frame handling statistics.
Definition acqThread.cpp:423
void Initialise()
Definition acqThread.cpp:29
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:13
void ResetCounters()
Reset counters for the internal household.
Definition acqThread.cpp:65
virtual void UserLogic()
Acquisition Thread user logic.
Definition acqThread.cpp:84
ifw::ccf::common::FrameQueue & GetInputQ()
Get refrence to the Application Input Queue.
Definition acqThread.cpp:57
IFW CTD Multiprocessing Toolkit Message Bus.
Definition messageBus.hpp:92
IFW CTD Multiprocessing Toolkit Message class.
Definition message.hpp:25
IFW CTD Multiprocessing Toolkit Thread base class.
Definition thread.hpp:31
Definition acqThread.cpp:11
constexpr double NO_FRAME_RECV_SLEEP_TIME
Sleep to apply when no frame is available.
Definition acqThread.hpp:22
constexpr double FRAME_RECV_TIMEOUT
Timeout to apply, waiting for the next frame.
Definition acqThread.hpp:19
Status
General status variable.
Definition base.hpp:158