10 : m_cam(cam), m_monitorInterval(monitorInterval), m_hasStartedMonitor(false)
31 bool stopRequested =
false;
37 std::this_thread::sleep_until(nextIterationTime);
Assertion macros and utilities based on the PPK_ASSERT library.
High-level wrapper around the NeoAPI camera for synchronized access.
std::string cameraStatusAsString() const
Get current camera status.
bool isConnected() const
Check if the camera is currently connected.
void start()
Starts the monitoring thread. If the monitor is already running, this call has no effect.
~StatusMonitor()
Destructor stops the monitoring thread if running.
virtual void runMonitor() const
The main monitoring loop executed on the background thread.
void stop()
Stops the monitoring thread and waits for it to finish. If the monitor is not running,...
std::thread m_monitorThread
Thread running the periodic monitoring loop.
std::atomic< bool > m_hasStartedMonitor
Flag indicating if the monitor thread has been started.
const irsol::camera::Interface & m_cam
Reference to the camera interface being monitored.
irsol::types::duration_t m_monitorInterval
Interval at which the monitor thread executes runMonitor()
StatusMonitor(const Interface &cam, irsol::types::duration_t monitorInterval=std::chrono::milliseconds(100))
Constructs a StatusMonitor for the given camera interface.
#define IRSOL_ASSERT_ERROR
Error-level assertion macro.
#define IRSOL_NAMED_LOG_INFO(name,...)
Logs an info-level message using a named logger.
#define IRSOL_NAMED_LOG_DEBUG(name,...)
Logs a debug-level message using a named logger.
Logging utilities and configuration for the irsol library.
Defines the StatusMonitor class to periodically monitor camera status in a background thread.
clock_t::duration duration_t
Alias for a duration of time as defined by clock_t.
Core type definitions for networking, time handling, and protocol values used throughout the irsol li...