Alexa Auto SDK  2.0.0
Public Member Functions | List of all members
aace::navigation::Navigation Class Referenceabstract

Public Member Functions

virtual bool setDestination (const std::string &payload)=0
 
virtual bool cancelNavigation ()=0
 
virtual std::string getNavigationState ()=0
 

Detailed Description

Navigation should be extended to handle navigation directives from the Engine.

Member Function Documentation

◆ setDestination()

virtual bool aace::navigation::Navigation::setDestination ( const std::string &  payload)
pure virtual

Notifies the platform implementation to set the navigation destination

Parameters
[in]payloadJSON data containing the destination information
)
"destination": {
"coordinate": {
"latitudeInDegrees": {{DOUBLE}},
"longitudeInDegrees": {{DOUBLE}}
},
"name": "{{STRING}}",
"singleLineDisplayAddress": "{{STRING}}"
"multipleLineDisplayAddress": "{{STRING}}",
},
"transportationMode": "{{STRING}}",
"metadata": {
"hoursOfOperation": [
{
"dayOfWeek": "{{STRING}}",
"hours": [{
"open": "{{STRING}}"
"close": "{{STRING}}"
}],
"status": "{{STRING}}"
},
{
"dayOfWeek": "{{STRING}}",
"hours": [{
"open": "{{STRING}}"
"close": "{{STRING}}"
}],
"status": "{{STRING}}"
},
...
...
],
"phoneNumber": "{{STRING}}"
}
  • destination (required) : Information needed to navigate to the destination
  • destination.name (optional) : Name of the destination
  • destination.singleLineDisplayAddress (optional) : Address of destination in single line
  • destination.multipleLineDisplayAddress (optional) : Address of destination in multiple lines with new lines expressed with
    escape sequence
  • coordinate (required) : Contains the geolocation information of the destination
  • coordinate.latitudeInDegrees (required) : Latitude coordinate in degrees
  • coordinate.longitudeInDegrees (required) : Longitute coordinate in degrees
  • transportationMode (required) : Indicates the means to navigate to the destination (Values: BIKING, DRIVING, TRANSIT, WALKING)
  • metadata (optional) : Extra information about the destination, requires phoneNumber or hoursOfOperation to be present
  • metadata.hoursOfOperation (optional) : List of daily hours for the location
  • hoursOfOperation.dayOfWeek (required) : Day of the week (Values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY)
  • hoursOfOperation.status (required) : Indicates whether the location is open on this day or not (Values: OPEN_DURING_HOURS, OPEN_24_HOURS, CLOSED, UNKNOWN, HOLIDAY)
  • hoursOfOperation.hours (required): Absent when status is UNKNOWN, OPEN_24_HOURS, CLOSED, hours are in ISO-8601 time with timezone format
  • metadata.phoneNumber (optional) : The phone number of the location in E.164 format
Returns
true if the platform implementation successfully handled the call, else false

◆ cancelNavigation()

virtual bool aace::navigation::Navigation::cancelNavigation ( )
pure virtual

Notifies the platform implementation to cancel navigation

Returns
true if the platform implementation successfully handled the call, else false

◆ getNavigationState()

virtual std::string aace::navigation::Navigation::getNavigationState ( )
pure virtual

Retrieve the navigation state from the platform. NOTE: You may return an empty string to default the payload to NOT_NAVIGATING

Returns
the current NavigationState JSON payload
)
"state": "{{STRING}}", //NAVIGATING or NOT_NAVIGATING
"waypoints": [
{
"type": "{{STRING}}", //Type of the waypoint - SOURCE, DESTINATION or INTERIM
"estimatedTimeOfArrival": {
"ideal": {{STRING}}, //Expected clock time ETA based on the ideal conditions. ISO 8601 UTC format
"predicted": {{STRING}} //predicted clock time ETA based on traffic conditions. ISO 8601 UTC format
},
"address": "{{STRING}}",
"coordinate": [{{LATITUDE_DOUBLE}},{{LONGITUDE_DOUBLE}}],
},
{
"type": "{{STRING}}", //Type of the waypoint - SOURCE, DESTINATION or INTERIM
"estimatedTimeOfArrival": {
"ideal": {{STRING}}, //Expected clock time ETA based on the ideal conditions. ISO 8601 UTC format
"predicted": {{STRING}} //predicted clock time ETA based on traffic conditions. ISO 8601 UTC format
},
"address": "{{STRING}}",
"coordinate": [{{LATITUDE_DOUBLE}},{{LONGITUDE_DOUBLE}}],
"poiOfInterest": {
"id": "{{STRING}}", //POI lookup Id vended from Alexa
"name": "{{STRING}}", // POI Name
"hoursOfOperation": [
{
"dayOfWeek": "{{STRING}}",
"hours": [
{
"open": "{{STRING}}", // ISO-8601 time with timezone format
"close": "{{STRING}}" // ISO-8601 time with timezone format
}
],
"type": "{{STRING}}" // Can be: OPEN_DURING_HOURS, OPEN_24_HOURS, etc.
}
],
"phoneNumber": "{{STRING}}"
}
},
...
],
"shapes": [
[
{{LATITUDE_DOUBLE}},
{{LONGITUDE_DOUBLE}}
],
...
]
  • state (required) : current navigation state
  • waypoints (required) : list of waypoints, which can be empty
  • shapes (required) : list of route shapes, which can be empty or limited to 100 entries

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