LCOV - code coverage report
Current view: top level - generated/include/ad/rss/map - RssEgoVehicleDynamicsOnRoute.hpp (source / functions) Hit Total Coverage
Test: ad_rss_map_integration Lines: 32 32 100.0 %
Date: 2025-07-22 06:56:19 Functions: 6 6 100.0 %
Branches: 13 16 81.2 %

           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 <chrono>
      21                 :            : #include <iostream>
      22                 :            : #include <limits>
      23                 :            : #include <memory>
      24                 :            : #include <sstream>
      25                 :            : #include "ad/physics/Acceleration.hpp"
      26                 :            : #include "ad/rss/map/TimePointOstream.hpp"
      27                 :            : /*!
      28                 :            :  * @brief namespace ad
      29                 :            :  */
      30                 :            : namespace ad {
      31                 :            : /*!
      32                 :            :  * @brief namespace rss
      33                 :            :  */
      34                 :            : namespace rss {
      35                 :            : /*!
      36                 :            :  * @brief namespace map
      37                 :            :  */
      38                 :            : namespace map {
      39                 :            : 
      40                 :            : /*!
      41                 :            :  * \brief DataType RssEgoVehicleDynamicsOnRoute
      42                 :            :  *
      43                 :            :  * Struct defining the vehicles current dynamics in respect to the respective route
      44                 :            :  */
      45                 :            : struct RssEgoVehicleDynamicsOnRoute
      46                 :            : {
      47                 :            :   /*!
      48                 :            :    * \brief Smart pointer on RssEgoVehicleDynamicsOnRoute
      49                 :            :    */
      50                 :            :   typedef std::shared_ptr<RssEgoVehicleDynamicsOnRoute> Ptr;
      51                 :            : 
      52                 :            :   /*!
      53                 :            :    * \brief Smart pointer on constant RssEgoVehicleDynamicsOnRoute
      54                 :            :    */
      55                 :            :   typedef std::shared_ptr<RssEgoVehicleDynamicsOnRoute const> ConstPtr;
      56                 :            : 
      57                 :            :   /*!
      58                 :            :    * \brief standard constructor
      59                 :            :    */
      60                 :        470 :   RssEgoVehicleDynamicsOnRoute() = default;
      61                 :            : 
      62                 :            :   /*!
      63                 :            :    * \brief standard destructor
      64                 :            :    */
      65                 :            :   ~RssEgoVehicleDynamicsOnRoute() = default;
      66                 :            : 
      67                 :            :   /*!
      68                 :            :    * \brief standard copy constructor
      69                 :            :    */
      70                 :            :   RssEgoVehicleDynamicsOnRoute(const RssEgoVehicleDynamicsOnRoute &other) = default;
      71                 :            : 
      72                 :            :   /*!
      73                 :            :    * \brief standard move constructor
      74                 :            :    */
      75                 :            :   RssEgoVehicleDynamicsOnRoute(RssEgoVehicleDynamicsOnRoute &&other) = default;
      76                 :            : 
      77                 :            :   /**
      78                 :            :    * \brief standard assignment operator
      79                 :            :    *
      80                 :            :    * \param[in] other Other RssEgoVehicleDynamicsOnRoute
      81                 :            :    *
      82                 :            :    * \returns Reference to this RssEgoVehicleDynamicsOnRoute.
      83                 :            :    */
      84                 :            :   RssEgoVehicleDynamicsOnRoute &operator=(const RssEgoVehicleDynamicsOnRoute &other) = default;
      85                 :            : 
      86                 :            :   /**
      87                 :            :    * \brief standard move operator
      88                 :            :    *
      89                 :            :    * \param[in] other Other RssEgoVehicleDynamicsOnRoute
      90                 :            :    *
      91                 :            :    * \returns Reference to this RssEgoVehicleDynamicsOnRoute.
      92                 :            :    */
      93                 :            :   RssEgoVehicleDynamicsOnRoute &operator=(RssEgoVehicleDynamicsOnRoute &&other) = default;
      94                 :            : 
      95                 :            :   /**
      96                 :            :    * \brief standard comparison operator
      97                 :            :    *
      98                 :            :    * \param[in] other Other RssEgoVehicleDynamicsOnRoute
      99                 :            :    *
     100                 :            :    * \returns \c true if both RssEgoVehicleDynamicsOnRoute are equal
     101                 :            :    */
     102                 :         54 :   bool operator==(const RssEgoVehicleDynamicsOnRoute &other) const
     103                 :            :   {
     104         [ +  + ]:        104 :     return (last_update == other.last_update) && (route_accel_lon == other.route_accel_lon)
     105   [ +  +  +  + ]:         48 :       && (route_accel_lat == other.route_accel_lat) && (avg_route_accel_lon == other.avg_route_accel_lon)
     106   [ +  +  +  + ]:        104 :       && (avg_route_accel_lat == other.avg_route_accel_lat);
     107                 :            :   }
     108                 :            : 
     109                 :            :   /**
     110                 :            :    * \brief standard comparison operator
     111                 :            :    *
     112                 :            :    * \param[in] other Other RssEgoVehicleDynamicsOnRoute.
     113                 :            :    *
     114                 :            :    * \returns \c true if both RssEgoVehicleDynamicsOnRoute are different
     115                 :            :    */
     116                 :          6 :   bool operator!=(const RssEgoVehicleDynamicsOnRoute &other) const
     117                 :            :   {
     118                 :          6 :     return !operator==(other);
     119                 :            :   }
     120                 :            : 
     121                 :            :   /*!
     122                 :            :    * The point in time of the last update of this.
     123                 :            :    */
     124                 :            :   std::chrono::system_clock::time_point last_update;
     125                 :            : 
     126                 :            :   /*!
     127                 :            :    * the ego acceleration component in longitudinal route direction
     128                 :            :    */
     129                 :            :   ::ad::physics::Acceleration route_accel_lon{0.};
     130                 :            : 
     131                 :            :   /*!
     132                 :            :    * the ego acceleration component in lateral route direction
     133                 :            :    */
     134                 :            :   ::ad::physics::Acceleration route_accel_lat{0.};
     135                 :            : 
     136                 :            :   /*!
     137                 :            :    * the ego acceleration component in longitudinal route direction, smoothened by an average filter
     138                 :            :    */
     139                 :            :   ::ad::physics::Acceleration avg_route_accel_lon{0.};
     140                 :            : 
     141                 :            :   /*!
     142                 :            :    * the ego acceleration component in lateral route direction, smoothened by an average filter
     143                 :            :    */
     144                 :            :   ::ad::physics::Acceleration avg_route_accel_lat{0.};
     145                 :            : };
     146                 :            : 
     147                 :            : } // namespace map
     148                 :            : } // namespace rss
     149                 :            : } // namespace ad
     150                 :            : 
     151                 :            : /*!
     152                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     153                 :            :  */
     154                 :            : #ifndef GEN_GUARD_AD_RSS_MAP_RSSEGOVEHICLEDYNAMICSONROUTE
     155                 :            : #define GEN_GUARD_AD_RSS_MAP_RSSEGOVEHICLEDYNAMICSONROUTE
     156                 :            : /*!
     157                 :            :  * @brief namespace ad
     158                 :            :  */
     159                 :            : namespace ad {
     160                 :            : /*!
     161                 :            :  * @brief namespace rss
     162                 :            :  */
     163                 :            : namespace rss {
     164                 :            : /*!
     165                 :            :  * @brief namespace map
     166                 :            :  */
     167                 :            : namespace map {
     168                 :            : 
     169                 :            : /**
     170                 :            :  * \brief standard ostream operator
     171                 :            :  *
     172                 :            :  * \param[in] os The output stream to write to
     173                 :            :  * \param[in] _value RssEgoVehicleDynamicsOnRoute value
     174                 :            :  *
     175                 :            :  * \returns The stream object.
     176                 :            :  *
     177                 :            :  */
     178                 :         55 : inline std::ostream &operator<<(std::ostream &os, RssEgoVehicleDynamicsOnRoute const &_value)
     179                 :            : {
     180                 :         55 :   os << "RssEgoVehicleDynamicsOnRoute(";
     181                 :         55 :   os << "last_update:";
     182                 :         55 :   os << _value.last_update;
     183                 :         55 :   os << ",";
     184                 :         55 :   os << "route_accel_lon:";
     185                 :         55 :   os << _value.route_accel_lon;
     186                 :         55 :   os << ",";
     187                 :         55 :   os << "route_accel_lat:";
     188                 :         55 :   os << _value.route_accel_lat;
     189                 :         55 :   os << ",";
     190                 :         55 :   os << "avg_route_accel_lon:";
     191                 :         55 :   os << _value.avg_route_accel_lon;
     192                 :         55 :   os << ",";
     193                 :         55 :   os << "avg_route_accel_lat:";
     194                 :         55 :   os << _value.avg_route_accel_lat;
     195                 :         55 :   os << ")";
     196                 :         55 :   return os;
     197                 :            : }
     198                 :            : 
     199                 :            : } // namespace map
     200                 :            : } // namespace rss
     201                 :            : } // namespace ad
     202                 :            : 
     203                 :            : namespace std {
     204                 :            : /*!
     205                 :            :  * \brief overload of the std::to_string for RssEgoVehicleDynamicsOnRoute
     206                 :            :  */
     207                 :         15 : inline std::string to_string(::ad::rss::map::RssEgoVehicleDynamicsOnRoute const &value)
     208                 :            : {
     209         [ +  - ]:         15 :   stringstream sstream;
     210         [ +  - ]:         15 :   sstream << value;
     211         [ +  - ]:         30 :   return sstream.str();
     212                 :         15 : }
     213                 :            : } // namespace std
     214                 :            : 
     215                 :            : /*!
     216                 :            :  * \brief overload of fmt::formatter calling std::to_string
     217                 :            :  */
     218                 :            : template <> struct fmt::formatter<::ad::rss::map::RssEgoVehicleDynamicsOnRoute> : formatter<string_view>
     219                 :            : {
     220                 :            :   template <typename FormatContext>
     221                 :         14 :   auto format(::ad::rss::map::RssEgoVehicleDynamicsOnRoute const &value, FormatContext &ctx)
     222                 :            :   {
     223                 :         28 :     return formatter<string_view>::format(std::to_string(value), ctx);
     224                 :            :   }
     225                 :            : };
     226                 :            : 
     227                 :            : #endif // GEN_GUARD_AD_RSS_MAP_RSSEGOVEHICLEDYNAMICSONROUTE

Generated by: LCOV version 1.14