Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::SensorInfo Struct Reference

Sensors information struct needed by the SensorManager. More...

#include <SensorInfo.h>

Collaboration diagram for Boardcore::SensorInfo:

Public Member Functions

 SensorInfo (const std::string id="", uint32_t period=0, std::function< void()> callback=[]() {}, bool isEnabled=true)
 
 SensorInfo (const std::string id, Units::Frequency::Hertz frequency, std::function< void()> callback=[]() {}, bool isEnabled=true)
 
 SensorInfo (const std::string id, std::chrono::nanoseconds period, std::function< void()> callback=[]() {}, bool isEnabled=true)
 
SensorInfooperator= (const SensorInfo &info)
 
bool operator== (const SensorInfo &info) const
 

Public Attributes

std::string id
 
std::chrono::nanoseconds period
 
std::function< void()> callback
 
bool isEnabled
 
bool isInitialized
 

Detailed Description

Sensors information struct needed by the SensorManager.

This structure contains the sampling period of a sensor, the function to be called after the sampling (callback) and one boolean indicating if the sensor has to be sampled (is enabled).

Definition at line 41 of file SensorInfo.h.

Constructor & Destructor Documentation

◆ SensorInfo() [1/3]

Boardcore::SensorInfo::SensorInfo ( const std::string id = "",
uint32_t period = 0,
std::function< void()> callback = []() {},
bool isEnabled = true )
inline

Definition at line 49 of file SensorInfo.h.

◆ SensorInfo() [2/3]

Boardcore::SensorInfo::SensorInfo ( const std::string id,
Units::Frequency::Hertz frequency,
std::function< void()> callback = []() {},
bool isEnabled = true )
inline

Definition at line 58 of file SensorInfo.h.

◆ SensorInfo() [3/3]

Boardcore::SensorInfo::SensorInfo ( const std::string id,
std::chrono::nanoseconds period,
std::function< void()> callback = []() {},
bool isEnabled = true )
inline

Definition at line 69 of file SensorInfo.h.

Member Function Documentation

◆ operator=()

SensorInfo & Boardcore::SensorInfo::operator= ( const SensorInfo & info)
inline

Definition at line 78 of file SensorInfo.h.

◆ operator==()

bool Boardcore::SensorInfo::operator== ( const SensorInfo & info) const
inline

Definition at line 89 of file SensorInfo.h.

Member Data Documentation

◆ callback

std::function<void()> Boardcore::SensorInfo::callback

Definition at line 45 of file SensorInfo.h.

◆ id

std::string Boardcore::SensorInfo::id

Definition at line 43 of file SensorInfo.h.

◆ isEnabled

bool Boardcore::SensorInfo::isEnabled

Definition at line 46 of file SensorInfo.h.

◆ isInitialized

bool Boardcore::SensorInfo::isInitialized

Definition at line 47 of file SensorInfo.h.

◆ period

std::chrono::nanoseconds Boardcore::SensorInfo::period

Definition at line 44 of file SensorInfo.h.


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