Helper to encode CCNb blocks. More...
#include <wire-ccnb.h>
Static Public Member Functions | |
| static size_t | AppendBlockHeader (Buffer::Iterator &start, size_t value, uint32_t block_type) | 
| Append CCNB block header.  More... | |
| static size_t | EstimateBlockHeader (size_t value) | 
| Estimate size of the CCNB block header.  More... | |
| static size_t | AppendNumber (Buffer::Iterator &start, uint32_t number) | 
| Add number in CCNB encoding.  More... | |
| static size_t | EstimateNumber (uint32_t number) | 
| Estimate size of the number in CCNB encoding.  More... | |
| static size_t | AppendCloser (Buffer::Iterator &start) | 
| Append CCNB closer tag (estimated size is 1)  More... | |
| static size_t | AppendTimestampBlob (Buffer::Iterator &start, const Time &time) | 
| Append a binary timestamp as a BLOB using the ccn binary Timestamp representation (12-bit fraction).  More... | |
| static size_t | EstimateTimestampBlob (const Time &time) | 
| Estimate size of a binary timestamp as a BLOB using CCNB enconding.  More... | |
| static size_t | AppendTaggedBlob (Buffer::Iterator &start, uint32_t dtag, const uint8_t *data, size_t size) | 
| Append a tagged BLOB.  More... | |
| static size_t | AppendTaggedBlobWithPadding (Buffer::Iterator &start, uint32_t dtag, uint32_t length, const uint8_t *data, size_t size) | 
| Append a tagged BLOB, adding 0-byte padding if necessary.  More... | |
| static size_t | EstimateTaggedBlob (uint32_t dtag, size_t size) | 
| Estimate size of a tagged BLOB in CCNB enconding.  More... | |
| template<class T > | |
| static size_t | AppendTaggedBlob (Buffer::Iterator &start, uint32_t dtag, const T &data) | 
| Append value as a tagged BLOB (templated version)  More... | |
| template<class T > | |
| static size_t | AppendTaggedBlobWithPadding (Buffer::Iterator &start, uint32_t dtag, uint32_t length, const T &data) | 
| Append value as a tagged BLOB (templated version), add 0-padding if necessary.  More... | |
| static size_t | AppendString (Buffer::Iterator &start, uint32_t dtag, const std::string &string) | 
| Append a tagged string (should be a valid UTF-8 coded string)  More... | |
| static size_t | EstimateString (uint32_t dtag, const std::string &string) | 
| Estimate size of the string in CCNB encoding.  More... | |
| static size_t | SerializeName (Buffer::Iterator &start, const Name &name) | 
| Append Name in CCNB encoding.  More... | |
| static size_t | SerializedSizeName (const Name &name) | 
| Estimate size of Name in CCNB encoding.  More... | |
| static Ptr< Name > | DeserializeName (Buffer::Iterator &start) | 
| Deserialize Name from CCNB encodeing.  More... | |
Helper to encode CCNb blocks.
Definition at line 38 of file wire-ccnb.h.
      
  | 
  static | 
Append CCNB block header.
| start | Buffer to store serialized | 
| value | dictionary id of the block header | 
| block_type | Type of CCNB block | 
Definition at line 43 of file wire-ccnb.cc.
      
  | 
  static | 
Append CCNB closer tag (estimated size is 1)
| start | Buffer to store serialized Interest | 
Definition at line 97 of file wire-ccnb.cc.
      
  | 
  static | 
Add number in CCNB encoding.
| start | Buffer to store serialized NdnInterest | 
| number | Number to be written | 
Definition at line 75 of file wire-ccnb.cc.
      
  | 
  static | 
Append a tagged string (should be a valid UTF-8 coded string)
This is a ccnb-encoded element with containing UDATA as content
| start | start iterator of the buffer to append to. | 
| dtag | is the element's dtab | 
| string | UTF-8 string to be written | 
Definition at line 199 of file wire-ccnb.cc.
      
  | 
  static | 
Append a tagged BLOB.
This is a ccnb-encoded element with containing the BLOB as content
| start | start iterator of the buffer to append to. | 
| dtag | is the element's dtab | 
| data | points to the binary data | 
| size | is the size of the data, in bytes | 
Definition at line 142 of file wire-ccnb.cc.
      
  | 
  inlinestatic | 
Append value as a tagged BLOB (templated version)
This is a ccnb-encoded element with containing the BLOB as content
Data will be reinterpret_cast<const uint8_t*> and size will be obtained using sizeof
| start | start iterator of the buffer to append to. | 
| dtag | is the element's dtab | 
| data | a value to add | 
Definition at line 243 of file wire-ccnb.h.
      
  | 
  static | 
Append a tagged BLOB, adding 0-byte padding if necessary.
This is a ccnb-encoded element with containing the BLOB as content
| start | start iterator of the buffer to append to. | 
| dtag | is the element's dtab | 
| length | minimum required length of the added field (padding added if necessary) | 
| data | points to the binary data | 
| size | is the size of the data, in bytes | 
Definition at line 161 of file wire-ccnb.cc.
      
  | 
  inlinestatic | 
Append value as a tagged BLOB (templated version), add 0-padding if necessary.
This is a ccnb-encoded element with containing the BLOB as content
Data will be reinterpret_cast<const uint8_t*> and size will be obtained using sizeof
| start | start iterator of the buffer to append to. | 
| dtag | is the element's dtab | 
| length | minimum required length of the field | 
| data | a value to add | 
Definition at line 250 of file wire-ccnb.h.
      
  | 
  static | 
Append a binary timestamp as a BLOB using the ccn binary Timestamp representation (12-bit fraction).
| start | start iterator of the buffer to append to. | 
| time | - Time object | 
Definition at line 104 of file wire-ccnb.cc.
      
  | 
  static | 
Deserialize Name from CCNB encodeing.
Definition at line 247 of file wire-ccnb.cc.
      
  | 
  static | 
Estimate size of the CCNB block header.
| value | dictionary id of the block header | 
Definition at line 62 of file wire-ccnb.cc.
      
  | 
  static | 
Estimate size of the number in CCNB encoding.
| number | Number to be written | 
Definition at line 89 of file wire-ccnb.cc.
      
  | 
  static | 
Estimate size of the string in CCNB encoding.
| dtag | is the element's dtab | 
| string | UTF-8 string to be written | 
Definition at line 214 of file wire-ccnb.cc.
      
  | 
  static | 
Estimate size of a tagged BLOB in CCNB enconding.
| dtag | is the element's dtab | 
| size | is the size of the data, in bytes | 
Definition at line 190 of file wire-ccnb.cc.
      
  | 
  static | 
Estimate size of a binary timestamp as a BLOB using CCNB enconding.
| time | - Time object | 
Definition at line 131 of file wire-ccnb.cc.
      
  | 
  static | 
Estimate size of Name in CCNB encoding.
| name | constant reference to Name object | 
Definition at line 234 of file wire-ccnb.cc.
      
  | 
  static | 
Append Name in CCNB encoding.
Definition at line 220 of file wire-ccnb.cc.
References ns3::ndn::Blob::buf().