REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
settings.h
Go to the documentation of this file.
1// Copyright (c) 2024 anabrid GmbH
2// Contact: https://www.anabrid.com/licensing/
3//
4// SPDX-License-Identifier: MIT OR GPL-2.0-or-later
5
6#pragma once
7
8#ifdef ARDUINO
9
11
12#include "net/auth.h"
13#include "net/ethernet.h"
14#include "nvmconfig/user.h"
15#include "nvmconfig/vendor.h"
16
17// Subsystems known so far (k/v):
18
19// immutable: VendorOTP
20// eth: net::StartupConfig [not permanent]
21// server: net::RuntimeConfig <- no more, deleted
22// auth: net::auth::UserPasswordAuthentification
23// user: user-defined space irrelevant for the firmware
24// do not confuse this with the users dictionary in the auth!
25
26namespace net {
33inline void register_settings() {
34 auto& persistent_settings = nvmconfig::PersistentSettingsWriter::get();
35 auto &subsystems = persistent_settings.subsystems;
36 subsystems.push_back(&nvmconfig::VendorOTP::get());
37 subsystems.push_back(&nvmconfig::PermanentUserDefinedStuff::get());
38 subsystems.push_back(&net::StartupConfig::get());
39 subsystems.push_back(&net::auth::Gatekeeper::get());
40
41 persistent_settings.read_from_eeprom();
42}
43} // namespace net
44
45#endif // ARDUINO
static PersistentSettingsWriter & get()
Definition singleton.h:48
Definition auth.h:22
void register_settings()
A registry for all permanent settings reachable for the protocol.
Definition settings.h:33
JSON Conversion Context.