-
Notifications
You must be signed in to change notification settings - Fork 51
/
ICentralSystemConfig.h
95 lines (76 loc) · 3.54 KB
/
ICentralSystemConfig.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
Copyright (c) 2020 Cedric Jimenez
This file is part of OpenOCPP.
OpenOCPP is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 2.1 of the License, or
(at your option) any later version.
OpenOCPP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with OpenOCPP. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENOCPP_ICENTRALSYSTEMCONFIG_H
#define OPENOCPP_ICENTRALSYSTEMCONFIG_H
#include <chrono>
#include <string>
namespace ocpp
{
namespace config
{
/** @brief Interface to retrieve stack internal configuration for the Central System role */
class ICentralSystemConfig
{
public:
/** @brief Destructor */
virtual ~ICentralSystemConfig() { }
// Paths
/** @brief Path to the database to store persistent data */
virtual std::string databasePath() const = 0;
/** @brief Path to the JSON schemas to validate the messages */
virtual std::string jsonSchemasPath() const = 0;
// Communication parameters
/** @brief Listen URL */
virtual std::string listenUrl() const = 0;
/** @brief Call request timeout */
virtual std::chrono::milliseconds callRequestTimeout() const = 0;
/** @brief Websocket PING interval */
virtual std::chrono::seconds webSocketPingInterval() const = 0;
/** @brief Boot notification retry interval */
virtual std::chrono::seconds bootNotificationRetryInterval() const = 0;
/** @brief Heartbeat interval */
virtual std::chrono::seconds heartbeatInterval() const = 0;
/** @brief Enable HTTP basic authentication */
virtual bool httpBasicAuthent() const = 0;
/** @brief Cipher list to use for TLSv1.2 connections */
virtual std::string tlsv12CipherList() const = 0;
/** @brief Cipher list to use for TLSv1.3 connections */
virtual std::string tlsv13CipherList() const = 0;
/** @brief ECDH curve to use for TLS connections */
virtual std::string tlsEcdhCurve() const = 0;
/** @brief Server certificate */
virtual std::string tlsServerCertificate() const = 0;
/** @brief Server certificate's private key */
virtual std::string tlsServerCertificatePrivateKey() const = 0;
/** @brief Server certificate's private key passphrase */
virtual std::string tlsServerCertificatePrivateKeyPassphrase() const = 0;
/** @brief Certification Authority signing chain for the server certificate */
virtual std::string tlsServerCertificateCa() const = 0;
/** @brief Enable client authentication using certificate */
virtual bool tlsClientCertificateAuthent() const = 0;
// Log
/** @brief Maximum number of entries in the log (0 = no logs in database) */
virtual unsigned int logMaxEntriesCount() const = 0;
// Behavior
/** @brief Size of the thread pool to handle incoming requests from the Charge Points */
virtual unsigned int incomingRequestsFromCpThreadPoolSize() const = 0;
// ISO 15118 PnC extensions
/** @brief If this variable set to true, then the Central System supports ISO 15118 plug and charge messages via the DataTransfer mechanism as
described in this application note. */
virtual bool iso15118PnCEnabled() const = 0;
};
} // namespace config
} // namespace ocpp
#endif // OPENOCPP_ICENTRALSYSTEMCONFIG_H