NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
E2EP04.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025-2026 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 
29 #ifndef DW_CORE_UTILITY_E2EP04_H_
30 #define DW_CORE_UTILITY_E2EP04_H_
31 
32 #include <dw/core/base/Exports.h>
33 #include <dw/core/base/Types.h>
34 #include <dw/core/base/Status.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
42 typedef enum {
44  INVALID = 0,
49 } E2EDataID;
50 
52 typedef enum {
53  STATUS_OK = 0x00U,
54  INPUTERR_NULL = 0x13U,
56 } E2EStatus;
57 
60 typedef struct E2EP04Config
61 {
63  uint32_t dataID;
64 
69  uint16_t offset;
70 
73  uint16_t minDataLength;
74 
77  uint16_t maxDataLength;
78 
80  uint8_t maxDeltaCounter;
81 } E2EP04Config;
82 
84 typedef enum {
87  OK = 0x00U,
88 
93  NONEWDATA = 0x01U,
94 
97 
99  REPEATED = 0x08U,
100 
103  OKSOMELOST = 0x20U,
104 
109 
111 typedef struct dwE2EP04ProtectObject* dwE2EP04ProtectHandle_t;
112 
114 typedef struct dwE2EP04CheckObject* dwE2EP04CheckHandle_t;
115 
133 dwStatus dwE2EP04Protect_initialize(dwE2EP04ProtectHandle_t* const protect, const uint32_t dataID, const uint8_t maxDeltaCounter, const uint16_t offset, const uint16_t minDataLength, const uint16_t maxDataLength);
134 
150 
165 dwStatus dwE2EP04Protect_getConfig(E2EP04Config const** const config, dwE2EP04ProtectHandle_t const protect);
166 
182 
201 dwStatus dwE2EP04Protect_protect(E2EStatus* const e2eStatus, void* dataPtr, const uint16_t length, dwE2EP04ProtectHandle_t const protect);
202 
216 
234 dwStatus dwE2EP04Check_initialize(dwE2EP04CheckHandle_t* const check, uint32_t dataID, uint8_t maxDeltaCounter, uint16_t offset, uint16_t minDataLength, const uint16_t maxDataLength);
235 
250 
265 dwStatus dwE2EP04Check_getConfig(E2EP04Config const** const config, dwE2EP04CheckHandle_t const check);
266 
282 
300 dwStatus dwE2EP04Check_check(E2EStatus* const e2eStatus, void* const dataPtr, uint16_t const length, dwE2EP04CheckHandle_t const check);
301 
316 dwStatus dwE2EP04Check_getCheckStatus(E2EP04CheckStatus const** const e2eCheckStatus, dwE2EP04CheckHandle_t const check);
317 
331 
332 #ifdef __cplusplus
333 }
334 #endif
335 
338 #endif // DW_CORE_UTILITY_E2EP04_H_
dwE2EP04Protect_getConfig
DW_API_PUBLIC dwStatus dwE2EP04Protect_getConfig(E2EP04Config const **const config, dwE2EP04ProtectHandle_t const protect)
Get the current config from E2E Profile 4 protect handle.
E2EP04Config::offset
uint16_t offset
Bit offset of the first bit of the E2E header from the beginning of the Data (bit numbering: bit 0 is...
Definition: E2EP04.h:69
INVALID
@ INVALID
invalid data id
Definition: E2EP04.h:44
Types.h
CHECK_STATUS_ERROR
@ CHECK_STATUS_ERROR
Error. Error not related to counters occurred (e.g. wrong crc, wrong length, wrong options,...
Definition: E2EP04.h:96
STATUS_OK
@ STATUS_OK
Definition: E2EP04.h:53
INPUTERR_WRONG
@ INPUTERR_WRONG
Definition: E2EP04.h:55
dwE2EP04Protect_configVerify
DW_API_PUBLIC dwStatus dwE2EP04Protect_configVerify(E2EStatus *const e2eStatus, dwE2EP04ProtectHandle_t const protect)
Verify the config of E2E Profile 4 protect handle.
NONEWDATA
@ NONEWDATA
Error.
Definition: E2EP04.h:93
E2EStatus
E2EStatus
E2E function return status.
Definition: E2EP04.h:52
E2EP04Config::maxDataLength
uint16_t maxDataLength
Maximal length of Data, in bits.
Definition: E2EP04.h:77
WRONGSEQUENCE
@ WRONGSEQUENCE
Error.
Definition: E2EP04.h:107
REPEATED
@ REPEATED
Error. The checks of the Data in this cycle were successful, with the exception of the repetition.
Definition: E2EP04.h:99
Exports.h
dwE2EP04Check_initialize
DW_API_PUBLIC dwStatus dwE2EP04Check_initialize(dwE2EP04CheckHandle_t *const check, uint32_t dataID, uint8_t maxDeltaCounter, uint16_t offset, uint16_t minDataLength, const uint16_t maxDataLength)
Creates a E2E Profile 4 check handle.
E2EP04Config::dataID
uint32_t dataID
A system-unique identifier of the Data.
Definition: E2EP04.h:63
dwE2EP04CheckHandle_t
struct dwE2EP04CheckObject * dwE2EP04CheckHandle_t
Handle represents a dwE2EP04Check object.
Definition: E2EP04.h:114
VIO_ASIL_COMMAND
@ VIO_ASIL_COMMAND
data id for dwVehicleIOASILCommandE2EWrapper
Definition: E2EP04.h:48
dwE2EP04Check_getCheckStatus
DW_API_PUBLIC dwStatus dwE2EP04Check_getCheckStatus(E2EP04CheckStatus const **const e2eCheckStatus, dwE2EP04CheckHandle_t const check)
Retrieve the latest check status of E2E Profile 4 check handle.
dwE2EP04Protect_protect
DW_API_PUBLIC dwStatus dwE2EP04Protect_protect(E2EStatus *const e2eStatus, void *dataPtr, const uint16_t length, dwE2EP04ProtectHandle_t const protect)
Protects the array/buffer to be transmitted using the E2E profile 4.
OK
@ OK
OK.
Definition: E2EP04.h:87
dwE2EP04Check_initializeFromConfig
DW_API_PUBLIC dwStatus dwE2EP04Check_initializeFromConfig(dwE2EP04CheckHandle_t *const check, E2EP04Config const *const config)
Creates a E2E Profile 4 check handle from config.
E2EP04Config
struct E2EP04Config E2EP04Config
Configuration of transmitted Data (Data Element), for E2E Profile 4.
E2EP04Config::minDataLength
uint16_t minDataLength
Minimal length of Data, in bits.
Definition: E2EP04.h:73
dwE2EP04Check_release
DW_API_PUBLIC dwStatus dwE2EP04Check_release(dwE2EP04CheckHandle_t const check)
Releases a E2E Profile 4 check handle.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:32
dwE2EP04Check_check
DW_API_PUBLIC dwStatus dwE2EP04Check_check(E2EStatus *const e2eStatus, void *const dataPtr, uint16_t const length, dwE2EP04CheckHandle_t const check)
Checks the Data received using the E2E profile 4 check handle.
dwE2EP04Check_configVerify
DW_API_PUBLIC dwStatus dwE2EP04Check_configVerify(E2EStatus *const e2eStatus, dwE2EP04CheckHandle_t const check)
Verify the config of E2E Profile 4 check handle.
dwE2EP04Check_getConfig
DW_API_PUBLIC dwStatus dwE2EP04Check_getConfig(E2EP04Config const **const config, dwE2EP04CheckHandle_t const check)
Get the current config from E2E Profile 4 check handle.
E2EP04Config
Configuration of transmitted Data (Data Element), for E2E Profile 4.
Definition: E2EP04.h:60
INPUTERR_NULL
@ INPUTERR_NULL
Definition: E2EP04.h:54
E2EP04CheckStatus
E2EP04CheckStatus
Status of the reception on one single Data in one cycle, protected with E2E Profile 4.
Definition: E2EP04.h:84
OKSOMELOST
@ OKSOMELOST
OK.
Definition: E2EP04.h:103
dwE2EP04Protect_release
DW_API_PUBLIC dwStatus dwE2EP04Protect_release(dwE2EP04ProtectHandle_t const protect)
Releases a E2E Profile 4 protect handle.
dwE2EP04Protect_initializeFromConfig
DW_API_PUBLIC dwStatus dwE2EP04Protect_initializeFromConfig(dwE2EP04ProtectHandle_t *const protect, E2EP04Config const *const config)
Creates an E2E Profile 4 protect handle from config.
Status.h
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: core/base/Exports.h:57
E2EP04Config::maxDeltaCounter
uint8_t maxDeltaCounter
Maximum allowed gap between two counter values of two consecutively received valid Data.
Definition: E2EP04.h:80
dwE2EP04ProtectHandle_t
struct dwE2EP04ProtectObject * dwE2EP04ProtectHandle_t
Handle represents a dwE2EP04Protect object.
Definition: E2EP04.h:111
E2EDataID
E2EDataID
Define a system-unique identifier of the Data.
Definition: E2EP04.h:42
VIO_ASIL_STATE
@ VIO_ASIL_STATE
data id for dwVehicleIOASILStateE2EWrapper structure
Definition: E2EP04.h:46
dwE2EP04Protect_initialize
DW_API_PUBLIC dwStatus dwE2EP04Protect_initialize(dwE2EP04ProtectHandle_t *const protect, const uint32_t dataID, const uint8_t maxDeltaCounter, const uint16_t offset, const uint16_t minDataLength, const uint16_t maxDataLength)
Creates an E2E Profile 4 protect handle.
E2EStructures.h