Telematics SDK - API Reference  v1.63.0
Hardware Antenna

Data Structures

class  telux::platform::hardware::IAntennaListener
 Listen class to get antenna configuration related notifications. The client needs to implement these methods as briefly as possible and avoid blocking calls. Class methods can be invoked from multiple threads, so the client needs to ensure that the implementation is thread-safe. More...
 
class  telux::platform::hardware::IAntennaManager
 IAntennaManager provides an interface to set and get the active antenna's configuration. More...
 

Typedefs

using telux::platform::hardware::GetActiveAntCb = std::function< void(int antIndex, telux::common::ErrorCode error)>
 

Detailed Description

This section contains APIs related to antenna management to set or get the active antenna's configuration.


Data Structure Documentation

class telux::platform::hardware::IAntennaListener

Listen class to get antenna configuration related notifications. The client needs to implement these methods as briefly as possible and avoid blocking calls. Class methods can be invoked from multiple threads, so the client needs to ensure that the implementation is thread-safe.

Public Member Functions

virtual void onActiveAntennaChange (int antIndex)
 
virtual ~IAntennaListener ()
 
- Public Member Functions inherited from telux::common::IServiceStatusListener
virtual void onServiceStatusChange (ServiceStatus status)
 
virtual ~IServiceStatusListener ()
 

Constructor & Destructor Documentation

virtual telux::platform::hardware::IAntennaListener::~IAntennaListener ( )
virtual

IAntennaListener destructor.

Member Function Documentation

virtual void telux::platform::hardware::IAntennaListener::onActiveAntennaChange ( int  antIndex)
virtual

This function is called whenever any active cellular antenna is changed.

On platforms with access control enabled, the caller needs to have TELUX_PLATFORM_ANTENNA_MGMT permission to receive this notification.

Parameters
[in]antIndexIndicates which antenna is now active.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::platform::hardware::IAntennaManager

IAntennaManager provides an interface to set and get the active antenna's configuration.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IAntennaListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IAntennaListener > listener)=0
 
virtual telux::common::Status setActiveAntenna (int antIndex, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status getActiveAntenna (GetActiveAntCb callback)=0
 
virtual ~IAntennaManager ()
 

Constructor & Destructor Documentation

virtual telux::platform::hardware::IAntennaManager::~IAntennaManager ( )
virtual

IAntennaManager destructor.

Member Function Documentation

virtual telux::common::ServiceStatus telux::platform::hardware::IAntennaManager::getServiceStatus ( )
pure virtual

Indicates whether the object is in a usable state.

Returns
telux::common::ServiceStatus indicating the current status of the antenna configuration service.
virtual telux::common::Status telux::platform::hardware::IAntennaManager::registerListener ( std::weak_ptr< IAntennaListener listener)
pure virtual

Registers the listener for antenna manager indications.

Parameters
[in]listenerPointer to the implemented listener.
Returns
Status of the registration request.
virtual telux::common::Status telux::platform::hardware::IAntennaManager::deregisterListener ( std::weak_ptr< IAntennaListener listener)
pure virtual

Deregisters the previously registered listener.

Parameters
[in]listenerPointer to the registered listener that needs to be removed.
Returns
Status of the deregistration request.
virtual telux::common::Status telux::platform::hardware::IAntennaManager::setActiveAntenna ( int  antIndex,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Switches the cellular antenna configuration between antennas when an antenna is damaged. This API is to be invoked when the client detects that the currently active antenna is broken and determines that a switch to another antenna is required to maintain cellular services. The index of the antenna is based on the order in which the antenna appears in the radio frequency control (RFC). Across reboots or SSR, this configuration will not be persistent and it will reset back to the initial antenna. Clients are required to call this API again to switch to the desired antenna.

On platforms with access control enabled, the caller needs to have TELUX_PLATFORM_ANTENNA_MGMT permission to successfully invoke this API.

Parameters
[in]antIndexPhysical antenna switch path index to be set, this index starts with 0.
[in]callbackOptional callback pointer to get the response of the setActiveAntenna request.
Returns
Status of the setActiveAntenna request; either success or the suitable error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::platform::hardware::IAntennaManager::getActiveAntenna ( GetActiveAntCb  callback)
pure virtual

Gets the current active cellular antenna configuration index of the device. Valid only when the device is camped on network.

On platforms with access control enabled, the caller needs to have TELUX_PLATFORM_ANTENNA_MGMT permission to successfully invoke this API.

Parameters
[in]callbackCallback function to get the getActiveAntenna response.
Returns
Status of the getActiveAntenna request; either success or the suitable error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.

Typedef Documentation

using telux::platform::hardware::GetActiveAntCb = typedef std::function<void(int antIndex, telux::common::ErrorCode error)>

This function is called with the response to the getActiveAntenna API.

The callback can be invoked from multiple threads, so the client needs to ensure that the implementation is thread-safe.

Parameters
[in]antIndexActive physical antenna switch path index.
[in]errorReturn code indicating whether the operation succeeded or not telux::common::ErrorCode.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.