Ares LoRa Serial Driver Core
Loading...
Searching...
No Matches
AresSerialConfigs Struct Reference

#include <ares_lora_serial.hpp>

Public Member Functions

 AresSerialConfigs (const py::kwargs &kwargs)

Public Attributes

std::string port
std::chrono::milliseconds serial_timeout = 100ms
std::chrono::milliseconds response_timeout = 2000ms
std::chrono::milliseconds rx_period = 100ms
bool master = false
std::function< void(int64_t, uint64_t, uint16_t, bool, uint8_t, uint16_t)> start_callback = nullptr
std::function< void(uint16_t, bool, bool)> heartbeat_callback = nullptr
std::function< void(uint16_t)> claim_callback = nullptr
std::function< void(uint16_t, uint16_t, uint8_t, uint8_t, const std::string &)> log_callback = nullptr
double alpha = 1.0
double beta = 2.0
std::function< void(uint8_t, uint16_t, uint16_t)> packet_rx_callback
std::function< void(uint32_t)> packet_tx_callback = nullptr

Detailed Description

Serial driver configurations.

Constructor & Destructor Documentation

◆ AresSerialConfigs()

AresSerialConfigs::AresSerialConfigs ( const py::kwargs & kwargs)
explicit

Construct from Python kwargs.

Parameters
kwargsPython keyword arguments.

Member Data Documentation

◆ alpha

double AresSerialConfigs::alpha = 1.0

Alpha parameter for the Gamma distribution.

◆ beta

double AresSerialConfigs::beta = 2.0

Beta parameter for the Gamma distribution.

◆ claim_callback

std::function<void(uint16_t)> AresSerialConfigs::claim_callback = nullptr

Callback for claim events. Parameters: (Master node ID).

◆ heartbeat_callback

std::function<void(uint16_t, bool, bool)> AresSerialConfigs::heartbeat_callback = nullptr

Callback for heartbeat events. Parameters: (source ID, ready, broadcasted).

◆ log_callback

std::function<void(uint16_t, uint16_t, uint8_t, uint8_t, const std::string &)> AresSerialConfigs::log_callback = nullptr

Log event callback. Parameters: (source ID, Log ID, chunk ID, number of chunks, message).

◆ master

bool AresSerialConfigs::master = false

Designates the driver as the master node.

◆ packet_rx_callback

std::function<void(uint8_t, uint16_t, uint16_t)> AresSerialConfigs::packet_rx_callback
Initial value:
=
nullptr

Packet Received callback. Parameters: (Sequence Count, Packet ID, Source ID).

◆ packet_tx_callback

std::function<void(uint32_t)> AresSerialConfigs::packet_tx_callback = nullptr

Packet Transmitted callback. Parameters: (Number of transmissions).

◆ port

std::string AresSerialConfigs::port

The serial port.

◆ response_timeout

std::chrono::milliseconds AresSerialConfigs::response_timeout = 2000ms

Default response timeout.

◆ rx_period

std::chrono::milliseconds AresSerialConfigs::rx_period = 100ms

The period to poll the input buffer at.

◆ serial_timeout

std::chrono::milliseconds AresSerialConfigs::serial_timeout = 100ms

Serial reception timeout.

◆ start_callback

std::function<void(int64_t, uint64_t, uint16_t, bool, uint8_t, uint16_t)> AresSerialConfigs::start_callback = nullptr

Callback function for start events. Parameters: (seconds, nanoseconds, source ID, broadcasted, sequence count, packet id).


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