![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
#include <iface_ctrl.hpp>
Classes | |
| class | stats |
| Radio interface statistics. More... | |
| class | disabled_exception |
| class | tx_inhibit_exception |
Public Types | |
| enum class | state : uint8_t { DISABLED , TX , RX , IDLE } |
Public Member Functions | |
| iface_ctrl (satnogs::comms::lib::radio::interface iface) | |
| void | enable () |
| Enables the interface and set it automatically to RX state. | |
| void | enable (bool yes) |
| void | disable () |
| Disables the interface. | |
| void | restart () |
| Restarts the interface by disabling and enabling it again. | |
| void | reset_stats () |
| Resets the TX/RX statistics of the interface. | |
| const stats & | get_stats () const |
| Returns the statistics class of the interface. | |
| void | rx_frame_dropped () |
| Increments the RX drop counter. | |
| void | frame_received (bool valid, float rssi) |
| Updates the RX stats. | |
| void | tx (const msg_arbiter::msg &msg, bool more=false) |
| iface_ctrl::state | get_state () const |
| Returns the current state of the interface. | |
Static Public Attributes | |
| static constexpr uint32_t | MAX_TRX_MS = 5000U |
Definition at line 33 of file iface_ctrl.hpp.
|
strong |
Definition at line 42 of file iface_ctrl.hpp.
| satnogs::comms::utils::iface_ctrl::iface_ctrl | ( | satnogs::comms::lib::radio::interface | iface | ) |
Definition at line 19 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::disable | ( | ) |
Disables the interface.
Definition at line 62 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::enable | ( | ) |
Enables the interface and set it automatically to RX state.
Definition at line 42 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::enable | ( | bool | yes | ) |
Definition at line 48 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::frame_received | ( | bool | valid, |
| float | rssi ) |
Updates the RX stats.
| valid | true if the frame passes the CRC check false otherwise |
| rssi | the RSSI of the received frame |
Definition at line 199 of file iface_ctrl.cpp.
| iface_ctrl::state satnogs::comms::utils::iface_ctrl::get_state | ( | ) | const |
Returns the current state of the interface.
Definition at line 125 of file iface_ctrl.cpp.
| const iface_ctrl::stats & satnogs::comms::utils::iface_ctrl::get_stats | ( | ) | const |
Returns the statistics class of the interface.
Definition at line 96 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::reset_stats | ( | ) |
Resets the TX/RX statistics of the interface.
Definition at line 85 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::restart | ( | ) |
Restarts the interface by disabling and enabling it again.
This can be useful when radio settings have changed and the interface needs to be reconfigured.
Definition at line 74 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::rx_frame_dropped | ( | ) |
Increments the RX drop counter.
Definition at line 223 of file iface_ctrl.cpp.
| void satnogs::comms::utils::iface_ctrl::tx | ( | const msg_arbiter::msg & | msg, |
| bool | more = false ) |
Definition at line 102 of file iface_ctrl.cpp.
|
staticconstexpr |
Maximum allowed TX/RX turnaround time in milliseconds
Definition at line 40 of file iface_ctrl.hpp.