Skip to content

Commit

Permalink
Doxygen comments
Browse files Browse the repository at this point in the history
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
  • Loading branch information
hikinggrass committed Jul 25, 2024
1 parent 3081319 commit 92b66ac
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
11 changes: 11 additions & 0 deletions include/utils/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ class Config {
json extract_implementation_info(const std::string& module_id, const std::string& impl_id) const;
void resolve_all_requirements();

///
/// \brief Parses the 3 tier model mappings in the config
/// You can set a EVSE id called "evse" and Connector id called "connector" for the whole module.
/// Additionally a "mapping" can be specified in the following way:
/// mapping:
/// implementation_id:
/// evse: 1
/// connector: 1
/// If no mappings are found it will be assumed that the module is mapped to the charging station.
/// If only a module mapping is defined alle implementations are mapped to this module mapping.
/// Implementations can have overwritten mappings.
void parse_3_tier_model_mapping();

// experimental caches
Expand Down
12 changes: 8 additions & 4 deletions include/utils/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ struct TelemetryConfig {
int id;
};

/// \brief A Mapping that can be used to map a module or implementation to a specific EVSE or optionally to a Connector
struct Mapping {
int evse;
std::optional<int> connector;
int evse; ///< The EVSE id
std::optional<int> connector; ///< An optional Connector id

Mapping(int evse) : evse(evse) {
}
Expand All @@ -95,9 +96,12 @@ struct Mapping {
}
};

/// \brief A 3 tier mapping for a module and its individual implementations
struct ModuleTierMappings {
std::optional<Mapping> module;
std::unordered_map<std::string, std::optional<Mapping>> implementations;
std::optional<Mapping> module; ///< Mapping of the whole module to an EVSE id and optional Connector id. If this is
///< absent the module is assumed to be mapped to the whole charging station
std::unordered_map<std::string, std::optional<Mapping>>
implementations; ///< Mappings for the individual implementations of the module
};

struct Requirement {
Expand Down

0 comments on commit 92b66ac

Please sign in to comment.