|
ndn-embeds 0.1.0
Lightweight NDN protocol stack for embedded systems
|
NDN Protocol Stack for ESP32 - Main include file. More...
#include "ndn/certificate.hpp"#include "ndn/common.hpp"#include "ndn/crypto.hpp"#include "ndn/cs.hpp"#include "ndn/data.hpp"#include "ndn/face.hpp"#include "ndn/fib.hpp"#include "ndn/forwarder.hpp"#include "ndn/interest.hpp"#include "ndn/link.hpp"#include "ndn/name.hpp"#include "ndn/pit.hpp"#include "ndn/signature.hpp"#include "ndn/tlv.hpp"Go to the source code of this file.
Functions | |
| Forwarder & | ndn::getForwarder () |
| Get the global Forwarder instance. | |
| void | ndn::setForwarder (Forwarder &fw) |
| Register the application's Forwarder for convenience APIs. | |
| Error | ndn::initialize () |
| Initialize the NDN protocol stack. | |
Convenience API | |
| Error | ndn::expressInterest (const Interest &interest, DataCallback onData, TimeoutCallback onTimeout=nullptr) |
| Send an Interest and wait for Data. | |
| Error | ndn::registerPrefix (std::string_view prefix, InterestCallback callback) |
| Register a prefix. | |
| Error | ndn::putData (const Data &data) |
| Send Data. | |
| void | ndn::processEvents () |
| Process events. | |
NDN Protocol Stack for ESP32 - Main include file.
The main header file for using the NDN protocol stack. Including this file provides access to all public APIs.
Also provides a global Forwarder instance and convenience APIs.
Definition in file ndn.hpp.
|
inline |
Send an Interest and wait for Data.
| interest | Interest to send |
| onData | Callback on Data reception |
| onTimeout | Callback on timeout (optional) |
Definition at line 98 of file ndn.hpp.
References ndn::Forwarder::expressInterest(), ndn::expressInterest(), and ndn::getForwarder().
Referenced by ndn::expressInterest().
| Forwarder & ndn::getForwarder | ( | ) |
Get the global Forwarder instance.
Returns the Forwarder registered via setForwarder(). Must be called after setForwarder().
Definition at line 15 of file api.cpp.
References ndn::getForwarder().
Referenced by ndn::expressInterest(), ndn::getForwarder(), ndn::processEvents(), ndn::putData(), and ndn::registerPrefix().
| Error ndn::initialize | ( | ) |
Initialize the NDN protocol stack.
Lightweight initialization. The Forwarder is managed by the application; call setForwarder() to register it for convenience APIs.
Definition at line 19 of file api.cpp.
References ndn::initialize().
Referenced by ndn::initialize().
|
inline |
Process events.
Must be called periodically.
Definition at line 135 of file ndn.hpp.
References ndn::getForwarder(), ndn::Forwarder::processEvents(), and ndn::processEvents().
Referenced by ndn::processEvents().
|
inline |
Send Data.
| data | Data to send |
Definition at line 124 of file ndn.hpp.
References ndn::getForwarder(), ndn::Forwarder::putData(), and ndn::putData().
Referenced by ndn::putData().
|
inline |
Register a prefix.
| prefix | Prefix URI string |
| callback | Callback on Interest reception |
Definition at line 112 of file ndn.hpp.
References ndn::getForwarder(), ndn::Forwarder::registerPrefix(), and ndn::registerPrefix().
Referenced by ndn::registerPrefix().
| void ndn::setForwarder | ( | Forwarder & | fw | ) |
Register the application's Forwarder for convenience APIs.
Must be called before using expressInterest(), registerPrefix(), etc.
| fw | Reference to the application's Forwarder |
Definition at line 11 of file api.cpp.
References ndn::setForwarder().
Referenced by ndn::setForwarder().