Alexa Auto SDK  4.3
Public Member Functions | List of all members
aace::carControl::CarControl Class Reference

Public Member Functions

 CarControl ()=default
 
virtual ~CarControl ()
 
virtual bool turnPowerControllerOn (const std::string &endpointId)
 
virtual bool turnPowerControllerOff (const std::string &endpointId)
 
virtual bool isPowerControllerOn (const std::string &endpointId, bool &isOn)
 
virtual bool turnToggleControllerOn (const std::string &endpointId, const std::string &controllerId)
 
virtual bool turnToggleControllerOff (const std::string &endpointId, const std::string &controllerId)
 
virtual bool isToggleControllerOn (const std::string &endpointId, const std::string &controllerId, bool &isOn)
 
virtual bool setRangeControllerValue (const std::string &endpointId, const std::string &controllerId, double value)
 
virtual bool adjustRangeControllerValue (const std::string &endpointId, const std::string &controllerId, double delta)
 
virtual bool getRangeControllerValue (const std::string &endpointId, const std::string &controllerId, double &value)
 
virtual bool setModeControllerValue (const std::string &endpointId, const std::string &controllerId, const std::string &value)
 
virtual bool adjustModeControllerValue (const std::string &endpointId, const std::string &controllerId, int delta)
 
virtual bool getModeControllerValue (const std::string &endpointId, const std::string &controllerId, std::string &value)
 

Detailed Description

CarControl should be extended to interface the elements that can be controlled in the vehicle. Each controllable element is an 'endpoint' with a unique endpointId. CarControl provides interfaces for four types of controllers. A custom combination of these controllers describes controls of the entire vehicle:

Deprecated:
This platform interface is deprecated. Use the Alexa Auto Services Bridge (AASB) message broker to publish and subscribe to AASB messages instead.
See also
aace::core::MessageBroker

Constructor & Destructor Documentation

◆ CarControl()

aace::carControl::CarControl::CarControl ( )
default

CarControl constructor.

◆ ~CarControl()

aace::carControl::CarControl::~CarControl ( )
virtualdefault

CarControl destructor.

Member Function Documentation

◆ turnPowerControllerOn()

bool aace::carControl::CarControl::turnPowerControllerOn ( const std::string &  controlId)
virtual

Notifies the platform implementation to power on the controller identified by endpointId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
Returns
true if successful.

PowerController

◆ turnPowerControllerOff()

bool aace::carControl::CarControl::turnPowerControllerOff ( const std::string &  endpointId)
virtual

Notifies the platform implementation to power off the controller identified by endpointId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
Returns
true if successful.

◆ isPowerControllerOn()

bool aace::carControl::CarControl::isPowerControllerOn ( const std::string &  endpointId,
bool &  isOn 
)
virtual

Retrieves the power state of the controller identified by endpointId from the platform implementation.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[out]isOnTo be set to true by the implementation if the controller is powered on.
Returns
true if isOn was successfully updated, false if the power state of the controller cannot be retrieved.

◆ turnToggleControllerOn()

bool aace::carControl::CarControl::turnToggleControllerOn ( const std::string &  controlId,
const std::string &  controllerId 
)
virtual

Notifies the platform implementation to turn on the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
Returns
true if successful.

ToggleController

◆ turnToggleControllerOff()

bool aace::carControl::CarControl::turnToggleControllerOff ( const std::string &  endpointId,
const std::string &  controllerId 
)
virtual

Notifies the platform implementation to turn off the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
Returns
true if successful.

◆ isToggleControllerOn()

bool aace::carControl::CarControl::isToggleControllerOn ( const std::string &  endpointId,
const std::string &  controllerId,
bool &  isOn 
)
virtual

Retrieves the power state of the controller identified by endpointId and controllerId from the platform implementation.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
[out]isOnTo be set to true by the implementation if the controller is turned on.
Returns
true if isOn was successfully updated, false if the power state of the controller cannot be retrieved.

◆ setRangeControllerValue()

bool aace::carControl::CarControl::setRangeControllerValue ( const std::string &  controlId,
const std::string &  controllerId,
double  value 
)
virtual

Notifies the platform implementation to set the range setting of the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
[in]valueThe new range setting.
Returns
true if successful.

RangeController

◆ adjustRangeControllerValue()

bool aace::carControl::CarControl::adjustRangeControllerValue ( const std::string &  endpointId,
const std::string &  controllerId,
double  delta 
)
virtual

Notifies the platform implementation to adjust the range setting of the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
[in]deltaThe delta by which to adjust the range setting.
Returns
true if successful.

◆ getRangeControllerValue()

bool aace::carControl::CarControl::getRangeControllerValue ( const std::string &  endpointId,
const std::string &  controllerId,
double &  value 
)
virtual

Retrieves the range setting of the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
[out]valueTo be set to the current range setting by the implementation.
Returns
true if value was successfully updated, false if the range setting of the controller cannot be retrieved.

◆ setModeControllerValue()

bool aace::carControl::CarControl::setModeControllerValue ( const std::string &  controlId,
const std::string &  controllerId,
const std::string &  value 
)
virtual

Notifies the platform implementation to set the mode of the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
[in]valueThe new mode to set.
Returns
true if successful.

ModeController

◆ adjustModeControllerValue()

bool aace::carControl::CarControl::adjustModeControllerValue ( const std::string &  endpointId,
const std::string &  controllerId,
int  delta 
)
virtual

Notifies the platform implementation to adjust the mode of the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
[in]deltaThe delta by which to adjust the mode.
Returns
true if successful.

◆ getModeControllerValue()

bool aace::carControl::CarControl::getModeControllerValue ( const std::string &  endpointId,
const std::string &  controllerId,
std::string &  value 
)
virtual

Retrieves the mode of the controller identified by endpointId and controllerId.

Note
The platform implementation must return within 5 seconds. Failure to do so will result in a timeout.
Parameters
[in]endpointIdThe unique identifier of the endpoint.
[in]controllerIdThe unique identifier of the controller.
[out]valueTo be set to the current mode by the implementation.
Returns
true if value was successfully updated, false if the mode of the controller cannot be retrieved.

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