ESP32 Transceiver IEEE 802.15.4 Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ieee802154::Frame Struct Reference

IEEE 802.15.4 MAC frame structure. More...

#include <Frame.h>

Collaboration diagram for ieee802154::Frame:
Collaboration graph
[legend]

Public Member Functions

size_t build (uint8_t *buffer, bool verbose) const
 Build IEEE 802.15.4 frame array with length byte at start and 0x00 at end.
 
bool parse (const uint8_t *data, bool verbose)
 parse frame from raw data
 
void setDestinationAddress (Address address)
 Set the destination address for the frame.
 
void setPAN (uint16_t panId)
 Defines the Personal Area Network Identifier (PAN ID) for the frame.
 
void setPayload (const uint8_t *data, size_t len)
 Set the payload for the frame.
 
void setSourceAddress (Address address)
 Set the source address for the frame.
 
const char * to_str (uint8_t frameType)
 Get a human-readable string representation of the frame.
 

Public Attributes

uint8_t destAddress [8]
 
uint8_t destAddrLen = 0
 
uint16_t destPanId = 0
 
FrameControlField fcf {}
 
uint8_t * payload = nullptr
 
size_t payloadLen = 0
 
uint8_t rssi_lqi = 0
 
uint8_t sequenceNumber = 0
 
uint8_t srcAddress [8]
 
uint8_t srcAddrLen = 0
 
uint16_t srcPanId = 0
 

Protected Attributes

std::vector< uint8_t > buffer
 

Detailed Description

IEEE 802.15.4 MAC frame structure.

Member Function Documentation

◆ build()

size_t ieee802154::Frame::build ( uint8_t *  buffer,
bool  verbose 
) const

Build IEEE 802.15.4 frame array with length byte at start and 0x00 at end.

◆ parse()

bool ieee802154::Frame::parse ( const uint8_t *  data,
bool  verbose 
)

parse frame from raw data

◆ setDestinationAddress()

void ieee802154::Frame::setDestinationAddress ( Address  address)
inline

Set the destination address for the frame.

◆ setPAN()

void ieee802154::Frame::setPAN ( uint16_t  panId)
inline

Defines the Personal Area Network Identifier (PAN ID) for the frame.

◆ setPayload()

void ieee802154::Frame::setPayload ( const uint8_t *  data,
size_t  len 
)
inline

Set the payload for the frame.

◆ setSourceAddress()

void ieee802154::Frame::setSourceAddress ( Address  address)
inline

Set the source address for the frame.

◆ to_str()

const char * ieee802154::Frame::to_str ( uint8_t  frameType)

Get a human-readable string representation of the frame.

Member Data Documentation

◆ buffer

std::vector<uint8_t> ieee802154::Frame::buffer
protected

◆ destAddress

uint8_t ieee802154::Frame::destAddress[8]

◆ destAddrLen

uint8_t ieee802154::Frame::destAddrLen = 0

◆ destPanId

uint16_t ieee802154::Frame::destPanId = 0

◆ fcf

FrameControlField ieee802154::Frame::fcf {}

◆ payload

uint8_t* ieee802154::Frame::payload = nullptr

◆ payloadLen

size_t ieee802154::Frame::payloadLen = 0

◆ rssi_lqi

uint8_t ieee802154::Frame::rssi_lqi = 0

◆ sequenceNumber

uint8_t ieee802154::Frame::sequenceNumber = 0

◆ srcAddress

uint8_t ieee802154::Frame::srcAddress[8]

◆ srcAddrLen

uint8_t ieee802154::Frame::srcAddrLen = 0

◆ srcPanId

uint16_t ieee802154::Frame::srcPanId = 0

The documentation for this struct was generated from the following files: