Telematics SDK - API Reference
v1.60.0
|
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)> |
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 () |
![]() | |
virtual void | onServiceStatusChange (ServiceStatus status) |
virtual | ~IServiceStatusListener () |
|
virtual |
IAntennaListener destructor.
|
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.
[in] | antIndex | Indicates which antenna is now active. |
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 () |
|
virtual |
IAntennaManager destructor.
|
pure virtual |
Indicates whether the object is in a usable state.
|
pure virtual |
Registers the listener for antenna manager indications.
[in] | listener | Pointer to the implemented listener. |
|
pure virtual |
Deregisters the previously registered listener.
[in] | listener | Pointer to the registered listener that needs to be removed. |
|
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.
[in] | antIndex | Physical antenna switch path index to be set, this index starts with 0. |
[in] | callback | Optional callback pointer to get the response of the setActiveAntenna request. |
|
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.
[in] | callback | Callback function to get the getActiveAntenna response. |
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.
[in] | antIndex | Active physical antenna switch path index. |
[in] | error | Return code indicating whether the operation succeeded or not telux::common::ErrorCode. |