• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.14
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    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-2023 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};
    62
    76{
    77public:
    78 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    79 static constexpr auto describeInputPorts()
    80 {
    81 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    82 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    84 DW_DESCRIBE_PORT(dwGPSFrame, "GPS_FRAME"_sv),
    85 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv));
    86 };
    87 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    88 static constexpr auto describeOutputPorts()
    89 {
    90 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    91 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    93 DW_DESCRIBE_PORT(dwGlobalEgomotionState, "GLOBAL_EGOMOTION"_sv),
    94 DW_DESCRIBE_PORT(dwGlobalEgomotionResultPayload, "GLOBAL_EGOMOTION_RESULT_PAYLOAD"_sv));
    95 };
    96 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    97 static constexpr auto describePasses()
    98 {
    100 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
    101 describePass(StringView{"ADD_GPS"}, DW_PROCESSOR_TYPE_CPU),
    102 describePass(StringView{"ADD_RELATIVE_EGOMOTION"}, DW_PROCESSOR_TYPE_CPU),
    103 describePass(StringView{"SEND_STATE"}, DW_PROCESSOR_TYPE_CPU),
    104 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
    105 };
    106
    107 static std::unique_ptr<dwGlobalEgomotionNode> create(ParameterProvider& provider);
    108
    111 const dwContextHandle_t ctx);
    112
    113 dwStatus setAsyncReset() override
    114 {
    116 // coverity[autosar_cpp14_a8_5_2_violation] FP: nvbugs/3904083
    117 auto asyncResetNode = dynamic_cast<IAsyncResetable*>(m_impl.get());
    118 if (asyncResetNode != nullptr)
    119 {
    120 return asyncResetNode->setAsyncReset();
    121 }
    122 return DW_FAILURE;
    123 },
    124 dw::core::Logger::Verbosity::DEBUG);
    125 }
    126
    127 dwStatus executeAsyncReset() override
    128 {
    130 // coverity[autosar_cpp14_a8_5_2_violation] FP: nvbugs/3904083
    131 auto asyncResetNode = dynamic_cast<IAsyncResetable*>(m_impl.get());
    132 if (asyncResetNode != nullptr)
    133 {
    134 return asyncResetNode->executeAsyncReset();
    135 }
    136 return DW_FAILURE;
    137 },
    138 dw::core::Logger::Verbosity::DEBUG);
    139 }
    140
    141 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    142 static constexpr auto describeParameters()
    143 {
    144 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    145 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    146 return describeConstructorArguments<dwGlobalEgomotionNodeInitParams, dwContextHandle_t>(
    149 dwConstRigHandle_t,
    152 const char*,
    156 uint32_t,
    157 "historySize"_sv,
    161 dwContextHandle_t)));
    162 }
    163
    164 dwStatus preShutdown() override
    165 {
    166 // coverity[autosar_cpp14_a8_5_2_violation] FP: nvbugs/3904083
    167 auto* preShutdownNode = dynamic_cast<IContainsPreShutdownAction*>(m_impl.get());
    168 if (preShutdownNode)
    169 {
    170 return preShutdownNode->preShutdown();
    171 }
    172 return DW_NOT_SUPPORTED;
    173 }
    174};
    175}
    176}
    177
    178#endif // DWFRAMEWORK_DWNODES_EGOMOTION_DWGLOBALEGOMOTIONNODE_DWGLOBALEGOMOTIONNODE_HPP_
    #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, args...)
    static dwStatus guardWithReturn(TryBlock const &tryBlock, ::dw::core::Logger::Verbosity verbosity=::dw::core::Logger::Verbosity::ERROR)
    Definition: Exception.hpp:161
    virtual dwStatus setAsyncReset()=0
    Set the async reset flag.
    virtual dwStatus executeAsyncReset()=0
    Executes a reset if the async reset flag is set.
    virtual dwStatus preShutdown()=0
    actions to be taken before node shutdown
    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)
    constexpr auto describeConstructorArgument(const Args &&... args) -> dw::core::Tuple< Args... >
    constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
    constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
    constexpr PassDescriptorT< 0 > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
    Definition: Buffer.hpp:40
    人人超碰97caoporen国产