1 # Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved.
3 @page dwx_naming_conventions API Naming Conventions and General Structures
6 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
8 NVIDIA<sup>®</sup> DriveWorks is a collection of modules with C APIs.
10 @section dwx_naming_functions Functions
12 Module functions are defined in camel case, as following:
16 dwStatus dwModule_functionName(.., dwModuleHandle_t obj)
19 @section dwx_naming_handles Handles
21 Each module provides a handle to access module functions.
24 typedef struct dwContextObject * dwContextHandle_t // Defines a type-safe handle to the instance of a module.
25 typedef struct dwContextObject const* dwConstContextHandle_t // Defines a type-safe handle to a const instance of a module.
28 @section dwx_naming_structures Structures
30 Structures supporting the module are defined with a typedef and prefixed module name in camel case.
33 typedef struct dwMyModuleParameterStruct {
34 float32_t parameterOne;
36 } dwMyModuleParameterStruct;
41 Enums are defined with a prefix of the module name, where each element is:
42 - Prefixed with the module name using `_` as a separator and
46 typedef enum dwMyModulParamFlags
48 DW_MY_MODULE_PARAM_FLAGS_ONE = 0,
49 DW_MY_MODULE_PARAM_FLAGS_TWO = 1,
50 } dwMyModuleParamFlags;