Goby v2
|
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>
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 |
provides an API to the goby-acomms MAC library. MACManager is essentially a std::list<protobuf::ModemTransmission> plus a timer.
Definition at line 51 of file mac_manager.h.
void goby::acomms::MACManager::startup | ( | const protobuf::MACConfig & | cfg | ) |
Starts the MAC with given configuration.
cfg | Initial configuration values (protobuf::MACConfig defined in acomms_amac.proto) |
Definition at line 65 of file mac_manager.cpp.
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().
m | a message containing details of the transmission to be initated. (protobuf::ModemMsgBase defined in acomms_modem_message.proto) |
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)
m | a 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.