25 #include "goby/acomms/acomms_helpers.h" 26 #include "goby/acomms/dccl.h" 27 #include "goby/util/binary.h" 28 #include "simple.pb.h" 30 using goby::acomms::operator<<;
37 dccl->validate<Simple>();
41 std::cout <<
"input a string to send up to 10 characters: " << std::endl;
42 getline(std::cin, *message.mutable_telegram());
44 std::cout <<
"passing message to encoder:\n" << message << std::endl;
48 dccl->encode(&bytes, message);
50 std::cout <<
"received hexadecimal string: " << goby::util::hex_encode(bytes) << std::endl;
54 std::cout <<
"passed hexadecimal string to decoder: " << goby::util::hex_encode(bytes)
57 dccl->decode(bytes, &message);
59 std::cout <<
"received message:" << message << std::endl;
static DCCLCodec * get()
DCCLCodec is a singleton class; use this to get a pointer to the class.