A Tlv0_1_1WireFormat extends WireFormat to override its virtual methods to implement encoding and decoding using NDN-TLV version 0.1.1. More...
#include <tlv-0_1_1-wire-format.hpp>
Public Member Functions | |
| virtual Blob | encodeName (const Name &name) |
| Encode name in NDN-TLV and return the encoding. More... | |
| virtual void | decodeName (Name &name, const uint8_t *input, size_t inputLength) |
| Decode input as a name in NDN-TLV and set the fields of the Name object. More... | |
| virtual Blob | encodeInterest (const Interest &interest, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset) |
| Encode interest in NDN-TLV and return the encoding. More... | |
| virtual void | decodeInterest (Interest &interest, const uint8_t *input, size_t inputLength, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset) |
| Decode input as an interest in NDN-TLV and set the fields of the interest object. More... | |
| virtual Blob | encodeData (const Data &data, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset) |
| Encode data with NDN-TLV and return the encoding. More... | |
| virtual void | decodeData (Data &data, const uint8_t *input, size_t inputLength, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset) |
| Decode input as a data packet in NDN-TLV and set the fields in the data object. More... | |
| virtual Blob | encodeControlParameters (const ControlParameters &controlParameters) |
| Encode controlParameters as NDN-TLV and return the encoding. More... | |
| virtual void | decodeControlParameters (ControlParameters &controlParameters, const uint8_t *input, size_t inputLength) |
| Decode input as a command parameters and set the fields of the controlParameters object. More... | |
| virtual Blob | encodeSignatureInfo (const Signature &signature) |
| Encode signature as an NDN-TLV SignatureInfo and return the encoding. More... | |
| virtual ptr_lib::shared_ptr< Signature > | decodeSignatureInfoAndValue (const uint8_t *signatureInfo, size_t signatureInfoLength, const uint8_t *signatureValue, size_t signatureValueLength) |
| Decode signatureInfo as a signature info and signatureValue as the related SignatureValue, and return a new object which is a subclass of Signature. More... | |
| virtual Blob | encodeSignatureValue (const Signature &signature) |
| Encode the signatureValue in the Signature object as an NDN-TLV SignatureValue (the signature bits) and return the encoding. More... | |
Public Member Functions inherited from ndn::WireFormat | |
| Blob | encodeInterest (const Interest &interest) |
| Encode interest and return the encoding. More... | |
| void | decodeInterest (Interest &interest, const uint8_t *input, size_t inputLength) |
| Blob | encodeData (const Data &data) |
| Encode data and return the encoding. More... | |
| void | decodeData (Data &data, const uint8_t *input, size_t inputLength) |
| virtual Blob | encodeForwardingEntry (const ForwardingEntry &forwardingEntry) |
| Encode forwardingEntry and return the encoding. More... | |
| virtual void | decodeForwardingEntry (ForwardingEntry &forwardingEntry, const uint8_t *input, size_t inputLength) |
| Decode input as a forwarding entry and set the fields of the forwardingEntry object. More... | |
| virtual ptr_lib::shared_ptr< Signature > | decodeSignatureInfoAndValue (const Blob &signatureInfo, const Blob &signatureValue) |
| Decode signatureInfo as a signature info and signatureValue as the related SignatureValue, and return a new object which is a subclass of Signature. More... | |
Static Public Member Functions | |
| static Tlv0_1_1WireFormat * | get () |
| Get a singleton instance of a Tlv0_1_1WireFormat. More... | |
Static Public Member Functions inherited from ndn::WireFormat | |
| static void | setDefaultWireFormat (WireFormat *wireFormat) |
| Set the static default WireFormat used by default encoding and decoding methods. More... | |
| static WireFormat * | getDefaultWireFormat () |
| Return the default WireFormat used by default encoding and decoding methods which was set with setDefaultWireFormat. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from ndn::WireFormat | |
| static bool | ENABLE_NDNX = false |
| NDNx support and binary XML (ccnb or ndnb) encoding is deprecated and code with throw an exception. More... | |
A Tlv0_1_1WireFormat extends WireFormat to override its virtual methods to implement encoding and decoding using NDN-TLV version 0.1.1.
To always use the preferred version NDN-TLV, you should use the class TlvWireFormat.
|
virtual |
Decode input as a command parameters and set the fields of the controlParameters object.
| controlParameters | The ControlParameters object whose fields are updated. |
| input | A pointer to the input buffer to decode. |
| inputLength | The number of bytes in input. |
Reimplemented from ndn::WireFormat.
|
virtual |
Decode input as a data packet in NDN-TLV and set the fields in the data object.
| data | The Data object whose fields are updated. |
| input | A pointer to the input buffer to decode. |
| inputLength | The number of bytes in input. |
| signedPortionBeginOffset | Return the offset in the input buffer of the beginning of the signed portion. If you are not decoding in order to verify, you can call decodeData(Data& data, const uint8_t *input, size_t inputLength) to ignore this returned value. |
| signedPortionEndOffset | Return the offset in the input buffer of the end of the signed portion. If you are not decoding in order to verify, you can call decodeData(Data& data, const uint8_t *input, size_t inputLength) to ignore this returned value. |
Reimplemented from ndn::WireFormat.
|
virtual |
Decode input as an interest in NDN-TLV and set the fields of the interest object.
| interest | The Interest object whose fields are updated. |
| input | A pointer to the input buffer to decode. |
| inputLength | The number of bytes in input. |
| signedPortionBeginOffset | Return the offset in the encoding of the beginning of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). If you are not decoding in order to verify, you can call decodeInterest(Interest& interest, const uint8_t *input, size_t inputLength) to ignore this returned value. |
| signedPortionEndOffset | Return the offset in the encoding of the end of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). If you are not decoding in order to verify, you can call decodeInterest(Interest& interest, const uint8_t *input, size_t inputLength) to ignore this returned value. |
Reimplemented from ndn::WireFormat.
|
virtual |
Decode input as a name in NDN-TLV and set the fields of the Name object.
| name | The Name object whose fields are updated. |
| input | A pointer to the input buffer to decode. |
| inputLength | The number of bytes in input. |
Reimplemented from ndn::WireFormat.
|
virtual |
Decode signatureInfo as a signature info and signatureValue as the related SignatureValue, and return a new object which is a subclass of Signature.
| signatureInfo | A pointer to the signature info input buffer to decode. |
| signatureInfoLength | The number of bytes in signatureInfo. |
| signatureValue | A pointer to the signature value input buffer to decode. |
| signatureValueLength | The number of bytes in signatureValue. |
Reimplemented from ndn::WireFormat.
|
virtual |
Encode controlParameters as NDN-TLV and return the encoding.
| controlParameters | The ControlParameters object to encode. |
Reimplemented from ndn::WireFormat.
|
virtual |
Encode data with NDN-TLV and return the encoding.
| data | The Data object to encode. |
| signedPortionBeginOffset | Return the offset in the encoding of the beginning of the signed portion. If you are not encoding in order to sign, you can call encodeData(const Data& data) to ignore this returned value. |
| signedPortionEndOffset | Return the offset in the encoding of the end of the signed portion. If you are not encoding in order to sign, you can call encodeData(const Data& data) to ignore this returned value. |
Reimplemented from ndn::WireFormat.
|
virtual |
Encode interest in NDN-TLV and return the encoding.
| interest | The Interest object to encode. |
| signedPortionBeginOffset | Return the offset in the encoding of the beginning of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). |
| signedPortionEndOffset | Return the offset in the encoding of the end of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). |
Reimplemented from ndn::WireFormat.
Encode name in NDN-TLV and return the encoding.
| name | The Name object to encode. |
Reimplemented from ndn::WireFormat.
Encode signature as an NDN-TLV SignatureInfo and return the encoding.
| signature | An object of a subclass of Signature to encode. |
Reimplemented from ndn::WireFormat.
Encode the signatureValue in the Signature object as an NDN-TLV SignatureValue (the signature bits) and return the encoding.
| signature | An object of a subclass of Signature with the signature value to encode. |
Reimplemented from ndn::WireFormat.
|
inlinestatic |
Get a singleton instance of a Tlv0_1_1WireFormat.
To always use the preferred version NDN-TLV, you should use TlvWireFormat::get().
1.8.9.1