3-phase PV router
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Attributes | List of all members
TemperatureSensing< N > Class Template Reference

This class implements the temperature sensing feature. More...

#include <utils_temp.h>

Collaboration diagram for TemperatureSensing< N >:
Collaboration graph
[legend]

Public Member Functions

constexpr TemperatureSensing ()=delete
 
constexpr TemperatureSensing (uint8_t pin, const DeviceAddress(&ref)[N])
 Construct a new Temperature Sensing object.
 
constexpr auto get_pin () const
 Get the pin of the sensor(s)
 
constexpr auto get_size () const
 Get the number of sensors.
 
void initTemperatureSensors ()
 Initialize the Dallas sensors.
 
int16_t readTemperature (const uint8_t idx)
 Read temperature of a specific device.
 
void requestTemperatures ()
 Request temperature for all sensors.
 

Private Types

using ScratchPad = uint8_t[9]
 

Private Attributes

const DeviceAddress sensorAddrs [N]
 
const uint8_t sensorPin
 

Detailed Description

template<uint8_t N>
class TemperatureSensing< N >

This class implements the temperature sensing feature.

Template Parameters
NNumber of sensors, automatically deduced

Definition at line 46 of file utils_temp.h.

Member Typedef Documentation

◆ ScratchPad

template<uint8_t N>
using TemperatureSensing< N >::ScratchPad = uint8_t[9]
private

Definition at line 48 of file utils_temp.h.

Constructor & Destructor Documentation

◆ TemperatureSensing() [1/2]

template<uint8_t N>
constexpr TemperatureSensing< N >::TemperatureSensing ( )
constexprdelete

◆ TemperatureSensing() [2/2]

template<uint8_t N>
constexpr TemperatureSensing< N >::TemperatureSensing ( uint8_t  pin,
const DeviceAddress(&)  ref[N] 
)
inlineconstexpr

Construct a new Temperature Sensing object.

Parameters
pinPin of the temperature sensor(s)
refThe list of temperature sensor(s)

Definition at line 59 of file utils_temp.h.

Member Function Documentation

◆ get_pin()

template<uint8_t N>
constexpr auto TemperatureSensing< N >::get_pin ( ) const
inlineconstexpr

Get the pin of the sensor(s)

Returns
constexpr auto

Definition at line 104 of file utils_temp.h.

Here is the caller graph for this function:

◆ get_size()

template<uint8_t N>
constexpr auto TemperatureSensing< N >::get_size ( ) const
inlineconstexpr

Get the number of sensors.

Returns
constexpr auto

Definition at line 94 of file utils_temp.h.

Here is the caller graph for this function:

◆ initTemperatureSensors()

template<uint8_t N>
void TemperatureSensing< N >::initTemperatureSensors ( )
inline

Initialize the Dallas sensors.

Definition at line 81 of file utils_temp.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readTemperature()

template<uint8_t N>
int16_t TemperatureSensing< N >::readTemperature ( const uint8_t  idx)
inline

Read temperature of a specific device.

Parameters
idxThe index of the device
Returns
int16_t Temperature * 100

Definition at line 115 of file utils_temp.h.

Here is the caller graph for this function:

◆ requestTemperatures()

template<uint8_t N>
void TemperatureSensing< N >::requestTemperatures ( )
inline

Request temperature for all sensors.

Definition at line 68 of file utils_temp.h.

Here is the caller graph for this function:

Member Data Documentation

◆ sensorAddrs

template<uint8_t N>
const DeviceAddress TemperatureSensing< N >::sensorAddrs[N]
private

Array of sensors

Definition at line 156 of file utils_temp.h.

◆ sensorPin

template<uint8_t N>
const uint8_t TemperatureSensing< N >::sensorPin
private

The pin of the sensor(s)

Definition at line 154 of file utils_temp.h.


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