24#ifndef GOBY_ACOMMS_MODEMDRIVER_STORE_SERVER_DRIVER_H
25#define GOBY_ACOMMS_MODEMDRIVER_STORE_SERVER_DRIVER_H
47 constexpr static const char*
eol{
"\r"};
50 template <
typename StoreServerMessage>
53 std::string pb_encoded;
55 msg->ParseFromString(pb_encoded);
58 template <
typename StoreServerMessage>
61 std::string pb_encoded;
62 msg.SerializeToString(&pb_encoded);
73 std::uint64_t last_send_time_;
74 double query_interval_seconds_;
75 double reset_interval_seconds_;
76 bool waiting_for_reply_;
77 std::uint32_t next_frame_;
provides an abstract base class for acoustic modem drivers. This is subclassed by the various drivers...
static constexpr int default_port
void startup(const protobuf::DriverConfig &cfg)
Starts the modem driver. Must be called before poll().
static constexpr const char * eol
static void serialize_store_server_message(const StoreServerMessage &msg, std::string *bytes)
void shutdown()
Shuts down the modem driver.
void do_work()
Allows the modem driver to do its work.
static void parse_store_server_message(const std::string &bytes, StoreServerMessage *msg)
void handle_initiate_transmission(const protobuf::ModemTransmission &m)
Virtual initiate_transmission method. Typically connected to MACManager::signal_initiate_transmission...
void parse_rudics_packet(std::string *bytes, std::string rudics_pkt, const std::string &reserved=std::string("\0\r\n", 3)+std::string(1, 0xff), bool include_crc=true)
void serialize_rudics_packet(std::string bytes, std::string *rudics_pkt, const std::string &reserved=std::string("\0\r\n", 3)+std::string(1, 0xff), bool include_crc=true)
The global namespace for the Goby project.
extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::MessageOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::goby::GobyMessageOptions >, 11, false > msg