Manages power supplies and monitors subsystem status.
More...
#include <power.hpp>
|
| class | r_lim |
| | Current limit resistor configuration. More...
|
| class | io_conf |
| | Represents the I/O configuration for the power management system. More...
|
|
| enum class | subsys : uint8_t {
CAN1 = 0
, CAN2 = 1
, RF_5V = 2
, FPGA_5V = 3
,
CAN1_LPWR = 4
, CAN2_LPWR = 5
, UHF = 6
, SBAND = 7
} |
| | Identifies subsystems managed by the power class. More...
|
| enum class | sensor : uint8_t { EFUSES = 0
, EMC1702 = 1
, AVERAGE = 2
} |
| | Identifies power measurement sources. More...
|
| enum class | channel : uint8_t {
FPGA = 1
, RF_5V = 2
, DIG_3V3 = 3
, VIN = 4
,
V_BAT = 5
} |
| | Identifies voltage and current measurement channels. More...
|
| enum class | pgood_tp : uint8_t { RAIL_5V = 0
, RAIL_FPGA = 1
, RAIL_UHF = 2
, RAIL_SBAND = 3
} |
| | Power good indicator. More...
|
|
| void | enable (subsys sys, bool en=true) |
| | Enable/disable the power of subsystems.
|
| bool | enabled (subsys sys) const |
| | Checks the if the subsystem is enabled.
|
| bool | pgood (pgood_tp tp) const |
| | Gets the power good indication from various power supplies.
|
| float | voltage (channel sys) const |
| | Retrieves the voltage of a specified channel.
|
| float | current (channel sys) const |
| | Retrieves the current of a specified channel.
|
| float | get_power (sensor src) const |
| | Calculates the power consumption for a specified sensor source.
|
| | power (const io_conf &io) |
Manages power supplies and monitors subsystem status.
Definition at line 42 of file power.hpp.
◆ channel
Identifies voltage and current measurement channels.
| Enumerator |
|---|
| FPGA | FPGA voltage/current channel.
|
| RF_5V | RF 5V voltage/current channel.
|
| DIG_3V3 | Digital 3.3V voltage/current channel.
|
| VIN | Input voltage channel.
|
| V_BAT | Battery voltage channel.
|
Definition at line 76 of file power.hpp.
◆ pgood_tp
Power good indicator.
| Enumerator |
|---|
| RAIL_5V | 5V rail
|
| RAIL_FPGA | FPGA rail.
|
| RAIL_UHF | UHF rail.
|
| RAIL_SBAND | S-Band rail.
|
Definition at line 89 of file power.hpp.
◆ sensor
Identifies power measurement sources.
| Enumerator |
|---|
| EFUSES | Power measured by eFuses.
|
| EMC1702 | Power measured by the EMC1702 sensor.
|
| AVERAGE | Average power from all available sources.
|
Definition at line 65 of file power.hpp.
◆ subsys
Identifies subsystems managed by the power class.
| Enumerator |
|---|
| CAN1 | CAN Bus 1.
|
| CAN2 | CAN Bus 2.
|
| RF_5V | RF 5V supply.
|
| FPGA_5V | FPGA 5V supply.
|
| CAN1_LPWR | Low-power mode for CAN Bus 1.
|
| CAN2_LPWR | Low-power mode for CAN Bus 2.
|
| UHF | UHF subsystem.
|
| SBAND | S-Band subsystem.
|
Definition at line 49 of file power.hpp.
◆ power()
| satnogs::comms::lib::power::power |
( |
const io_conf & | io | ) |
|
◆ current()
| float satnogs::comms::lib::power::current |
( |
channel | sys | ) |
const |
Retrieves the current of a specified channel.
This function measures the current for a specific power channel using the corresponding ADC and resistor limits. Supported channels include the digital 3.3V rail, RF 5V rail, FPGA rail, and input voltage channel.
- Parameters
-
| sys | The channel for which the current is being measured: |
- Returns
- The measured current in amperes (A).
- Exceptions
-
| inval_arg_exception | if the specified channel is not supported. |
Definition at line 174 of file power.cpp.
◆ enable()
| void satnogs::comms::lib::power::enable |
( |
subsys | sys, |
|
|
bool | en = true ) |
Enable/disable the power of subsystems.
- Parameters
-
| sys | the target subsystem/power supply |
| en | true to enable, false to disable |
Definition at line 35 of file power.cpp.
◆ enabled()
| bool satnogs::comms::lib::power::enabled |
( |
subsys | sys | ) |
const |
Checks the if the subsystem is enabled.
- Parameters
-
| sys | the subsystem to check |
- Returns
- true if the subsystem is enabled, false otherwise
Definition at line 86 of file power.cpp.
◆ get_power()
| float satnogs::comms::lib::power::get_power |
( |
sensor | src | ) |
const |
Calculates the power consumption for a specified sensor source.
This function computes the power consumption based on the specified power sensor source. It supports efuses, EMC1702 sensor, and an averaged value.
- Parameters
-
| src | The power sensor source |
- Returns
- The calculated power in Watts.
- Exceptions
-
| inval_arg_exception | if the specified sensor source is not supported. |
Definition at line 209 of file power.cpp.
◆ pgood()
| bool satnogs::comms::lib::power::pgood |
( |
pgood_tp | tp | ) |
const |
Gets the power good indication from various power supplies.
- Parameters
-
- Returns
- true if the power is good and stabilized, false otherwise
Definition at line 117 of file power.cpp.
◆ voltage()
| float satnogs::comms::lib::power::voltage |
( |
channel | sys | ) |
const |
Retrieves the voltage of a specified channel.
This function measures the voltage for a specific power channel in the system. Supported channels include the input voltage (VIN) and battery voltage (V_BAT).
- Parameters
-
| sys | The channel for which the voltage is being measured |
- Returns
- The measured voltage in Volts.
- Exceptions
-
| `inval_arg_exception` | if the specified channel is not supported. |
Definition at line 146 of file power.cpp.
The documentation for this class was generated from the following files: