From fc81692b2c469d412f8eb6b79778c346fbed626b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20K=C3=BCppers?= Date: Fri, 3 Jan 2025 16:51:52 +0100 Subject: [PATCH] add doxystrings for spatem setters --- .../impl/spatem/spatem_ts_setters.h | 78 ++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/spatem/spatem_ts_setters.h b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/spatem/spatem_ts_setters.h index ed749a2a..a1bab8fd 100644 --- a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/spatem/spatem_ts_setters.h +++ b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/spatem/spatem_ts_setters.h @@ -38,55 +38,131 @@ namespace access { #include - + /** + * @brief Sets the IntersectionID value. + * + * @param intsct_id The IntersectionID object to set. + * @param id The value to set. + * @throws std::out_of_range if the id is out of the valid range. + */ inline void setIntersectionID(IntersectionID& intsct_id, const uint16_t id) { throwIfOutOfRange(id, IntersectionID::MIN, IntersectionID::MAX, "IntersectionID"); intsct_id.value = id; } + /** + * @brief Sets the IntersectionID value in an IntersectionReferenceID object. + * + * @param intsct_ref_id The IntersectionReferenceID object to set. + * @param id The value to set. + * @throws std::out_of_range if the id is out of the valid range. + */ inline void setIntersectionID(IntersectionReferenceID& intsct_ref_id, const uint16_t id) { setIntersectionID(intsct_ref_id.id, id); } + /** + * @brief Sets the IntersectionID value in an IntersectionState object. + * + * @param intsct The IntersectionState object to set. + * @param id The value to set. + * @throws std::out_of_range if the id is out of the valid range. + */ inline void setIntersectionID(IntersectionState& intsct, const uint16_t id) { setIntersectionID(intsct.id, id); } + /** + * @brief Sets the MinuteOfTheYear value. + * + * @param moy The MinuteOfTheYear object to set. + * @param moy_value The value to set. + * @throws std::out_of_range if the moy_value is out of the valid range. + */ inline void setMinuteOfTheYear(MinuteOfTheYear& moy, const uint32_t moy_value) { throwIfOutOfRange(moy_value, MinuteOfTheYear::MIN, MinuteOfTheYear::MAX, "MinuteOfTheYear"); moy.value = moy_value; } + /** + * @brief Sets the MinuteOfTheYear value in an IntersectionState object. + * + * @param intsct The IntersectionState object to set. + * @param moy_value The value to set. + * @throws std::out_of_range if the moy_value is out of the valid range. + */ inline void setMinuteOfTheYear(IntersectionState& intsct, const uint32_t moy_value) { setMinuteOfTheYear(intsct.moy, moy_value); intsct.moy_is_present = true; } + /** + * @brief Sets the DSecond value. + * + * @param dsecond The DSecond object to set. + * @param dsecond_value The value to set. + * @throws std::out_of_range if the dsecond_value is out of the valid range. + */ inline void setDSecond(DSecond& dsecond, const uint32_t dsecond_value) { throwIfOutOfRange(dsecond_value, DSecond::MIN, DSecond::MAX, "DSecond"); dsecond.value = dsecond_value; } + /** + * @brief Sets the DSecond value using a double. + * + * @param dsecond The DSecond object to set. + * @param dsecond_value The value to set in seconds. + * @throws std::out_of_range if the dsecond_value is out of the valid range. + */ inline void setDSecond(DSecond& dsecond, const double dsecond_value) { uint32_t dsecond_value_ms = (uint32_t)(dsecond_value*1e3); setDSecond(dsecond, dsecond_value_ms); } + /** + * @brief Sets the DSecond value in an IntersectionState object. + * + * @param intsct The IntersectionState object to set. + * @param dsecond_value The value to set. + * @throws std::out_of_range if the dsecond_value is out of the valid range. + */ inline void setDSecond(IntersectionState& intsct, const uint32_t dsecond_value) { setDSecond(intsct.time_stamp, dsecond_value); intsct.time_stamp_is_present = true; } + /** + * @brief Sets the DSecond value in an IntersectionState object using a double. + * + * @param intsct The IntersectionState object to set. + * @param dsecond_value The value to set in seconds. + * @throws std::out_of_range if the dsecond_value is out of the valid range. + */ inline void setDSecond(IntersectionState& intsct, const double dsecond_value) { setDSecond(intsct.time_stamp, dsecond_value); intsct.time_stamp_is_present = true; } + /** + * @brief Sets the SignalGroupID value. + * + * @param signal_group_id The SignalGroupID object to set. + * @param id The value to set. + * @throws std::out_of_range if the id is out of the valid range. + */ inline void setSignalGroupID(SignalGroupID& signal_group_id, const uint8_t id) { throwIfOutOfRange(id, SignalGroupID::MIN, SignalGroupID::MAX, "SignalGroupID"); signal_group_id.value = id; } + /** + * @brief Sets the SignalGroupID value in a MovementState object. + * + * @param movement_state The MovementState object to set. + * @param id The value to set. + * @throws std::out_of_range if the id is out of the valid range. + */ inline void setSignalGroupID(MovementState& movement_state, const uint8_t id) { setSignalGroupID(movement_state.signal_group, id); }