23 #ifndef IridiumShoreDriver20140508H 24 #define IridiumShoreDriver20140508H 26 #include <boost/bimap.hpp> 27 #include <boost/circular_buffer.hpp> 29 #include "goby/acomms/modemdriver/driver_base.h" 30 #include "goby/acomms/modemdriver/iridium_driver_common.h" 31 #include "goby/acomms/modemdriver/iridium_shore_rudics.h" 32 #include "goby/acomms/modemdriver/iridium_shore_sbd.h" 33 #include "goby/acomms/protobuf/iridium_driver.pb.h" 34 #include "goby/acomms/protobuf/iridium_sbd_directip.pb.h" 35 #include "goby/acomms/protobuf/iridium_shore_driver.pb.h" 36 #include "goby/common/time.h" 58 typedef unsigned ModemId;
65 std::string create_sbd_mt_data_message(
const std::string& payload,
const std::string& imei);
66 void receive_sbd_mo();
67 void send_sbd_mt(
const std::string& bytes,
const std::string& imei);
69 void rudics_send(
const std::string& data, ModemId
id);
70 void rudics_disconnect(boost::shared_ptr<RUDICSConnection> connection);
71 void rudics_line(
const std::string& line, boost::shared_ptr<RUDICSConnection> connection);
72 void rudics_connect(boost::shared_ptr<RUDICSConnection> connection);
85 DATA_BUFFER_CAPACITY = 30
87 RemoteNode() : data_out(DATA_BUFFER_CAPACITY) {}
89 boost::shared_ptr<OnCallBase> on_call;
90 boost::circular_buffer<protobuf::ModemTransmission> data_out;
93 std::map<ModemId, RemoteNode> remote_;
95 boost::asio::io_service rudics_io_;
96 boost::shared_ptr<RUDICSServer> rudics_server_;
97 boost::asio::io_service sbd_io_;
98 boost::shared_ptr<SBDServer> mo_sbd_server_;
101 boost::bimap<ModemId, boost::shared_ptr<RUDICSConnection> > clients_;
103 typedef std::string IMEI;
104 std::map<ModemId, IMEI> modem_id_to_imei_;
void do_work()
Allows the modem driver to do its work.
void startup(const protobuf::DriverConfig &cfg)
Starts the modem driver. Must be called before poll().
google::protobuf::uint32 uint32
an unsigned 32 bit integer
void handle_initiate_transmission(const protobuf::ModemTransmission &m)
Virtual initiate_transmission method. Typically connected to MACManager::signal_initiate_transmission...
void shutdown()
Shuts down the modem driver.
The global namespace for the Goby project.
provides an abstract base class for acoustic modem drivers. This is subclassed by the various drivers...