3#include <ArduinoJson.h>
11#define POLL_RX_TO_RESP_TX_DLY_UUS 2400
16static portMUX_TYPE
taskMutex = portMUX_INITIALIZER_UNLOCKED;
37 virtual void setup()
override;
42 virtual void loop()
override;
79 static void rx_ok_cb(
const dwt_cb_data_t *cb_data);
The base class for Time-of-Flight (TOF) devices.
Definition: tof-device.h:44
The TofResponder class represents a TOF responder device.
Definition: tof-responder.h:22
uint64_t poll_rx_ts
Timestamp of poll frame reception.
Definition: tof-responder.h:53
virtual void loop() override
Main loop of the TOF responder device.
Definition: tof-responder.cpp:51
static SemaphoreHandle_t responseSemaphore
FreeRTOS Semaphore to indicate a active response.
Definition: tof-responder.h:68
static void rx_ok_cb(const dwt_cb_data_t *cb_data)
Static interrupt service routine (ISR) for successful frame reception.
Definition: tof-responder.cpp:233
~TofResponder()
Definition: tof-responder.h:32
DynamicJsonDocument * rx_diagnostics_json
JSON holding the rx diagnostic information with style like uwb_diagnostic.json.
Definition: tof-responder.h:63
uwb_addr dst_address
The destination address of the initiator.
Definition: tof-responder.h:48
uint64_t resp_tx_ts
Timestamp of response frame transmission.
Definition: tof-responder.h:58
virtual void setup() override
Initialize and configure the TOF responder device.
Definition: tof-responder.cpp:19
void update_rx_diagnostics()
updates the value of rx_diagnostics.
Definition: tof-responder.cpp:196
long long uwb_addr
Definition: datatypes.h:11
Header file for the TOFDevice class, a superclass for TOF initiators and responders.
static portMUX_TYPE taskMutex
A FreeRTOS Mutex type to protekt task from getting interupted while tof mesuring.
Definition: tof-responder.h:16