Alexa Auto SDK  2.3.0
NavigationEngineInterfaces.h
1 /*
2  * Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef AAC_NAVIGATION_NAVIGATION_ENGINE_INTERFACES_H
17 #define AAC_NAVIGATION_NAVIGATION_ENGINE_INTERFACES_H
18 
19 #include "Navigation.h"
20 
21 namespace aace {
22 namespace navigation {
23 
24 class NavigationEngineInterface {
25 public:
26  enum class EventName {
27  /*
28  * Navigation was started. Send in response to startNavigation() directive.
29  */
30  NAVIGATION_STARTED,
31 
32  /*
33  * List of previous waypoints was displayed. Send in response to showPreviousWaypoints() directive.
34  */
35  PREVIOUS_WAYPOINTS_SHOWN,
36 
37  /*
38  * The previous navigation route was started. Send in response to navigateToPreviousWaypoint() directive.
39  */
40  PREVIOUS_NAVIGATION_STARTED,
41 
42  /*
43  * Overview of route was displayed. Send in response to controlDisplay() directive.
44  */
45  ROUTE_OVERVIEW_SHOWN,
46 
47  /*
48  * List of directions was displayed. Send in response to controlDisplay() directive.
49  */
50  DIRECTIONS_LIST_SHOWN,
51 
52  /*
53  * Map successfully zoomed in. Send in response to controlDisplay() directive.
54  */
55  ZOOMED_IN,
56 
57  /*
58  * Map successfully zoomed out. Send in response to controlDisplay() directive.
59  */
60  ZOOMED_OUT,
61 
62  /*
63  * Map successfully centered. Send in response to controlDisplay() directive.
64  */
65  MAP_CENTERED,
66 
67  /*
68  * Map successfully aligned with north up. Send in response to controlDisplay() directive.
69  */
70  ORIENTED_NORTH,
71 
72  /*
73  * Map successfully moved in North direction. Send in response to controlDisplay() directive.
74  */
75  SCROLLED_NORTH,
76 
77  /*
78  * Map successfully moved upwards. Send in response to controlDisplay() directive.
79  */
80  SCROLLED_UP,
81 
82  /*
83  * Map successfully moved in East direction. Send in response to controlDisplay() directive.
84  */
85  SCROLLED_EAST,
86 
87  /*
88  * Map successfully moved rightwards. Send in response to controlDisplay() directive.
89  */
90  SCROLLED_RIGHT,
91 
92  /*
93  * Map successfully moved in South direction. Send in response to controlDisplay() directive.
94  */
95  SCROLLED_SOUTH,
96 
97  /*
98  * Map successfully moved downwards. Send in response to controlDisplay() directive.
99  */
100  SCROLLED_DOWN,
101 
102  /*
103  * Map successfully moved in West direction. Send in response to controlDisplay() directive.
104  */
105  SCROLLED_WEST,
106 
107  /*
108  * Map successfully moved leftwards. Send in response to controlDisplay() directive.
109  */
110  SCROLLED_LEFT,
111 
112  /*
113  * Map sounds were muted. Send in response to controlDisplay() directive.
114  */
115  ROUTE_GUIDANCE_MUTED,
116 
117  /*
118  * Map sounds were unmuted. Send in response to controlDisplay() directive.
119  */
120  ROUTE_GUIDANCE_UNMUTED,
121 
122  /*
123  * Default alternate routes were successfully found and displayed. Send in response to showAlternativeRoutes() directive.
124  */
125  DEFAULT_ALTERNATE_ROUTES_SHOWN,
126 
127  /*
128  * Alternate routes with shorter times were successfully found and displayed. Send in response to showAlternativeRoutes() directive.
129  */
130  SHORTER_TIME_ROUTES_SHOWN,
131 
132  /*
133  * Alternate routes with shorter distances were successfully found and displayed. Send in response to showAlternativeRoutes() directive.
134  */
135  SHORTER_DISTANCE_ROUTES_SHOWN,
136 
137  /*
138  * Next turn was successfully announced. Send in response to announceManeuver() directive.
139  */
140  TURN_GUIDANCE_ANNOUNCED,
141 
142  /*
143  * Next exit was successfully announced. Send in response to announceManeuver() directive.
144  */
145  EXIT_GUIDANCE_ANNOUNCED,
146 
147  /*
148  * Directions for entering successfully announced. Send in response to announceManeuver() directive.
149  */
150  ENTER_GUIDANCE_ANNOUNCED,
151 
152  /*
153  * Directions for merging successfully announced. Send in response to announceManeuver() directive.
154  */
155  MERGE_GUIDANCE_ANNOUNCED,
156 
157  /*
158  * Lane guidance was successfully announced. Send in response to announceManeuver() directive.
159  */
160  LANE_GUIDANCE_ANNOUNCED,
161 
162  /*
163  * Current speed limit successfully announced. Send in response to announceRoadRegulation() directive.
164  */
165  SPEED_LIMIT_REGULATION_ANNOUNCED,
166 
167  /*
168  * Carpool status successfully announced. Send in response to announceRoadRegulation() directive.
169  */
170  CARPOOL_RULES_REGULATION_ANNOUNCED
171  };
172 
173  enum class ErrorType {
177  NAVIGATION_START_FAILED,
178 
182  SHOW_PREVIOUS_WAYPOINTS_FAILED,
183 
187  PREVIOUS_NAVIGATION_START_FAILED,
188 
189  /*
190  * Overview of route was failed to display. Send in response to controlDisplay() directive.
191  */
192  ROUTE_OVERVIEW_FAILED,
193 
194  /*
195  * List of directions was failed to display. Send in response to controlDisplay() directive.
196  */
197  DIRECTIONS_LIST_FAILED,
198 
199  /*
200  * Map zoom-in unsuccessful. Send in response to controlDisplay() directive.
201  */
202  ZOOM_IN_FAILED,
203 
204  /*
205  * Map zoom-out unsuccessful. Send in response to controlDisplay() directive.
206  */
207  ZOOM_OUT_FAILED,
208 
209  /*
210  * Map centering unsuccessful. Send in response to controlDisplay() directive.
211  */
212  CENTER_FAILED,
213 
214  /*
215  * Map alignment to north unsuccessful. Send in response to controlDisplay() directive.
216  */
217  ORIENT_NORTH_FAILED,
218 
219  /*
220  * Moving map North was unsuccessful. Send in response to controlDisplay() directive.
221  */
222  SCROLL_NORTH_FAILED,
223 
224  /*
225  * Moving map upwards was unsuccessful. Send in response to controlDisplay() directive.
226  */
227  SCROLL_UP_FAILED,
228 
229  /*
230  * Moving map East was unsuccessful. Send in response to controlDisplay() directive.
231  */
232  SCROLL_EAST_FAILED,
233 
234  /*
235  * Moving map rightwards was unsuccessful. Send in response to controlDisplay() directive.
236  */
237  SCROLL_RIGHT_FAILED,
238 
239  /*
240  * Moving map South was unsuccessful. Send in response to controlDisplay() directive.
241  */
242  SCROLL_SOUTH_FAILED,
243 
244  /*
245  * Moving map downwards was unsuccessful. Send in response to controlDisplay() directive.
246  */
247  SCROLL_DOWN_FAILED,
248 
249  /*
250  * Moving map west was unsuccessful. Send in response to controlDisplay() directive.
251  */
252  SCROLL_WEST_FAILED,
253 
254  /*
255  * Moving map leftwards was unsuccessful. Send in response to controlDisplay() directive.
256  */
257  SCROLL_LEFT_FAILED,
258 
259  /*
260  * Map sounds failed to be muted. Send in response to controlDisplay() directive.
261  */
262  MUTED_ROUTE_GUIDANCE_FAILED,
263 
264  /*
265  * Map sounds failed to be unmuted. Send in response to controlDisplay() directive.
266  */
267  UNMUTED_ROUTE_GUIDANCE_FAILED,
268 
269  /*
270  * Displaying default alternate routes was unsuccessful. Send in response to showAlternativeRoutes() directive.
271  */
272  DEFAULT_ALTERNATE_ROUTES_FAILED,
273 
274  /*
275  * Displaying alternate routes with shorter times was unsuccessful. Send in response to showAlternativeRoutes() directive.
276  */
277  SHORTER_TIME_ROUTES_FAILED,
278 
279  /*
280  * Displaying alternate routes with shorter distances was unsuccessful. Send in response to showAlternativeRoutes() directive.
281  */
282  SHORTER_DISTANCE_ROUTES_FAILED,
283 
284  /*
285  * Next turn announcement was unsuccessful. Send in response to announceManeuver() directive.
286  */
287  TURN_GUIDANCE_FAILED,
288 
289  /*
290  * Next exit announcement was unsuccessful. Send in response to announceManeuver() directive.
291  */
292  EXIT_GUIDANCE_FAILED,
293 
294  /*
295  * Announcement for entering directions was unsuccessful. Send in response to announceManeuver() directive.
296  */
297  ENTER_GUIDANCE_FAILED,
298 
299  /*
300  * Announcement for merging directions was unsuccessful. Send in response to announceManeuver() directive.
301  */
302  MERGE_GUIDANCE_FAILED,
303 
304  /*
305  * Lane guidance announcement was unsuccessful. Send in response to announceManeuver() directive.
306  */
307  LANE_GUIDANCE_FAILED,
308 
309  /*
310  * Current speed limit announcement was unsuccessful. Send in response to announceRoadRegulation() directive.
311  */
312  SPEED_LIMIT_REGULATION_FAILED,
313 
314  /*
315  * Carpool status announcement was unsuccessful. Send in response to announceRoadRegulation() directive.
316  */
317  CARPOOL_RULES_REGULATION_FAILED
318  };
319 
320  enum class ErrorCode {
324  INTERNAL_SERVICE_ERROR,
325 
329  ROUTE_NOT_FOUND,
330 
334  NO_PREVIOUS_WAYPOINTS,
335 
339  NOT_SUPPORTED,
340 
344  NOT_ALLOWED
345  };
346 
347  // user requested alternate route
348  enum class AlternateRouteType {
349  DEFAULT,
350 
351  SHORTER_TIME,
352 
353  SHORTER_DISTANCE
354  };
355 
356  virtual void onNavigationEvent(EventName event) = 0;
357  virtual void onNavigationError(ErrorType type, ErrorCode code, const std::string& description) = 0;
358  virtual void onShowAlternativeRoutesSucceeded(const std::string& payload) = 0;
359 };
360 
361 } // namespace navigation
362 } // namespace aace
363 
364 #endif
Definition: AddressBook.h:26

Alexa Auto SDK 2.3.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0