Goby Underwater Autonomy Project
Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
|
provides an API to the goby-acomms MAC library. More...
#include <goby/acomms/amac.h>
Public Member Functions | |
Constructors/Destructor | |
MACManager (std::ostream *log=0) | |
Default constructor. | |
~MACManager () | |
Control | |
void | startup (const protobuf::MACConfig &cfg) |
Starts the MAC with given configuration. | |
void | shutdown () |
Shutdown the MAC. | |
void | do_work () |
Must be called regularly for the MAC to perform its work (10 Hertz or so is fine) | |
Modem Slots | |
void | handle_modem_all_incoming (const protobuf::ModemMsgBase &m) |
Call every time a message is received from vehicle to "discover" this vehicle or reset the expire timer. Only needed when the type is amac::mac_auto_decentralized. Typically connected to ModemDriverBase::signal_all_incoming using bind(). | |
Manipulate slots | |
std::map< int, protobuf::Slot > ::iterator | add_slot (const protobuf::Slot &s) |
bool | remove_slot (const protobuf::Slot &s) |
removes any slots in the cycle where protobuf::operator==(const protobuf::Slot&, const protobuf::Slot&) is true. | |
void | clear_all_slots () |
clears all slots from communications cycle. | |
Static Public Member Functions | |
Other | |
static void | add_flex_groups (util::FlexOstream *tout) |
Adds groups for a FlexOstream logger. | |
Public Attributes | |
Modem Signals | |
boost::signal< void(protobuf::ModemMsgBase *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(). | |
boost::signal< void(protobuf::ModemRangingRequest *m) | signal_initiate_ranging ) |
Signals when it is time for this platform to begin an acoustic ranging transmission to another vehicle or ranging beacon(s). Typically connected to ModemDriverBase::handle_initiate_ranging() using bind(). |
provides an API to the goby-acomms MAC library.
Definition at line 53 of file mac_manager.h.
goby::acomms::MACManager::MACManager | ( | std::ostream * | log = 0 | ) |
Default constructor.
log | std::ostream object or FlexOstream to capture all humanly readable runtime and debug information (optional). |
Definition at line 40 of file mac_manager.cpp.
std::map< int, goby::acomms::protobuf::Slot >::iterator goby::acomms::MACManager::add_slot | ( | const protobuf::Slot & | s | ) |
Definition at line 400 of file mac_manager.cpp.
void goby::acomms::MACManager::handle_modem_all_incoming | ( | const protobuf::ModemMsgBase & | m | ) |
Call every time a message is received from vehicle to "discover" this vehicle or reset the expire timer. Only needed when the type is amac::mac_auto_decentralized. Typically connected to ModemDriverBase::signal_all_incoming using bind().
m | the new incoming message (used to detect vehicles). (protobuf::ModemMsgBase defined in modem_message.proto) |
Definition at line 290 of file mac_manager.cpp.
bool goby::acomms::MACManager::remove_slot | ( | const protobuf::Slot & | s | ) |
removes any slots in the cycle where protobuf::operator==(const protobuf::Slot&, const protobuf::Slot&) is true.
Definition at line 426 of file mac_manager.cpp.
void goby::acomms::MACManager::startup | ( | const protobuf::MACConfig & | cfg | ) |
Starts the MAC with given configuration.
cfg | Initial configuration values (protobuf::MACConfig defined in amac.proto) |
Definition at line 72 of file mac_manager.cpp.
boost::signal<void (protobuf::ModemRangingRequest* m) goby::acomms::MACManager::signal_initiate_ranging) |
Signals when it is time for this platform to begin an acoustic ranging transmission to another vehicle or ranging beacon(s). Typically connected to ModemDriverBase::handle_initiate_ranging() using bind().
m | parameters of the ranging request to be performed (protobuf::ModemRangingRequest defined in modem_message.proto). |
Definition at line 103 of file mac_manager.h.
boost::signal<void (protobuf::ModemMsgBase* 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 modem_message.proto) |
Definition at line 98 of file mac_manager.h.