SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::lib::temperature< T > Class Template Reference

Manages multiple temperature sensors for monitoring and alerting. More...

#include <temperature.hpp>

Public Member Functions

 temperature (bsp::i2c &i2c, bsp::gpio &alert_t_pa_uhf, bsp::gpio &alert_t_pa_sband, const rf_frontend09 &rf09, const rf_frontend24 &rf24)
float get () const
 Retrieve the average board temperature.
float get (temperature_sensor s) const
 Returns the temperature from a specific sensor.
bool alert () const
 Checks if any temperature sensor has triggered an alert.
bool alert (temperature_sensor s) const
 Checks if a specific temperature sensor has triggered an alert.
float get (temperature_sensor s) const
bool alert (temperature_sensor s) const

Detailed Description

template<typename T>
class satnogs::comms::lib::temperature< T >

Manages multiple temperature sensors for monitoring and alerting.

The temperature class interfaces with multiple temperature sensors to monitor temperatures for various components, including PCB, UHF PA, and S-Band PA. It provides methods for retrieving temperatures and handling alerts.

Template Parameters
TThe type of temperature sensor (For the time being only emc1702 is supported).

Definition at line 74 of file temperature.hpp.

Constructor & Destructor Documentation

◆ temperature()

template<typename T>
satnogs::comms::lib::temperature< T >::temperature ( bsp::i2c & i2c,
bsp::gpio & alert_t_pa_uhf,
bsp::gpio & alert_t_pa_sband,
const rf_frontend09 & rf09,
const rf_frontend24 & rf24 )
inline

Definition at line 77 of file temperature.hpp.

Member Function Documentation

◆ alert() [1/3]

template<typename T>
bool satnogs::comms::lib::temperature< T >::alert ( ) const
inline

Checks if any temperature sensor has triggered an alert.

Returns
true if any sensor has an active alert, false otherwise.

Definition at line 128 of file temperature.hpp.

◆ alert() [2/3]

template<typename T>
bool satnogs::comms::lib::temperature< T >::alert ( temperature_sensor s) const

Checks if a specific temperature sensor has triggered an alert.

Parameters
sThe sensor to check for an alert condition.
Returns
true if the specified sensor has an active alert, false otherwise.
Exceptions
invalid_sensor_exceptionif the specified sensor is invalid.

◆ alert() [3/3]

Definition at line 29 of file temperature.cpp.

◆ get() [1/3]

template<typename T>
float satnogs::comms::lib::temperature< T >::get ( ) const
inline

Retrieve the average board temperature.

Returns
float The average temperature parsed from the three available temperature sensors (PCB, UHF PA, SBAND PA) on the Satnogs Comms board

Definition at line 105 of file temperature.hpp.

◆ get() [2/3]

template<typename T>
float satnogs::comms::lib::temperature< T >::get ( temperature_sensor s) const

Returns the temperature from a specific sensor.

Parameters
sthe target sensor
Returns
float The temperature from a specific sensor
Exceptions
invalid_sensor_exceptionif the specified sensor is invalid.

◆ get() [3/3]

Definition at line 9 of file temperature.cpp.


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