#ifndef COMWATCH_H #include "serial.h" #include "spdlog/spdlog.h" #include #include #include #include enum class SIGNAL_TYPE{ REMOVE_, ADD_, }; class SerialWatch { private: std::function callback; std::jthread work_thread; std::stop_source s; std::mutex m; public: SerialWatch() = default; ~SerialWatch(); void set_callback(std::function func); void work(); }; #endif // !COMWATCH_H