23 #ifndef DriverBase20091214H 24 #define DriverBase20091214H 26 #include <boost/signals2.hpp> 27 #include <boost/thread.hpp> 29 #include "goby/acomms/acomms_constants.h" 30 #include "goby/acomms/protobuf/driver_base.pb.h" 31 #include "goby/acomms/protobuf/modem_message.pb.h" 32 #include "goby/util/linebasedcomms.h" 62 virtual void shutdown() = 0;
67 virtual void do_work() = 0;
85 boost::signals2::signal<void(const protobuf::ModemTransmission& message)>
signal_receive;
90 boost::signals2::signal<void(const protobuf::ModemTransmission& message)>
101 boost::signals2::signal<void(protobuf::ModemTransmission* msg_request)>
118 int driver_order() {
return order_; }
135 void modem_write(
const std::string& out);
141 bool modem_read(std::string* in);
153 const std::string& glog_out_group()
const {
return glog_out_group_; }
154 const std::string& glog_in_group()
const {
return glog_in_group_; }
168 boost::shared_ptr<util::LineBasedInterface> modem_;
170 std::string glog_out_group_;
171 std::string glog_in_group_;
173 boost::shared_ptr<std::ofstream> raw_fs_;
174 bool raw_fs_connections_made_;
boost::signals2::signal< void(const protobuf::ModemRaw &msg)> signal_raw_incoming
Called after any message is received from the modem by the driver. Used by the MACManager for auto-di...
boost::signals2::signal< void(const protobuf::ModemTransmission &message)> signal_transmit_result
Called when a transmission is completed.
boost::signals2::signal< void(const protobuf::ModemTransmission &message)> signal_receive
Called when a binary data transmission is received from the modem.
util::LineBasedInterface & modem()
use for direct access to the modem
The global namespace for the Goby project.
provides an abstract base class for acoustic modem drivers. This is subclassed by the various drivers...
boost::signals2::signal< void(const protobuf::ModemRaw &msg)> signal_raw_outgoing
Called after any message is sent from the driver to the modem. Useful for higher level analysis and d...
boost::signals2::signal< void(protobuf::ModemTransmission *msg)> signal_data_request
Called when the modem or modem driver needs data to send. The returned data should be stored in Modem...
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial...
boost::signals2::signal< void(protobuf::ModemTransmission *msg_request)> signal_modify_transmission
Called before the modem driver begins processing a transmission. This allows a third party to modify ...