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>
34#define CRUIZCORE_XG1010_PACKET_SIZE 8
57 void send_init_packet(
bool enable_transfer);
60 void check_deadline();
62#if BOOST_VERSION < 104800
64 handle_read(boost::system::error_code ec,
size_t bytes_read)
67 bytes_read_ = bytes_read;
72 std::string cfg_serial_;
73 unsigned int cfg_baud_rate_;
74 unsigned int cfg_freq_;
76 boost::asio::io_service io_service_;
77 boost::asio::serial_port serial_;
78 boost::asio::io_service::work io_service_work_;
79 boost::asio::deadline_timer deadline_;
80 boost::asio::streambuf input_buffer_;
82 unsigned int receive_timeout_;
83 unsigned char in_packet_[CRUIZCORE_XG1010_PACKET_SIZE];
85 boost::system::error_code ec_;
90 unsigned int tt_loopcount_;
91 unsigned int ttc_full_loop_;
92 unsigned int ttc_read_;
93 unsigned int ttc_catch_up_;
94 unsigned int ttc_parse_;
IMU acquisition thread for CruizCore XG1010 gyros.
virtual void finalize()
Finalize the thread.
CruizCoreXG1010AcquisitionThread(std::string &cfg_name, std::string &cfg_prefix, bool continuous)
Constructor.
virtual void init()
Initialize the thread.
virtual void loop()
Code to execute in the thread.
Fawkes library namespace.