ndn-embeds 0.1.0
Lightweight NDN protocol stack for embedded systems
Loading...
Searching...
No Matches
face.hpp File Reference

NDN Face interface. More...

#include "ndn/common.hpp"
#include <functional>

Go to the source code of this file.

Classes

class  ndn::Face
 NDN Face abstract base class. More...
 

Typedefs

using ndn::PacketCallback = std::function< void(FaceId faceId, const uint8_t *data, size_t len)>
 Packet receive callback.
 

Detailed Description

NDN Face interface.

A Face abstracts the connection to a physical network. Concrete implementation classes for different transports such as ESP-NOW, BLE, and Wi-Fi inherit from this interface.

See also
https://docs.named-data.net/NDN-packet-spec/current/

Definition in file face.hpp.

Typedef Documentation

◆ PacketCallback

using ndn::PacketCallback = typedef std::function<void(FaceId faceId, const uint8_t* data, size_t len)>

Packet receive callback.

Callback function type invoked when a Face receives a packet.

Parameters
faceIdID of the Face that received the packet
dataPointer to the received packet data
lenPacket size in bytes

Definition at line 28 of file face.hpp.