• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.10
    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-2022 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/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>
    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 static constexpr auto describeInputPorts()
    79 {
    81 DW_DESCRIBE_PORT(dwGPSFrame, "GPS_FRAME"_sv),
    82 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv));
    83 };
    84 static constexpr auto describeOutputPorts()
    85 {
    87 DW_DESCRIBE_PORT(dwGlobalEgomotionState, "GLOBAL_EGOMOTION"_sv),
    88 DW_DESCRIBE_PORT(dwGlobalEgomotionResultPayload, "GLOBAL_EGOMOTION_RESULT_PAYLOAD"_sv));
    89 };
    90 static constexpr auto describePasses()
    91 {
    93 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
    94 describePass("ADD_GPS"_sv, DW_PROCESSOR_TYPE_CPU),
    95 describePass("ADD_RELATIVE_EGOMOTION"_sv, DW_PROCESSOR_TYPE_CPU),
    96 describePass("SEND_STATE"_sv, DW_PROCESSOR_TYPE_CPU),
    97 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
    98 };
    99
    100 static std::unique_ptr<dwGlobalEgomotionNode> create(ParameterProvider& provider);
    101
    104 const dwContextHandle_t ctx);
    105
    106 dwStatus setAsyncReset() override
    107 {
    108 return Exception::guardWithReturn([&]() {
    109 auto asyncResetNode = dynamic_cast<IAsyncResetable*>(m_impl.get());
    110 if (asyncResetNode != nullptr)
    111 {
    112 return asyncResetNode->setAsyncReset();
    113 }
    114 return DW_FAILURE;
    115 },
    116 dw::core::Logger::Verbosity::DEBUG);
    117 }
    118
    119 dwStatus executeAsyncReset() override
    120 {
    121 return Exception::guardWithReturn([&]() {
    122 auto asyncResetNode = dynamic_cast<IAsyncResetable*>(m_impl.get());
    123 if (asyncResetNode != nullptr)
    124 {
    125 return asyncResetNode->executeAsyncReset();
    126 }
    127 return DW_FAILURE;
    128 },
    129 dw::core::Logger::Verbosity::DEBUG);
    130 }
    131
    132 static constexpr auto describeParameters()
    133 {
    134 return describeConstructorArguments<dwGlobalEgomotionNodeInitParams, dwContextHandle_t>(
    137 dwConstRigHandle_t,
    140 const char*,
    144 uint32_t,
    145 "historySize"_sv,
    149 dwContextHandle_t)));
    150 }
    151
    152 dwStatus preShutdown() override
    153 {
    154 auto* preShutdownNode = dynamic_cast<IContainsPreShutdownAction*>(m_impl.get());
    155 if (preShutdownNode)
    156 {
    157 return preShutdownNode->preShutdown();
    158 }
    159 return DW_NOT_SUPPORTED;
    160 }
    161};
    162}
    163}
    164
    165#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...)
    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 describePortCollection(Args &&... args)
    constexpr std::tuple< dw::core::StringView, dwProcessorType > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
    constexpr auto describeConstructorArgument(const Args &&... args)
    constexpr auto describePassCollection(const Args &&... args)
    Definition: Buffer.hpp:40
    人人超碰97caoporen国产