24 #include "../../acomms/driver_tester/driver_tester.h" 25 #include "goby/acomms/acomms_helpers.h" 26 #include "goby/acomms/connect.h" 27 #include "goby/common/logger.h" 28 #include "goby/pb/pb_modem_driver.h" 29 #include "goby/util/binary.h" 37 int main(
int argc,
char* argv[])
39 boost::shared_ptr<goby::pb::PBDriver> driver1, driver2;
65 cfg1.MutableExtension(PBDriverConfig::request_socket);
67 socket1->set_socket_type(goby::common::protobuf::ZeroMQServiceConfig::Socket::REQUEST);
68 socket1->set_transport(goby::common::protobuf::ZeroMQServiceConfig::Socket::TCP);
69 socket1->set_connect_or_bind(goby::common::protobuf::ZeroMQServiceConfig::Socket::CONNECT);
70 socket1->set_ethernet_address(
"127.0.0.1");
71 socket1->set_ethernet_port(54321);
73 cfg1.SetExtension(PBDriverConfig::query_interval_seconds, 2);
74 cfg1.AddExtension(PBDriverConfig::rate_to_frames, 1);
75 cfg1.AddExtension(PBDriverConfig::rate_to_frames, 3);
76 cfg1.AddExtension(PBDriverConfig::rate_to_frames, 3);
77 cfg1.AddExtension(PBDriverConfig::rate_to_bytes, 32);
78 cfg1.AddExtension(PBDriverConfig::rate_to_bytes, 64);
79 cfg1.AddExtension(PBDriverConfig::rate_to_bytes, 64);
82 cfg2.MutableExtension(PBDriverConfig::request_socket)->CopyFrom(*socket1);
84 std::vector<int> tests_to_run;
85 tests_to_run.push_back(4);
86 tests_to_run.push_back(5);
88 DriverTester tester(driver1, driver2, cfg1, cfg2, tests_to_run,
89 goby::acomms::protobuf::DRIVER_PB_STORE_SERVER);
void set_name(const std::string &s)
Set the name of the application that the logger is serving.
ReturnType goby_time()
Returns current UTC time as a boost::posix_time::ptime.
void add_group(const std::string &name, Colors::Color color=Colors::nocolor, const std::string &description="")
Add another group to the logger. A group provides related manipulator for categorizing log messages...
common::FlexOstream glog
Access the Goby logger through this object.
Objects pertaining to acoustic communications (acomms)
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...