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

namespace  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.
 
using ParamsDigest = detail::TypedDigest< TT::ParametersSha256DigestComponent >
 ParametersSha256DigestComponent type.
 
using Keyword = detail::TypedString< TT::KeywordNameComponent >
 KeywordNameComponent convention.
 
using GenericNumber = detail::TypedNumber< TT::GenericNameComponent >
 GenericNameComponent that contains NNI.
 
using Segment = detail::TypedNumber< TT::SegmentNameComponent >
 SegmentNameComponent convention.
 
using ByteOffset = detail::TypedNumber< TT::ByteOffsetNameComponent >
 ByteOffsetNameComponent convention.
 
using Version = detail::TypedNumber< TT::VersionNameComponent >
 VersionNameComponent convention.
 
using Timestamp = detail::TypedNumber< TT::TimestampNameComponent >
 TimestampNameComponent convention.
 
using SequenceNum = detail::TypedNumber< TT::SequenceNumNameComponent >
 SequenceNumNameComponent convention.
 

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>();
Definition convention.hpp:74
#define NDNPH_SHA256_LEN
SHA256 digest length.
Definition common.hpp:34

◆ 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);
Definition convention.hpp:90

`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>();
Definition convention.hpp:111

◆ 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::TimeValue(port::UnixTime::now()));
Indicate that TLV-VALUE should be a random number.
Definition convention.hpp:13
Indicate that TLV-VALUE should be a timestamp.
Definition convention.hpp:27

◆ Version

VersionNameComponent convention.

Supported operations are same as convention::Timestamp.