Hey Johannes, I am still working on the network-coding router for IBR-DTN and had another issue. I figured out what you were talking about in regards to block processors and how to create new extension blocks, but I had a question regarding the SDNV. In the DTN2 implementation of EBR (a network coding router) they used SDNV to encode their data when streaming it into blocks so that they met the draft spec. The only example I see of that in IBR-DTN is in AgeBlock where you just do
SDNV value(getMicroseconds())
then stream "value" into the block. 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.
Carson Dunbar
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
participants (2)
-
Carson Dunbar
-
Johannes Morgenroth