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

ESP-NOW Face implementation. More...

#include "ndn/face.hpp"
#include <array>
#include <cstring>
#include "esp_now.h"

Go to the source code of this file.

Classes

struct  ndn::PeerInfo
 Peer information. More...
 
class  ndn::EspNowFace
 ESP-NOW Face. More...
 

Functions

FaceId ndn::macToFaceId (const uint8_t *mac)
 Generate FaceId from MAC address.
 

Variables

constexpr size_t ndn::ESPNOW_MAX_PAYLOAD = 1470
 ESP-NOW maximum payload size (v2.0)
 
constexpr size_t ndn::ESPNOW_MAX_PEERS = 20
 ESP-NOW maximum number of peers.
 
constexpr uint8_t ndn::BROADCAST_MAC [6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
 Broadcast MAC address.
 

Detailed Description

ESP-NOW Face implementation.

NDN Face implementation using the ESP-NOW protocol. Supports both broadcast and unicast.

Definition in file espnow_face.hpp.

Function Documentation

◆ macToFaceId()

FaceId ndn::macToFaceId ( const uint8_t *  mac)
inline

Generate FaceId from MAC address.

Parameters
macMAC address (6 bytes)
Returns
FaceId

Definition at line 37 of file espnow_face.hpp.

References ndn::macToFaceId().

Referenced by ndn::EspNowFace::addPeer(), and ndn::macToFaceId().

Variable Documentation

◆ BROADCAST_MAC

constexpr uint8_t ndn::BROADCAST_MAC[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
constexpr

Broadcast MAC address.

Definition at line 30 of file espnow_face.hpp.

Referenced by ndn::EspNowFace::broadcast(), and ndn::EspNowFace::start().

◆ ESPNOW_MAX_PAYLOAD

constexpr size_t ndn::ESPNOW_MAX_PAYLOAD = 1470
constexpr

ESP-NOW maximum payload size (v2.0)

Definition at line 24 of file espnow_face.hpp.

Referenced by ndn::EspNowFace::broadcast(), ndn::EspNowFace::maxPayloadSize(), and ndn::EspNowFace::sendTo().

◆ ESPNOW_MAX_PEERS

constexpr size_t ndn::ESPNOW_MAX_PEERS = 20
constexpr

ESP-NOW maximum number of peers.

Definition at line 27 of file espnow_face.hpp.