Goby3  3.0.1
2021.08.17

provides an API to the WHOI Micro-Modem driver More...

#include <goby/acomms/modem_driver.h>

Inheritance diagram for goby::acomms::MMDriver:
goby::acomms::ModemDriverBase

Public Member Functions

 MMDriver ()
 Default constructor. More...
 
 ~MMDriver () override
 Destructor. More...
 
void startup (const protobuf::DriverConfig &cfg) override
 Starts the driver. More...
 
void update_cfg (const protobuf::DriverConfig &cfg) override
 Update configuration while running (not required to be implemented) More...
 
void shutdown () override
 Stops the driver. More...
 
void do_work () override
 See ModemDriverBase::do_work() More...
 
void handle_initiate_transmission (const protobuf::ModemTransmission &m) override
 See ModemDriverBase::handle_initiate_transmission() More...
 
int clk_mode ()
 Current clock mode of the modem, necessary for synchronous navigation. More...
 
bool is_started () const
 
void set_silent (bool silent)
 
void write_single_cfg (const std::string &s)
 
- Public Member Functions inherited from goby::acomms::ModemDriverBase
virtual ~ModemDriverBase ()
 Public Destructor. More...
 
int driver_order ()
 

Static Public Member Functions

static unsigned packet_frame_count (int rate)
 
static unsigned packet_size (int rate)
 

Additional Inherited Members

- Public Attributes inherited from goby::acomms::ModemDriverBase
boost::signals2::signal< void(const protobuf::ModemTransmission &message)> signal_receive
 Called when a binary data transmission is received from the modem. More...
 
boost::signals2::signal< void(const protobuf::ModemTransmission &message)> signal_transmit_result
 Called when a transmission is completed. More...
 
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 ModemTransmission::frame. More...
 
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 the parameters of the transmission (such as destination or rate) on the fly. More...
 
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-discovery of vehicles. Also useful for higher level analysis and debugging of the transactions between the driver and the modem. More...
 
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 debugging of the transactions between the driver and the modem. More...
 
- Protected Member Functions inherited from goby::acomms::ModemDriverBase
 ModemDriverBase ()
 Constructor. More...
 
void modem_write (const std::string &out)
 write a line to the serial port. More...
 
bool modem_read (std::string *in)
 read a line from the serial port, including end-of-line character(s) More...
 
void modem_start (const protobuf::DriverConfig &cfg)
 start the physical connection to the modem (serial port, TCP, etc.). must be called before ModemDriverBase::modem_read() or ModemDriverBase::modem_write() More...
 
void modem_close ()
 closes the serial port. Use modem_start to reopen the port. More...
 
const std::string & glog_out_group () const
 
const std::string & glog_in_group () const
 
util::LineBasedInterfacemodem ()
 use for direct access to the modem More...
 
- Static Protected Attributes inherited from goby::acomms::ModemDriverBase
static std::atomic< intcount_
 

Detailed Description

provides an API to the WHOI Micro-Modem driver

Definition at line 56 of file mm_driver.h.

Constructor & Destructor Documentation

◆ MMDriver()

goby::acomms::MMDriver::MMDriver ( )

Default constructor.

◆ ~MMDriver()

goby::acomms::MMDriver::~MMDriver ( )
override

Destructor.

Member Function Documentation

◆ clk_mode()

int goby::acomms::MMDriver::clk_mode ( )
inline

Current clock mode of the modem, necessary for synchronous navigation.

Definition at line 81 of file mm_driver.h.

◆ do_work()

void goby::acomms::MMDriver::do_work ( )
overridevirtual

◆ handle_initiate_transmission()

void goby::acomms::MMDriver::handle_initiate_transmission ( const protobuf::ModemTransmission m)
overridevirtual

◆ is_started()

bool goby::acomms::MMDriver::is_started ( ) const
inline

Definition at line 83 of file mm_driver.h.

◆ packet_frame_count()

static unsigned goby::acomms::MMDriver::packet_frame_count ( int  rate)
inlinestatic

Definition at line 85 of file mm_driver.h.

◆ packet_size()

static unsigned goby::acomms::MMDriver::packet_size ( int  rate)
inlinestatic

Definition at line 87 of file mm_driver.h.

◆ set_silent()

void goby::acomms::MMDriver::set_silent ( bool  silent)

◆ shutdown()

void goby::acomms::MMDriver::shutdown ( )
overridevirtual

Stops the driver.

Implements goby::acomms::ModemDriverBase.

◆ startup()

void goby::acomms::MMDriver::startup ( const protobuf::DriverConfig cfg)
overridevirtual

Starts the driver.

Parameters
cfgConfiguration for the Micro-Modem driver. DriverConfig is defined in acomms_driver_base.proto, and various extensions specific to the WHOI Micro-Modem are defined in acomms_mm_driver.proto.

Implements goby::acomms::ModemDriverBase.

◆ update_cfg()

void goby::acomms::MMDriver::update_cfg ( const protobuf::DriverConfig cfg)
overridevirtual

Update configuration while running (not required to be implemented)

Reimplemented from goby::acomms::ModemDriverBase.

◆ write_single_cfg()

void goby::acomms::MMDriver::write_single_cfg ( const std::string &  s)

The documentation for this class was generated from the following file: