Goby Underwater Autonomy Project
Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
|
provides an API to the imaginary ABC modem (as an example how to write drivers) More...
#include <acomms/libmodemdriver/abc_driver.h>
Inherits goby::acomms::ModemDriverBase.
Public Member Functions | |
ABCDriver (std::ostream *log=0) | |
Instantiate with an optional logger object. | |
void | startup (const protobuf::DriverConfig &cfg) |
Starts the modem driver. Must be called before do_work(). | |
void | shutdown () |
Shuts down the modem driver. | |
void | do_work () |
Allows the modem driver to do its work. | |
void | handle_initiate_transmission (protobuf::ModemMsgBase *m) |
Virtual initiate_transmission method. Typically connected to MACManager::signal_initiate_transmission() using bind(). |
provides an API to the imaginary ABC modem (as an example how to write drivers)
Definition at line 33 of file abc_driver.h.
void goby::acomms::ABCDriver::do_work | ( | ) | [virtual] |
Allows the modem driver to do its work.
Should be called regularly to perform the work of the driver as the driver *does not* run in its own thread. This allows us to guarantee that no signals are called except inside this do_work method.
Implements goby::acomms::ModemDriverBase.
Definition at line 119 of file abc_driver.cpp.
void goby::acomms::ABCDriver::handle_initiate_transmission | ( | protobuf::ModemMsgBase * | m | ) | [virtual] |
Virtual initiate_transmission method. Typically connected to MACManager::signal_initiate_transmission() using bind().
m | ModemMsgBase (defined in modem_message.proto) containing the details of the transmission to be started. This does *not* contain data, which will be requested when the driver calls the data request signal (ModemDriverBase::signal_data_request) |
Implements goby::acomms::ModemDriverBase.
Definition at line 73 of file abc_driver.cpp.
void goby::acomms::ABCDriver::startup | ( | const protobuf::DriverConfig & | cfg | ) | [virtual] |
Starts the modem driver. Must be called before do_work().
cfg | Startup configuration for the driver and modem. DriverConfig is defined in driver_base.proto. Derived classes can define extensions (see http://code.google.com/apis/protocolbuffers/docs/proto.html#extensions) to DriverConfig to handle modem specific configuration. |
Implements goby::acomms::ModemDriverBase.
Definition at line 30 of file abc_driver.cpp.