DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Map Initialization

Detailed Description

Functions to initialize, load and release map data.

Functions

DW_API_PUBLIC dwStatus dwMaps_initialize (dwMapHandle_t *mapHandle, const char *filename, dwContextHandle_t contextHandle)
 Creates a map handle and initializes the map data by deserializing a driveworks maps file. More...
 
DW_API_PUBLIC dwStatus dwMaps_release (dwMapHandle_t mapHandle)
 Release map handle. More...
 

Function Documentation

◆ dwMaps_initialize()

DW_API_PUBLIC dwStatus dwMaps_initialize ( dwMapHandle_t mapHandle,
const char *  filename,
dwContextHandle_t  contextHandle 
)

Creates a map handle and initializes the map data by deserializing a driveworks maps file.

Buffer sizes are allocated to fit the file content.

Note
: allocates memory.
Parameters
[out]mapHandlemapHandle to be initialized
[in]filenamepath to driveworks maps file
[in]contextHandledriveworks context
Returns
DW_SUCCESS Map handle is successfully initialized.
DW_INVALID_ARGUMENT mapHandle, filename is nullptr.
DW_FAILURE Error during maps backend access, or invalid enum encountered.
DW_FILE_INVALID Error loading file: not a valid driveworks maps file.

◆ dwMaps_release()

DW_API_PUBLIC dwStatus dwMaps_release ( dwMapHandle_t  mapHandle)

Release map handle.

Note
: Releases memory.
Parameters
[in,out]mapHandlemap handle to be released.
Returns
DW_SUCCESS Successfully released map object and handle.
DW_BAD_CAST Could not successfully cast handle to map object.