esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Typedefs
ndnph::convention Namespace Reference

Namespaces

 detail
 

Classes

class  RandomValue
 Indicate that TLV-VALUE should be a random number. More...
 
class  TimeValue
 Indicate that TLV-VALUE should be a timestamp. More...
 

Typedefs

using ImplicitDigest = detail::TypedDigest< TT::ImplicitSha256DigestComponent >
 ImplicitSha256DigestComponent type. More...
 
using ParamsDigest = detail::TypedDigest< TT::ParametersSha256DigestComponent >
 ParametersSha256DigestComponent type. More...
 
using Keyword = detail::TypedString< TT::KeywordNameComponent >
 KeywordNameComponent convention. More...
 
using GenericNumber = detail::TypedNumber< TT::GenericNameComponent >
 GenericNameComponent that contains NNI. More...
 
using Segment = detail::TypedNumber< TT::SegmentNameComponent >
 SegmentNameComponent convention. More...
 
using ByteOffset = detail::TypedNumber< TT::ByteOffsetNameComponent >
 ByteOffsetNameComponent convention. More...
 
using Version = detail::TypedNumber< TT::VersionNameComponent >
 VersionNameComponent convention. More...
 
using Timestamp = detail::TypedNumber< TT::TimestampNameComponent >
 TimestampNameComponent convention. More...
 
using SequenceNum = detail::TypedNumber< TT::SequenceNumNameComponent >
 SequenceNumNameComponent convention. More...
 

Typedef Documentation

◆ ByteOffset

ByteOffsetNameComponent convention.

Supported operations are same as convention::Segment.

◆ GenericNumber

GenericNameComponent that contains NNI.

Supported operations are same as convention::Timestamp.

◆ ImplicitDigest

ImplicitSha256DigestComponent type.

Supported operations:

uint8_t digest[NDNPH_SHA256_LEN];
name.append(region, convention::ImplicitDigest(), digest);
bool isDigest = component.is<convention::ImplicitDigest>();
uint8_t* digest2 = component.as<convention::ImplicitDigest>();
#define NDNPH_SHA256_LEN
SHA256 digest length.
Definition: common.hpp:34
detail::TypedDigest< TT::ImplicitSha256DigestComponent > ImplicitDigest
ImplicitSha256DigestComponent type.
Definition: convention.hpp:167

◆ Keyword

KeywordNameComponent convention.

Supported operations:

name.append(region, convention::Keyword(), "hello");
bool isKeyword = component.is<convention::Keyword>();
const char* keyword = component.as<convention::Keyword>(region);
detail::TypedString< TT::KeywordNameComponent > Keyword
KeywordNameComponent convention.
Definition: convention.hpp:190

`component.as<convention::Keyword>(region)` copies TLV-VALUE and appends NUL. It may return incorrect result if TLV-VALUE contains non-printable characters. It's recommended to use `component.value()` but there's no NUL termination.

◆ ParamsDigest

ParametersSha256DigestComponent type.

Supported operations are same as convention::ImplicitDigest.

◆ Segment

SegmentNameComponent convention.

Supported operations:

name.append(region, convention::Segment(), 700);
bool isSegment = component.is<convention::Segment>();
uint64_t segment = component.as<convention::Segment>();
detail::TypedNumber< TT::SegmentNameComponent > Segment
SegmentNameComponent convention.
Definition: convention.hpp:209

◆ SequenceNum

SequenceNumNameComponent convention.

Supported operations are same as convention::Segment.

◆ Timestamp

TimestampNameComponent convention.

Supported operations include those in convention::Segment, and:

name.append(region, convention::Timestamp(), convention::RandomValue());
name.append(region, convention::Timestamp(), convention::TimeValue(port::UnixTime::now()));
detail::TypedNumber< TT::TimestampNameComponent > Timestamp
TimestampNameComponent convention.
Definition: convention.hpp:234

◆ Version

VersionNameComponent convention.

Supported operations are same as convention::Timestamp.