Compute Graph Framework SDK Reference  5.16
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-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 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 dwStatus run() override;
57
58 size_t getPassCount() const noexcept override;
59
60 dwStatus runPass(size_t passIndex) override;
61
62 dwStatus getPass(Pass** pass, size_t index) override;
63
64 // coverity[autosar_cpp14_a2_10_5_violation] RFD Pending: TID-2053
65 dwStatus getPasses(VectorFixed<Pass*>& passList) override;
66
67 dwStatus setName(const char* name) override;
68
69 dwStatus getName(const char** name) override;
70
71 dwStatus collectErrorSignals(dwGraphErrorSignal*& errorSignal, bool updateFromModule = true) override;
72
73 dwStatus getModuleErrorSignal(dwErrorSignal& errorSignal) override;
74
75 dwStatus getNodeErrorSignal(dwGraphErrorSignal& errorSignal) override;
76
77 dwStatus collectHealthSignals(dwGraphHealthSignal*& healthSignal, bool updateFromModule = false) override;
78
79 dwStatus getModuleHealthSignal(dwHealthSignal& healthSignal) override;
80
81 dwStatus getNodeHealthSignal(dwGraphHealthSignal& healthSignal) override;
82
83 dwStatus clearErrorSignal() override;
84
85 dwStatus clearHealthSignal() override;
86
87 dwStatus updateCurrentErrorSignal(dwGraphErrorSignal& signal) override;
88
90
91 // coverity[autosar_cpp14_a5_1_1_violation] RFD Accepted: TID-2056
92 dwStatus addToErrorSignal(uint32_t error, dwTime_t timestamp = 0L) override;
93
94 // coverity[autosar_cpp14_a5_1_1_violation] RFD Accepted: TID-2056
95 dwStatus addToHealthSignal(uint32_t error, dwTime_t timestamp = 0L) override;
96
97 dwStatus setIterationCount(uint32_t iterationCount) override final;
98
99 dwStatus setNodePeriod(uint32_t period) override final;
100
101 dwStatus setState(const char* state) override;
102
103 void resetPorts() override;
104
105 dwStatus getInputChannel(const size_t portID, ChannelObject*& channel) const override;
106
107 dwStatus getOutputChannel(const size_t portID, ChannelObject*& channel) const override;
108
109 dwStatus getInputPort(const size_t portID, dw::framework::PortBase*& port) const override;
110
111 dwStatus getOutputPort(const size_t portID, dw::framework::PortBase*& port) const override;
112
113protected:
114 std::unique_ptr<Node> m_impl;
115};
116
117// coverity[autosar_cpp14_a0_1_6_violation]
119{
120public:
121 explicit ExceptionSafeSensorNode(std::unique_ptr<Node> impl);
122
123 dwStatus start() override;
124
125 dwStatus stop() override;
126
127 dwStatus setAffinityMask(uint mask) override;
128
129 dwStatus setThreadPriority(int prio) override;
130
131 dwStatus setStartTime(dwTime_t startTime) override;
132
133 dwStatus setEndTime(dwTime_t endTime) override;
134
135 dwStatus isVirtual(bool* isVirtualBool) override;
136
138
140
142
143 dwStatus getNextTimestamp(dwTime_t& nextTimestamp) final;
144
145 dwStatus isEnabled(bool& isEnabled) override;
146
147protected:
149};
150} // namespace framework
151} // namespace dw
152
153#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 addToErrorSignal(uint32_t error, dwTime_t timestamp=0L) override
dwStatus collectErrorSignals(dwGraphErrorSignal *&errorSignal, bool updateFromModule=true) 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
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 getPass(Pass **pass, size_t index) 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 collectHealthSignals(dwGraphHealthSignal *&healthSignal, bool updateFromModule=false) 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:389
dw::core::Function< void(DataEvent)> DataEventWriteCallback
Definition: Node.hpp:398
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:40