ad_rss
UnstructuredSceneRssStateValidInputRange.hpp
Go to the documentation of this file.
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 
18 #pragma once
19 
20 #include <cmath>
21 #include <limits>
26 #include "spdlog/fmt/ostr.h"
27 #include "spdlog/spdlog.h"
28 
39 inline bool withinValidInputRange(::ad::rss::state::UnstructuredSceneRssState const &input, bool const logErrors = true)
40 {
41  // check for generic member input ranges
42  bool inValidInputRange = true;
43  inValidInputRange = withinValidInputRange(input.response, logErrors)
44  && withinValidInputRange(input.headingRange, logErrors) && withinValidInputRange(input.alphaLon, logErrors);
45  if (!inValidInputRange && logErrors)
46  {
47  spdlog::error("withinValidInputRange(::ad::rss::state::UnstructuredSceneRssState)>> {} has invalid member",
48  input); // LCOV_EXCL_BR_LINE
49  }
50 
51  return inValidInputRange;
52 }
ad::rss::state::UnstructuredSceneRssState::response
::ad::rss::state::UnstructuredSceneResponse response
Definition: UnstructuredSceneRssState.hpp:126
UnstructuredSceneRssState.hpp
ad::rss::state::UnstructuredSceneRssState::headingRange
::ad::rss::state::HeadingRange headingRange
Definition: UnstructuredSceneRssState.hpp:131
withinValidInputRange
bool withinValidInputRange(::ad::rss::state::UnstructuredSceneRssState const &input, bool const logErrors=true)
check if the given UnstructuredSceneRssState is within valid input range
Definition: UnstructuredSceneRssStateValidInputRange.hpp:39
ad::rss::state::UnstructuredSceneRssState::alphaLon
::ad::rss::world::LongitudinalRssAccelerationValues alphaLon
Definition: UnstructuredSceneRssState.hpp:141
ad::rss::state::UnstructuredSceneRssState
DataType UnstructuredSceneRssState.
Definition: UnstructuredSceneRssState.hpp:43
LongitudinalRssAccelerationValuesValidInputRange.hpp
UnstructuredSceneResponseValidInputRange.hpp
HeadingRangeValidInputRange.hpp