ad_rss
generated
include
ad
rss
state
ProperResponse.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 <iostream>
21
#include <limits>
22
#include <memory>
23
#include <sstream>
24
#include "ad/geometry/HeadingRangeVector.hpp"
25
#include "
ad/rss/state/AccelerationRestriction.hpp
"
26
#include "
ad/rss/state/LateralResponse.hpp
"
27
#include "
ad/rss/state/LongitudinalResponse.hpp
"
28
#include "
ad/rss/state/UnstructuredConstellationResponse.hpp
"
29
#include "
ad/rss/world/ObjectIdVector.hpp
"
30
#include "
ad/rss/world/TimeIndex.hpp
"
34
namespace
ad
{
38
namespace
rss {
42
namespace
state {
43
49
struct
ProperResponse
50
{
54
typedef
std::shared_ptr<ProperResponse>
Ptr
;
55
59
typedef
std::shared_ptr<ProperResponse const>
ConstPtr
;
60
64
ProperResponse
() =
default
;
65
69
~ProperResponse
() =
default
;
70
74
ProperResponse
(
const
ProperResponse
&other) =
default
;
75
79
ProperResponse
(
ProperResponse
&&other) =
default
;
80
88
ProperResponse
&
operator=
(
const
ProperResponse
&other) =
default
;
89
97
ProperResponse
&
operator=
(
ProperResponse
&&other) =
default
;
98
106
bool
operator==
(
const
ProperResponse
&other)
const
107
{
108
return
(
time_index
== other.
time_index
) && (
is_safe
== other.
is_safe
)
109
&& (
dangerous_objects
== other.
dangerous_objects
) && (
longitudinal_response
== other.
longitudinal_response
)
110
&& (
lateral_response_right
== other.
lateral_response_right
)
111
&& (
lateral_response_left
== other.
lateral_response_left
) && (
heading_ranges
== other.
heading_ranges
)
112
&& (
acceleration_restrictions
== other.
acceleration_restrictions
)
113
&& (
unstructured_constellation_response
== other.
unstructured_constellation_response
);
114
}
115
123
bool
operator!=
(
const
ProperResponse
&other)
const
124
{
125
return
!
operator==
(other);
126
}
127
133
::ad::rss::world::TimeIndex
time_index
{0u};
134
139
bool
is_safe
{
false
};
140
144
::ad::rss::world::ObjectIdVector
dangerous_objects
;
145
149
::ad::rss::state::LongitudinalResponse
longitudinal_response
;
150
154
::ad::rss::state::LateralResponse
lateral_response_right
;
155
159
::ad::rss::state::LateralResponse
lateral_response_left
;
160
165
::ad::geometry::HeadingRangeVector
heading_ranges
;
166
170
::ad::rss::state::AccelerationRestriction
acceleration_restrictions
;
171
175
::ad::rss::state::UnstructuredConstellationResponse
unstructured_constellation_response
;
176
};
177
178
}
// namespace state
179
}
// namespace rss
180
}
// namespace ad
181
185
#ifndef GEN_GUARD_AD_RSS_STATE_PROPERRESPONSE
186
#define GEN_GUARD_AD_RSS_STATE_PROPERRESPONSE
190
namespace
ad
{
194
namespace
rss {
198
namespace
state {
199
209
inline
std::ostream &
operator<<
(std::ostream &os,
ProperResponse
const
&_value)
210
{
211
os <<
"ProperResponse("
;
212
os <<
"time_index:"
;
213
os << _value.
time_index
;
214
os <<
","
;
215
os <<
"is_safe:"
;
216
os << _value.
is_safe
;
217
os <<
","
;
218
os <<
"dangerous_objects:"
;
219
os << _value.
dangerous_objects
;
220
os <<
","
;
221
os <<
"longitudinal_response:"
;
222
os << _value.
longitudinal_response
;
223
os <<
","
;
224
os <<
"lateral_response_right:"
;
225
os << _value.
lateral_response_right
;
226
os <<
","
;
227
os <<
"lateral_response_left:"
;
228
os << _value.
lateral_response_left
;
229
os <<
","
;
230
os <<
"heading_ranges:"
;
231
os << _value.
heading_ranges
;
232
os <<
","
;
233
os <<
"acceleration_restrictions:"
;
234
os << _value.
acceleration_restrictions
;
235
os <<
","
;
236
os <<
"unstructured_constellation_response:"
;
237
os << _value.
unstructured_constellation_response
;
238
os <<
")"
;
239
return
os;
240
}
241
242
}
// namespace state
243
}
// namespace rss
244
}
// namespace ad
245
246
namespace
std {
250
inline
std::string
to_string
(::
ad::rss::state::ProperResponse
const
&value)
251
{
252
stringstream sstream;
253
sstream << value;
254
return
sstream.str();
255
}
256
}
// namespace std
257
261
template
<>
struct
fmt::formatter<::
ad::rss::state::ProperResponse
> : formatter<string_view>
262
{
263
template
<
typename
FormatContext>
auto
format(::
ad::rss::state::ProperResponse
const
&value, FormatContext &ctx)
264
{
265
return
formatter<string_view>::format(std::to_string(value), ctx);
266
}
267
};
268
269
#endif
// GEN_GUARD_AD_RSS_STATE_PROPERRESPONSE
AccelerationRestriction.hpp
std::to_string
std::string to_string(::ad::rss::core::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition:
LateralRelativePosition.hpp:162
LateralResponse.hpp
LongitudinalResponse.hpp
ObjectIdVector.hpp
TimeIndex.hpp
UnstructuredConstellationResponse.hpp
ad::rss::state::LateralResponse
LateralResponse
DataType LateralResponse.
Definition:
LateralResponse.hpp:46
ad::rss::state::LongitudinalResponse
LongitudinalResponse
DataType LongitudinalResponse.
Definition:
LongitudinalResponse.hpp:46
ad::rss::state::operator<<
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition:
AccelerationRestriction.hpp:164
ad::rss::state::UnstructuredConstellationResponse
UnstructuredConstellationResponse
DataType UnstructuredConstellationResponse.
Definition:
UnstructuredConstellationResponse.hpp:44
ad::rss::world::ObjectIdVector
std::vector<::ad::rss::world::ObjectId > ObjectIdVector
DataType ObjectIdVector.
Definition:
ObjectIdVector.hpp:44
ad::rss::world::TimeIndex
uint64_t TimeIndex
DataType TimeIndex.
Definition:
TimeIndex.hpp:39
ad
namespace ad
Definition:
LateralRelativePosition.hpp:28
ad::rss::state::AccelerationRestriction
DataType AccelerationRestriction.
Definition:
AccelerationRestriction.hpp:43
ad::rss::state::ProperResponse
DataType ProperResponse.
Definition:
ProperResponse.hpp:50
ad::rss::state::ProperResponse::acceleration_restrictions
::ad::rss::state::AccelerationRestriction acceleration_restrictions
Definition:
ProperResponse.hpp:170
ad::rss::state::ProperResponse::longitudinal_response
::ad::rss::state::LongitudinalResponse longitudinal_response
Definition:
ProperResponse.hpp:149
ad::rss::state::ProperResponse::time_index
::ad::rss::world::TimeIndex time_index
Definition:
ProperResponse.hpp:133
ad::rss::state::ProperResponse::lateral_response_right
::ad::rss::state::LateralResponse lateral_response_right
Definition:
ProperResponse.hpp:154
ad::rss::state::ProperResponse::Ptr
std::shared_ptr< ProperResponse > Ptr
Smart pointer on ProperResponse.
Definition:
ProperResponse.hpp:54
ad::rss::state::ProperResponse::operator!=
bool operator!=(const ProperResponse &other) const
standard comparison operator
Definition:
ProperResponse.hpp:123
ad::rss::state::ProperResponse::dangerous_objects
::ad::rss::world::ObjectIdVector dangerous_objects
Definition:
ProperResponse.hpp:144
ad::rss::state::ProperResponse::lateral_response_left
::ad::rss::state::LateralResponse lateral_response_left
Definition:
ProperResponse.hpp:159
ad::rss::state::ProperResponse::heading_ranges
::ad::geometry::HeadingRangeVector heading_ranges
Definition:
ProperResponse.hpp:165
ad::rss::state::ProperResponse::operator=
ProperResponse & operator=(const ProperResponse &other)=default
standard assignment operator
ad::rss::state::ProperResponse::~ProperResponse
~ProperResponse()=default
standard destructor
ad::rss::state::ProperResponse::unstructured_constellation_response
::ad::rss::state::UnstructuredConstellationResponse unstructured_constellation_response
Definition:
ProperResponse.hpp:175
ad::rss::state::ProperResponse::ProperResponse
ProperResponse()=default
standard constructor
ad::rss::state::ProperResponse::operator==
bool operator==(const ProperResponse &other) const
standard comparison operator
Definition:
ProperResponse.hpp:106
ad::rss::state::ProperResponse::is_safe
bool is_safe
Definition:
ProperResponse.hpp:139
ad::rss::state::ProperResponse::ProperResponse
ProperResponse(ProperResponse &&other)=default
standard move constructor
ad::rss::state::ProperResponse::operator=
ProperResponse & operator=(ProperResponse &&other)=default
standard move operator
ad::rss::state::ProperResponse::ProperResponse
ProperResponse(const ProperResponse &other)=default
standard copy constructor
ad::rss::state::ProperResponse::ConstPtr
std::shared_ptr< ProperResponse const > ConstPtr
Smart pointer on constant ProperResponse.
Definition:
ProperResponse.hpp:59
Generated by
1.9.1