22 #ifndef __PLUGINS_IMU_IMU_CRUIZCORE_XG1010_H_ 23 #define __PLUGINS_IMU_IMU_CRUIZCORE_XG1010_H_ 25 #include "acquisition_thread.h" 26 #include "imu_cruizcore_xg1010.h" 28 #include <boost/asio.hpp> 29 #include <boost/lambda/bind.hpp> 30 #include <boost/lambda/lambda.hpp> 35 #define CRUIZCORE_XG1010_PACKET_SIZE 8 40 #ifdef USE_TIMETRACKER 59 void send_init_packet(
bool enable_transfer);
62 void check_deadline();
64 #if BOOST_VERSION < 104800 65 void handle_read(boost::system::error_code ec,
size_t bytes_read)
68 bytes_read_ = bytes_read;
73 std::string cfg_serial_;
74 unsigned int cfg_baud_rate_;
75 unsigned int cfg_freq_;
77 boost::asio::io_service io_service_;
78 boost::asio::serial_port serial_;
79 boost::asio::io_service::work io_service_work_;
80 boost::asio::deadline_timer deadline_;
81 boost::asio::streambuf input_buffer_;
83 unsigned int receive_timeout_;
84 unsigned char in_packet_[CRUIZCORE_XG1010_PACKET_SIZE];
86 boost::system::error_code ec_;
89 #ifdef USE_TIMETRACKER 91 unsigned int tt_loopcount_;
92 unsigned int ttc_full_loop_;
93 unsigned int ttc_read_;
94 unsigned int ttc_catch_up_;
95 unsigned int ttc_parse_;
CruizCoreXG1010AcquisitionThread(std::string &cfg_name, std::string &cfg_prefix, bool continuous)
Constructor.
Fawkes library namespace.
virtual void loop()
Code to execute in the thread.
virtual void finalize()
Finalize the thread.
IMU acquisition thread for CruizCore XG1010 gyros.
virtual void init()
Initialize the thread.