NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
Command and Control API

Detailed Description

This file declares APIs for the NVIDIA DRIVE® Update library 'libnvducc.so'.

Data Structures

struct  DUCC_Status
 Defines the DRIVE Update status structure returned from library function call. More...
 
struct  optionEntry
 Defines the entry inside option buffer header. More...
 
struct  optionBuffer
 Buffer for storing options. More...
 
struct  versionEntry
 Defines the entry inside version buffer header. More...
 
struct  versionBuffer
 Refer to optionBuffer struct memory layout. More...
 
struct  infoEntry
 Defines the entry inside info buffer header. More...
 
struct  infoBuffer
 Refer to optionBuffer struct memory layout. More...
 
interface  DU
 Initialize C&C connection to the DRIVE Update Master. More...
 

Macros

#define DUCC_Success   (0x00000000U)
 
#define ERR_NotImplemented   (0x00010000U)
 
#define ERR_InvalidArgument   (0x00010001U)
 
#define ERR_NoPendingIMG   (0x00010002U)
 
#define ERR_PathNotExist   (0x00010003U)
 
#define ERR_OperationNotPermitted   (0x00010004U)
 
#define ERR_BufferTooSmall   (0x00010005U)
 
#define ERR_OperationRestrictedByConfig   (0x00010006U)
 
#define ERR_Busy   (0x00010007U)
 
#define ERR_UnableConnect   (0x00020000U)
 
#define ERR_ConnectionLost   (0x00020001U)
 
#define ERR_NoActiveConnection   (0x00020002U)
 
#define ERR_InvalidResponse   (0x00020003U)
 
#define PA_NONE   (0U)
 
#define PA_RUNLEVEL   (1U)
 
#define PA_USERACTION   (2U)
 
#define STATE_DORMANT   (0U)
 DRIVE Update is dormant and not connected. More...
 
#define STATE_NO_CONNECTIVITY   (1U)
 OTA is unable to connect to the cloud. More...
 
#define STATE_UP_TO_DATE   (2U)
 OTA is connected to the cloud. More...
 
#define STATE_UPDATE_AVAILABLE   (3U)
 OTA is connected to the cloud. More...
 
#define STATE_UPDATE_IN_PROGRESS   (4U)
 Update Installation is either in progress or paused awaiting user action or specified RunLevel. More...
 
#define STATE_UPDATE_FAILED   (5U)
 Last update failed and the cloud does not have any alternative updates to try or re-try. More...
 
#define STATE_FATAL_ERROR   (6U)
 Last update failed in a way which DOTA cannot recover. More...
 
#define NUM_DUCC_STATES   (7U)
 
#define DUCC_LOC_US   (0U)
 Defines the US locale. More...
 
#define DUCC_IMG_CURRENT   (0U)
 Defines the currently installed image state. More...
 
#define DUCC_IMG_PENDING   (1U)
 Defines the image pending installation state. More...
 
#define PR_NONE   (101U)
 Indicates no progress or progress not defined. More...
 
#define PR_MAX   (100U)
 Indicates progress number when it reaches 100%. More...
 
#define FILEPATH_MAX   (512U)
 Defines the max length of the file path. More...
 
#define DUCC_USERACTION_DEFAULT_SELECTION   (0)
 Default option for user actions, which will accept any terms or otherwise continue the installation process whenever applicable. More...
 

Typedefs

typedef uint32_t DUCC_Error
 Defines the return codes of DRIVE Update C&C library function calls. More...
 
typedef uint32_t DUCC_PendingAction
 Type of pending actions defined by DRIVE Update C&C interface. More...
 
typedef uint32_t DUCC_State
 States defined by DRIVE Update C&C interface. More...
 
typedef uint32_t DUCC_Locale
 Defines the locales used to get content. More...
 
typedef uint32_t DUCC_Image
 Defines the image installation states. More...
 
typedef struct DUCC * PDUCC
 Defines the DRIVE Update C&C handle. More...
 
typedef struct DUCC_Status DUCC_Status
 Defines the DRIVE Update status structure returned from library function call. More...
 
typedef void(* DUCCCallback) (void *pObj, const DUCC_Status *pStatus)
 Callback function when status changed. More...
 
typedef struct optionEntry optionEntry
 Defines the entry inside option buffer header. More...
 
typedef struct optionBuffer optionBuffer
 Buffer for storing options. More...
 
typedef struct versionEntry versionEntry
 Defines the entry inside version buffer header. More...
 
typedef struct versionBuffer versionBuffer
 Refer to optionBuffer struct memory layout. More...
 
typedef struct infoEntry infoEntry
 Defines the entry inside info buffer header. More...
 
typedef struct infoBuffer infoBuffer
 Refer to optionBuffer struct memory layout. More...
 

Functions

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_Error DUCC_Get_API_Version (PDUCC pDuccInfo, uint32_t *pVersion)
 
DUCC_Error DUCC_Get_Current_RunLevel (PDUCC pDuccInfo, DU_RUN_LEVEL *pRunLevel)
 
DUCC_Error DUCC_Request_RunLevel (PDUCC pDuccInfo, DU_RUN_LEVEL reqRunLevel)
 
DUCC_Error DUCC_Get_Current_Status (PDUCC pDuccInfo, DUCC_Status *pStatus)
 
DUCC_Error DUCC_Get_Versions (PDUCC pDuccInfo, DUCC_Image image, versionBuffer *pVersionBuf, uint32_t *pVersionBufsize)
 
DUCC_Error DUCC_Close (PDUCC pDuccInfo)
 

Macro Definition Documentation

◆ DUCC_IMG_CURRENT

#define DUCC_IMG_CURRENT   (0U)

Defines the currently installed image state.

Definition at line 95 of file ducc.h.

◆ DUCC_IMG_PENDING

#define DUCC_IMG_PENDING   (1U)

Defines the image pending installation state.

Definition at line 97 of file ducc.h.

◆ DUCC_LOC_US

#define DUCC_LOC_US   (0U)

Defines the US locale.

Definition at line 90 of file ducc.h.

◆ DUCC_Success

#define DUCC_Success   (0x00000000U)

Definition at line 43 of file ducc.h.

◆ DUCC_USERACTION_DEFAULT_SELECTION

#define DUCC_USERACTION_DEFAULT_SELECTION   (0)

Default option for user actions, which will accept any terms or otherwise continue the installation process whenever applicable.

Definition at line 110 of file ducc.h.

◆ ERR_BufferTooSmall

#define ERR_BufferTooSmall   (0x00010005U)

Definition at line 49 of file ducc.h.

◆ ERR_Busy

#define ERR_Busy   (0x00010007U)

Definition at line 51 of file ducc.h.

◆ ERR_ConnectionLost

#define ERR_ConnectionLost   (0x00020001U)

Definition at line 53 of file ducc.h.

◆ ERR_InvalidArgument

#define ERR_InvalidArgument   (0x00010001U)

Definition at line 45 of file ducc.h.

◆ ERR_InvalidResponse

#define ERR_InvalidResponse   (0x00020003U)

Definition at line 55 of file ducc.h.

◆ ERR_NoActiveConnection

#define ERR_NoActiveConnection   (0x00020002U)

Definition at line 54 of file ducc.h.

◆ ERR_NoPendingIMG

#define ERR_NoPendingIMG   (0x00010002U)

Definition at line 46 of file ducc.h.

◆ ERR_NotImplemented

#define ERR_NotImplemented   (0x00010000U)

Definition at line 44 of file ducc.h.

◆ ERR_OperationNotPermitted

#define ERR_OperationNotPermitted   (0x00010004U)

Definition at line 48 of file ducc.h.

◆ ERR_OperationRestrictedByConfig

#define ERR_OperationRestrictedByConfig   (0x00010006U)

Definition at line 50 of file ducc.h.

◆ ERR_PathNotExist

#define ERR_PathNotExist   (0x00010003U)

Definition at line 47 of file ducc.h.

◆ ERR_UnableConnect

#define ERR_UnableConnect   (0x00020000U)

Definition at line 52 of file ducc.h.

◆ FILEPATH_MAX

#define FILEPATH_MAX   (512U)

Defines the max length of the file path.

Definition at line 104 of file ducc.h.

◆ NUM_DUCC_STATES

#define NUM_DUCC_STATES   (7U)

Definition at line 83 of file ducc.h.

◆ PA_NONE

#define PA_NONE   (0U)

Definition at line 61 of file ducc.h.

◆ PA_RUNLEVEL

#define PA_RUNLEVEL   (1U)

Definition at line 62 of file ducc.h.

◆ PA_USERACTION

#define PA_USERACTION   (2U)

Definition at line 63 of file ducc.h.

◆ PR_MAX

#define PR_MAX   (100U)

Indicates progress number when it reaches 100%.

Definition at line 102 of file ducc.h.

◆ PR_NONE

#define PR_NONE   (101U)

Indicates no progress or progress not defined.

Definition at line 100 of file ducc.h.

◆ STATE_DORMANT

#define STATE_DORMANT   (0U)

DRIVE Update is dormant and not connected.

Definition at line 70 of file ducc.h.

◆ STATE_FATAL_ERROR

#define STATE_FATAL_ERROR   (6U)

Last update failed in a way which DOTA cannot recover.

The system is now in an undetermined state, possibly bootable but should be assumed unsafe to use.

Definition at line 82 of file ducc.h.

◆ STATE_NO_CONNECTIVITY

#define STATE_NO_CONNECTIVITY   (1U)

OTA is unable to connect to the cloud.

Definition at line 72 of file ducc.h.

◆ STATE_UP_TO_DATE

#define STATE_UP_TO_DATE   (2U)

OTA is connected to the cloud.

Definition at line 74 of file ducc.h.

◆ STATE_UPDATE_AVAILABLE

#define STATE_UPDATE_AVAILABLE   (3U)

OTA is connected to the cloud.

There is an update available. Awaiting higher RunLevel to proceed.

Definition at line 76 of file ducc.h.

◆ STATE_UPDATE_FAILED

#define STATE_UPDATE_FAILED   (5U)

Last update failed and the cloud does not have any alternative updates to try or re-try.

Vehicle may require service.

Definition at line 80 of file ducc.h.

◆ STATE_UPDATE_IN_PROGRESS

#define STATE_UPDATE_IN_PROGRESS   (4U)

Update Installation is either in progress or paused awaiting user action or specified RunLevel.

Definition at line 78 of file ducc.h.

Typedef Documentation

◆ DUCC_Error

typedef uint32_t DUCC_Error

Defines the return codes of DRIVE Update C&C library function calls.

Definition at line 42 of file ducc.h.

◆ DUCC_Image

typedef uint32_t DUCC_Image

Defines the image installation states.

Definition at line 93 of file ducc.h.

◆ DUCC_Locale

typedef uint32_t DUCC_Locale

Defines the locales used to get content.

Definition at line 88 of file ducc.h.

◆ DUCC_PendingAction

typedef uint32_t DUCC_PendingAction

Type of pending actions defined by DRIVE Update C&C interface.

Definition at line 60 of file ducc.h.

◆ DUCC_State

typedef uint32_t DUCC_State

States defined by DRIVE Update C&C interface.

Definition at line 68 of file ducc.h.

◆ DUCC_Status

typedef struct DUCC_Status DUCC_Status

Defines the DRIVE Update status structure returned from library function call.

It consists of 3 components: state, progress and pending action.

◆ DUCCCallback

typedef void(* DUCCCallback) (void *pObj, const DUCC_Status *pStatus)

Callback function when status changed.

Parameters
[in]pObj(void*)Pointer to the object registered during initialization.
[in]pStatus(const_DUCC_Status*)Current DRIVE Update status.
Returns
None

Definition at line 144 of file ducc.h.

◆ infoBuffer

typedef struct infoBuffer infoBuffer

Refer to optionBuffer struct memory layout.

◆ infoEntry

typedef struct infoEntry infoEntry

Defines the entry inside info buffer header.

◆ optionBuffer

typedef struct optionBuffer optionBuffer

Buffer for storing options.

The following describes the memory layout of the optionBuffer structure:

+-------------------+
| numEntries |
+-------------------+
| |
| OptionEntry[] |
| |
+-------------------+
| |
| |
| char[] |
| |
| |
+-------------------+
| Unused |
+-------------------+

It contains header of each individual entry at top of the buffer, then area of string which would be pointed by option entry header using offset bytes Since option buffer is caller allocated, it may contains unused bytes at end of the buffer. The structure layout would be initialized by library code.

To obtain size needed for buffer, pass NULL to corresponding API call and a minimal size would be filled in size parameter. The minimal size would also be filled in size parameter if the buffer size is too small, under this case ERR_BufferTooSmall would be returned.

A null byte in string area does not mark the end of that string.

◆ optionEntry

typedef struct optionEntry optionEntry

Defines the entry inside option buffer header.

◆ PDUCC

typedef struct DUCC* PDUCC

Defines the DRIVE Update C&C handle.

Definition at line 115 of file ducc.h.

◆ versionBuffer

typedef struct versionBuffer versionBuffer

Refer to optionBuffer struct memory layout.

◆ versionEntry

typedef struct versionEntry versionEntry

Defines the entry inside version buffer header.

Function Documentation

◆ DUCC_Close()

DUCC_Error DUCC_Close ( PDUCC  pDuccInfo)

◆ DUCC_Get_API_Version()

DUCC_Error DUCC_Get_API_Version ( PDUCC  pDuccInfo,
uint32_t *  pVersion 
)

◆ DUCC_Get_Current_RunLevel()

DUCC_Error DUCC_Get_Current_RunLevel ( PDUCC  pDuccInfo,
DU_RUN_LEVEL pRunLevel 
)

◆ DUCC_Get_Current_Status()

DUCC_Error DUCC_Get_Current_Status ( PDUCC  pDuccInfo,
DUCC_Status pStatus 
)

◆ DUCC_Get_Versions()

DUCC_Error DUCC_Get_Versions ( PDUCC  pDuccInfo,
DUCC_Image  image,
versionBuffer pVersionBuf,
uint32_t *  pVersionBufsize 
)

◆ 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_Request_RunLevel()

DUCC_Error DUCC_Request_RunLevel ( PDUCC  pDuccInfo,
DU_RUN_LEVEL  reqRunLevel 
)