UWB-Tracking
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
TofDevice Class Reference

The base class for Time-of-Flight (TOF) devices. More...

#include <tof-device.h>

Inheritance diagram for TofDevice:
TofInitiator TofResponder

Public Member Functions

 TofDevice (uwb_addr src, unsigned long wdt_timeout)
 Constructor for the TofDevice class. More...
 
 ~TofDevice ()
 Destructor for the TofDevice class. More...
 
virtual void setup ()
 Initialize and configure the TOF device. More...
 
void start_wdt ()
 Start the WDT to handle failure events. More...
 
void enable_leds ()
 Enable LEDs for debugging purposes. More...
 
virtual void loop ()
 Main loop of the TOF device. More...
 
char * get_type ()
 Get the type of the TOF device. More...
 

Protected Attributes

Watchdog my_watchdog
 
uwb_addr src_address
 
String type
 
mac_frame_802_15_4_format_t mac_frame
 
uint8_t poll_msg [4] = {'P', 'o', 'l', 'l'}
 
uint8_t resp_msg [16] = {0, 0, 0, 0, 0, 0, 0, 0, 'R', 'e', 's', 'p', 'o', 'n', 's', 'e'}
 
uint8_t rx_buffer [RX_BUF_LEN]
 
uint32_t status_reg
 
dwt_aes_job_t aes_job_tx
 
dwt_aes_job_t aes_job_rx
 
int8_t status
 
dwt_aes_config_t aes_config
 
dwt_config_t config
 
dwt_aes_key_t keys_options [NUM_OF_KEY_OPTIONS]
 

Detailed Description

The base class for Time-of-Flight (TOF) devices.

Constructor & Destructor Documentation

◆ TofDevice()

TofDevice ( uwb_addr  src,
unsigned long  wdt_timeout 
)

Constructor for the TofDevice class.

Parameters
srcThe source address for the TOF device.
wdt_timeoutTime for the Watchdog, wdt triggers reboot.

◆ ~TofDevice()

~TofDevice ( )
inline

Destructor for the TofDevice class.

Member Function Documentation

◆ enable_leds()

void enable_leds ( )

Enable LEDs for debugging purposes.

◆ get_type()

char * get_type ( )
inline

Get the type of the TOF device.

Returns
A pointer to the type string.

◆ loop()

void loop ( )
virtual

Main loop of the TOF device.

Reimplemented in TofInitiator, and TofResponder.

◆ setup()

void setup ( )
virtual

Initialize and configure the TOF device.

Setup the TOF device.

Reimplemented in TofInitiator, and TofResponder.

◆ start_wdt()

void start_wdt ( )

Start the WDT to handle failure events.

Start the Watchdog timer to reset controller if necessary.

Member Data Documentation

◆ aes_config

dwt_aes_config_t aes_config
protected

◆ aes_job_rx

dwt_aes_job_t aes_job_rx
protected

◆ aes_job_tx

dwt_aes_job_t aes_job_tx
protected

◆ config

dwt_config_t config
protected

◆ keys_options

dwt_aes_key_t keys_options[NUM_OF_KEY_OPTIONS]
protected

◆ mac_frame

mac_frame_802_15_4_format_t mac_frame
protected

◆ my_watchdog

Watchdog my_watchdog
protected

◆ poll_msg

uint8_t poll_msg[4] = {'P', 'o', 'l', 'l'}
protected

◆ resp_msg

uint8_t resp_msg[16] = {0, 0, 0, 0, 0, 0, 0, 0, 'R', 'e', 's', 'p', 'o', 'n', 's', 'e'}
protected

◆ rx_buffer

uint8_t rx_buffer[RX_BUF_LEN]
protected

◆ src_address

uwb_addr src_address
protected

◆ status

int8_t status
protected

◆ status_reg

uint32_t status_reg
protected

◆ type

String type
protected

The documentation for this class was generated from the following files: