Skip to content

Commit

Permalink
feat: make message queue delay configurable for OCPP 1.6 as well
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Dimov <[email protected]>
  • Loading branch information
valentin-dimov committed Dec 7, 2023
1 parent b0ecb62 commit 8e82f26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/OCPP/OCPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ void OCPP::init() {
json_config.dump(), this->ocpp_share_path, user_config_path, std::filesystem::path(this->config.DatabasePath),
sql_init_path, std::filesystem::path(this->config.MessageLogPath),
std::make_shared<EvseSecurity>(*this->r_security));

this->charge_point->set_message_queue_resume_delay(std::chrono::seconds(config.MessageQueueResumeDelay));
}

void OCPP::ready() {
Expand Down
1 change: 1 addition & 0 deletions modules/OCPP/OCPP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct Conf {
int PublishChargingScheduleDurationS;
std::string MessageLogPath;
std::string CertsPath;
int MessageQueueResumeDelay;
};

class OCPP : public Everest::ModuleBase {
Expand Down
6 changes: 5 additions & 1 deletion modules/OCPP/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ config:
CertsPath:
description: Path to folder where certificates are located. If empty uses everest prefix + etc/everest/certs
type: string
default: ""
default: ""#
MessageQueueResumeDelay:
description: Time (seconds) to delay resuming the message queue after reconnecting
type: integer
default: 0
provides:
main:
description: This is a OCPP 1.6 charge point
Expand Down

0 comments on commit 8e82f26

Please sign in to comment.