• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.22
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    ExceptionSafeNode.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 DW_FRAMEWORK_EXCEPTIONSAFENODE_HPP_
    32#define DW_FRAMEWORK_EXCEPTIONSAFENODE_HPP_
    33
    34#include <dwcgf/node/Node.hpp>
    35
    36namespace dw
    37{
    38namespace framework
    39{
    40// coverity[autosar_cpp14_a0_1_6_violation]
    42{
    43public:
    44 explicit ExceptionSafeProcessNode(std::unique_ptr<Node> impl);
    45
    46 ~ExceptionSafeProcessNode() override = default;
    47
    48 dwStatus reset() override;
    49
    50 dwStatus setInputChannel(ChannelObject* channel, size_t portID) override;
    51
    52 dwStatus setOutputChannel(ChannelObject* channel, size_t portID) override;
    53
    54 dwStatus validate() override;
    55
    56 // coverity[autosar_cpp14_a2_10_5_violation]
    57 dwStatus run() override;
    58
    59 size_t getPassCount() const noexcept override;
    60
    61 dwStatus runPass(size_t passIndex) override;
    62
    63 dwStatus getPass(Pass*& pass, size_t index) override;
    64
    65 // coverity[autosar_cpp14_a2_10_5_violation]
    66 dwStatus getPasses(VectorFixed<Pass*>& passList) override;
    67
    68 dwStatus setName(const char* name) override;
    69
    70 dwStatus getName(const char** name) override;
    71
    72 dwStatus collectErrorSignals(dwGraphErrorSignal*& errorSignal) override;
    73
    74 dwStatus getModuleErrorSignal(dwErrorSignal& errorSignal) override;
    75
    76 dwStatus getNodeErrorSignal(dwGraphErrorSignal& errorSignal) override;
    77
    78 dwStatus collectHealthSignals(dwGraphHealthSignal*& healthSignal) override;
    79
    80 dwStatus getModuleHealthSignal(dwHealthSignal& healthSignal) override;
    81
    82 dwStatus getNodeHealthSignal(dwGraphHealthSignal& healthSignal) override;
    83
    84 dwStatus clearErrorSignal() override;
    85
    86 dwStatus clearHealthSignal() override;
    87
    88 dwStatus updateCurrentErrorSignal(dwGraphErrorSignal& signal) override;
    89
    91
    92 // coverity[autosar_cpp14_a5_1_1_violation] RFD Accepted: TID-2056
    93 dwStatus addToErrorSignal(uint32_t error, dwTime_t timestamp = 0L) override;
    94
    95 // coverity[autosar_cpp14_a5_1_1_violation] RFD Accepted: TID-2056
    96 dwStatus addToHealthSignal(uint32_t error, dwTime_t timestamp = 0L) override;
    97
    98 dwStatus setIterationCount(uint32_t iterationCount) override final;
    99
    100 dwStatus setNodePeriod(uint32_t period) override final;
    101
    102 dwStatus setState(const char* state) override;
    103
    104 void resetPorts() override;
    105
    106 dwStatus getInputChannel(const size_t portID, ChannelObject*& channel) const override;
    107
    108 dwStatus getOutputChannel(const size_t portID, ChannelObject*& channel) const override;
    109
    110 dwStatus getInputPort(const size_t portID, dw::framework::PortBase*& port) const override;
    111
    112 dwStatus getOutputPort(const size_t portID, dw::framework::PortBase*& port) const override;
    113
    114 template <typename T>
    116 {
    117 return dynamic_cast<T&>(*m_impl);
    118 }
    119
    120protected:
    121 std::unique_ptr<Node> m_impl;
    122};
    123
    124// coverity[autosar_cpp14_a0_1_6_violation]
    126{
    127public:
    128 explicit ExceptionSafeSensorNode(std::unique_ptr<Node> impl);
    129
    130 dwStatus start() override;
    131
    132 dwStatus stop() override;
    133
    134 dwStatus setAffinityMask(uint mask) override;
    135
    136 dwStatus setThreadPriority(int prio) override;
    137
    138 dwStatus setStartTime(dwTime_t startTime) override;
    139
    140 dwStatus setEndTime(dwTime_t endTime) override;
    141
    142 dwStatus isVirtual(bool* isVirtualBool) override;
    143
    145
    147
    149
    150 dwStatus getNextTimestamp(dwTime_t& nextTimestamp) final;
    151
    152 dwStatus isEnabled(bool& isEnabled) override;
    153
    154protected:
    156};
    157} // namespace framework
    158} // namespace dw
    159
    160#endif // DW_FRAMEWORK_EXCEPTIONSAFENODE_HPP_
    Basic error signal that gets reported only when there is an error.
    Basic health signal that describes the health status of the graph.
    ~ExceptionSafeProcessNode() override=default
    dwStatus updateCurrentHealthSignal(dwGraphHealthSignal &signal) override
    dwStatus getModuleErrorSignal(dwErrorSignal &errorSignal) override
    dwStatus collectHealthSignals(dwGraphHealthSignal *&healthSignal) override
    dwStatus addToErrorSignal(uint32_t error, dwTime_t timestamp=0L) override
    dwStatus setNodePeriod(uint32_t period) override final
    dwStatus setState(const char *state) override
    dwStatus getNodeHealthSignal(dwGraphHealthSignal &healthSignal) override
    dwStatus getNodeErrorSignal(dwGraphErrorSignal &errorSignal) override
    size_t getPassCount() const noexcept override
    dwStatus getName(const char **name) override
    dwStatus getPass(Pass *&pass, size_t index) override
    ExceptionSafeProcessNode(std::unique_ptr< Node > impl)
    dwStatus getInputPort(const size_t portID, dw::framework::PortBase *&port) const override
    dwStatus runPass(size_t passIndex) override
    dwStatus setOutputChannel(ChannelObject *channel, size_t portID) override
    dwStatus getOutputChannel(const size_t portID, ChannelObject *&channel) const override
    dwStatus getModuleHealthSignal(dwHealthSignal &healthSignal) override
    dwStatus getInputChannel(const size_t portID, ChannelObject *&channel) const override
    dwStatus setIterationCount(uint32_t iterationCount) override final
    dwStatus addToHealthSignal(uint32_t error, dwTime_t timestamp=0L) override
    dwStatus setName(const char *name) override
    dwStatus getPasses(VectorFixed< Pass * > &passList) override
    dwStatus setInputChannel(ChannelObject *channel, size_t portID) override
    dwStatus updateCurrentErrorSignal(dwGraphErrorSignal &signal) override
    dwStatus collectErrorSignals(dwGraphErrorSignal *&errorSignal) override
    dwStatus getOutputPort(const size_t portID, dw::framework::PortBase *&port) const override
    dwStatus setEndTime(dwTime_t endTime) override
    dwStatus isVirtual(bool *isVirtualBool) override
    dwStatus isEnabled(bool &isEnabled) override
    dwStatus setDataEventWriteCallback(DataEventWriteCallback cb) override
    dwStatus setAffinityMask(uint mask) override
    ExceptionSafeSensorNode(std::unique_ptr< Node > impl)
    dwStatus setStartTime(dwTime_t startTime) override
    dwStatus setThreadPriority(int prio) override
    dwStatus setLockstepDeterministicMode(bool enable) final
    dwStatus getNextTimestamp(dwTime_t &nextTimestamp) final
    dwStatus setDataEventReadCallback(DataEventReadCallback cb) override
    dw::core::Function< bool(DataEvent &)> DataEventReadCallback
    Definition: Node.hpp:388
    dw::core::Function< void(DataEvent)> DataEventWriteCallback
    Definition: Node.hpp:397
    Pass is a runnable describes the metadata of a pass.
    Definition: Pass.hpp:50
    constexpr size_t passIndex(dw::core::StringView identifier)
    Get the the pass index for a pass identified by name.
    Definition: Buffer.hpp:41
    人人超碰97caoporen国产