esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | List of all members
ndnph::BasicSegmentProducer< SegmentConvention, regionCap > Class Template Reference

Producer of segmented object. More...

#include <segment-producer.hpp>

Inherits ndnph::SegmentProducerBase.

Public Member Functions

 SegmentProducerBase (Face &face, Options opts)
 Constructor.
 
 SegmentProducerBase (Face &face)
 
- Public Member Functions inherited from ndnph::SegmentProducerBase
 SegmentProducerBase (Face &face, Options opts)
 Constructor.
 
 SegmentProducerBase (Face &face)
 
void setContent (Name prefix, const uint8_t *content, size_t size)
 Set or change served content.
 
- 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

bool processInterest (Interest interest) final
 Override to receive Interest packets.
 

Additional Inherited Members

- Public Types inherited from ndnph::PacketHandler
using PacketInfo = Face::PacketInfo
 
- 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.
 
- Protected Attributes inherited from ndnph::SegmentProducerBase
Options m_opts
 
Name m_prefix
 
uint64_t m_lastSegment = 0
 
const uint8_t * m_content = nullptr
 
size_t m_size = 0
 

Detailed Description

template<typename SegmentConvention = convention::Segment, size_t regionCap = 2048>
class ndnph::BasicSegmentProducer< SegmentConvention, regionCap >

Producer of segmented object.

Template Parameters
SegmentConventionsegment component convention.
regionCapencoding region capacity.

Member Function Documentation

◆ processInterest()

template<typename SegmentConvention = convention::Segment, size_t regionCap = 2048>
bool ndnph::BasicSegmentProducer< SegmentConvention, regionCap >::processInterest ( Interest  )
inlinefinalprivatevirtual

Override to receive Interest 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.

◆ SegmentProducerBase() [1/2]

template<typename SegmentConvention = convention::Segment, size_t regionCap = 2048>
ndnph::SegmentProducerBase::SegmentProducerBase ( Face face)
inlineexplicit

◆ SegmentProducerBase() [2/2]

template<typename SegmentConvention = convention::Segment, size_t regionCap = 2048>
ndnph::SegmentProducerBase::SegmentProducerBase ( Face face,
Options  opts 
)
inlineexplicit

Constructor.

Parameters
faceface for communication.
optsoptions.

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