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