26#include "../../codec.h"
30int main(
int ,
char* [])
32 dccl::dlog.
connect(dccl::logger::ALL, &std::cerr);
36 codec.load<BytesMsg>();
37 codec.info<BytesMsg>(&dccl::dlog);
47 codec.encode(&encoded, msg_in);
49 assert(encoded.size() == 36);
52 codec.decode(encoded, &msg_out);
54 assert(msg_in.SerializeAsString() == msg_out.SerializeAsString());
56 std::cout <<
"all tests passed" << std::endl;
The Dynamic CCL enCODer/DECoder. This is the main class you will use to load, encode and decode DCCL ...
void connect(int verbosity_mask, Slot slot)
Connect the output of one or more given verbosities to a slot (function pointer or similar)
void hex_decode(const std::string &in, std::string *out)
Decodes a (little-endian) hexadecimal string to a byte string. Index 0 and 1 (first byte) of in are w...