7#ifdef SAFETY_CHECKS_ENABLED
17 class CalibrationStore final {
18 CalibrationStore() =
default;
21 std::string FILE_PATH =
"./racoon.calibration.yml";
24 CalibrationStore&
operator=(
const CalibrationStore&) =
delete;
26 CalibrationStore&
operator=(CalibrationStore&&) =
delete;
36 const std::string& set_name =
"default")
const;
40 const std::string& set_name =
"default")
const;
44 const std::string& set_name =
"default")
const;
CalibrationStore & operator=(CalibrationStore &&)=delete
bool doesFileExist() const
Check whether the backing YAML file exists.
CalibrationStore(CalibrationStore &&)=delete
CalibrationStore(const CalibrationStore &)=delete
static CalibrationStore & instance()
Return the singleton store instance.
CalibrationStore & operator=(const CalibrationStore &)=delete
void storeReading(float black_tresh, float white_tresh, CalibrationType type, const std::string &set_name="default") const
Persist one black/white threshold pair for the given calibration type and set.
bool hasReadings(CalibrationType type, const std::string &set_name="default") const
Report whether both expected values are present for the given type and set.
std::vector< float > getReadings(CalibrationType type, const std::string &set_name="default") const
Return {white_tresh, black_tresh} or {0.0, 0.0} when no reading exists.
std::vector< std::string > getSetNames(CalibrationType type) const
Return the names of all calibration sets stored for the given type.
CalibrationType
Supported calibration families persisted by CalibrationStore.