Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
lorawan_downlink_cb Struct Reference

LoRaWAN downlink callback parameters. More...

#include <lorawan.h>

Data Fields

uint16_t port
 Port to handle messages for.
 
void(* cb )(uint8_t port, bool data_pending, int16_t rssi, int8_t snr, uint8_t len, const uint8_t *data)
 Callback function to run on downlink data.
 
sys_snode_t node
 Node for callback list.
 

Detailed Description

LoRaWAN downlink callback parameters.

Field Documentation

◆ cb

void(* lorawan_downlink_cb::cb) (uint8_t port, bool data_pending, int16_t rssi, int8_t snr, uint8_t len, const uint8_t *data)

Callback function to run on downlink data.

Note
Callbacks are run on the system workqueue, and should therefore be as short as possible.
Parameters
portPort message was sent on
data_pendingNetwork server has more downlink packets pending
rssiReceived signal strength in dBm
snrSignal to Noise ratio in dBm
lenLength of data received, will be 0 for ACKs
dataData received, will be NULL for ACKs

◆ node

sys_snode_t lorawan_downlink_cb::node

Node for callback list.

◆ port

uint16_t lorawan_downlink_cb::port

Port to handle messages for.

  • Port 0: TX packet acknowledgements
  • Ports 1-255: Standard downlink port
  • LW_RECV_PORT_ANY: All downlinks

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