Ares LoRa Firmware
Loading...
Searching...
No Matches
ares_lora_transport_api Struct Reference

Unified LoRa transport interface. More...

#include <lora.h>

Data Fields

int(* init )(const struct ares_lora_transport *transport, const void *config, lora_transport_handler_t evt_handler, void *context)
 Function for initializing the LoRa transport interface.
int(* uninit )(const struct ares_lora_transport *transport)
 Function for uninitializing the LoRa transport interface.
int(* enable )(const struct ares_lora_transport *transport, bool block_tx)
 Function for enabling transport in given TX mode.
int(* write )(const struct ares_lora_transport *transport, const void *data, size_t length, size_t *cnt)
 Function for writing data to the transfer interface.
int(* read )(const struct ares_lora_transport *transport, void *data, size_t length, size_t *cnt)
 Function for reading data from the transport interface.
int(* configure )(const struct ares_lora_transport *transport, const struct lora_modem_config *config)
 Function for reconfiguring the LoRa modem defined in the transport interface.

Detailed Description

Unified LoRa transport interface.

Field Documentation

◆ configure

int(* ares_lora_transport_api::configure) (const struct ares_lora_transport *transport, const struct lora_modem_config *config)

Function for reconfiguring the LoRa modem defined in the transport interface.

Parameters
[in]transportPointer to the transfer instance.
[in]configPointer to the new LoRa modem configurations.
Returns
0 on success.
negative error code otherwise.

◆ enable

int(* ares_lora_transport_api::enable) (const struct ares_lora_transport *transport, bool block_tx)

Function for enabling transport in given TX mode.

Function can be used to reconfigure TX to work in blocking mode.

Parameters
[in]transportPointer to transfer instance.
[in]block_txIf true, the transport TX is enabled in blocking mode.
Returns
0 on success.
negative error code otherwise.

◆ init

int(* ares_lora_transport_api::init) (const struct ares_lora_transport *transport, const void *config, lora_transport_handler_t evt_handler, void *context)

Function for initializing the LoRa transport interface.

Parameters
[in]transportPointer to the transfer instance.
[in]configPointer to the instance configuration.
[in]evt_handlerEvent handler.
[in]contextPointer to the context passed to event handler.
Returns
0 on success.
negative error code otherwise.

◆ read

int(* ares_lora_transport_api::read) (const struct ares_lora_transport *transport, void *data, size_t length, size_t *cnt)

Function for reading data from the transport interface.

Parameters
[in]transportPointer to the transfer instance.
[in]dataPointer to the destination buffer.
[in]lengthDestination buffer length.
[out]cntPointer to the received bytes counter.
Returns
0 on success.
negative error code otherwise.

◆ uninit

int(* ares_lora_transport_api::uninit) (const struct ares_lora_transport *transport)

Function for uninitializing the LoRa transport interface.

Parameters
[in]transportPointer to the transfer instance.
Returns
0 on success.
negative error code otherwise.

◆ write

int(* ares_lora_transport_api::write) (const struct ares_lora_transport *transport, const void *data, size_t length, size_t *cnt)

Function for writing data to the transfer interface.

Parameters
[in]transportPointer to the transfer interface.
[in]dataPointer to the source buffer.
[in]lengthSource buffer length.
[out]cntPointer to the sent bytes counter.
Returns
0 on success.
negative error code otherwise.

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