ad_rss
generated
include
ad
rss
core
RelativeObjectStateValidInputRange.hpp
Go to the documentation of this file.
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
18
#pragma once
19
20
#include <cmath>
21
#include <limits>
22
#include "
ad/rss/core/RelativeObjectState.hpp
"
23
#include "
ad/rss/core/StructuredObjectStateValidInputRange.hpp
"
24
#include "
ad/rss/world/ObjectStateValidInputRange.hpp
"
25
#include "
ad/rss/world/ObjectTypeValidInputRange.hpp
"
26
#include "
ad/rss/world/RssDynamicsValidInputRange.hpp
"
27
#include "spdlog/fmt/ostr.h"
28
#include "spdlog/spdlog.h"
29
40
inline
bool
withinValidInputRange
(::
ad::rss::core::RelativeObjectState
const
&input,
bool
const
logErrors =
true
)
41
{
42
// check for generic member input ranges
43
bool
inValidInputRange =
true
;
44
inValidInputRange =
withinValidInputRange
(input.
object_type
, logErrors)
45
&&
withinValidInputRange
(input.
dynamics
, logErrors)
46
&&
withinValidInputRange
(input.
unstructured_object_state
, logErrors)
47
&&
withinValidInputRange
(input.
structured_object_state
, logErrors);
48
if
(!inValidInputRange && logErrors)
49
{
50
spdlog::error(
"withinValidInputRange(::ad::rss::core::RelativeObjectState)>> {} has invalid member"
,
51
input);
// LCOV_EXCL_BR_LINE
52
}
53
54
return
inValidInputRange;
55
}
ObjectStateValidInputRange.hpp
ObjectTypeValidInputRange.hpp
withinValidInputRange
bool withinValidInputRange(::ad::rss::core::RelativeObjectState const &input, bool const logErrors=true)
check if the given RelativeObjectState is within valid input range
Definition:
RelativeObjectStateValidInputRange.hpp:40
RelativeObjectState.hpp
RssDynamicsValidInputRange.hpp
StructuredObjectStateValidInputRange.hpp
ad::rss::core::RelativeObjectState
DataType RelativeObjectState.
Definition:
RelativeObjectState.hpp:48
ad::rss::core::RelativeObjectState::structured_object_state
::ad::rss::core::StructuredObjectState structured_object_state
Definition:
RelativeObjectState.hpp:141
ad::rss::core::RelativeObjectState::unstructured_object_state
::ad::rss::world::ObjectState unstructured_object_state
Definition:
RelativeObjectState.hpp:136
ad::rss::core::RelativeObjectState::dynamics
::ad::rss::world::RssDynamics dynamics
Definition:
RelativeObjectState.hpp:131
ad::rss::core::RelativeObjectState::object_type
::ad::rss::world::ObjectType object_type
Definition:
RelativeObjectState.hpp:126
Generated by
1.9.1