STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
radio_link::FakeAir Class Reference

#include <fake_air.h>

Inheritance diagram for radio_link::FakeAir:
[legend]
Collaboration diagram for radio_link::FakeAir:
[legend]

Classes

struct  Sent

Public Member Functions

 FakeAir (uint32_t *now_ms)
bool packet_arrives (const uint8_t *bytes, uint8_t n)
bool dio1 () const
bool wait_busy () override
void transfer (const uint8_t *tx, uint8_t *rx, uint16_t len) override

Public Attributes

bool tx_never_done = false
bool listening = false
bool sniffing = false
uint16_t irq = 0
unsigned n_sent = 0
Sent sent [kMaxSent]
unsigned tx_attempts = 0

Static Public Attributes

static constexpr unsigned kMaxSent = 64

Private Attributes

uint32_t * now_
uint8_t buffer_ [256]
uint8_t payload_len_ = 0
uint8_t rx_len_ = 0
bool transmitting_ = false
uint32_t tx_start_ = 0
uint32_t tx_done_ms_ = 0
uint32_t tx_timeout_ms_ = 0

Static Private Attributes

static constexpr uint8_t kRxBase = 0x80
static constexpr uint16_t kDio1Mask = 0x0263

Additional Inherited Members

Detailed Description

Definition at line 19 of file fake_air.h.

Constructor & Destructor Documentation

◆ FakeAir()

radio_link::FakeAir::FakeAir ( uint32_t * now_ms)
inlineexplicit

Definition at line 28 of file fake_air.h.

References buffer_, and now_.

Member Function Documentation

◆ dio1()

bool radio_link::FakeAir::dio1 ( ) const
inline

Definition at line 58 of file fake_air.h.

References irq, and kDio1Mask.

◆ packet_arrives()

bool radio_link::FakeAir::packet_arrives ( const uint8_t * bytes,
uint8_t n )
inline

◆ transfer()

◆ wait_busy()

bool radio_link::FakeAir::wait_busy ( )
inlineoverridevirtual

Implements radio_link::SpiBus.

Definition at line 62 of file fake_air.h.

Member Data Documentation

◆ buffer_

uint8_t radio_link::FakeAir::buffer_[256]
private

Definition at line 146 of file fake_air.h.

Referenced by FakeAir(), packet_arrives(), and transfer().

◆ irq

uint16_t radio_link::FakeAir::irq = 0

Definition at line 38 of file fake_air.h.

Referenced by dio1(), packet_arrives(), and transfer().

◆ kDio1Mask

uint16_t radio_link::FakeAir::kDio1Mask = 0x0263
staticconstexprprivate

Definition at line 144 of file fake_air.h.

Referenced by dio1().

◆ kMaxSent

unsigned radio_link::FakeAir::kMaxSent = 64
staticconstexpr

Definition at line 26 of file fake_air.h.

Referenced by transfer().

◆ kRxBase

uint8_t radio_link::FakeAir::kRxBase = 0x80
staticconstexprprivate

Definition at line 143 of file fake_air.h.

Referenced by packet_arrives(), and transfer().

◆ listening

bool radio_link::FakeAir::listening = false

◆ n_sent

unsigned radio_link::FakeAir::n_sent = 0

◆ now_

uint32_t* radio_link::FakeAir::now_
private

Definition at line 145 of file fake_air.h.

Referenced by FakeAir(), and transfer().

◆ payload_len_

uint8_t radio_link::FakeAir::payload_len_ = 0
private

Definition at line 147 of file fake_air.h.

Referenced by transfer().

◆ rx_len_

uint8_t radio_link::FakeAir::rx_len_ = 0
private

Definition at line 147 of file fake_air.h.

Referenced by packet_arrives(), and transfer().

◆ sent

Sent radio_link::FakeAir::sent[kMaxSent]

Definition at line 40 of file fake_air.h.

Referenced by anonymous_namespace{idle_e2e.cpp}::beats(), and transfer().

◆ sniffing

bool radio_link::FakeAir::sniffing = false

◆ transmitting_

bool radio_link::FakeAir::transmitting_ = false
private

Definition at line 148 of file fake_air.h.

Referenced by transfer().

◆ tx_attempts

unsigned radio_link::FakeAir::tx_attempts = 0

◆ tx_done_ms_

uint32_t radio_link::FakeAir::tx_done_ms_ = 0
private

Definition at line 149 of file fake_air.h.

Referenced by transfer().

◆ tx_never_done

bool radio_link::FakeAir::tx_never_done = false

Definition at line 33 of file fake_air.h.

Referenced by anonymous_namespace{idle_e2e.cpp}::check_idle_tx_fail(), and transfer().

◆ tx_start_

uint32_t radio_link::FakeAir::tx_start_ = 0
private

Definition at line 149 of file fake_air.h.

Referenced by transfer().

◆ tx_timeout_ms_

uint32_t radio_link::FakeAir::tx_timeout_ms_ = 0
private

Definition at line 149 of file fake_air.h.

Referenced by transfer().


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