Compute Graph Framework SDK Reference
5.4.5418 Release
For Test and Development only

GraphHealthSignal.hpp
Go to the documentation of this file.
1 //
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) 2021 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_GRAPH_HEALTH_SIGNAL_HPP_
32 #define DW_FRAMEWORK_GRAPH_HEALTH_SIGNAL_HPP_
33 
34 #include <dw/core/base/Types.h>
35 
36 #include <ostream>
37 #include <sstream>
38 
39 namespace dw
40 {
41 namespace framework
42 {
43 
47 typedef enum dwGraphState {
48  DW_GRAPH_STATE_UNKNOWN = 0, //unable to determine health state
52 } dwGraphState;
53 
57 typedef enum dwGraphStateLevel {
58  DW_GRAPH_STATE_LEVEL_UNKNOWN = 0, //unable to determine level
64 
65 static const uint32_t DW_NODE_STATE_MAX_ERROR_STRING_LENGTH = 256;
66 static const uint32_t DW_NODE_STATE_MAX_KEY_VALUE_PAIR = 16;
67 static const uint32_t DW_NODE_STATE_MAX_ERROR_COUNT = 16;
68 
73 {
76 };
77 
82 {
83  // Time that this signal was generated
84  dwTime_t timestamp;
85 
86  // Graph State of this signal
88 
89  // Severity of this signal
91 
92  // Source is a string with the processName.NodeName.PassName format
93  // This is set at runtime by the process executing the node.
95 
96  // Optional key value pair for additional debuggability
97  uint32_t nValues;
99 };
100 
102 {
104  uint32_t count;
105 };
106 
107 // Helper functions for logging Graph Health Signals
108 std::ostream& operator<<(std::ostream& os, dwGraphState state);
109 std::ostream& operator<<(std::ostream& os, dwGraphStateLevel level);
110 std::ostream& operator<<(std::ostream& os, const dwGraphHealthSignal& signal);
111 }
112 }
113 
114 #endif // DW_FRAMEWORK_GRAPH_HEALTH_SIGNAL_HPP_
static const uint32_t DW_NODE_STATE_MAX_ERROR_STRING_LENGTH
dwGraphState
Enumerated levels describing the status of the graph.
Basic health signal that describes the health status of the graph.
static const uint32_t DW_NODE_STATE_MAX_KEY_VALUE_PAIR
dwGraphStateLevel
Enumerated levels of severity describing the consequence of the graph signal on the entire system...
char key[DW_NODE_STATE_MAX_ERROR_STRING_LENGTH]
char value[DW_NODE_STATE_MAX_ERROR_STRING_LENGTH]
std::ostream & operator<<(std::ostream &os, dwGraphState state)
Definition: Exception.hpp:46
static const uint32_t DW_NODE_STATE_MAX_ERROR_COUNT
Defines a pair of a key and value used to provide additional debugging information to the dwGraphHeal...