LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - ObjectStateValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 8 8 100.0 %
Date: 2024-04-30 13:12:49 Functions: 1 1 100.0 %
Branches: 16 18 88.9 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
       3                 :            :  *
       4                 :            :  * Copyright (C) 2018-2020 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-1997
      16                 :            :  */
      17                 :            : 
      18                 :            : #pragma once
      19                 :            : 
      20                 :            : #include <cmath>
      21                 :            : #include <limits>
      22                 :            : #include "ad/physics/AngleValidInputRange.hpp"
      23                 :            : #include "ad/physics/AngularVelocityValidInputRange.hpp"
      24                 :            : #include "ad/physics/Dimension2DValidInputRange.hpp"
      25                 :            : #include "ad/physics/Distance2DValidInputRange.hpp"
      26                 :            : #include "ad/physics/SpeedValidInputRange.hpp"
      27                 :            : #include "ad/rss/world/ObjectState.hpp"
      28                 :            : #include "spdlog/fmt/ostr.h"
      29                 :            : #include "spdlog/spdlog.h"
      30                 :            : 
      31                 :            : /*!
      32                 :            :  * \brief check if the given ObjectState is within valid input range
      33                 :            :  *
      34                 :            :  * \param[in] input the ObjectState as an input value
      35                 :            :  * \param[in] logErrors enables error logging
      36                 :            :  *
      37                 :            :  * \returns \c true if ObjectState 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                 :     245586 : inline bool withinValidInputRange(::ad::rss::world::ObjectState const &input, bool const logErrors = true)
      42                 :            : {
      43                 :            :   // check for generic member input ranges
      44                 :     245586 :   bool inValidInputRange = true;
      45         [ +  + ]:     491162 :   inValidInputRange = withinValidInputRange(input.yaw, logErrors) && withinValidInputRange(input.dimension, logErrors)
      46   [ +  +  +  + ]:     245574 :     && withinValidInputRange(input.yawRate, logErrors) && withinValidInputRange(input.centerPoint, logErrors)
      47   [ +  +  +  +  :     491162 :     && withinValidInputRange(input.speed, logErrors) && withinValidInputRange(input.steeringAngle, logErrors);
                   +  + ]
      48   [ +  +  +  - ]:     245586 :   if (!inValidInputRange && logErrors)
      49                 :            :   {
      50         [ +  - ]:         20 :     spdlog::error("withinValidInputRange(::ad::rss::world::ObjectState)>> {} has invalid member",
      51                 :            :                   input); // LCOV_EXCL_BR_LINE
      52                 :            :   }
      53                 :            : 
      54                 :     245586 :   return inValidInputRange;
      55                 :            : }

Generated by: LCOV version 1.14