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

           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 <iostream>
      21                 :            : #include <limits>
      22                 :            : #include <memory>
      23                 :            : #include <sstream>
      24                 :            : #include "ad/physics/Distance.hpp"
      25                 :            : #include "ad/physics/Duration.hpp"
      26                 :            : #include "ad/physics/Speed.hpp"
      27                 :            : #include "ad/rss/world/LateralRssAccelerationValues.hpp"
      28                 :            : #include "ad/rss/world/LongitudinalRssAccelerationValues.hpp"
      29                 :            : #include "ad/rss/world/UnstructuredSettings.hpp"
      30                 :            : /*!
      31                 :            :  * @brief namespace ad
      32                 :            :  */
      33                 :            : namespace ad {
      34                 :            : /*!
      35                 :            :  * @brief namespace rss
      36                 :            :  */
      37                 :            : namespace rss {
      38                 :            : /*!
      39                 :            :  * @brief namespace world
      40                 :            :  */
      41                 :            : namespace world {
      42                 :            : 
      43                 :            : /*!
      44                 :            :  * \brief DataType RssDynamics
      45                 :            :  *
      46                 :            :  * Describes the RSS dynamics values to be applied for an object within the metric world frame. The dynamics consist of
      47                 :            :  * a longitudinal component, a lateral component and a lateral fluctuation margin to be taken into account to compensate
      48                 :            :  * for lateral fluctuations.
      49                 :            :  */
      50                 :            : struct RssDynamics
      51                 :            : {
      52                 :            :   /*!
      53                 :            :    * \brief Smart pointer on RssDynamics
      54                 :            :    */
      55                 :            :   typedef std::shared_ptr<RssDynamics> Ptr;
      56                 :            : 
      57                 :            :   /*!
      58                 :            :    * \brief Smart pointer on constant RssDynamics
      59                 :            :    */
      60                 :            :   typedef std::shared_ptr<RssDynamics const> ConstPtr;
      61                 :            : 
      62                 :            :   /*!
      63                 :            :    * \brief standard constructor
      64                 :            :    */
      65                 :      25507 :   RssDynamics() = default;
      66                 :            : 
      67                 :            :   /*!
      68                 :            :    * \brief standard destructor
      69                 :            :    */
      70                 :            :   ~RssDynamics() = default;
      71                 :            : 
      72                 :            :   /*!
      73                 :            :    * \brief standard copy constructor
      74                 :            :    */
      75                 :            :   RssDynamics(const RssDynamics &other) = default;
      76                 :            : 
      77                 :            :   /*!
      78                 :            :    * \brief standard move constructor
      79                 :            :    */
      80                 :            :   RssDynamics(RssDynamics &&other) = default;
      81                 :            : 
      82                 :            :   /**
      83                 :            :    * \brief standard assignment operator
      84                 :            :    *
      85                 :            :    * \param[in] other Other RssDynamics
      86                 :            :    *
      87                 :            :    * \returns Reference to this RssDynamics.
      88                 :            :    */
      89                 :            :   RssDynamics &operator=(const RssDynamics &other) = default;
      90                 :            : 
      91                 :            :   /**
      92                 :            :    * \brief standard move operator
      93                 :            :    *
      94                 :            :    * \param[in] other Other RssDynamics
      95                 :            :    *
      96                 :            :    * \returns Reference to this RssDynamics.
      97                 :            :    */
      98                 :            :   RssDynamics &operator=(RssDynamics &&other) = default;
      99                 :            : 
     100                 :            :   /**
     101                 :            :    * \brief standard comparison operator
     102                 :            :    *
     103                 :            :    * \param[in] other Other RssDynamics
     104                 :            :    *
     105                 :            :    * \returns \c true if both RssDynamics are equal
     106                 :            :    */
     107                 :        140 :   bool operator==(const RssDynamics &other) const
     108                 :            :   {
     109         [ +  + ]:        266 :     return (alphaLon == other.alphaLon) && (alphaLat == other.alphaLat)
     110   [ +  +  +  + ]:        124 :       && (lateralFluctuationMargin == other.lateralFluctuationMargin) && (responseTime == other.responseTime)
     111         [ +  + ]:        120 :       && (maxSpeedOnAcceleration == other.maxSpeedOnAcceleration)
     112   [ +  +  +  + ]:        266 :       && (unstructuredSettings == other.unstructuredSettings);
     113                 :            :   }
     114                 :            : 
     115                 :            :   /**
     116                 :            :    * \brief standard comparison operator
     117                 :            :    *
     118                 :            :    * \param[in] other Other RssDynamics.
     119                 :            :    *
     120                 :            :    * \returns \c true if both RssDynamics are different
     121                 :            :    */
     122                 :          7 :   bool operator!=(const RssDynamics &other) const
     123                 :            :   {
     124                 :          7 :     return !operator==(other);
     125                 :            :   }
     126                 :            : 
     127                 :            :   /*!
     128                 :            :    * RSS dynamics values along longitudinal coordinate system axis.
     129                 :            :    */
     130                 :            :   ::ad::rss::world::LongitudinalRssAccelerationValues alphaLon;
     131                 :            : 
     132                 :            :   /*!
     133                 :            :    * RSS dynamics values along lateral coordinate system axis.
     134                 :            :    */
     135                 :            :   ::ad::rss::world::LateralRssAccelerationValues alphaLat;
     136                 :            : 
     137                 :            :   /*!
     138                 :            :    * Defines the lateral fluctuation margin to be taken into account.
     139                 :            :    */
     140                 :            :   ::ad::physics::Distance lateralFluctuationMargin{0.0};
     141                 :            : 
     142                 :            :   /*!
     143                 :            :    * Defines the response time of the object to be considered.
     144                 :            :    */
     145                 :            :   ::ad::physics::Duration responseTime;
     146                 :            : 
     147                 :            :   /*!
     148                 :            :    * Defines the maximum speed of the object to be considered while acceleration within
     149                 :            :    * the response time. The acceleration will be stopped if this speed limit is reached.
     150                 :            :    * In case the speed before the acceleration is already higher or equal to this value,
     151                 :            :    * no further acceleration will take place during the response time (in this case
     152                 :            :    * speed before response time == speed after response time).
     153                 :            :    */
     154                 :            :   ::ad::physics::Speed maxSpeedOnAcceleration{100};
     155                 :            : 
     156                 :            :   /*!
     157                 :            :    * Settings to be considered for evaluation in unstructured mode.
     158                 :            :    */
     159                 :            :   ::ad::rss::world::UnstructuredSettings unstructuredSettings;
     160                 :            : };
     161                 :            : 
     162                 :            : } // namespace world
     163                 :            : } // namespace rss
     164                 :            : } // namespace ad
     165                 :            : 
     166                 :            : /*!
     167                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     168                 :            :  */
     169                 :            : #ifndef GEN_GUARD_AD_RSS_WORLD_RSSDYNAMICS
     170                 :            : #define GEN_GUARD_AD_RSS_WORLD_RSSDYNAMICS
     171                 :            : /*!
     172                 :            :  * @brief namespace ad
     173                 :            :  */
     174                 :            : namespace ad {
     175                 :            : /*!
     176                 :            :  * @brief namespace rss
     177                 :            :  */
     178                 :            : namespace rss {
     179                 :            : /*!
     180                 :            :  * @brief namespace world
     181                 :            :  */
     182                 :            : namespace world {
     183                 :            : 
     184                 :            : /**
     185                 :            :  * \brief standard ostream operator
     186                 :            :  *
     187                 :            :  * \param[in] os The output stream to write to
     188                 :            :  * \param[in] _value RssDynamics value
     189                 :            :  *
     190                 :            :  * \returns The stream object.
     191                 :            :  *
     192                 :            :  */
     193                 :    4035500 : inline std::ostream &operator<<(std::ostream &os, RssDynamics const &_value)
     194                 :            : {
     195                 :    4035500 :   os << "RssDynamics(";
     196                 :    4035500 :   os << "alphaLon:";
     197                 :    4035500 :   os << _value.alphaLon;
     198                 :    4035500 :   os << ",";
     199                 :    4035500 :   os << "alphaLat:";
     200                 :    4035500 :   os << _value.alphaLat;
     201                 :    4035500 :   os << ",";
     202                 :    4035500 :   os << "lateralFluctuationMargin:";
     203                 :    4035500 :   os << _value.lateralFluctuationMargin;
     204                 :    4035500 :   os << ",";
     205                 :    4035500 :   os << "responseTime:";
     206                 :    4035500 :   os << _value.responseTime;
     207                 :    4035500 :   os << ",";
     208                 :    4035500 :   os << "maxSpeedOnAcceleration:";
     209                 :    4035500 :   os << _value.maxSpeedOnAcceleration;
     210                 :    4035500 :   os << ",";
     211                 :    4035500 :   os << "unstructuredSettings:";
     212                 :    4035500 :   os << _value.unstructuredSettings;
     213                 :    4035500 :   os << ")";
     214                 :    4035500 :   return os;
     215                 :            : }
     216                 :            : 
     217                 :            : } // namespace world
     218                 :            : } // namespace rss
     219                 :            : } // namespace ad
     220                 :            : 
     221                 :            : namespace std {
     222                 :            : /*!
     223                 :            :  * \brief overload of the std::to_string for RssDynamics
     224                 :            :  */
     225                 :          1 : inline std::string to_string(::ad::rss::world::RssDynamics const &value)
     226                 :            : {
     227         [ +  - ]:          2 :   stringstream sstream;
     228         [ +  - ]:          1 :   sstream << value;
     229         [ +  - ]:          2 :   return sstream.str();
     230                 :            : }
     231                 :            : } // namespace std
     232                 :            : #endif // GEN_GUARD_AD_RSS_WORLD_RSSDYNAMICS

Generated by: LCOV version 1.14