1 # Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved.
3 @page dwx_naming_conventions API Naming Conventions and General Structures
6 NVIDIA<sup>®</sup> DriveWorks is a collection of modules with C APIs.
8 @section dwx_naming_functions Functions
10 Module functions are defined in camel case, as following:
14 dwStatus dwModule_functionName(.., dwModuleHandle_t obj)
17 @section dwx_naming_handles Handles
19 Each module provides a handle to access module functions.
22 typedef struct dwContextObject * dwContextHandle_t // Defines a type-safe handle to the instance of a module.
23 typedef struct dwContextObject const* dwConstContextHandle_t // Defines a type-safe handle to a const instance of a module.
26 @section dwx_naming_structures Structures
28 Structures supporting the module are defined with a typedef and prefixed module name in camel case.
31 typedef struct dwMyModuleParameterStruct {
32 float32_t parameterOne;
34 } dwMyModuleParameterStruct;
39 Enums are defined with a prefix of the module name, where each element is:
40 - Prefixed with the module name using `_` as a separator and
44 typedef enum dwMyModulParamFlags
46 DW_MY_MODULE_PARAM_FLAGS_ONE = 0,
47 DW_MY_MODULE_PARAM_FLAGS_TWO = 1,
48 } dwMyModuleParamFlags;