ad_rss
LongitudinalRssStateValidInputRange.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::LongitudinalRssState 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.alphaLon, logErrors) && withinValidInputRange(input.rssStateInformation, logErrors);
45  if (!inValidInputRange && logErrors)
46  {
47  spdlog::error("withinValidInputRange(::ad::rss::state::LongitudinalRssState)>> {} has invalid member",
48  input); // LCOV_EXCL_BR_LINE
49  }
50 
51  return inValidInputRange;
52 }
LongitudinalResponseValidInputRange.hpp
ad::rss::state::LongitudinalRssState
DataType LongitudinalRssState.
Definition: LongitudinalRssState.hpp:44
withinValidInputRange
bool withinValidInputRange(::ad::rss::state::LongitudinalRssState const &input, bool const logErrors=true)
check if the given LongitudinalRssState is within valid input range
Definition: LongitudinalRssStateValidInputRange.hpp:39
ad::rss::state::LongitudinalRssState::response
::ad::rss::state::LongitudinalResponse response
Definition: LongitudinalRssState.hpp:127
LongitudinalRssState.hpp
LongitudinalRssAccelerationValuesValidInputRange.hpp
RssStateInformationValidInputRange.hpp
ad::rss::state::LongitudinalRssState::alphaLon
::ad::rss::world::LongitudinalRssAccelerationValues alphaLon
Definition: LongitudinalRssState.hpp:132
ad::rss::state::LongitudinalRssState::rssStateInformation
::ad::rss::state::RssStateInformation rssStateInformation
Definition: LongitudinalRssState.hpp:137