#include "goby/acomms/amac.h"
#include "goby/acomms/connect.h"
#include "goby/common/logger.h"
#include <iostream>
using goby::acomms::operator<<;
int main(int argc, char* argv[])
{
cfg.
set_type(goby::acomms::protobuf::MAC_FIXED_DECENTRALIZED);
slot->
set_type(goby::acomms::protobuf::ModemTransmission::DATA);
slot->
set_slot_seconds(5);
for (unsigned i = 1; i < 150; ++i)
{
usleep(100000);
}
new_slot.set_src(2);
new_slot.set_rate(0);
new_slot.set_type(goby::acomms::protobuf::ModemTransmission::DATA);
new_slot.set_slot_seconds(5);
mac.push_back(new_slot);
mac.resize(mac.size() + 1);
mac.back().CopyFrom(mac.front());
mac.back().set_src(3);
mac.resize(mac.size() + 1);
mac.back().CopyFrom(mac.front());
mac.back().set_type(goby::acomms::protobuf::ModemTransmission::DRIVER_SPECIFIC);
mac.back().SetExtension(micromodem::protobuf::type,
micromodem::protobuf::MICROMODEM_REMUS_LBL_RANGING);
for (;;)
{
usleep(100000);
}
return 0;
}
{
std::cout << "starting transmission with these values: " << msg << std::endl;
}