Compute Graph Framework SDK Reference  5.22
dwGlobalEgomotionNode.hpp
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
31#ifndef DWFRAMEWORK_DWNODES_EGOMOTION_DWGLOBALEGOMOTIONNODE_DWGLOBALEGOMOTIONNODE_HPP_
32#define DWFRAMEWORK_DWNODES_EGOMOTION_DWGLOBALEGOMOTIONNODE_DWGLOBALEGOMOTIONNODE_HPP_
33
34#include <dw/egomotion/base/Egomotion.h>
35#include <dw/egomotion/global/GlobalEgomotion.h>
36#include <dw/egomotion/global/GlobalEgomotionSerialization.h>
37#include <dw/roadcast/base_types/RoadCastPacketTypes.hpp>
39#include <dwcgf/node/Node.hpp>
42#include <dwcgf/pass/Pass.hpp>
44#include <dwcgf/port/Port.hpp>
46#include <dwframework/dwnodes/common/GlobalEgomotionCommonTypes.hpp>
47#include <dwframework/dwnodes/common/channelpackets/EgomotionState.hpp>
48#include <dwframework/dwnodes/common/channelpackets/GPS.hpp>
49#include <dwframework/dwnodes/common/channelpackets/GlobalEgomotionCommonTypes.hpp>
50
51namespace dw
52{
53namespace framework
54{
55
57{
58 dwConstRigHandle_t rigHandle;
59 const char* gpsSensorName;
60 uint32_t historySize;
61
64
73};
74
88{
89public:
90 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
91 static constexpr auto describeInputPorts()
92 {
93 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
94 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
96 DW_DESCRIBE_PORT(dwGPSFrame, "GPS_FRAME"_sv),
97 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv));
98 };
99 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
100 static constexpr auto describeOutputPorts()
101 {
102 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
103 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
105 DW_DESCRIBE_PORT(dwGlobalEgomotionState, "GLOBAL_EGOMOTION"_sv),
106 DW_DESCRIBE_PORT(dwGlobalEgomotionResultPayload, "GLOBAL_EGOMOTION_RESULT_PAYLOAD"_sv));
107 };
108 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
109 static constexpr auto describePasses()
110 {
112 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
113 describePass(StringView{"ADD_GPS"}, DW_PROCESSOR_TYPE_CPU),
114 describePass(StringView{"ADD_RELATIVE_EGOMOTION"}, DW_PROCESSOR_TYPE_CPU),
115 describePass(StringView{"SEND_STATE"}, DW_PROCESSOR_TYPE_CPU),
116 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
117 };
118
119 static std::unique_ptr<dwGlobalEgomotionNode> create(ParameterProvider& provider);
120
123 const dwContextHandle_t ctx);
124
125 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
126 static constexpr auto describeParameters()
127 {
128 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
129 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
131 describeConstructorArgument<dwGlobalEgomotionNodeInitParams>(
133 dwConstRigHandle_t,
136 const char*,
140 uint32_t,
141 "historySize"_sv,
144 dwTime_t,
145 "nvSciChannelWaitTimeUs"_sv,
146 0,
149 bool,
150 "sigPresenceGPSCourseAccuracy"_sv,
153 bool,
154 "sigPresenceGPSSpeedAccuracy"_sv,
157 bool,
158 "sigPresenceGPSJamState"_sv,
161 bool,
162 "sigPresenceGPSSpoofState"_sv,
165 bool,
166 "sigPresenceGPSHorizontalAccuracy"_sv,
169 bool,
170 "sigPresenceGPSVerticalAccuracy"_sv,
173 bool,
174 "sigPresenceGPSVerticalVelocity"_sv,
176 describeConstructorArgument<dwContextHandle_t>(
178 dwContextHandle_t)));
179 }
180
181 dwStatus preShutdown() override;
182};
183} // namespace framework
184} // namespace dw
185
186#endif // DWFRAMEWORK_DWNODES_EGOMOTION_DWGLOBALEGOMOTIONNODE_DWGLOBALEGOMOTIONNODE_HPP_
#define DW_DESCRIBE_PARAMETER_WITH_DEFAULT(TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PORT(TYPE_NAME, NAME, args...)
The interface to access parameter values identified by name and/or (semantic) type.
This node computes the global vehicle state and motion over time using signals from GPS and relative ...
dwGlobalEgomotionNode(const dwGlobalEgomotionNodeInitParams &params, const dwContextHandle_t ctx)
static std::unique_ptr< dwGlobalEgomotionNode > create(ParameterProvider &provider)
bool sigPresenceGPSCourseAccuracy
Signal presence parameters.
constexpr std::tuple describeConstructorArguments()
constexpr PassDescriptorT< 0 > describePass(dw::core::StringView &&name, dwProcessorType processorType)
dwTime_t nvSciChannelWaitTimeUs
Wait time for nvSciChannel.
constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
Definition: Buffer.hpp:41