Skip to content

Commit

Permalink
Add decscription and some more style fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Emmers <[email protected]>
  • Loading branch information
marcemmers committed Feb 6, 2024
1 parent 7f41db7 commit 8ba99fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@
"mutability": "ReadOnly"
}
],
"description": "If enabled the metervalues configured with the AlignedDataCtrlr will be rounded to the exact time intervals",
"default": "0",
"type": "boolean"
}
Expand Down
22 changes: 11 additions & 11 deletions include/ocpp/v201/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace utils {
/// \brief std::vector<MeasurandEnum> of the configured AlignedDataMeasurands
std::vector<MeasurandEnum> get_measurands_vec(const std::string& measurands_csv);

///\brief This function determines if any of the \p measurands is present in the \p _meter_value at all
///\return True if any measurand is found, false otherwise
/// \brief This function determines if any of the \p measurands is present in the \p _meter_value at all
/// \return True if any measurand is found, false otherwise
bool meter_value_has_any_measurand(const MeterValue& _meter_value, const std::vector<MeasurandEnum>& measurands);

/// \brief Applies the given \p measurands to the given \p _meter_value . The returned meter value will only contain
Expand All @@ -27,12 +27,12 @@ bool meter_value_has_any_measurand(const MeterValue& _meter_value, const std::ve
MeterValue get_meter_value_with_measurands_applied(const MeterValue& _meter_value,
const std::vector<MeasurandEnum>& measurands);

///\brief Applies the given measurands to \p meter_values based on their ReadingContext.
/// \brief Applies the given measurands to \p meter_values based on their ReadingContext.
/// Transaction_Begin, Interruption_Begin, Transaction_End, Interruption_End and Sample_Periodic will be filtered using
/// \p sampled_tx_ended_measurands.
/// Sample_Clock will be filtered using \p aligned_tx_ended_measurands
/// Any metervalue after \p max_timestamp will also be removed.
///\retval filtered meter values
/// \retval filtered meter values
std::vector<MeterValue> get_meter_values_with_measurands_applied(
const std::vector<MeterValue>& meter_values, const std::vector<MeasurandEnum>& sampled_tx_ended_measurands,
const std::vector<MeasurandEnum>& aligned_tx_ended_measurands, ocpp::DateTime max_timestamp);
Expand All @@ -47,15 +47,15 @@ TriggerReasonEnum stop_reason_to_trigger_reason_enum(const ReasonEnum& stop_reas
/// \return
std::string sha256(const std::string& str);

/// @brief Return a SHA256 hash generated from a combination of the \p token type and id
/// @param token the token to generate the hash for
/// @return A SHA256 hash string
/// \brief Return a SHA256 hash generated from a combination of the \p token type and id
/// \param token the token to generate the hash for
/// \return A SHA256 hash string
std::string generate_token_hash(const IdToken& token);

/// @brief Align the clock aligned timestamps to the interval values
/// @param timestamp the timestamp to align
/// @param align_interval the clock aligned interval to align to since midnight 00:00
/// @return DateTime type timestamp
/// \brief Align the clock aligned timestamps to the interval values
/// \param timestamp the timestamp to align
/// \param align_interval the clock aligned interval to align to since midnight 00:00
/// \return DateTime type timestamp
ocpp::DateTime align_timestamp(const DateTime timestamp, std::chrono::seconds align_interval);

} // namespace utils
Expand Down

0 comments on commit 8ba99fd

Please sign in to comment.