NVIDIA DriveOS Linux NSR SDK API Reference
7.0.3.0 Release
ducommon.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
3
*
4
* NVIDIA CORPORATION and its licensors retain all intellectual property
5
* and proprietary rights in and to this software, related documentation
6
* and any modifications thereto. Any use, reproduction, disclosure or
7
* distribution of this software and related documentation without an express
8
* license agreement from NVIDIA CORPORATION is strictly prohibited.
9
*/
10
17
#ifndef DUCOMMON_H_
18
#define DUCOMMON_H_
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
24
#include <stdint.h>
25
#include <stddef.h>
26
44
#define DU_UID_COMMON (0U)
45
46
#define DU_UID_TRANSPORT (1U)
47
48
#define DU_UID_LINK (2U)
49
50
#define DU_UID_TII (3U)
51
52
#define DU_UID_MASTER (4U)
53
54
#define DU_UID_BHC (5U)
55
56
#define DU_UID_RPE (6U)
57
58
#define DU_UID_CCHECK (7U)
59
60
#define DU_UID_AUTH (8U)
61
62
#define DU_UID_CONTENT (9U)
63
64
#define DU_UID_DECOMP (10U)
65
74
typedef
uint32_t
DU_RCODE
;
75
80
#define DU_ECODE(uid, suid, err) DU_ERR_CODE(uid, suid, err)
81
83
#define DU_ERR_UID_OFFSET (24U)
84
86
#define DU_ERR_UID_MASK ((uint32_t) 0xFFU)
87
89
#define DU_ERR_SUID_OFFSET (20U)
90
92
#define DU_ERR_SUID_MASK ((uint32_t) 0xFU)
93
95
#define DU_ERR_MASK ((uint32_t) 0xFFFFFU)
96
98
#define DU_ERR_CODE(uid, suid, err) \
99
(DU_RCODE)((((uid) & DU_ERR_UID_MASK) << DU_ERR_UID_OFFSET) | \
100
(((suid) & DU_ERR_SUID_MASK) << DU_ERR_SUID_OFFSET) | \
101
((err) & DU_ERR_MASK))
102
104
#define DU_ECODE_GET_UID(rcode) (((rcode) >> 24U) & 0xFFU)
105
106
#define DU_ECODE_GET_SUID(rcode) (((rcode) >> 20U) & 0xFU)
107
108
#define DU_ECODE_GET_ERR(rcode) ((rcode) & 0xFFFFFU)
109
111
#define DU_OK (DU_RCODE)(0U)
112
113
// Common error codes used by shared components only
114
#define DUCOMMON_ECODE(err) DU_ECODE(DU_UID_COMMON, 0U, (err))
115
116
#define DUCOMMON_ERR_GENERIC DUCOMMON_ECODE(1U)
117
#define DUCOMMON_ERR_INVALID_ARGUMENT DUCOMMON_ECODE(2U)
118
#define DUCOMMON_ERR_NOT_FOUND DUCOMMON_ECODE(3U)
119
#define DUCOMMON_ERR_BUFFER_TOO_SMALL DUCOMMON_ECODE(4U)
120
#define DUCOMMON_ERR_SYNTAX DUCOMMON_ECODE(5U)
121
123
#define DU_STR_LONG_BUF_SIZE (128U)
124
126
#define DU_STR_SHORT_BUF_SIZE (32U)
127
129
#define DU_PATH_MAX (512U)
130
132
#define DU_MAX_CMD_LEN (512U)
133
135
#define DU_1KB (1024U)
136
137
#define DU_2KB (2U * DU_1KB)
138
139
#define DU_4KB (4U * DU_1KB)
140
141
#define DU_8KB (8U * DU_1KB)
142
143
#define DU_16KB (16U * DU_1KB)
144
145
#define DU_32KB (32U * DU_1KB)
146
147
#define DU_64KB (64U * DU_1KB)
148
149
#define DU_128KB (128U * DU_1KB)
150
151
#define DU_256KB (256U * DU_1KB)
152
153
#define DU_512KB (512U * DU_1KB)
154
155
#define DU_1MB (1024U * DU_1KB)
156
157
159
typedef
enum
DU_RUN_LEVEL
160
{
165
RL_DORMANT
= 0U,
170
RL_MONITOR
,
176
RL_TELECAST
,
182
RL_XFER
,
188
RL_BG_APPLY
,
193
RL_FULL_APPLY
,
198
RL_UNRESTRICTED
,
202
RL_INVALID
,
203
}
DU_RUN_LEVEL
;
204
206
#define DU_RUNLEVEL_STR_MAX_SIZE (16U)
207
209
#ifdef __cplusplus
210
}
211
#endif
212
213
#endif // DUCOMMON_H_
RL_BG_APPLY
@ RL_BG_APPLY
Background apply run level.
Definition:
ducommon.h:188
RL_TELECAST
@ RL_TELECAST
Telecast run level.
Definition:
ducommon.h:176
RL_MONITOR
@ RL_MONITOR
Monitor run level.
Definition:
ducommon.h:170
RL_XFER
@ RL_XFER
Transfer run level.
Definition:
ducommon.h:182
DU_RCODE
uint32_t DU_RCODE
Drive Update error codes.
Definition:
ducommon.h:74
DU_RUN_LEVEL
DU_RUN_LEVEL
Defines the run level.
Definition:
ducommon.h:159
RL_INVALID
@ RL_INVALID
Invalid run level.
Definition:
ducommon.h:202
RL_DORMANT
@ RL_DORMANT
Dormant run level (default).
Definition:
ducommon.h:165
RL_FULL_APPLY
@ RL_FULL_APPLY
Full apply run level.
Definition:
ducommon.h:193
RL_UNRESTRICTED
@ RL_UNRESTRICTED
Unrestricted run level.
Definition:
ducommon.h:198
Privacy Policy
|
Manage My Privacy
|
Do Not Sell or Share My Data
|
Terms of Service
|
Accessibility
|
Corporate Policies
|
Product Security
|
Contact
© 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Subject to Change | For test and development only.
Thu May 8 2025 00:05:06 | PR-10721-6.0