LCOV - code coverage report
Current view: top level - generated/include/ad/rss/map - RssObjectData.hpp (source / functions) Hit Total Coverage
Test: ad_rss_map_integration Lines: 46 46 100.0 %
Date: 2025-07-22 06:56:19 Functions: 11 11 100.0 %
Branches: 19 26 73.1 %

           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/map/match/Object.hpp"
      26                 :            : #include "ad/physics/Angle.hpp"
      27                 :            : #include "ad/physics/AngularVelocity.hpp"
      28                 :            : #include "ad/physics/SpeedRange.hpp"
      29                 :            : #include "ad/rss/map/TimePointOstream.hpp"
      30                 :            : #include "ad/rss/world/ObjectId.hpp"
      31                 :            : #include "ad/rss/world/ObjectType.hpp"
      32                 :            : #include "ad/rss/world/RssDynamics.hpp"
      33                 :            : /*!
      34                 :            :  * @brief namespace ad
      35                 :            :  */
      36                 :            : namespace ad {
      37                 :            : /*!
      38                 :            :  * @brief namespace rss
      39                 :            :  */
      40                 :            : namespace rss {
      41                 :            : /*!
      42                 :            :  * @brief namespace map
      43                 :            :  */
      44                 :            : namespace map {
      45                 :            : 
      46                 :            : /*!
      47                 :            :  * \brief DataType RssObjectData
      48                 :            :  *
      49                 :            :  * struct describing the object data relevant for RSS constellation creation
      50                 :            :  */
      51                 :            : struct RssObjectData
      52                 :            : {
      53                 :            :   /*!
      54                 :            :    * \brief Smart pointer on RssObjectData
      55                 :            :    */
      56                 :            :   typedef std::shared_ptr<RssObjectData> Ptr;
      57                 :            : 
      58                 :            :   /*!
      59                 :            :    * \brief Smart pointer on constant RssObjectData
      60                 :            :    */
      61                 :            :   typedef std::shared_ptr<RssObjectData const> ConstPtr;
      62                 :            : 
      63                 :            :   /*!
      64                 :            :    * \brief standard constructor
      65                 :            :    */
      66   [ #  #  #  # ]:        585 :   RssObjectData() = default;
      67                 :            : 
      68                 :            :   /*!
      69                 :            :    * \brief standard destructor
      70                 :            :    */
      71                 :        820 :   ~RssObjectData() = default;
      72                 :            : 
      73                 :            :   /*!
      74                 :            :    * \brief standard copy constructor
      75                 :            :    */
      76                 :        210 :   RssObjectData(const RssObjectData &other) = default;
      77                 :            : 
      78                 :            :   /*!
      79                 :            :    * \brief standard move constructor
      80                 :            :    */
      81                 :         25 :   RssObjectData(RssObjectData &&other) = default;
      82                 :            : 
      83                 :            :   /**
      84                 :            :    * \brief standard assignment operator
      85                 :            :    *
      86                 :            :    * \param[in] other Other RssObjectData
      87                 :            :    *
      88                 :            :    * \returns Reference to this RssObjectData.
      89                 :            :    */
      90                 :         68 :   RssObjectData &operator=(const RssObjectData &other) = default;
      91                 :            : 
      92                 :            :   /**
      93                 :            :    * \brief standard move operator
      94                 :            :    *
      95                 :            :    * \param[in] other Other RssObjectData
      96                 :            :    *
      97                 :            :    * \returns Reference to this RssObjectData.
      98                 :            :    */
      99                 :         30 :   RssObjectData &operator=(RssObjectData &&other) = default;
     100                 :            : 
     101                 :            :   /**
     102                 :            :    * \brief standard comparison operator
     103                 :            :    *
     104                 :            :    * \param[in] other Other RssObjectData
     105                 :            :    *
     106                 :            :    * \returns \c true if both RssObjectData are equal
     107                 :            :    */
     108                 :         32 :   bool operator==(const RssObjectData &other) const
     109                 :            :   {
     110   [ +  +  +  + ]:         60 :     return (last_update == other.last_update) && (id == other.id) && (type == other.type)
     111   [ +  +  +  +  :         24 :       && (match_object == other.match_object) && (speed_range == other.speed_range) && (yaw_rate == other.yaw_rate)
                   +  + ]
     112   [ +  +  +  +  :         60 :       && (steering_angle == other.steering_angle) && (rss_dynamics == other.rss_dynamics);
                   +  + ]
     113                 :            :   }
     114                 :            : 
     115                 :            :   /**
     116                 :            :    * \brief standard comparison operator
     117                 :            :    *
     118                 :            :    * \param[in] other Other RssObjectData.
     119                 :            :    *
     120                 :            :    * \returns \c true if both RssObjectData are different
     121                 :            :    */
     122                 :          9 :   bool operator!=(const RssObjectData &other) const
     123                 :            :   {
     124                 :          9 :     return !operator==(other);
     125                 :            :   }
     126                 :            : 
     127                 :            :   /*!
     128                 :            :    * The point in time of the last update of this.
     129                 :            :    */
     130                 :            :   std::chrono::system_clock::time_point last_update;
     131                 :            : 
     132                 :            :   /*!
     133                 :            :    * the object id
     134                 :            :    */
     135                 :            :   ::ad::rss::world::ObjectId id{0};
     136                 :            : 
     137                 :            :   /*!
     138                 :            :    * the object type
     139                 :            :    */
     140                 :            :   ::ad::rss::world::ObjectType type{::ad::rss::world::ObjectType::Invalid};
     141                 :            : 
     142                 :            :   /*!
     143                 :            :    * the object's position described by its map matched bounding box and position
     144                 :            :    */
     145                 :            :   ::ad::map::match::Object match_object;
     146                 :            : 
     147                 :            :   /*!
     148                 :            :    * the object's speed provided as a range with min, max
     149                 :            :    * to support use-cases like e.g. artifical objects with unknow speed
     150                 :            :    */
     151                 :            :   ::ad::physics::SpeedRange speed_range;
     152                 :            : 
     153                 :            :   /*!
     154                 :            :    * the object's yaw rate
     155                 :            :    */
     156                 :            :   ::ad::physics::AngularVelocity yaw_rate;
     157                 :            : 
     158                 :            :   /*!
     159                 :            :    * the vehicle's steering angle (only relevant for vehicles)
     160                 :            :    */
     161                 :            :   ::ad::physics::Angle steering_angle;
     162                 :            : 
     163                 :            :   /*!
     164                 :            :    * the object's RssDynamics to be applied
     165                 :            :    */
     166                 :            :   ::ad::rss::world::RssDynamics rss_dynamics;
     167                 :            : };
     168                 :            : 
     169                 :            : } // namespace map
     170                 :            : } // namespace rss
     171                 :            : } // namespace ad
     172                 :            : 
     173                 :            : /*!
     174                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     175                 :            :  */
     176                 :            : #ifndef GEN_GUARD_AD_RSS_MAP_RSSOBJECTDATA
     177                 :            : #define GEN_GUARD_AD_RSS_MAP_RSSOBJECTDATA
     178                 :            : /*!
     179                 :            :  * @brief namespace ad
     180                 :            :  */
     181                 :            : namespace ad {
     182                 :            : /*!
     183                 :            :  * @brief namespace rss
     184                 :            :  */
     185                 :            : namespace rss {
     186                 :            : /*!
     187                 :            :  * @brief namespace map
     188                 :            :  */
     189                 :            : namespace map {
     190                 :            : 
     191                 :            : /**
     192                 :            :  * \brief standard ostream operator
     193                 :            :  *
     194                 :            :  * \param[in] os The output stream to write to
     195                 :            :  * \param[in] _value RssObjectData value
     196                 :            :  *
     197                 :            :  * \returns The stream object.
     198                 :            :  *
     199                 :            :  */
     200                 :         26 : inline std::ostream &operator<<(std::ostream &os, RssObjectData const &_value)
     201                 :            : {
     202                 :         26 :   os << "RssObjectData(";
     203                 :         26 :   os << "last_update:";
     204                 :         26 :   os << _value.last_update;
     205                 :         26 :   os << ",";
     206                 :         26 :   os << "id:";
     207                 :         26 :   os << _value.id;
     208                 :         26 :   os << ",";
     209                 :         26 :   os << "type:";
     210                 :         26 :   os << _value.type;
     211                 :         26 :   os << ",";
     212                 :         26 :   os << "match_object:";
     213                 :         26 :   os << _value.match_object;
     214                 :         26 :   os << ",";
     215                 :         26 :   os << "speed_range:";
     216                 :         26 :   os << _value.speed_range;
     217                 :         26 :   os << ",";
     218                 :         26 :   os << "yaw_rate:";
     219                 :         26 :   os << _value.yaw_rate;
     220                 :         26 :   os << ",";
     221                 :         26 :   os << "steering_angle:";
     222                 :         26 :   os << _value.steering_angle;
     223                 :         26 :   os << ",";
     224                 :         26 :   os << "rss_dynamics:";
     225                 :         26 :   os << _value.rss_dynamics;
     226                 :         26 :   os << ")";
     227                 :         26 :   return os;
     228                 :            : }
     229                 :            : 
     230                 :            : } // namespace map
     231                 :            : } // namespace rss
     232                 :            : } // namespace ad
     233                 :            : 
     234                 :            : namespace std {
     235                 :            : /*!
     236                 :            :  * \brief overload of the std::to_string for RssObjectData
     237                 :            :  */
     238                 :         18 : inline std::string to_string(::ad::rss::map::RssObjectData const &value)
     239                 :            : {
     240         [ +  - ]:         18 :   stringstream sstream;
     241         [ +  - ]:         18 :   sstream << value;
     242         [ +  - ]:         36 :   return sstream.str();
     243                 :         18 : }
     244                 :            : } // namespace std
     245                 :            : 
     246                 :            : /*!
     247                 :            :  * \brief overload of fmt::formatter calling std::to_string
     248                 :            :  */
     249                 :            : template <> struct fmt::formatter<::ad::rss::map::RssObjectData> : formatter<string_view>
     250                 :            : {
     251                 :         17 :   template <typename FormatContext> auto format(::ad::rss::map::RssObjectData const &value, FormatContext &ctx)
     252                 :            :   {
     253                 :         34 :     return formatter<string_view>::format(std::to_string(value), ctx);
     254                 :            :   }
     255                 :            : };
     256                 :            : 
     257                 :            : #endif // GEN_GUARD_AD_RSS_MAP_RSSOBJECTDATA

Generated by: LCOV version 1.14