Compute Graph Framework SDK Reference  5.12
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 setInputChannel(ChannelObject* channel, uint8_t portID, dwSerializationType dataType) override;
53
54 dwStatus setOutputChannel(ChannelObject* channel, uint8_t portID) override;
55
56 dwStatus validate() override;
57
58 dwStatus run() override;
59
60 size_t getPassCount() const noexcept override;
61
62 dwStatus runPass(size_t passIndex) override;
63
64 dwStatus getPass(Pass** pass, uint8_t index) override;
65
66 // coverity[autosar_cpp14_a2_10_5_violation] RFD Pending: TID-2053
67 dwStatus getPasses(VectorFixed<Pass*>& passList) override;
68
69 // coverity[autosar_cpp14_a2_10_5_violation] RFD Pending: TID-2053
70 dwStatus getPasses(VectorFixed<Pass*>& passList,
71 dwProcessorType processorType) override;
72
73 dwStatus setName(const char* name) override;
74
75 dwStatus getName(const char** name) override;
76
77 dwStatus getErrorSignal(dwGraphErrorSignal& sehErrorSignal, dwGraphErrorSignal*& errorSignal, uint16_t const sourceId, char8_t const* instanceName = nullptr) override;
78
79 dwStatus getHealthSignal(dwGraphHealthSignal*& healthSignal, bool updateFromModule = false) override;
80
81 dwStatus clearErrorSignal() override;
82
83 dwStatus clearHealthSignal() override;
84
85 dwStatus updateCurrentErrorSignal(dwGraphErrorSignal& signal) override;
86
88
89 dwStatus setIterationCount(uint32_t iterationCount) override final;
90
91 dwStatus setNodePeriod(uint32_t period) override final;
92
93 dwStatus setState(const char* state) override;
94
95 void resetPorts() override;
96
97 dwStatus getInputChannel(const uint8_t portID, ChannelObject*& channel) const override;
98
99 dwStatus getOutputChannel(const uint8_t portID, ChannelObject*& channel) const override;
100
101 dwStatus getInputPort(const uint8_t portID, dw::framework::PortBase*& port) const override;
102
103 dwStatus getOutputPort(const uint8_t portID, dw::framework::PortBase*& port) const override;
104
105protected:
106 std::unique_ptr<Node> m_impl;
107};
108
109// coverity[autosar_cpp14_a0_1_6_violation]
111{
112public:
113 explicit ExceptionSafeSensorNode(std::unique_ptr<Node> impl);
114
115 dwStatus start() override;
116
117 dwStatus stop() override;
118
119 dwStatus setAffinityMask(uint mask) override;
120
121 dwStatus setThreadPriority(int prio) override;
122
123 dwStatus setStartTime(dwTime_t startTime) override;
124
125 dwStatus setEndTime(dwTime_t endTime) override;
126
127 dwStatus isVirtual(bool* isVirtualBool) override;
128
130
132
134
135 dwStatus getNextTimestamp(dwTime_t& nextTimestamp) final;
136
137protected:
139};
140} // namespace framework
141} // namespace dw
142
143#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 updateCurrentHealthSignal(dwGraphHealthSignal &signal) override
dwStatus setNodePeriod(uint32_t period) override final
dwStatus setState(const char *state) override
dwStatus setOutputChannel(ChannelObject *channel, uint8_t portID) override
size_t getPassCount() const noexcept override
dwStatus getName(const char **name) override
dwStatus getErrorSignal(dwGraphErrorSignal &sehErrorSignal, dwGraphErrorSignal *&errorSignal, uint16_t const sourceId, char8_t const *instanceName=nullptr) 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 updateCurrentErrorSignal(dwGraphErrorSignal &signal) override
dwStatus getInputChannel(const uint8_t portID, ChannelObject *&channel) const override
dwStatus setEndTime(dwTime_t endTime) override
dwStatus isVirtual(bool *isVirtualBool) 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:377
dw::core::Function< void(DataEvent)> DataEventWriteCallback
Definition: Node.hpp:386
Pass is a runnable describes the metadata of a pass.
Definition: Pass.hpp:49
dwSerializationType
Definition: Types.hpp:43
constexpr size_t passIndex(dw::core::StringView identifier)
Get the the pass index for a pass identified by name.
dwTrivialDataType dataType
Number of levels in the pyramid.
Definition: Buffer.hpp:40