22 #include "goby/acomms/amac.h"    23 #include "goby/acomms/connect.h"    24 #include "goby/common/logger.h"    28 using goby::acomms::operator<<;
    32 int main(
int argc, 
char* argv[])
    47     cfg.set_type(goby::acomms::protobuf::MAC_FIXED_DECENTRALIZED);
    51     slot->set_type(goby::acomms::protobuf::ModemTransmission::DATA);
    52     slot->set_slot_seconds(5);
    65     for (
unsigned i = 1; i < 150; ++i)
    79     new_slot.set_type(goby::acomms::protobuf::ModemTransmission::DATA);
    80     new_slot.set_slot_seconds(5);
    82     mac.push_back(new_slot);
    85     mac.resize(mac.size() + 1);
    86     mac.back().CopyFrom(mac.front());
    87     mac.back().set_src(3);
    89     mac.resize(mac.size() + 1);
    90     mac.back().CopyFrom(mac.front());
    91     mac.back().set_type(goby::acomms::protobuf::ModemTransmission::DRIVER_SPECIFIC);
    92     mac.back().SetExtension(micromodem::protobuf::type,
    93                             micromodem::protobuf::MICROMODEM_REMUS_LBL_RANGING);
   113     std::cout << 
"starting transmission with these values: " << msg << std::endl;
 void set_name(const std::string &s)
Set the name of the application that the logger is serving. 
void startup(const protobuf::MACConfig &cfg)
Starts the MAC with given configuration. 
void do_work()
Allows the MAC timer to do its work. Does not block. If you prefer more control you can directly cont...
provides an API to the goby-acomms MAC library. MACManager is essentially a std::list<protobuf::Modem...
void connect(Signal *signal, Slot slot)
connect a signal to a slot (e.g. function pointer) 
common::FlexOstream glog
Access the Goby logger through this object. 
void update()
You must call this after any change to the underlying list that would invalidate iterators or change ...
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 o...
void add_stream(logger::Verbosity verbosity=logger::VERBOSE, std::ostream *os=0)
Attach a stream object (e.g. std::cout, std::ofstream, ...) to the logger with desired verbosity...