DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

MapProvider.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2018-2019 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
31 #ifndef DW_MAPS_MAP_PROVIDER_H_
32 #define DW_MAPS_MAP_PROVIDER_H_
33 
34 #include <dw/maps/Maps.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 //#######################################################################################
41 // Map Provider
42 //#######################################################################################
43 
77 typedef struct dwMapProviderObject* dwMapProviderHandle_t;
78 typedef struct dwMapProviderObject const* dwConstMapsProviderHandle_t;
79 
84 {
88 
92 typedef uint64_t dwMapsRequestToken;
93 
110  dwMapProviderHandle_t* providerHandle,
111  const char* mapCacheFile,
112  dwMapProviderParameters* params,
113  dwContextHandle_t contextHandle);
114 
131  dwMapProviderHandle_t* providerHandle,
132  const char* mapDirectory,
133  dwMapProviderParameters* params,
134  dwContextHandle_t contextHandle);
135 
154  dwMapsBounds* bounds,
155  dwMapProviderHandle_t providerHandle);
156 
160 typedef struct dwMapsContentLayerObject const* dwConstMapsContentLayerHandle_t;
161 
174 dwStatus dwMapProvider_getContentLayer(dwConstMapsContentLayerHandle_t* layer,
175  const char* layerId,
176  dwConstMapsProviderHandle_t providerHandle);
177 
182 {
183  dwConstMapsContentLayerHandle_t* buffer;
184  size_t maxSize;
185  size_t size;
187 
200  dwConstMapsProviderHandle_t providerHandle); /* in */
201 
212 dwStatus dwMapProvider_release(dwMapProviderHandle_t providerHandle);
213 
235  dwMapsRequestToken* requestToken,
236  const dwMapsBounds* bounds,
237  const dwMapsContentLayerBuffer* layers,
238  dwMapProviderHandle_t providerHandle);
239 
243 typedef struct dwMapsRoute
244 {
246  size_t waypointCount;
247 } dwMapsRoute;
248 
270  dwMapsRequestToken* requestToken,
271  const dwMapsRoute* route,
272  const dwMapsContentLayerBuffer* layers,
273  dwMapProviderHandle_t providerHandle);
274 
287  dwConstMapHandle_t mapHandle,
288  dwMapProviderHandle_t providerHandle);
289 
304  dwConstMapHandle_t* mapHandle,
305  dwMapsRequestToken requestToken,
306  dwMapProviderHandle_t providerHandle);
307 
310 #ifdef __cplusplus
311 }
312 #endif
313 
314 #endif // DW_MAPS_MAP_PROVIDER_H_
DW_API_PUBLIC dwStatus dwMapProvider_requestMapForBounds(dwMapsRequestToken *requestToken, const dwMapsBounds *bounds, const dwMapsContentLayerBuffer *layers, dwMapProviderHandle_t providerHandle)
Requests a map covering a specified geographic bounds.
size_t waypointCount
Number of waypoints in the planned route.
Definition: MapProvider.h:246
struct dwMapsContentLayerObject const * dwConstMapsContentLayerHandle_t
Forward declaration of content layer handle.
Definition: MapProvider.h:160
DW_API_PUBLIC dwStatus dwMapProvider_initializeWithCacheFile(dwMapProviderHandle_t *providerHandle, const char *mapCacheFile, dwMapProviderParameters *params, dwContextHandle_t contextHandle)
Create a map provider backed by a map cache file in the local filesystem.
Geographic coordinate bounds.
Definition: Location.h:61
DW_API_PUBLIC dwStatus dwMapProvider_requestMapForRoute(dwMapsRequestToken *requestToken, const dwMapsRoute *route, const dwMapsContentLayerBuffer *layers, dwMapProviderHandle_t providerHandle)
Requests a map covering a planned route.
Parameters for the provider determining preallocation.
Definition: MapProvider.h:83
size_t maxSize
maximum number of layers that fit into the buffer
Definition: MapProvider.h:184
NVIDIA DriveWorks API: Maps
size_t size
current number of layers in the buffer
Definition: MapProvider.h:185
dwStatus
Status definition.
Definition: Status.h:178
DW_API_PUBLIC dwStatus dwMapProvider_initializeWithDirectory(dwMapProviderHandle_t *providerHandle, const char *mapDirectory, dwMapProviderParameters *params, dwContextHandle_t contextHandle)
Create a map provider backed by a map directory in the local filesystem.
Location point defined by WGS84 coordinates.
Definition: Types.h:575
DW_API_PUBLIC dwStatus dwMapProvider_tryGetRequestedMap(dwConstMapHandle_t *mapHandle, dwMapsRequestToken requestToken, dwMapProviderHandle_t providerHandle)
Attempts to get a requested map with a request token.
DW_API_PUBLIC dwStatus dwMapProvider_getContentLayers(dwMapsContentLayerBuffer *layers, dwConstMapsProviderHandle_t providerHandle)
Get all available content layers from the map provider.
struct dwMapProviderObject * dwMapProviderHandle_t
Definition: MapProvider.h:77
size_t totalMapAllocationBytes
Total memory available for requests.
Definition: MapProvider.h:86
DW_API_PUBLIC dwStatus dwMapProvider_getCoverageBounds(dwMapsBounds *bounds, dwMapProviderHandle_t providerHandle)
Get the bounds of coverage for the map provider.
struct dwMapProviderObject const * dwConstMapsProviderHandle_t
Definition: MapProvider.h:78
uint64_t dwMapsRequestToken
Token for retrieval of requested maps from the provider.
Definition: MapProvider.h:92
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
Caller-provided buffer for content layers.
Definition: MapProvider.h:181
dwConstMapsContentLayerHandle_t * buffer
pointer to layers array
Definition: MapProvider.h:183
struct dwMapObject const * dwConstMapHandle_t
Definition: Maps.h:69
Defines a planned route for an ordered sequence of waypoints.
Definition: MapProvider.h:243
DW_API_PUBLIC dwStatus dwMapProvider_getContentLayer(dwConstMapsContentLayerHandle_t *layer, const char *layerId, dwConstMapsProviderHandle_t providerHandle)
Get content layer by identifier from the map provider.
size_t numAllocatedMaps
Number of maps to allocate for requests.
Definition: MapProvider.h:85
DW_API_PUBLIC dwStatus dwMapProvider_releaseMap(dwConstMapHandle_t mapHandle, dwMapProviderHandle_t providerHandle)
Releases a requested map back to original map provider.
#define DW_API_PUBLIC
Definition: Exports.h:56
DW_API_PUBLIC dwStatus dwMapProvider_release(dwMapProviderHandle_t providerHandle)
Release map provider.
dwMapsGeoPoint * waypoints
Sequence of waypoints defining the planned route.
Definition: MapProvider.h:245