34#ifndef GOBY_ACOMMS_MODEMDRIVER_POPOTO_DRIVER_H
35#define GOBY_ACOMMS_MODEMDRIVER_POPOTO_DRIVER_H
71 void parse_in(
const std::string& in, std::map<std::string, std::string>* out);
72 void signal_and_write(
const std::string& raw);
85 static std::string json_to_binary(
const nlohmann::json& element);
86 static std::string binary_to_json(
const std::uint8_t* buf,
size_t num_bytes);
87 static std::string StripString(std::string in,
const std::string& p);
92 protobuf::ModemTransmission modem_msg_;
94 static constexpr int DEFAULT_BAUD{115200};
95 static constexpr int DEFAULT_MTU_BYTES{1024};
96 static constexpr int POPOTO_BROADCAST_ID{255};
100 GOBY_HEADER_TYPE = 0,
101 GOBY_HEADER_ACK_REQUEST = 1
provides an abstract base class for acoustic modem drivers. This is subclassed by the various drivers...
void send_ping(protobuf::ModemTransmission &msg)
void do_work() override
Allows the modem driver to do its work.
void send_range_request(int dest)
void send(protobuf::ModemTransmission &msg)
void shutdown() override
Shuts down the modem driver.
void handle_initiate_transmission(const protobuf::ModemTransmission &m) override
Virtual initiate_transmission method. Typically connected to MACManager::signal_initiate_transmission...
void startup(const protobuf::DriverConfig &cfg) override
Starts the modem driver. Must be called before poll().
void play_file(protobuf::ModemTransmission &msg)
_proto_TypeTraits::Singular::ConstType GetExtension(const ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< DriverConfig, _proto_TypeTraits, _field_type, _is_packed > &id) const
extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::goby::acomms::protobuf::DriverConfig, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::goby::acomms::popoto::protobuf::Config >, 11, false > config
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