esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
ndnph::transport::Transport Class Referenceabstract

Base class of low-level transport. More...

#include <transport.hpp>

Inherited by esp8266ndn::BleServerTransportBase [virtual], esp8266ndn::EthernetTransport [virtual], esp8266ndn::UdpTransport [virtual], ndnph::BridgeTransport [virtual], ndnph::port_transport_memif::MemifTransport [virtual], ndnph::port_transport_socket::UdpUnicastTransport [virtual], ndnph::transport::RxQueueMixin [virtual], and ndnph::transport::TransportWrap [virtual].

Public Types

using RxCallback = void(*)(void *ctx, const uint8_t *pkt, size_t pktLen, uint64_t endpointId)
 

Public Member Functions

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...
 

Protected Member Functions

void invokeRxCallback (const uint8_t *pkt, size_t pktLen, uint64_t endpointId=0)
 Invoke incoming packet callback for a received packet. More...
 

Private Member Functions

virtual bool doIsUp () const =0
 
virtual void doLoop ()=0
 
virtual bool doSend (const uint8_t *pkt, size_t pktLen, uint64_t endpointId)=0
 

Detailed Description

Base class of low-level transport.

Member Typedef Documentation

◆ RxCallback

using ndnph::transport::Transport::RxCallback = void (*)(void* ctx, const uint8_t* pkt, size_t pktLen, uint64_t endpointId)

Constructor & Destructor Documentation

◆ ~Transport()

virtual ndnph::transport::Transport::~Transport ( )
virtualdefault

Member Function Documentation

◆ doIsUp()

virtual bool ndnph::transport::Transport::doIsUp ( ) const
privatepure virtual

◆ doLoop()

virtual void ndnph::transport::Transport::doLoop ( )
privatepure virtual

◆ doSend()

virtual bool ndnph::transport::Transport::doSend ( const uint8_t *  pkt,
size_t  pktLen,
uint64_t  endpointId 
)
privatepure virtual

◆ invokeRxCallback()

void ndnph::transport::Transport::invokeRxCallback ( const uint8_t *  pkt,
size_t  pktLen,
uint64_t  endpointId = 0 
)
inlineprotected

Invoke incoming packet callback for a received packet.

◆ isUp()

bool ndnph::transport::Transport::isUp ( ) const
inline

Determine whether transport is connected.

◆ loop()

void ndnph::transport::Transport::loop ( )
inline

Process periodical events, such as receiving packets.

◆ send()

bool ndnph::transport::Transport::send ( const uint8_t *  pkt,
size_t  pktLen,
uint64_t  endpointId = 0 
)
inline

Synchronously transmit a packet.

◆ setRxCallback()

void ndnph::transport::Transport::setRxCallback ( RxCallback  cb,
void *  ctx 
)
inline

Set incoming packet callback.


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