forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfiguration.h
More file actions
37 lines (25 loc) · 1.36 KB
/
Copy pathConfiguration.h
File metadata and controls
37 lines (25 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// matth-x/ArduinoOcpp
// Copyright Matthias Akstaller 2019 - 2022
// MIT License
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include <ArduinoOcpp/Core/ConfigurationKeyValue.h>
#include <ArduinoOcpp/Core/ConfigurationOptions.h>
#include <ArduinoOcpp/Core/ConfigurationContainerFlash.h>
#define CONFIGURATION_FN "/arduino-ocpp.cnf"
namespace ArduinoOcpp {
template <class T>
std::shared_ptr<Configuration<T>> declareConfiguration(const char *key, T defaultValue, const char *filename = CONFIGURATION_FN, bool remotePeerCanWrite = true, bool remotePeerCanRead = true, bool localClientCanWrite = true, bool rebootRequiredWhenChanged = false);
void addConfigurationContainer(std::shared_ptr<ConfigurationContainer> container);
std::vector<std::shared_ptr<ConfigurationContainer>>::iterator getConfigurationContainersBegin();
std::vector<std::shared_ptr<ConfigurationContainer>>::iterator getConfigurationContainersEnd();
namespace Ocpp16 {
// template <class T>
// std::shared_ptr<Configuration<T>> changeConfiguration(const char *key, T value);
std::shared_ptr<AbstractConfiguration> getConfiguration(const char *key);
std::shared_ptr<std::vector<std::shared_ptr<AbstractConfiguration>>> getAllConfigurations();
}
bool configuration_init(FilesystemOpt fsOpt = FilesystemOpt::Use_Mount_FormatOnFail);
bool configuration_save();
} //end namespace ArduinoOcpp
#endif