
Hi there.
Am 27.03.2012 17:49, schrieb Carson Dunbar:
Does SDNV work the same in IBR-DTN as in DTN2? Looking at the SDNV files it looks fairly different. Do you need to use SDNV in the primary block or is this handled by default somewhere else? Do you have any other examples of extension blocks using SDNV for IBR-DTN? Thanks.
Actually, the SDNV de/encoder is based on the DTN2 code. But it is wrapped into C++ classes for usage with stream.
The code example you have found is the right place you could look at. Another place were the SDNV is used is the DefaultSerializer. This class do the hole encoding/decoding of the primary- and other blocks of the bundle.
The usage is quite simple, just do that:
// read a value SDNV value; stream >> value;
// write a value SDNV value(42); stream << value;
Kind regards, Johannes