• <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
    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-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 DW_FRAMEWORK_EXCEPTIONSAFENODE_HPP_
    32#define DW_FRAMEWORK_EXCEPTIONSAFENODE_HPP_
    33
    34#include <dwcgf/node/Node.hpp>
    35
    36namespace dw
    37{
    38namespace framework
    39{
    41{
    42public:
    43 explicit ExceptionSafeProcessNode(std::unique_ptr<Node> impl);
    44
    45 ~ExceptionSafeProcessNode() override = default;
    46
    47 dwStatus reset() override;
    48
    49 dwStatus setInputChannel(ChannelObject* channel, uint8_t portID) override;
    50
    51 dwStatus setInputChannel(ChannelObject* channel, uint8_t portID, dwSerializationType dataType) override;
    52
    53 dwStatus setOutputChannel(ChannelObject* channel, uint8_t portID) override;
    54
    55 dwStatus validate() override;
    56
    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, uint8_t index) override;
    64
    65 dwStatus getPasses(VectorFixed<Pass*>& passList) override;
    66
    67 dwStatus getPasses(VectorFixed<Pass*>& passList,
    68 dwProcessorType processorType,
    69 dwProcessType processType) override;
    70
    71 dwStatus setName(const char* name) override;
    72
    73 dwStatus getName(const char** name) override;
    74
    75 dwStatus getErrorSignal(dwGraphErrorSignal*& errorSignal) override;
    76
    77 dwStatus getHealthSignal(dwGraphHealthSignal*& healthSignal, bool updateFromModule = false) override;
    78
    79 dwStatus reportCurrentErrorSignal(dwGraphErrorSignal& signal) override;
    80
    82
    83 dwStatus setIterationCount(uint32_t iterationCount) override final;
    84
    85 dwStatus setNodePeriod(uint32_t period) override final;
    86
    87 dwStatus setState(const char* state) override;
    88
    89 void resetPorts() override;
    90
    91 dwStatus getInputChannel(const uint8_t portID, ChannelObject*& channel) const override;
    92
    93 dwStatus getOutputChannel(const uint8_t portID, ChannelObject*& channel) const override;
    94
    95 dwStatus getInputPort(const uint8_t portID, dw::framework::PortBase*& port) const override;
    96
    97 dwStatus getOutputPort(const uint8_t portID, dw::framework::PortBase*& port) const override;
    98
    99protected:
    100 std::unique_ptr<Node> m_impl;
    101};
    102
    104{
    105public:
    106 explicit ExceptionSafeSensorNode(std::unique_ptr<Node> impl);
    107
    108 ~ExceptionSafeSensorNode() override = default;
    109
    110 dwStatus reset() override;
    111
    112 dwStatus setInputChannel(ChannelObject* channel, uint8_t portID) override;
    113
    114 dwStatus setInputChannel(ChannelObject* channel, uint8_t portID, dwSerializationType dataType) override;
    115
    116 dwStatus setOutputChannel(ChannelObject* channel, uint8_t portID) override;
    117
    118 dwStatus validate() override;
    119
    120 dwStatus start() override;
    121
    122 dwStatus stop() override;
    123
    124 dwStatus setAffinityMask(uint mask) override;
    125
    126 dwStatus setThreadPriority(int prio) override;
    127
    128 dwStatus setStartTime(dwTime_t startTime) override;
    129
    130 dwStatus setEndTime(dwTime_t endTime) override;
    131
    132 dwStatus run() override;
    133
    134 size_t getPassCount() const noexcept override;
    135
    136 dwStatus runPass(size_t passIndex) override;
    137
    138 dwStatus getPass(Pass** pass, uint8_t index) override;
    139
    140 dwStatus getPasses(VectorFixed<Pass*>& passList) override;
    141
    142 dwStatus getPasses(VectorFixed<Pass*>& passList,
    143 dwProcessorType processorType,
    144 dwProcessType processType) override;
    145
    146 dwStatus setName(const char* name) override;
    147
    148 dwStatus getName(const char** name) override;
    149
    150 dwStatus isVirtual(bool* isVirtualBool) override;
    151
    152 dwStatus setDataEventReadCallback(DataEventReadCallback cb) override;
    153
    154 dwStatus setDataEventWriteCallback(DataEventWriteCallback cb) override;
    155
    156 dwStatus getErrorSignal(dwGraphErrorSignal*& errorSignal) override;
    157
    158 dwStatus getHealthSignal(dwGraphHealthSignal*& healthSignal, bool updateFromModule = false) override;
    159
    161
    163
    164 dwStatus setIterationCount(uint32_t iterationCount) override final;
    165
    166 dwStatus setNodePeriod(uint32_t period) override final;
    167
    168 dwStatus setState(const char* state) override;
    169
    170 void resetPorts() override;
    171
    172 dwStatus getInputChannel(const uint8_t portID, ChannelObject*& channel) const override;
    173
    174 dwStatus getOutputChannel(const uint8_t portID, ChannelObject*& channel) const override;
    175 void setNodeImple(std::unique_ptr<Node> impl);
    176
    177 dwStatus getInputPort(const uint8_t portID, dw::framework::PortBase*& port) const override;
    178
    179 dwStatus getOutputPort(const uint8_t portID, dw::framework::PortBase*& port) const override;
    180
    181 dwStatus setLockstepDeterministicMode(bool enable) final;
    182
    183 dwStatus getNextTimestamp(dwTime_t& nextTimestamp) final;
    184
    185protected:
    186 std::unique_ptr<Node> m_impl;
    187 ISensorNode* m_sensorNodeImpl;
    188};
    189} // namespace framework
    190} // namespace dw
    191
    192#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 setInputChannel(ChannelObject *channel, uint8_t portID, dwSerializationType dataType) override
    dwStatus reportCurrentErrorSignal(dwGraphErrorSignal &signal) override
    dwStatus setNodePeriod(uint32_t period) override final
    dwStatus setState(const char *state) override
    dwStatus getErrorSignal(dwGraphErrorSignal *&errorSignal) override
    dwStatus setOutputChannel(ChannelObject *channel, uint8_t portID) override
    size_t getPassCount() const noexcept override
    dwStatus getName(const char **name) override
    dwStatus getInputPort(const uint8_t portID, dw::framework::PortBase *&port) const override
    ExceptionSafeProcessNode(std::unique_ptr< Node > impl)
    dwStatus getPass(Pass **pass, uint8_t index) override
    dwStatus runPass(size_t passIndex) override
    dwStatus setIterationCount(uint32_t iterationCount) override final
    dwStatus getOutputPort(const uint8_t portID, dw::framework::PortBase *&port) const override
    dwStatus setName(const char *name) override
    dwStatus getPasses(VectorFixed< Pass * > &passList) override
    dwStatus setInputChannel(ChannelObject *channel, uint8_t portID) override
    dwStatus getOutputChannel(const uint8_t portID, ChannelObject *&channel) const override
    dwStatus getHealthSignal(dwGraphHealthSignal *&healthSignal, bool updateFromModule=false) override
    dwStatus getInputChannel(const uint8_t portID, ChannelObject *&channel) const override
    dwStatus reportCurrentHealthSignal(dwGraphHealthSignal &signal) override
    dwStatus setEndTime(dwTime_t endTime) override
    ~ExceptionSafeSensorNode() override=default
    dwStatus setOutputChannel(ChannelObject *channel, uint8_t portID) override
    size_t getPassCount() const noexcept override
    dwStatus setInputChannel(ChannelObject *channel, uint8_t portID, dwSerializationType dataType) override
    dwStatus setAffinityMask(uint mask) override
    dwStatus setInputChannel(ChannelObject *channel, uint8_t portID) override
    ExceptionSafeSensorNode(std::unique_ptr< Node > impl)
    dwStatus setStartTime(dwTime_t startTime) override
    dwStatus setThreadPriority(int prio) override
    dw::core::Function< bool(DataEvent &)> DataEventReadCallback
    Definition: Node.hpp:353
    dw::core::Function< void(DataEvent)> DataEventWriteCallback
    Definition: Node.hpp:362
    Pass is a runnable describes the metadata of a pass.
    Definition: Pass.hpp:49
    constexpr size_t passIndex(dw::core::StringView identifier)
    Get the the pass index for a pass identified by name.
    dwSerializationType
    Definition: Types.hpp:42
    dwTrivialDataType dataType
    Number of levels in the pyramid.
    Definition: Buffer.hpp:40
    人人超碰97caoporen国产