ESP32 Transceiver IEEE 802.15.4 Library
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
ieee802154 Namespace Reference

Classes

class  Address
 IEEE 802.15.4 Address abstraction. More...
 
class  ESP32TransceiverIEEE802_15_4
 Class to manage an IEEE 802.15.4 transceiver using the ESP-IDF API. On the sending side we support broadcast and direct addressing. On the receiving side we support promiscuous mode, and reveiving only frames that are destinated to the device or broadcast frames. More...
 
class  ESP32TransceiverStreamIEEE802_15_4
 Arduino Stream interface for IEEE 802.15.4 transceiver. More...
 
struct  Frame
 IEEE 802.15.4 MAC frame structure. More...
 
struct  frame_data_t
 Structure to hold frame data and frame info. More...
 
struct  FrameControlField
 IEEE 802.15.4 Frame Control Field (FCF) structure Bit fields are ordered LSB to MSB to match IEEE 802.15.4 specification. More...
 
class  RingBuffer
 Efficient ring buffer for storing frame data. More...
 

Typedefs

using ESP32TransceiverIEEE802_15_4Stream = ESP32TransceiverStreamIEEE802_15_4
 Alias for ESP32TransceiverStreamIEEE802_15_4 to simplify usage.
 
typedef void(* ieee802154_transceiver_rx_callback_t) (Frame &frame, esp_ieee802154_frame_info_t &frame_info, void *user_data)
 Callback function type for received IEEE 802.15.4 frames.
 
typedef void(* ieee802154_transceiver_sfd_callback_t) (void *user_data)
 Callback function type for SFD (Start Frame Delimiter) received event.
 
typedef void(* ieee802154_transceiver_sfd_tx_callback_t) (uint8_t *frame, void *user_data)
 Callback function type for SFD transmitted event.
 
typedef void(* ieee802154_transceiver_tx_done_callback_t) (const uint8_t *frame, const uint8_t *ack, esp_ieee802154_frame_info_t *ack_frame_info, void *user_data)
 Callback function type for successful IEEE 802.15.4 frame transmission.
 
typedef void(* ieee802154_transceiver_tx_failed_callback_t) (const uint8_t *frame, esp_ieee802154_tx_error_t error, void *user_data)
 Callback function type for failed IEEE 802.15.4 frame transmission.
 

Enumerations

enum class  addr_mode_t : uint8_t { NONE = 0x0 , RESERVED = 0x1 , SHORT = 0x2 , EXTENDED = 0x3 }
 IEEE 802.15.4 address mode enumerations. More...
 
enum class  channel_t : uint8_t {
  UNDEFINED = 0 , CHANNEL_11 = 11 , CHANNEL_12 = 12 , CHANNEL_13 = 13 ,
  CHANNEL_14 = 14 , CHANNEL_15 = 15 , CHANNEL_16 = 16 , CHANNEL_17 = 17 ,
  CHANNEL_18 = 18 , CHANNEL_19 = 19 , CHANNEL_20 = 20 , CHANNEL_21 = 21 ,
  CHANNEL_22 = 22 , CHANNEL_23 = 23 , CHANNEL_24 = 24 , CHANNEL_25 = 25 ,
  CHANNEL_26 = 26
}
 Enum for IEEE 802.15.4 channel numbers (11-26). More...
 
enum class  frame_version_t : uint8_t { V_2003 = 0x0 , V_2006 = 0x1 , V_RESERVED1 = 0x2 , V_RESERVED2 = 0x3 }
 IEEE 802.15.4 frame version enumerations. More...
 
enum class  Frameype_t : uint8_t { BEACON = 0x0 , DATA = 0x1 , ACK = 0x2 , MAC_CMD = 0x3 }
 IEEE 802.15.4 FCF field value enumerations. More...
 

Functions

Address BROADCAST_ADDRESS ((uint8_t[2]){0xFF, 0xFF})
 Broadcast address constant.
 
 ESP_STATIC_ASSERT (sizeof(FrameControlField)==IEEE802154_FCF_SIZE, "ieee802154_fcf_t must be 2 bytes")
 
void receive_packet_task (void *pvParameters)
 Forward declarations.
 

Variables

ESP32TransceiverIEEE802_15_4pt_transceiver = nullptr
 accessible by global callback functions
 

Typedef Documentation

◆ ESP32TransceiverIEEE802_15_4Stream

Alias for ESP32TransceiverStreamIEEE802_15_4 to simplify usage.

◆ ieee802154_transceiver_rx_callback_t

typedef void(* ieee802154::ieee802154_transceiver_rx_callback_t) (Frame &frame, esp_ieee802154_frame_info_t &frame_info, void *user_data)

Callback function type for received IEEE 802.15.4 frames.

Parameters
frameParsed IEEE 802.15.4 frame.
frame_infoFrame information (e.g., RSSI, LQI, channel).
user_dataUser-defined data passed to the callback.

◆ ieee802154_transceiver_sfd_callback_t

typedef void(* ieee802154::ieee802154_transceiver_sfd_callback_t) (void *user_data)

Callback function type for SFD (Start Frame Delimiter) received event.

Parameters
user_dataUser-defined data passed to the callback.

◆ ieee802154_transceiver_sfd_tx_callback_t

typedef void(* ieee802154::ieee802154_transceiver_sfd_tx_callback_t) (uint8_t *frame, void *user_data)

Callback function type for SFD transmitted event.

Parameters
framePointer to frame data.
user_dataUser-defined data passed to the callback.

◆ ieee802154_transceiver_tx_done_callback_t

typedef void(* ieee802154::ieee802154_transceiver_tx_done_callback_t) (const uint8_t *frame, const uint8_t *ack, esp_ieee802154_frame_info_t *ack_frame_info, void *user_data)

Callback function type for successful IEEE 802.15.4 frame transmission.

Parameters
framePointer to transmitted frame data.
ackPointer to acknowledgment frame data (if any).
ack_frame_infoFrame info for the acknowledgment.
user_dataUser-defined data passed to the callback.

◆ ieee802154_transceiver_tx_failed_callback_t

typedef void(* ieee802154::ieee802154_transceiver_tx_failed_callback_t) (const uint8_t *frame, esp_ieee802154_tx_error_t error, void *user_data)

Callback function type for failed IEEE 802.15.4 frame transmission.

Parameters
framePointer to transmitted frame data.
errorTransmission error code.
user_dataUser-defined data passed to the callback.

Enumeration Type Documentation

◆ addr_mode_t

enum class ieee802154::addr_mode_t : uint8_t
strong

IEEE 802.15.4 address mode enumerations.

Enumerator
NONE 
RESERVED 
SHORT 
EXTENDED 

◆ channel_t

enum class ieee802154::channel_t : uint8_t
strong

Enum for IEEE 802.15.4 channel numbers (11-26).

Enumerator
UNDEFINED 
CHANNEL_11 
CHANNEL_12 
CHANNEL_13 
CHANNEL_14 
CHANNEL_15 
CHANNEL_16 
CHANNEL_17 
CHANNEL_18 
CHANNEL_19 
CHANNEL_20 
CHANNEL_21 
CHANNEL_22 
CHANNEL_23 
CHANNEL_24 
CHANNEL_25 
CHANNEL_26 

◆ frame_version_t

enum class ieee802154::frame_version_t : uint8_t
strong

IEEE 802.15.4 frame version enumerations.

Enumerator
V_2003 
V_2006 
V_RESERVED1 
V_RESERVED2 

◆ Frameype_t

enum class ieee802154::Frameype_t : uint8_t
strong

IEEE 802.15.4 FCF field value enumerations.

Enumerator
BEACON 
DATA 
ACK 
MAC_CMD 

Function Documentation

◆ BROADCAST_ADDRESS()

Address ieee802154::BROADCAST_ADDRESS ( (uint8_t[2]){0xFF, 0xFF}  )
inline

Broadcast address constant.

◆ ESP_STATIC_ASSERT()

ieee802154::ESP_STATIC_ASSERT ( sizeof(FrameControlField = =IEEE802154_FCF_SIZE,
"ieee802154_fcf_t must be 2 bytes"   
)

◆ receive_packet_task()

void ieee802154::receive_packet_task ( void *  pvParameters)

Forward declarations.

Variable Documentation

◆ pt_transceiver

ESP32TransceiverIEEE802_15_4 * ieee802154::pt_transceiver = nullptr

accessible by global callback functions