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/point/ENUHeadingValidInputRange.hpp" 23 : : #include "ad/map/point/ENUPointValidInputRange.hpp" 24 : : #include "ad/physics/AngleValidInputRange.hpp" 25 : : #include "ad/physics/DistanceValidInputRange.hpp" 26 : : #include "ad/physics/SpeedValidInputRange.hpp" 27 : : #include "ad/rss/map/RssObjectDataOnRoute.hpp" 28 : : #include "spdlog/fmt/ostr.h" 29 : : #include "spdlog/spdlog.h" 30 : : 31 : : /*! 32 : : * \brief check if the given RssObjectDataOnRoute is within valid input range 33 : : * 34 : : * \param[in] input the RssObjectDataOnRoute as an input value 35 : : * \param[in] logErrors enables error logging 36 : : * 37 : : * \returns \c true if RssObjectDataOnRoute is considered to be within the specified input range 38 : : * 39 : : * \note the specified input range is defined by the ranges of all members 40 : : */ 41 : 54 : inline bool withinValidInputRange(::ad::rss::map::RssObjectDataOnRoute const &input, bool const logErrors = true) 42 : : { 43 : : // check for generic member input ranges 44 : 54 : bool inValidInputRange = true; 45 : 54 : inValidInputRange = withinValidInputRange(input.route_heading, logErrors) 46 [ + + ]: 43 : && withinValidInputRange(input.route_radius, logErrors) 47 [ + + ]: 41 : && withinValidInputRange(input.route_heading_delta, logErrors) 48 [ + + ]: 39 : && withinValidInputRange(input.route_speed_lat, logErrors) 49 [ + + ]: 37 : && withinValidInputRange(input.route_speed_lon, logErrors) 50 [ + + ]: 35 : && withinValidInputRange(input.object_center_position_projected_on_route, logErrors) 51 [ + + ]: 33 : && withinValidInputRange(input.object_center_distance_to_route, logErrors) 52 [ + + ]: 31 : && withinValidInputRange(input.object_center_position_projected_on_lane_in_nominal_route_direction, logErrors) 53 [ + + ]: 29 : && withinValidInputRange(input.object_center_distance_along_route, logErrors) 54 [ + + ]: 27 : && withinValidInputRange(input.nominal_center_position_of_lane_in_nominal_route_direction, logErrors) 55 [ + + ]: 25 : && withinValidInputRange(input.object_route_section_front_left, logErrors) 56 [ + + ]: 23 : && withinValidInputRange(input.object_route_section_front_right, logErrors) 57 [ + + ]: 21 : && withinValidInputRange(input.object_route_section_back_left, logErrors) 58 [ + + ]: 19 : && withinValidInputRange(input.object_route_section_back_right, logErrors) 59 [ + + + + ]: 97 : && withinValidInputRange(input.object_turning_center, logErrors); 60 [ + + + - ]: 54 : if (!inValidInputRange && logErrors) 61 : : { 62 [ + - ]: 39 : spdlog::error("withinValidInputRange(::ad::rss::map::RssObjectDataOnRoute)>> {} has invalid member", 63 : : input); // LCOV_EXCL_BR_LINE 64 : : } 65 : : 66 : 54 : return inValidInputRange; 67 : : }