Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
emul.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <zephyr/lorawan/lorawan.h>

Go to the source code of this file.

Typedefs

typedef void(* lorawan_uplink_cb_t) (uint8_t port, uint8_t len, const uint8_t *data)
 Defines the emulator uplink callback handler function signature.
 

Functions

void lorawan_emul_send_downlink (uint8_t port, bool data_pending, int16_t rssi, int8_t snr, uint8_t len, const uint8_t *data)
 Emulate LoRaWAN downlink message.
 
void lorawan_emul_register_uplink_callback (lorawan_uplink_cb_t cb)
 Register callback for emulated uplink messages.
 

Typedef Documentation

◆ lorawan_uplink_cb_t

typedef void(* lorawan_uplink_cb_t) (uint8_t port, uint8_t len, const uint8_t *data)

Defines the emulator uplink callback handler function signature.

Parameters
portLoRaWAN port
lenPayload data length
dataPointer to the payload data

Function Documentation

◆ lorawan_emul_register_uplink_callback()

void lorawan_emul_register_uplink_callback ( lorawan_uplink_cb_t cb)

Register callback for emulated uplink messages.

Parameters
cbPointer to the uplink callback handler function

◆ lorawan_emul_send_downlink()

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

Emulate LoRaWAN downlink message.

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