16MAKE_ENUM(EstopState, PLAY, STOP, STATUS_ERROR);
43 void tick(
const boost::system::error_code&);
52 static constexpr unsigned int MAXIMUM_CONSECUTIVE_STATUS_ERROR = 5;
55 static constexpr int INTERVAL_BETWEEN_READS_MS = 5;
58 std::thread estop_thread;
59 std::atomic_bool in_destructor =
false;
62 std::atomic<EstopState> estop_state;
65 unsigned int num_consecutive_status_error = 0;
68 unsigned int regular_read_interval_ms;
72 boost::asio::io_service io_service;
75 boost::asio::deadline_timer timer;
78 std::unique_ptr<UartCommunication> uart_reader;