NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
ducc.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 
19 #ifndef DUCC_H_
20 #define DUCC_H_
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #include <stdint.h>
27 #include "ducommon.h"
28 #include "dutransport.h"
29 
38 /* ---------------------- Types --------------------------------------------- */
42 typedef uint32_t DUCC_Error;
43 #define DUCC_Success (0x00000000U)
44 #define ERR_NotImplemented (0x00010000U)
45 #define ERR_InvalidArgument (0x00010001U)
46 #define ERR_NoPendingIMG (0x00010002U)
47 #define ERR_PathNotExist (0x00010003U)
48 #define ERR_OperationNotPermitted (0x00010004U)
49 #define ERR_BufferTooSmall (0x00010005U)
50 #define ERR_OperationRestrictedByConfig (0x00010006U)
51 #define ERR_Busy (0x00010007U)
52 #define ERR_UnableConnect (0x00020000U)
53 #define ERR_ConnectionLost (0x00020001U)
54 #define ERR_NoActiveConnection (0x00020002U)
55 #define ERR_InvalidResponse (0x00020003U)
56 
60 typedef uint32_t DUCC_PendingAction;
61 #define PA_NONE (0U)
62 #define PA_RUNLEVEL (1U)
63 #define PA_USERACTION (2U)
64 
68 typedef uint32_t DUCC_State;
70 #define STATE_DORMANT (0U)
71 
72 #define STATE_NO_CONNECTIVITY (1U)
73 
74 #define STATE_UP_TO_DATE (2U)
75 
76 #define STATE_UPDATE_AVAILABLE (3U)
77 
78 #define STATE_UPDATE_IN_PROGRESS (4U)
79 
80 #define STATE_UPDATE_FAILED (5U)
81 
82 #define STATE_FATAL_ERROR (6U)
83 #define NUM_DUCC_STATES (7U)
84 
88 typedef uint32_t DUCC_Locale;
90 #define DUCC_LOC_US (0U)
91 
93 typedef uint32_t DUCC_Image;
95 #define DUCC_IMG_CURRENT (0U)
96 
97 #define DUCC_IMG_PENDING (1U)
98 
100 #define PR_NONE (101U)
101 
102 #define PR_MAX (100U)
103 
104 #define FILEPATH_MAX (512U)
105 
110 #define DUCC_USERACTION_DEFAULT_SELECTION (0)
111 
115 typedef struct DUCC *PDUCC;
116 
121 typedef struct DUCC_Status
122 {
126  uint32_t progress;
131 } DUCC_Status;
132 
144 typedef void (*DUCCCallback)(void *pObj,
145  const DUCC_Status *pStatus);
146 
150 typedef struct optionEntry
151 {
153  uint32_t userActionID;
155  uint32_t contentOffset;
157  uint32_t contentLen;
158 } optionEntry;
159 
194 typedef struct optionBuffer
195 {
197  uint32_t numEntries;
200 } optionBuffer;
201 
205 typedef struct versionEntry
206 {
208  uint32_t nameOffset;
210  uint32_t nameLen;
212  uint32_t versionOffset;
214  uint32_t versionLen;
215 } versionEntry;
216 
220 typedef struct versionBuffer
221 {
223  uint32_t numEntries;
226 } versionBuffer;
227 
231 typedef struct infoEntry
232 {
234  uint32_t nameOffset;
236  uint32_t nameLen;
238  uint32_t contentOffset;
240  uint32_t contentLen;
241 } infoEntry;
242 
246 typedef struct infoBuffer
247 {
249  uint32_t numEntries;
252 } infoBuffer;
253 
254 /* -------------------- Function Declarations ------------------------------ */
314 (
315  DUTR_TR_TYPE trType,
316  DUTR_SEC_TYPE seType,
317  const PDUTR_TR_PARAM pTrParam,
318  const PDUTR_SEC_PARAM pSeParam,
319  PDUCC *ppDucc
320 );
321 
358 (
359  PDUCC pDuccInfo,
360  uint32_t *pVersion
361 );
362 
415 (
416  PDUCC pDuccInfo,
417  DU_RUN_LEVEL *pRunLevel
418 );
419 
473 (
474  PDUCC pDuccInfo,
475  DU_RUN_LEVEL reqRunLevel
476 );
477 
531 (
532  PDUCC pDuccInfo,
533  DUCC_Status *pStatus
534 );
535 
604 (
605  PDUCC pDuccInfo,
606  DUCC_Image image,
607  versionBuffer *pVersionBuf,
608  uint32_t *pVersionBufsize
609 );
610 
639 (
640  PDUCC pDuccInfo
641 );
643 #ifdef __cplusplus
644 }
645 #endif
646 
647 #endif
infoBuffer
struct infoBuffer infoBuffer
Refer to optionBuffer struct memory layout.
dutransport.h
NVIDIA DRIVE® Update DU-Transport library interface.
infoBuffer::numEntries
uint32_t numEntries
Number of entries in this buffer.
Definition: ducc.h:249
versionEntry::nameOffset
uint32_t nameOffset
Offset to start of name string.
Definition: ducc.h:208
optionBuffer::numEntries
uint32_t numEntries
Number of entries in this buffer.
Definition: ducc.h:197
infoEntry::contentLen
uint32_t contentLen
Length of content string.
Definition: ducc.h:240
versionBuffer::numEntries
uint32_t numEntries
Number of entries in this buffer.
Definition: ducc.h:223
versionEntry::nameLen
uint32_t nameLen
Length of name string.
Definition: ducc.h:210
DUCC_Status::pendingActionArgs
uint32_t pendingActionArgs
Pending action argument.
Definition: ducc.h:130
versionBuffer::pEntry
versionEntry * pEntry
Pointer to first versionEntry.
Definition: ducc.h:225
infoEntry::contentOffset
uint32_t contentOffset
Offset to start of content string.
Definition: ducc.h:238
infoBuffer::pEntry
infoEntry * pEntry
Pointer to first infoEntry.
Definition: ducc.h:251
infoEntry::nameOffset
uint32_t nameOffset
Offset to start of name string.
Definition: ducc.h:234
optionBuffer::pEntry
optionEntry * pEntry
Pointer to first optionEntry.
Definition: ducc.h:199
versionEntry
struct versionEntry versionEntry
Defines the entry inside version buffer header.
optionBuffer
Buffer for storing options.
Definition: ducc.h:194
infoEntry::nameLen
uint32_t nameLen
Length of name string.
Definition: ducc.h:236
DUCC_Get_Versions
DUCC_Error DUCC_Get_Versions(PDUCC pDuccInfo, DUCC_Image image, versionBuffer *pVersionBuf, uint32_t *pVersionBufsize)
DUCC_Request_RunLevel
DUCC_Error DUCC_Request_RunLevel(PDUCC pDuccInfo, DU_RUN_LEVEL reqRunLevel)
DUCC_State
uint32_t DUCC_State
States defined by DRIVE Update C&C interface.
Definition: ducc.h:68
DUTR_TR_TYPE
DUTR_TR_TYPE
Defines DU-Transport back-end transport protocols.
Definition: dutransport.h:48
optionBuffer
struct optionBuffer optionBuffer
Buffer for storing options.
DUCC_Init
DUCC_Error DUCC_Init(DUTR_TR_TYPE trType, DUTR_SEC_TYPE seType, const PDUTR_TR_PARAM pTrParam, const PDUTR_SEC_PARAM pSeParam, PDUCC *ppDucc)
DUCC_Image
uint32_t DUCC_Image
Defines the image installation states.
Definition: ducc.h:93
versionBuffer
struct versionBuffer versionBuffer
Refer to optionBuffer struct memory layout.
DU_RUN_LEVEL
DU_RUN_LEVEL
Defines the run level.
Definition: ducommon.h:159
DUCC_Close
DUCC_Error DUCC_Close(PDUCC pDuccInfo)
PDUTR_TR_PARAM
void * PDUTR_TR_PARAM
Holds the pointer to parameter of DU-Transport back-end protocols.
Definition: dutransport.h:145
versionEntry::versionLen
uint32_t versionLen
Length of version string.
Definition: ducc.h:214
DUCC_Locale
uint32_t DUCC_Locale
Defines the locales used to get content.
Definition: ducc.h:88
DUCC_Status::progress
uint32_t progress
Current progress of DRIVE Update. It indicates progress %, or nothing in progress (when not set).
Definition: ducc.h:126
PDUCC
struct DUCC * PDUCC
Defines the DRIVE Update C&C handle.
Definition: ducc.h:115
optionEntry
struct optionEntry optionEntry
Defines the entry inside option buffer header.
DUCC_Error
uint32_t DUCC_Error
Defines the return codes of DRIVE Update C&C library function calls.
Definition: ducc.h:42
optionEntry::contentLen
uint32_t contentLen
Length of content string.
Definition: ducc.h:157
DUCC_Status::pendingAction
DUCC_PendingAction pendingAction
Pending action of DRIVE Update. If set and applicable, it indicates that the installation progress re...
Definition: ducc.h:128
DUTR_SEC_TYPE
DUTR_SEC_TYPE
Defines DU-Transport security protocols.
Definition: dutransport.h:61
infoBuffer
Refer to optionBuffer struct memory layout.
Definition: ducc.h:246
infoEntry
struct infoEntry infoEntry
Defines the entry inside info buffer header.
void
typedef void(WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV)(const WFDDevice device
DUCC_Get_Current_RunLevel
DUCC_Error DUCC_Get_Current_RunLevel(PDUCC pDuccInfo, DU_RUN_LEVEL *pRunLevel)
optionEntry::userActionID
uint32_t userActionID
ID of userAction, use this to return user selection.
Definition: ducc.h:153
DUCC_PendingAction
uint32_t DUCC_PendingAction
Type of pending actions defined by DRIVE Update C&C interface.
Definition: ducc.h:60
DUCC_Get_Current_Status
DUCC_Error DUCC_Get_Current_Status(PDUCC pDuccInfo, DUCC_Status *pStatus)
optionEntry
Defines the entry inside option buffer header.
Definition: ducc.h:150
infoEntry
Defines the entry inside info buffer header.
Definition: ducc.h:231
optionEntry::contentOffset
uint32_t contentOffset
Offset to start of content string.
Definition: ducc.h:155
DUCC_Status
Defines the DRIVE Update status structure returned from library function call.
Definition: ducc.h:121
DUCC_Status
struct DUCC_Status DUCC_Status
Defines the DRIVE Update status structure returned from library function call.
versionEntry
Defines the entry inside version buffer header.
Definition: ducc.h:205
PDUTR_SEC_PARAM
void * PDUTR_SEC_PARAM
Definition: dutransport.h:75
DUCC_Status::state
DUCC_State state
Current state of DRIVE Update. It indicates operational state of Drive Update stack.
Definition: ducc.h:124
DUCCCallback
void(* DUCCCallback)(void *pObj, const DUCC_Status *pStatus)
Callback function when status changed.
Definition: ducc.h:144
DUCC_Get_API_Version
DUCC_Error DUCC_Get_API_Version(PDUCC pDuccInfo, uint32_t *pVersion)
ducommon.h
Common definitions and declarations for NVIDIA DRIVE® Update.
versionEntry::versionOffset
uint32_t versionOffset
Offset to start of version string.
Definition: ducc.h:212
versionBuffer
Refer to optionBuffer struct memory layout.
Definition: ducc.h:220