ad_rss
generated
include
ad
rss
world
LaneSegmentValidInputRange.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>
22
#include "ad/physics/MetricRangeValidInputRange.hpp"
23
#include "
ad/rss/world/LaneDrivingDirectionValidInputRange.hpp
"
24
#include "
ad/rss/world/LaneSegment.hpp
"
25
#include "
ad/rss/world/LaneSegmentTypeValidInputRange.hpp
"
26
#include "spdlog/fmt/ostr.h"
27
#include "spdlog/spdlog.h"
28
39
inline
bool
withinValidInputRange
(::
ad::rss::world::LaneSegment
const
&input,
bool
const
logErrors =
true
)
40
{
41
// check for generic member input ranges
42
bool
inValidInputRange =
true
;
43
inValidInputRange =
withinValidInputRange
(input.
type
, logErrors)
44
&&
withinValidInputRange
(input.
drivingDirection
, logErrors) &&
withinValidInputRange
(input.
length
, logErrors)
45
&&
withinValidInputRange
(input.
width
, logErrors);
46
if
(!inValidInputRange && logErrors)
47
{
48
spdlog::error(
"withinValidInputRange(::ad::rss::world::LaneSegment)>> {} has invalid member"
,
49
input);
// LCOV_EXCL_BR_LINE
50
}
51
52
return
inValidInputRange;
53
}
LaneDrivingDirectionValidInputRange.hpp
ad::rss::world::LaneSegment::length
::ad::physics::MetricRange length
Definition:
LaneSegment.hpp:139
ad::rss::world::LaneSegment
DataType LaneSegment.
Definition:
LaneSegment.hpp:46
withinValidInputRange
bool withinValidInputRange(::ad::rss::world::LaneSegment const &input, bool const logErrors=true)
check if the given LaneSegment is within valid input range
Definition:
LaneSegmentValidInputRange.hpp:39
ad::rss::world::LaneSegment::width
::ad::physics::MetricRange width
Definition:
LaneSegment.hpp:144
ad::rss::world::LaneSegment::drivingDirection
::ad::rss::world::LaneDrivingDirection drivingDirection
Definition:
LaneSegment.hpp:134
ad::rss::world::LaneSegment::type
::ad::rss::world::LaneSegmentType type
Definition:
LaneSegment.hpp:129
LaneSegment.hpp
LaneSegmentTypeValidInputRange.hpp
Generated by
1.8.17