Goby3  3.1.5a
2024.05.23

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:

Public Member Functions

Constructors/Destructor
 MACManager ()
 Default constructor. More...
 
 MACManager (int id)
 
 ~MACManager ()
 
Control
void startup (const protobuf::MACConfig &cfg)
 Starts the MAC with given configuration. More...
 
void restart ()
 Restarts the MAC with original configuration. More...
 
void shutdown ()
 Shutdown the MAC. More...
 
void do_work ()
 Allows the MAC timer to do its work. Does not block. More...
 
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.). More...
 
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 ()
 
time::SystemClock::duration cycle_duration ()
 
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).

Definition at line 50 of file mac_manager.h.

Constructor & Destructor Documentation

◆ MACManager() [1/2]

goby::acomms::MACManager::MACManager ( )

Default constructor.

◆ MACManager() [2/2]

goby::acomms::MACManager::MACManager ( int  id)

◆ ~MACManager()

goby::acomms::MACManager::~MACManager ( )

Member Function Documentation

◆ cycle_count()

unsigned goby::acomms::MACManager::cycle_count ( )
inline

Definition at line 101 of file mac_manager.h.

◆ cycle_duration()

time::SystemClock::duration goby::acomms::MACManager::cycle_duration ( )

◆ do_work()

void goby::acomms::MACManager::do_work ( )

Allows the MAC timer to do its work. Does not block.

◆ glog_mac_group()

const std::string& goby::acomms::MACManager::glog_mac_group ( ) const
inline

Definition at line 104 of file mac_manager.h.

◆ restart()

void goby::acomms::MACManager::restart ( )

Restarts the MAC with original configuration.

◆ running()

bool goby::acomms::MACManager::running ( )
inline

Definition at line 81 of file mac_manager.h.

◆ shutdown()

void goby::acomms::MACManager::shutdown ( )

Shutdown the MAC.

◆ startup()

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)

◆ update()

void goby::acomms::MACManager::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.).

Member Data Documentation

◆ signal_initiate_transmission

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.

◆ signal_slot_start

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.


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