esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Private Member Functions | List of all members
ndnph::rdr::RdrMetadataConsumer Class Reference

Consumer of RDR metadata packet. More...

#include <rdr.hpp>

Inherits ndnph::PacketHandler.

Classes

struct  Options
 

Public Types

using Callback = void(*)(void *ctx, Data data)
 
- Public Types inherited from ndnph::PacketHandler
using PacketInfo = Face::PacketInfo
 

Public Member Functions

 RdrMetadataConsumer (Face &face, const Options &opts)
 
 RdrMetadataConsumer (Face &face)
 
void start (Name rdrPrefix, Callback cb, void *ctx=nullptr)
 
- Public Member Functions inherited from ndnph::PacketHandler
 PacketHandler ()=default
 Construct without adding to Face.
 
 PacketHandler (Face &face, int8_t prio=0)
 Construct and add handler to Face.
 

Private Member Functions

void loop () final
 Override to be invoked periodically.
 
bool processData (Data data) final
 Override to receive Data packets.
 

Additional Inherited Members

- Protected Member Functions inherited from ndnph::PacketHandler
virtual ~PacketHandler ()
 Remove handler from Face.
 
FacegetFace () const
 
const PacketInfogetCurrentPacketInfo () const
 Retrieve information about current processing packet.
 
template<typename Packet >
bool send (Region &region, const Packet &packet, PacketInfo pi={})
 Synchronously transmit a packet.
 
template<typename Packet , typename... PacketInfoModifier>
bool send (Region &region, const Packet &packet, const PacketInfoModifier &... pim)
 Synchronously transmit a packet.
 
template<typename Packet , typename... Arg, typename = typename std::enable_if< !std::is_base_of<Region, typename std::decay<Packet>::type>::value>::type>
bool send (const Packet &packet, Arg &&... arg)
 Synchronously transmit a packet.
 
template<typename... Arg>
bool reply (Arg &&... arg)
 Synchronously transmit a packet in reply to current processing packet.
 

Detailed Description

Consumer of RDR metadata packet.

See also
https://redmine.named-data.net/projects/ndn-tlv/wiki/RDR

Member Typedef Documentation

◆ Callback

using ndnph::rdr::RdrMetadataConsumer::Callback = void (*)(void* ctx, Data data)

Constructor & Destructor Documentation

◆ RdrMetadataConsumer() [1/2]

ndnph::rdr::RdrMetadataConsumer::RdrMetadataConsumer ( Face face,
const Options opts 
)
inlineexplicit

◆ RdrMetadataConsumer() [2/2]

ndnph::rdr::RdrMetadataConsumer::RdrMetadataConsumer ( Face face)
inlineexplicit

Member Function Documentation

◆ loop()

void ndnph::rdr::RdrMetadataConsumer::loop ( )
inlinefinalprivatevirtual

Override to be invoked periodically.

Reimplemented from ndnph::PacketHandler.

◆ processData()

bool ndnph::rdr::RdrMetadataConsumer::processData ( Data  )
inlinefinalprivatevirtual

Override to receive Data packets.

Return values
truepacket has been accepted by this handler.
falsepacket is not accepted, and should go to the next handler.

Reimplemented from ndnph::PacketHandler.

◆ start()

void ndnph::rdr::RdrMetadataConsumer::start ( Name  rdrPrefix,
Callback  cb,
void *  ctx = nullptr 
)
inline

The documentation for this class was generated from the following file: