24 #ifndef GOBY_MIDDLEWARE_FRONTSEAT_WAVEGLIDER_WAVEGLIDER_SV2_FRONTSEAT_DRIVER_H
25 #define GOBY_MIDDLEWARE_FRONTSEAT_WAVEGLIDER_WAVEGLIDER_SV2_FRONTSEAT_DRIVER_H
31 #include <boost/asio/io_service.hpp>
32 #include <boost/circular_buffer.hpp>
33 #include <dccl/codec.h>
54 class SV2SerialConnection;
58 class SV2CommandFollowFixedHeading;
59 class SV2RequestEnumerate;
60 class SV2RequestQueuedMessage;
61 class SV2RequestStatus;
72 void send_command_to_frontseat(
const protobuf::CommandRequest& command)
override;
73 void send_data_to_frontseat(
const protobuf::InterfaceData& data)
override;
74 void send_raw_to_frontseat(
const protobuf::Raw& data)
override;
76 bool frontseat_providing_data()
const override;
78 void handle_sv2_message(
const std::string& message);
79 void handle_enumeration_request(
const protobuf::SV2RequestEnumerate&
msg);
80 void handle_request_status(
const protobuf::SV2RequestStatus& request);
81 void handle_request_queued_message(
const protobuf::SV2RequestQueuedMessage& request);
83 void check_crc(
const std::string& message, uint16_t expected);
84 void add_crc(std::string* message);
88 void check_connection_state();
91 const protobuf::WavegliderSV2Config waveglider_sv2_config_;
93 bool frontseat_providing_data_;
97 boost::asio::io_service io_;
98 std::shared_ptr<SV2SerialConnection> serial_;
100 boost::circular_buffer<std::shared_ptr<protobuf::SV2CommandFollowFixedHeading>>
const protobuf::Config & cfg() const
WavegliderSV2(const protobuf::Config &cfg)
The global namespace for the Goby project.
extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::goby::GobyMessageOptions >, 11, false > msg
std::chrono::time_point< SystemClock > time_point