Proactive Safety Framework  1.0
pss_daemon.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11 */
12 
13 #ifndef PSS_DAEMON_H
14 #define PSS_DAEMON_H
15 
16 #include "pss_protocol.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 typedef enum NvPSSDStatus_t
23 {
27 
28 /*
29  * @brief Register a PSS client.
30  * @description This function allows a client to register with the PSS, specifying which sensor it will be monitoring.
31  *
32  * @param clientId A unique identifier for the client/sensor.
33  *
34  * @return A boolean indicating whether the registration was successful.
35  */
36 NvPSSDErr NvPSSRegisterPSSClient(uint32_t* clientId);
37 
38 /*
39  * @brief Terminate a PSS client.
40  * @description This function allows a client to unregister from the PSS, typically when it's shutting down or no longer needs to monitor sensor.
41  *
42  * @param clientId The ID of the client to be terminated.
43  *
44  * @return A boolean indicating whether the client was successfully terminated.
45  */
46 NvPSSDErr NvPSSTerminatePSSClient(const uint32_t clientId);
47 
48 /*
49  * @brief Report a safety event.
50  * @dexcription Clients use this function to report safety events to the PSS when they detect potential hazards.
51  *
52  * @param clientId The ID of the client reporting the event.
53  * @param event A SafetyEvent structure containing details about the detected safety event.
54  *
55  * @return A boolean indicating whether the event was successfully reported.
56  */
57 NvPSSDErr NvPSSReportSafetyEvent(const uint32_t clientId, const SafetyEvent* event);
58 
59 /*
60  * @brief Report a sensor failure.
61  * @description Clients use this function to inform the PSS about sensor failures, which could affect the overall system safety assessment.
62  *
63  * @param clientId The ID of the client reporting the sensor failure.
64  * @return A boolean indicating whether the sensor failure was successfully reported.
65  */
66 NvPSSDErr NvPSSReportSensorFailure(const uint32_t clientId);
67 
68 // Functions for exchanging heartbeat messages
69 // Callbacks for receiving SW/HW error reports
70 // Functions to log to PSB
71 // Functions to update Configuration Data
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif
78 
NvPSSDErr NvPSSReportSensorFailure(const uint32_t clientId)
NvPSSDErr NvPSSRegisterPSSClient(uint32_t *clientId)
NvPSSDErr NvPSSReportSafetyEvent(const uint32_t clientId, const SafetyEvent *event)
NvPSSDErr NvPSSTerminatePSSClient(const uint32_t clientId)
NvPSSDErr
Definition: pss_daemon.h:23
@ NVPSSD_SUCCESS
Definition: pss_daemon.h:24
@ NVPSSD_FAIL
Definition: pss_daemon.h:25
Structure for safety event data with fusion support.
Definition: pss_protocol.h:137