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

Helper to keep track an outgoing pending Interest. More...

#include <packet-handler.hpp>

Public Member Functions

 OutgoingPendingInterest (PacketHandler *ph)
 
template<typename Packet , typename... Arg>
bool send (const Packet &interest, int timeout, Arg &&... arg)
 Send an Interest. More...
 
template<typename Packet >
bool send (const Packet &interest)
 
template<typename Packet , typename ArgFirst , typename... Arg, typename = typename std::enable_if<!std::is_integral<ArgFirst>::value>::type>
bool send (const Packet &interest, ArgFirst &&arg1, Arg &&... arg)
 
bool matchPitToken () const
 Compare PIT token of current incoming packet against last outgoing Interest. More...
 
bool match (const Data &data, const Interest &interest) const
 Check Interest-Data match. More...
 
bool match (const Data &data, const Name &name, bool canBePrefix=true) const
 Check Interest-Data match. More...
 
void expireNow ()
 Set expire time to now. More...
 
bool expired () const
 Determine if the pending Interest has expired / timed out. More...
 

Detailed Description

Helper to keep track an outgoing pending Interest.

Constructor & Destructor Documentation

◆ OutgoingPendingInterest()

ndnph::PacketHandler::OutgoingPendingInterest::OutgoingPendingInterest ( PacketHandler ph)
inline

Member Function Documentation

◆ expired()

bool ndnph::PacketHandler::OutgoingPendingInterest::expired ( ) const
inline

Determine if the pending Interest has expired / timed out.

◆ expireNow()

void ndnph::PacketHandler::OutgoingPendingInterest::expireNow ( )
inline

Set expire time to now.

◆ match() [1/2]

bool ndnph::PacketHandler::OutgoingPendingInterest::match ( const Data data,
const Interest interest 
) const
inline

Check Interest-Data match.

Precondition
processData is executing.
Parameters
dataincoming Data.
interestsaved outgoing Interest.

◆ match() [2/2]

bool ndnph::PacketHandler::OutgoingPendingInterest::match ( const Data data,
const Name name,
bool  canBePrefix = true 
) const
inline

Check Interest-Data match.

Precondition
processData is executing.
Parameters
dataincoming Data.
namesaved outgoing Interest name.
canBePrefixCanBePrefix flag on the Interest.

◆ matchPitToken()

bool ndnph::PacketHandler::OutgoingPendingInterest::matchPitToken ( ) const
inline

Compare PIT token of current incoming packet against last outgoing Interest.

Precondition
one of processInterest, processData, or processNack is executing.

Comparing PIT token alone is unreliable because PIT token is not guaranteed to be unique. If the application has saved a copy of the outgoing Interest or its name, it's recommended to use match() instead.

◆ send() [1/3]

template<typename Packet >
bool ndnph::PacketHandler::OutgoingPendingInterest::send ( const Packet &  interest)
inline

◆ send() [2/3]

template<typename Packet , typename ArgFirst , typename... Arg, typename = typename std::enable_if<!std::is_integral<ArgFirst>::value>::type>
bool ndnph::PacketHandler::OutgoingPendingInterest::send ( const Packet &  interest,
ArgFirst &&  arg1,
Arg &&...  arg 
)
inline

◆ send() [3/3]

template<typename Packet , typename... Arg>
bool ndnph::PacketHandler::OutgoingPendingInterest::send ( const Packet &  interest,
int  timeout,
Arg &&...  arg 
)
inline

Send an Interest.

Template Parameters
PacketInterest or its parameterized / signed variant.
Parameters
interestthe Interest.
timeouttimeout in milliseconds. Default is InterestLifetime.
argother arguments to PacketHandler::send() .

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