NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
duplugin.h File Reference

Detailed Description

Helper interfaces to program an NVIDIA DRIVE® Update plugin.

Definition in file duplugin.h.

Go to the source code of this file.

Data Structures

struct  DULINK_EXPORT_REQS
 Data structure to define DU Link node to be exported by a DRIVE Update plugin via exportDULinkNodes. More...
 
struct  CTX_LOCK_STR
 Data structure to enable access in a DU Link callback to a string requiring thread access protection. More...
 
struct  CTX_LOCK_UINT8
 Data structure to enable access in a DU Link callback to a uint8_t requiring thread access protection. More...
 
struct  CTX_LOCK_RL
 Data structure to enable access in a DU Link callback to a DU_RUN_LEVEL requiring thread access protection. More...
 
struct  CTX_LIST_STR
 Data structure to enable reading a list of values in a DU Link callback. More...
 
struct  DULINK_CONNECT_INFO
 Data structure to hold information for single DU Link connection. More...
 

Macros

#define DUMASTER_PATH   "/master"
 Defines the path to DU Master used for registration. More...
 
#define PLUGIN_TYPE_INSTALLER   "installer"
 Defines the name strings of all the valid DRIVE Update plugin types. More...
 
#define PLUGIN_TYPE_CONTROLLER   "controller"
 controller type plugin name More...
 
#define PLUGIN_TYPE_CONTENT_PROVIDER   "content_provider"
 content provider type plugin name More...
 
#define PLUGIN_TYPE_FILE_TRANSFORM   "file_transform"
 transform type plugin name More...
 
#define PLUGIN_TYPE_VALIDATOR   "validator"
 validator type plugin name More...
 
#define PLUGIN_TYPE_METADATA_PROVIDER   "metadata_provider"
 metadata provider type plugin name More...
 
#define PLUGIN_TYPE_PERS_CTX_STORE   "persistent_ctx_store"
 persistent context store type plugin name More...
 
#define PLUGIN_TYPE_DEBUG   "debug"
 debugger type plugin name More...
 
#define NODE_PLUGIN_TYPE   "plugin-type"
 Defines the default file names to be exported by all DRIVE Update plugins, including name, parent_path and dulink_ver. More...
 
#define NODE_REQUESTED_RL   "requested_rl"
 requested runlevel file node More...
 
#define NODE_CURRENT_RL   "current_rl"
 current runlevel file node More...
 
#define NODE_PERSISTENT_CTX_PATH   "persistent_ctx_path"
 persistent context path file node More...
 
#define NODE_PENDING_RL   "pending_rl"
 pending runlevel file node More...
 
#define NODE_STATE   "state"
 state file node More...
 
#define NODE_STATE_LIST   "state.list"
 state list file node More...
 
#define NODE_PROGRESS   "progress"
 Defines the file names to be exported by certain DRIVE Update plugin types. More...
 
#define NODE_CMD   "cmd"
 command file node More...
 
#define NODE_CMD_LIST   "cmd.list"
 command list file node More...
 
#define NODE_RESULT   "result"
 result file node More...
 
#define NOTIFY_NODE_CURRENT_RL   "current_rl.notify"
 Defines the file names of notification nodes to be exported by all DRIVE Update plugins. More...
 
#define NOTIFY_NODE_STATE   "state.notify"
 notify node of state More...
 
#define NOTIFY_NODE_PENDING_RL   "pending_rl.notify"
 notify node of pending runlevel More...
 
#define NOTIFY_NODE_PROGRESS   "progress.notify"
 Defines the file names of notification nodes to be exported by certain DRIVE Update plugins. More...
 
#define NOTIFY_NODE_RESULT   "result.notify"
 notify node of result More...
 
#define READ_ONLY_ATTR
 Defines the helper macros of various file attributes of DULINK_ATTR type. More...
 
#define READ_ONLY_DIR_ATTR
 Defines the attribute of read only directory. More...
 
#define READ_WRITE_ATTRIBUTE
 Defines the attribute of read and write allowed file. More...
 
#define WRITE_ONLY_ATTRIBUTE
 Defines the attribute of write only file. More...
 
#define MASTER_ONLY_RW_ATTRIBUTE
 Defines the attribute of the file that can be read and written by DU Master, but cannot be accessed by any other plguins. More...
 
#define MASTER_ONLY_WRITE_ATTRIBUTE
 Defines the attribute of the file that only DU Master can write but not read, and any other plguins cannot access. More...
 
#define COMPAT_ONLY_RW_ATTR
 Defines the attribute of the file that only DU CCheck can read and write, and any other plguins cannot access. More...
 
#define MASTER_ONLY_READ_ATTR
 Defines the file attribute of master read only and others deny write. More...
 
#define ALL_RO_MASTER_RW_ATTR
 Defines the file attribute of all plugins can read, DU Master can read and write. More...
 
#define CCHECK_ONLY_READ_ATTR
 Defines the file attribute of only CCheck can read. More...
 
#define DDU_ONLY_WRITE_ATTR
 Defines the file attribute of only DDU can write. More...
 
#define DUCLIENT_ONLY_RW_ATTR
 Defines the file attribute of only DU-CLIENT can read and write, and any other plguins cannot access. More...
 
#define ALL_RO_DUCLIENT_RW_ATTR
 Defines the file attribute of of all plugins can read, DU-CLIENT can read and write. More...
 
#define ALL_RO_CTX_STORE_RW_ATTR
 Defines the file attribute of of all plugins can read, ctx_store can read and write. More...
 
#define DUTR_PARAM_BUFLEN   (1024)
 Defines the buffer size of the input parameters for DU Transport, used by DULINK_CONNECT_INFO. More...
 

Typedefs

typedef enum DUPLUGIN_TYPE DUPLUGIN_TYPE
 Defines all of the valid DRIVE Update plugin types. More...
 
typedef enum DULINK_CONNECTION_ROLE DULINK_CONNECTION_ROLE
 Role of DU LINK connection. More...
 
typedef struct DULINK_EXPORT_REQS DULINK_EXPORT_REQS
 Data structure to define DU Link node to be exported by a DRIVE Update plugin via exportDULinkNodes. More...
 
typedef struct DULINK_EXPORT_REQSPDULINK_EXPORT_REQS
 
typedef struct CTX_LOCK_STR CTX_LOCK_STR
 Data structure to enable access in a DU Link callback to a string requiring thread access protection. More...
 
typedef struct CTX_LOCK_STRPCTX_LOCK_STR
 
typedef struct CTX_LOCK_UINT8 CTX_LOCK_UINT8
 Data structure to enable access in a DU Link callback to a uint8_t requiring thread access protection. More...
 
typedef struct CTX_LOCK_UINT8PCTX_LOCK_UINT8
 
typedef struct CTX_LOCK_RL CTX_LOCK_RL
 Data structure to enable access in a DU Link callback to a DU_RUN_LEVEL requiring thread access protection. More...
 
typedef struct CTX_LOCK_RLPCTX_LOCK_RL
 
typedef struct CTX_LIST_STR CTX_LIST_STR
 Data structure to enable reading a list of values in a DU Link callback. More...
 
typedef struct CTX_LIST_STRPCTX_LIST_STR
 
typedef struct DULINK_CONNECT_INFO DULINK_CONNECT_INFO
 Data structure to hold information for single DU Link connection. More...
 
typedef struct DULINK_CONNECT_INFOPDULINK_CONNECT_INFO
 

Enumerations

enum  DUPLUGIN_TYPE {
  CONTROLLER = 0U,
  INSTALLER,
  CONTENT_PROVIDER,
  FILE_TRANSFORM,
  VALIDATOR,
  METADATA_PROVIDER,
  DUPLUGIN_TYPE_MAX
}
 Defines all of the valid DRIVE Update plugin types. More...
 
enum  DULINK_CONNECTION_ROLE {
  DULINK_CONNECT_ROUTER = 0,
  DULINK_CONNECT_PLUGIN
}
 Role of DU LINK connection. More...
 

Functions

DU_RCODE exportDULinkNodes (const DULINK_EXPORT_REQS *pDulinkDirs, uint8_t numDirs, const DULINK_EXPORT_REQS *pDulinkFiles, uint8_t numFiles, const DULINK_EXPORT_REQS *pDulinkNotifyNodes, uint8_t numNotifyNodes)
 Export DU Link directories, files and notify nodes. More...
 
DU_RCODE registerToMaster (const char *pMasterPath)
 Register a DU Link plugin to DU Master. More...
 
DU_RCODE replaceContentRoot (char *pStr, const char *pContRootVal, uint64_t bufLen)
 Replace $CONTENT_ROOT$ in path string to actual content. More...
 
DU_RCODE getPluginParent (char *pBuf, uint32_t bufLen)
 Get plugin parent path. More...
 
DU_RCODE getPluginConnInfo (const char *pPluginName, PDULINK_CONNECT_INFO pInfo)
 Get plugin connection info for DU-Link open. More...
 
DU_RCODE readOnlyStringCB (const char *pRequestPath, const char *pOriginPath, void *pCtx, uint64_t offset, uint64_t length, void *pBuf, DULINK_CB_OPERATION operation, uint64_t *pRetVal)
 Callback for read only strings in a DU-Link node. More...
 
DU_RCODE listNodeCB (const char *pRequestPath, const char *pOriginPath, void *pCtx, uint64_t offset, uint64_t length, void *pBuf, DULINK_CB_OPERATION operation, uint64_t *pRetVal)
 Callback for read-only .list nodes. More...
 
DU_RCODE readOnlyRunlevelCB (const char *pRequestPath, const char *pOriginPath, void *pCtx, uint64_t offset, uint64_t length, void *pBuf, DULINK_CB_OPERATION operation, uint64_t *pRetVal)
 Callback for read-only runlevel nodes. More...