esp8266ndn
NDN Arduino library for ESP8266 and more
|
A transport that communicates via libmemif. More...
#include <memif.hpp>
Inherits ndnph::transport::Transport.
Classes | |
struct | Options |
Public Types | |
enum class | Role { CLIENT = 0 , SERVER = 1 } |
using | DefaultDataroom = std::integral_constant< uint16_t, 2048 > |
![]() | |
using | RxCallback = void(*)(void *ctx, const uint8_t *pkt, size_t pktLen, uint64_t endpointId) |
Public Member Functions | |
bool | begin (const char *socketName, uint32_t id, uint16_t dataroom=0) |
Start transport. More... | |
bool | begin (Options opts) |
Start transport with advanced options. More... | |
bool | end () |
Stop transport. More... | |
uint16_t | getDataroom () const |
Return actual dataroom. More... | |
![]() | |
virtual | ~Transport ()=default |
bool | isUp () const |
Determine whether transport is connected. More... | |
void | loop () |
Process periodical events, such as receiving packets. More... | |
void | setRxCallback (RxCallback cb, void *ctx) |
Set incoming packet callback. More... | |
bool | send (const uint8_t *pkt, size_t pktLen, uint64_t endpointId=0) |
Synchronously transmit a packet. More... | |
Additional Inherited Members | |
![]() | |
void | invokeRxCallback (const uint8_t *pkt, size_t pktLen, uint64_t endpointId=0) |
Invoke incoming packet callback for a received packet. More... | |
A transport that communicates via libmemif.
Current implementation only allows one memif transport per control socket name. It is compatible with NDN-DPDK dataplane, but has no management integration.
using ndnph::port_transport_memif::MemifTransport::DefaultDataroom = std::integral_constant<uint16_t, 2048> |
|
inline |
Start transport.
socketName | control socket name. |
id | interface ID. |
dataroom | maximum dataroom; 0 means library default. |
|
inline |
Start transport with advanced options.
|
inline |
Stop transport.
|
inline |
Return actual dataroom.