Skip to content

Commit

Permalink
refactors some function names to obey naming convenctions
Browse files Browse the repository at this point in the history
Signed-off-by: MarzellT <[email protected]>
  • Loading branch information
MarzellT committed Aug 22, 2024
1 parent f8a18f2 commit c2ded86
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modules/OCPPConfiguration/OCPPConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ void OCPPConfiguration::ready() {
const auto mapping_file_path = std::filesystem::path{config.mapping_file_path};
event_handler = std::make_unique<EventHandler>(mapping_file_path);

r_ocpp_module->call_monitor_variables(parseConfigMonitorVariables());
r_ocpp_module->call_monitor_variables(parse_config_monitor_variables());

r_ocpp_module->subscribe_event_data(
[&](const auto& event_data) { event_handler->handleEvent(event_data, config.user_config_path); });
[&](const auto& event_data) { event_handler->handle_event(event_data, config.user_config_path); });
}

std::vector<types::ocpp::ComponentVariable> OCPPConfiguration::parseConfigMonitorVariables() {
std::vector<types::ocpp::ComponentVariable> OCPPConfiguration::parse_config_monitor_variables() {
const auto& monitor_variables_string = config.monitor_variables;

if (monitor_variables_string.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion modules/OCPPConfiguration/OCPPConfiguration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class OCPPConfiguration : public Everest::ModuleBase {

// ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1
// insert your private definitions here
std::vector<types::ocpp::ComponentVariable> parseConfigMonitorVariables();
std::vector<types::ocpp::ComponentVariable> parse_config_monitor_variables();

std::unique_ptr<EventHandler> event_handler;
// ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1
Expand Down
2 changes: 1 addition & 1 deletion modules/OCPPConfiguration/main/event_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ EventHandler::EventHandler(const std::filesystem::path& config_mapping_path) :
config_mapping(MappingReader::read_mapping(config_mapping_path)) {
}

void EventHandler::handleEvent(const types::ocpp::EventData& event_data, const std::string& user_config_path_string) {
void EventHandler::handle_event(const types::ocpp::EventData& event_data, const std::string& user_config_path_string) {

const auto& everest_module_mapping_opt =
find_mapping_by_component_variable_or_log_error(event_data.component_variable);
Expand Down
2 changes: 1 addition & 1 deletion modules/OCPPConfiguration/main/event_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace module {
class EventHandler {
public:
EventHandler(const std::filesystem::path& config_mapping_path);
void handleEvent(const types::ocpp::EventData& event_data, const std::string& user_config_path_string);
void handle_event(const types::ocpp::EventData& event_data, const std::string& user_config_path_string);

private:
const std::optional<EverestConfigMapping>
Expand Down

0 comments on commit c2ded86

Please sign in to comment.