Note: Goby version 1 (shown here) is now considered obsolete. Please use version 2 for new projects, and consider upgrading old projects.

Goby Underwater Autonomy Project  Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
goby::acomms::ABCDriver Class Reference

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.

List of all members.

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().

Detailed Description

provides an API to the imaginary ABC modem (as an example how to write drivers)

Examples:
libmodemdriver/driver_simple/driver_simple.cpp.

Definition at line 33 of file abc_driver.h.


Member Function Documentation

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().

Parameters:
mModemMsgBase (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().

Parameters:
cfgStartup 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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends