24 #include "goby/acomms/dccl.h" 27 using goby::acomms::operator<<;
29 int main(
int argc,
char* argv[])
41 msg_in.set_req_bytes(goby::util::hex_decode(
"88abcd1122338754"));
42 msg_in.set_opt_bytes(goby::util::hex_decode(
"102030adef2cb79d"));
45 codec->encode(&encoded, msg_in);
48 codec->decode(encoded, &msg_out);
50 assert(msg_in.SerializeAsString() == msg_out.SerializeAsString());
52 std::cout <<
"all tests passed" << std::endl;
void set_name(const std::string &s)
Set the name of the application that the logger is serving.
static DCCLCodec * get()
DCCLCodec is a singleton class; use this to get a pointer to the class.
common::FlexOstream glog
Access the Goby logger through this object.
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...