Skip to content

Commit d65e6c5

Browse files
authored
Merge pull request #132 from c-jimenez/release/v1.3.0
Release/v1.3.0
2 parents 6562f9e + 7e08b2a commit d65e6c5

File tree

76 files changed

+2615
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2615
-372
lines changed

3rdparty/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT} ${DISABLED_WARNING_LW
2828
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT} ${DISABLED_WARNING_LWS}")
2929
endif()
3030

31+
set(LWS_WITH_NETLINK OFF)
3132
add_subdirectory(libwebsockets)

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
cmake_minimum_required(VERSION 3.13)
66

7-
project(OpenOCPP DESCRIPTION "Open Source C++ implementation of the OCPP 2.6 protocol"
8-
VERSION 1.2.0
7+
project(OpenOCPP DESCRIPTION "Open Source C++ implementation of the OCPP 1.6 protocol"
8+
VERSION 1.3.0
99
)
1010

1111
# Definitions for Version.h file
@@ -101,7 +101,11 @@ target_link_libraries(open-ocpp-dynamic
101101
ws
102102
websockets
103103
)
104-
set_target_properties(open-ocpp-dynamic PROPERTIES OUTPUT_NAME "open-ocpp")
104+
set_target_properties(open-ocpp-dynamic PROPERTIES
105+
OUTPUT_NAME "open-ocpp"
106+
VERSION ${PROJECT_VERSION}
107+
SOVERSION ${PROJECT_VERSION_MAJOR}
108+
)
105109

106110
# Install commands
107111
include(GNUInstallDirs)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ As such it can be used and distributed in any commercial and non-commercial prod
3232
- [Extended trigger messages](#extended-trigger-messages)
3333
- [Certificate management](#certificate-management)
3434
- [Signed firmware update](#signed-firmware-update)
35-
- [OCPP IS15118 PnC extensions](#ocpp-is15118-pnc-extensions)
35+
- [OCPP ISO15118 PnC extensions](#ocpp-iso15118-pnc-extensions)
3636
- [Charge Point role](#charge-point-role)
3737
- [Central System role](#central-system-role)
3838
- [Internal configuration keys](#internal-configuration-keys)
@@ -231,7 +231,7 @@ If **InternalCertificateManagementEnabled** is set to **true**, the storage of c
231231

232232
**Open OCPP** provides helper classes based on OpenSSL to ease private keys, certificate and certificate requests usage : generation, signature, verification. They can be used in the user application callbacks. These helpers can be found in the ocpp::tools::x509 namespace and are widely used in the **Open OCPP** source code and examples.
233233

234-
### OCPP IS15118 PnC extensions
234+
### OCPP ISO15118 PnC extensions
235235

236236
**Open OCPP** fully supports the whole messaging, data types and configuration keys set associated to the ISO15118 PnC extensions.
237237

@@ -241,7 +241,7 @@ In Charge Point role these extensions consists mainly on forwarding messages fro
241241

242242
**Open OCPP** implements the forwarding and provides callback and retries capabilities for certificates messages.
243243

244-
Allthough **Open OCPP** is able to manage a certificate store, the Chare Point certificate used for ISO15118 communication won't be stored in it even if the **InternalCertificateManagementEnabled** configuration key is set to **true**. This is will allow for the ISO15118-2 stack to access this certificate and use it to secure its communications with the vehicule.
244+
Allthough **Open OCPP** is able to manage a certificate store, the Charge Point certificate used for ISO15118 communication won't be stored in it even if the **InternalCertificateManagementEnabled** configuration key is set to **true**. This is will allow for the ISO15118-2 stack to access this certificate and use it to secure its communications with the vehicule.
245245

246246
#### Central System role
247247

examples/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ add_subdirectory(iso15118_chargepoint)
55
add_subdirectory(iso15118_centralsystem)
66
add_subdirectory(quick_start_centralsystem)
77
add_subdirectory(quick_start_chargepoint)
8+
add_subdirectory(quick_start_cs_lc_hybrid)
89
add_subdirectory(quick_start_localcontroller)
910
add_subdirectory(remote_chargepoint)
1011
add_subdirectory(security_centralsystem)

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The following examples are available for OCPP 1.6 standard :
77
* [Quick start Central System example](./quick_start_centralsystem/README.md)
88
* [Quick start Charge Point example](./quick_start_chargepoint/README.md)
99
* [Quick start Local Controller example](./quick_start_localcontroller/README.md)
10+
* [Quick start Hybrid Central System / Local Controller example](./quick_start_cs_lc_hybrid/README.md)
1011
* [Remote Charge Point example](./remote_chargepoint/README.md)
1112

1213
The following examples are available for OCPP 1.6 security extensions :

examples/common/DefaultCentralSystemEventsHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class DefaultCentralSystemEventsHandler : public ocpp::centralsystem::ICentralSy
260260
/** @brief Remove a charge point from the connected charge points */
261261
void removeChargePoint(const std::string& identifier);
262262

263-
private:
263+
protected:
264264
/** @brief Path to the V2G root CA */
265265
std::filesystem::path m_iso_v2g_root_ca;
266266
/** @brief Path to the MO root CA */

examples/common/DefaultChargePointEventsHandler.cpp

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,28 @@ bool DefaultChargePointEventsHandler::getMeterValue(
166166
/** @copydoc bool IChargePointEventsHandler::remoteStartTransactionRequested(unsigned int, const std::string&) */
167167
bool DefaultChargePointEventsHandler::remoteStartTransactionRequested(unsigned int connector_id, const std::string& id_tag)
168168
{
169+
bool ret = false;
169170
cout << "Remote start transaction : " << connector_id << " - " << id_tag << endl;
170-
m_remote_start_pending[connector_id - 1u] = true;
171-
m_remote_start_id_tag[connector_id - 1u] = id_tag;
172-
return true;
171+
if (connector_id != 0)
172+
{
173+
m_remote_start_pending[connector_id - 1u] = true;
174+
m_remote_start_id_tag[connector_id - 1u] = id_tag;
175+
ret = true;
176+
}
177+
else
178+
{
179+
for (size_t i = 1; i <= m_config.ocppConfig().numberOfConnectors(); i++)
180+
{
181+
if (m_chargepoint->getConnectorStatus(i) < ChargePointStatus::Charging)
182+
{
183+
m_remote_start_pending[i - 1u] = true;
184+
m_remote_start_id_tag[i - 1u] = id_tag;
185+
ret = true;
186+
break;
187+
}
188+
}
189+
}
190+
return ret;
173191
}
174192

175193
/** @copydoc bool IChargePointEventsHandler::remoteStopTransactionRequested(unsigned int) */

examples/common/config/CentralSystemConfig.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ class CentralSystemConfig : public ocpp::config::ICentralSystemConfig
8484
/** @brief Maximum number of entries in the log (0 = no logs in database) */
8585
unsigned int logMaxEntriesCount() const override { return get<unsigned int>("LogMaxEntriesCount"); }
8686

87+
// Behavior
88+
89+
/** @brief Size of the thread pool to handle incoming requests from the Charge Points */
90+
unsigned int incomingRequestsFromCpThreadPoolSize() const override
91+
{
92+
return get<unsigned int>("IncomingRequestsFromCpThreadPoolSize");
93+
};
94+
8795
// ISO 15118 PnC extensions
8896

8997
/** @brief If this variable set to true, then the Central System supports ISO 15118 plug and charge messages via the DataTransfer mechanism as

examples/common/config/LocalControllerConfig.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,32 @@ class LocalControllerConfig : public ocpp::config::ILocalControllerConfig
8787

8888
// Behavior
8989

90+
/** @brief Size of the thread pool to handle incoming requests from the Charge Points */
91+
unsigned int incomingRequestsFromCpThreadPoolSize() const override
92+
{
93+
return get<unsigned int>("IncomingRequestsFromCpThreadPoolSize");
94+
};
95+
/** @brief Size of the thread pool to handle incoming requests from the Central System */
96+
unsigned int incomingRequestsFromCsThreadPoolSize() const override
97+
{
98+
return get<unsigned int>("IncomingRequestsFromCsThreadPoolSize");
99+
};
90100
/** @brief Disconnect from Charge Point on Central System disconnection */
91101
bool disconnectFromCpWhenCsDisconnected() const override { return getBool("DisconnectFromCpWhenCsDisconnected"); }
92102

103+
// Unused from Central System configuration interface
104+
105+
/** @brief Boot notification retry interval */
106+
std::chrono::seconds bootNotificationRetryInterval() const override
107+
{
108+
return get<std::chrono::seconds>("BootNotificationRetryInterval");
109+
}
110+
/** @brief Heartbeat interval */
111+
std::chrono::seconds heartbeatInterval() const override { return get<std::chrono::seconds>("HeartbeatInterval"); }
112+
/** @brief If this variable set to true, then the Central System supports ISO 15118 plug and charge messages via the DataTransfer mechanism as
113+
described in this application note. */
114+
bool iso15118PnCEnabled() const override { return getBool("Iso15118PnCEnabled"); }
115+
93116
private:
94117
/** @brief Configuration file */
95118
ocpp::helpers::IniFile& m_config;

examples/common/config/OcppConfig.cpp

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,34 @@ ocpp::types::ConfigurationStatus OcppConfig::setConfiguration(const std::string&
197197
{
198198
if ((it->second & PARAM_WRITE) != 0)
199199
{
200-
if ((it->second & PARAM_OCPP) != 0)
200+
std::size_t key_is_interval = key.find("Interval");
201+
if (key_is_interval != std::string::npos)
201202
{
202-
m_config.set(OCPP_PARAMS, key, value);
203-
}
204-
else
205-
{
206-
m_config.set(STACK_PARAMS, key, value);
207-
}
208-
if ((it->second & PARAM_REBOOT) != 0)
209-
{
210-
ret = ConfigurationStatus::RebootRequired;
203+
std::size_t value_is_negative = key.find("-");
204+
if (value_is_negative)
205+
{
206+
ret = ConfigurationStatus::Rejected;
207+
}
211208
}
212-
else
209+
210+
if (ret != ConfigurationStatus::Rejected)
213211
{
214-
ret = ConfigurationStatus::Accepted;
212+
if ((it->second & PARAM_OCPP) != 0)
213+
{
214+
m_config.set(OCPP_PARAMS, key, value);
215+
}
216+
else
217+
{
218+
m_config.set(STACK_PARAMS, key, value);
219+
}
220+
if ((it->second & PARAM_REBOOT) != 0)
221+
{
222+
ret = ConfigurationStatus::RebootRequired;
223+
}
224+
else
225+
{
226+
ret = ConfigurationStatus::Accepted;
227+
}
215228
}
216229
}
217230
else

0 commit comments

Comments
 (0)