Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2022 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: LGPL-2.1-only 7 : : * 8 : : * ----------------- END LICENSE BLOCK ----------------------------------- 9 : : */ 10 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-2046 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #include <cmath> 21 : : #include <limits> 22 : : #include "ad/map/match/ObjectValidInputRange.hpp" 23 : : #include "ad/physics/AngleValidInputRange.hpp" 24 : : #include "ad/physics/AngularVelocityValidInputRange.hpp" 25 : : #include "ad/physics/SpeedRangeValidInputRange.hpp" 26 : : #include "ad/rss/map/RssObjectData.hpp" 27 : : #include "ad/rss/world/ObjectTypeValidInputRange.hpp" 28 : : #include "ad/rss/world/RssDynamicsValidInputRange.hpp" 29 : : #include "spdlog/fmt/ostr.h" 30 : : #include "spdlog/spdlog.h" 31 : : 32 : : /*! 33 : : * \brief check if the given RssObjectData is within valid input range 34 : : * 35 : : * \param[in] input the RssObjectData as an input value 36 : : * \param[in] logErrors enables error logging 37 : : * 38 : : * \returns \c true if RssObjectData is considered to be within the specified input range 39 : : * 40 : : * \note the specified input range is defined by the ranges of all members 41 : : */ 42 : 20 : inline bool withinValidInputRange(::ad::rss::map::RssObjectData const &input, bool const logErrors = true) 43 : : { 44 : : // check for generic member input ranges 45 : 20 : bool inValidInputRange = true; 46 : 20 : inValidInputRange = withinValidInputRange(input.type, logErrors) 47 [ + + + + ]: 15 : && withinValidInputRange(input.match_object, logErrors) && withinValidInputRange(input.speed_range, logErrors) 48 [ + + + + ]: 9 : && withinValidInputRange(input.yaw_rate, logErrors) && withinValidInputRange(input.steering_angle, logErrors) 49 [ + + + + ]: 35 : && withinValidInputRange(input.rss_dynamics, logErrors); 50 [ + + + - ]: 20 : if (!inValidInputRange && logErrors) 51 : : { 52 [ + - ]: 17 : spdlog::error("withinValidInputRange(::ad::rss::map::RssObjectData)>> {} has invalid member", 53 : : input); // LCOV_EXCL_BR_LINE 54 : : } 55 : : 56 : 20 : return inValidInputRange; 57 : : }