Goby v2
List of all members

provides an API to the goby-acomms MAC library. MACManager is essentially a std::list<protobuf::ModemTransmission> plus a timer. More...

#include <goby/acomms/amac.h>

Inheritance diagram for goby::acomms::MACManager:
Inheritance graph
[legend]

Public Member Functions

Constructors/Destructor
 MACManager ()
 Default constructor.
 
 ~MACManager ()
 
Control
void startup (const protobuf::MACConfig &cfg)
 Starts the MAC with given configuration. More...
 
void restart ()
 Restarts the MAC with original configuration.
 
void shutdown ()
 Shutdown the MAC.
 
void do_work ()
 Allows the MAC timer to do its work. Does not block. If you prefer more control you can directly control the underlying boost::asio::io_service (get_io_service()) instead of using this function. This function is equivalent to get_io_service().poll();.
 
void update ()
 You must call this after any change to the underlying list that would invalidate iterators or change the size (insert, push_back, erase, etc.).
 
bool running ()
 

Modem Signals

boost::signals2::signal< void(const protobuf::ModemTransmission &m)> signal_initiate_transmission
 Signals when it is time for this platform to begin transmission of an acoustic message at the start of its TDMA slot. Typically connected to ModemDriverBase::handle_initiate_transmission() using bind(). More...
 
boost::signals2::signal< void(const protobuf::ModemTransmission &m)> signal_slot_start
 Signals the start of all transmissions (even when we don't transmit) More...
 
unsigned cycle_count ()
 
double cycle_duration ()
 
boost::asio::io_service & get_io_service ()
 
const std::string & glog_mac_group () const
 

Detailed Description

provides an API to the goby-acomms MAC library. MACManager is essentially a std::list<protobuf::ModemTransmission> plus a timer.

See also
acomms_amac.proto and acomms_modem_message.proto for definition of Google Protocol Buffers messages (namespace goby::acomms::protobuf).
Examples:
acomms/amac/amac_simple/amac_simple.cpp, and acomms/chat/chat.cpp.

Definition at line 51 of file mac_manager.h.

Member Function Documentation

void goby::acomms::MACManager::startup ( const protobuf::MACConfig cfg)

Starts the MAC with given configuration.

Parameters
cfgInitial configuration values (protobuf::MACConfig defined in acomms_amac.proto)
Examples:
acomms/amac/amac_simple/amac_simple.cpp, and acomms/chat/chat.cpp.

Definition at line 65 of file mac_manager.cpp.

Member Data Documentation

boost::signals2::signal<void(const protobuf::ModemTransmission& m)> goby::acomms::MACManager::signal_initiate_transmission

Signals when it is time for this platform to begin transmission of an acoustic message at the start of its TDMA slot. Typically connected to ModemDriverBase::handle_initiate_transmission() using bind().

Parameters
ma message containing details of the transmission to be initated. (protobuf::ModemMsgBase defined in acomms_modem_message.proto)
Examples:
acomms/amac/amac_simple/amac_simple.cpp, and acomms/chat/chat.cpp.

Definition at line 91 of file mac_manager.h.

boost::signals2::signal<void(const protobuf::ModemTransmission& m)> goby::acomms::MACManager::signal_slot_start

Signals the start of all transmissions (even when we don't transmit)

Parameters
ma message containing details of the transmission to be initated. (protobuf::ModemMsgBase defined in acomms_modem_message.proto)

Definition at line 97 of file mac_manager.h.


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