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/physics/AccelerationValidInputRange.hpp" 24 : : #include "ad/physics/AngleValidInputRange.hpp" 25 : : #include "ad/physics/DistanceValidInputRange.hpp" 26 : : #include "ad/physics/SpeedValidInputRange.hpp" 27 : : #include "ad/rss/map/RouteAccelerations.hpp" 28 : : #include "spdlog/fmt/ostr.h" 29 : : #include "spdlog/spdlog.h" 30 : : 31 : : /*! 32 : : * \brief check if the given RouteAccelerations is within valid input range 33 : : * 34 : : * \param[in] input the RouteAccelerations as an input value 35 : : * \param[in] logErrors enables error logging 36 : : * 37 : : * \returns \c true if RouteAccelerations 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 : 24 : inline bool withinValidInputRange(::ad::rss::map::RouteAccelerations const &input, bool const logErrors = true) 42 : : { 43 : : // check for generic member input ranges 44 : 24 : bool inValidInputRange = true; 45 : 24 : inValidInputRange = withinValidInputRange(input.route_heading, logErrors) 46 [ + + + + ]: 14 : && withinValidInputRange(input.route_radius, logErrors) && withinValidInputRange(input.route_speed_lon, logErrors) 47 [ + + ]: 10 : && withinValidInputRange(input.route_speed_lat, logErrors) 48 [ + + ]: 8 : && withinValidInputRange(input.route_heading_delta, logErrors) 49 [ + + + + ]: 38 : && withinValidInputRange(input.route_centripetal_acceleration, logErrors); 50 [ + + + - ]: 24 : if (!inValidInputRange && logErrors) 51 : : { 52 [ + - ]: 20 : spdlog::error("withinValidInputRange(::ad::rss::map::RouteAccelerations)>> {} has invalid member", 53 : : input); // LCOV_EXCL_BR_LINE 54 : : } 55 : : 56 : 24 : return inValidInputRange; 57 : : }