pvxs
pvxs copied to clipboard
add user encode/decode
Attempt to address #9 with a user API for (de)serialization. Three pairs of functions are added for the 3 contexts in which PVD are found in the PVA protocol: Type, Full structure, and Partial structure. The xcode::encode*()
functions append to an std::vector<uint8_t>
. The xcode::decode*()
functions operate on a pair of pointers (like iterators). The first pointer is passed by reference, and updated based on the number of bytes consumed by each operation.