# Sensor control

**Detailed Description**

This section contains APIs related to sensor configuration, sensor control and data acquisition from sensors.

- *group* Telematics\_sensor\_control

    - Typedefs

- using SelfTestExResultCallback = std::function&lt;void([telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) result, [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[sensor](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6sensorE)::[SelfTestResultParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00621.html#_CPPv4N5telux6sensor20SelfTestResultParamsE) selfTestResultParams)&gt;

    - This file hosts the sensor interfaces to configure, activate or get data from the individual sensors available - Gyroscope, Accelerometer, etc.

This function is invoked when a result for a self-test initiated using [telux::sensor::ISensorClient::selfTest](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624_1a65f85468f5c4948a6ec97c5d3ba41bd8) is performed.

- Param result:

    - **[in]** - Errorcode depicting result of the self test - [telux::common::ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga84acdb74b7d34616b1ca497c7369810d.html#a00023_1ga84acdb74b7d34616b1ca497c7369810d) [in] selfTestResultParams - Struct to represent the result of sensor self test via [telux::sensor::SelfTestResultParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00621)

- using SelfTestResultCallback = std::function&lt;void([telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) result)&gt;

    - This function is invoked when a result for a self-test initiated using [telux::sensor::ISensorClient::selfTest](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624_1a65f85468f5c4948a6ec97c5d3ba41bd8) is available.

Deprecated This callback is no longer supported. Use [telux::sensor::SelfTestExResultCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00047_1gae47c17ff409dfa85ff6bc6be3f7599cf).

- Param result:

    - **[in]** The result of the self test - [telux::common::ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga84acdb74b7d34616b1ca497c7369810d.html#a00023_1ga84acdb74b7d34616b1ca497c7369810d)

- using ISensor = ISensorClient

    -

- class ISensorEventListener : public [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ISDKListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00046.html#_CPPv4N5telux6common12ISDKListenerE)

    - [ISensorEventListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622) interface is used to receive notifications related to sensor events and configuration updates.

The listener method can be invoked from multiple different threads. Client needs to make sure that implementation is thread-safe.

Public Functions

- inline virtual void onEvent(std::shared\_ptr&lt;std::vector&lt;[SensorEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00629.html#_CPPv4N5telux6sensor11SensorEventE)&gt;&gt; events)

    - This function is called to notify about available sensor events. Note the following constraints on this listener API It shall not perform time consuming (compute or I/O intensive) operations on this thread It shall not inovke an sensor APIs on this thread due to the underlying concurrency model

On platforms with Access control enabled, the client needs to have TELUX\_SENSOR\_DATA\_READ permission for this listener API to be invoked.

- Parameters:

    - **events** – **[in]** - List of sensor events

- inline virtual void onConfigurationUpdate([SensorConfiguration](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00623.html#_CPPv4N5telux6sensor19SensorConfigurationE) configuration)

    - This function is called to notify any change in the configuration of the [ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624) object this listener is associated with.

On platforms with Access control enabled, the client needs to have TELUX\_SENSOR\_DATA\_READ permission for this listener API to be invoked.

- Parameters:

    - **configuration** – **[in]** - The new configuration of the sensor client. [telux::sensor::SensorConfiguration](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00623). Fields that have changed can be identified using the [telux::sensor::SensorConfiguration::updateMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00623_1afe7d7e845909075d23b242afb3c90cce) and fields that are valid can be identified using [telux::sensor::SensorConfiguration::validityMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00623_1a01146c35d27ef1a09e63a47f4c00aa36)

- inline virtual void onSelfTestFailed()

    - This API is invoked to notify a failed self-test that was triggered internally by the sensor service. For self-test explicitly requested via [telux::sensor::ISensorClient::selfTest](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624_1a65f85468f5c4948a6ec97c5d3ba41bd8) API, results will be delivered via [SelfTestExResultCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00047_1gae47c17ff409dfa85ff6bc6be3f7599cf).

On platforms with Access control enabled, the client needs to have TELUX\_SENSOR\_DATA\_READ permission for this listener API to be invoked.

- inline virtual ~ISensorEventListener()

    - The destructor for the sensor event listener

- class ISensorClient

    - [ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624) interface is used to access the different services provided by the sensor framework to configure, activate and acquire sensor data.

Each instance of this class is a unique sensor client to the underlying sensor framework and any number of such clients can exist in a given process. Each of these clients can acquire data from the underlying sensor framework with different configurations.

Public Functions

- virtual [SensorInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00625.html#_CPPv4N5telux6sensor10SensorInfoE) getSensorInfo() = 0

    - Get the information related to sensor

- Returns:

    - information retated to sensor - [telux::sensor::SensorInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) configure([SensorConfiguration](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00623.html#_CPPv4N5telux6sensor19SensorConfigurationE) configuration) = 0

    - Configure the sensor client with desired sampling rate, batch count and rotation configuration. Any change in sampling rate or batch count or rotation configuration of the sensor will be notified via [telux::sensor::ISensorEventListener::onConfigurationUpdate](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622_1ad1ef972591bb999b46d78a2ebb861909).

In case a sensor client needs to be reconfigured after having been activated, the client should be deactivated, configured and activated again as a part of the reconfiguration process.

It is always recommended that configuration of a client is done before activating it. If a client is activated without configuration, the client is configured with a default configuration and activated. The default configuration would have the sampling rate set to minimum sampling rate supported [telux::sensor::SensorInfo::samplingRates](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625_1a53fa4e9251278fe5de0a5c89e21bebb5), the batch count set to maximum batch count supported [telux::sensor::SensorInfo::maxBatchCountSupported](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625_1a235f4271d2e18cd0e1f536b0bbfe5193) and rotated data will be delivered via [telux::sensor::ISensorEventListener::onEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622_1ab357afb7ab27fb33b127f3f093bc7c5c).

On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_DATA\_READ permission to invoke this API successfully.

- Parameters:

    - **configuration** – **[in]** - The desired configuration for the client [telux::sensor::SensorConfiguration](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00623). Ensure the required validity mask [telux::sensor::SensorConfiguration::validityMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00623_1a01146c35d27ef1a09e63a47f4c00aa36) is set for the configuration.

- Returns:

    - status of configuration request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [SensorConfiguration](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00623.html#_CPPv4N5telux6sensor19SensorConfigurationE) getConfiguration() = 0

    - Get the current configuration of this sensor client

On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_DATA\_READ permission to invoke this API successfully.

- Returns:

    - the current configuration of the client. [telux::sensor::SensorConfiguration::validityMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00623_1a01146c35d27ef1a09e63a47f4c00aa36) should be checked to know which of the fields in the returned configuration is valid.

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) activate() = 0

    - Activate the sensor client. Once activated, any available sensor event will be notified via [telux::sensor::ISensorEventListener::onEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622_1ab357afb7ab27fb33b127f3f093bc7c5c)

It is always recommended that configuration of a client is done before activating it. If a client is activated without configuration, the client is configured with the default configuration and activated. The default configuration would have the sampling rate set to minimum sampling rate supported [telux::sensor::SensorInfo::samplingRates](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625_1a53fa4e9251278fe5de0a5c89e21bebb5), the batch count set to maximum batch count supported [telux::sensor::SensorInfo::maxBatchCountSupported](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625_1a235f4271d2e18cd0e1f536b0bbfe5193) and rotated data will be delivered via [telux::sensor::ISensorEventListener::onEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622_1ab357afb7ab27fb33b127f3f093bc7c5c). Activating an already activated sensor would result in the API returning telux::common::Status::SUCCESS.

Activating this sensor client would not impact other inactive sensor clients.

On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_DATA\_READ permission to invoke this API successfully.

- Returns:

    - status of activation request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) deactivate() = 0

    - Deactivate the sensor client. Once deactivated, no further sensor events will be notified via [telux::sensor::ISensorEventListener::onEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622_1ab357afb7ab27fb33b127f3f093bc7c5c). Deactivating an already inactive sensor would result in the API returning telux::common::Status::SUCCESS.

Deactivating this sensor client would not impact other active sensor clients.

On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_DATA\_READ permission to invoke this API successfully.

- Returns:

    - status of deactivation request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) selfTest([SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6sensor12SelfTestTypeE) selfTestType, [SelfTestExResultCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00047_1gae47c17ff409dfa85ff6bc6be3f7599cf.html#_CPPv4N5telux6sensor24SelfTestExResultCallbackE) cb) = 0

    - Initiate self test on this sensor

If there are no active data acquistion sessions corresponding to this sensor, the [SensorResultType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1ga31887260a0a22e9c132287144a48abdc.html#a00027_1ga31887260a0a22e9c132287144a48abdc) will be set to [CURRENT](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1ga31887260a0a22e9c132287144a48abdc.html#a00027_1gga31887260a0a22e9c132287144a48abdcab4f5a1dd6c704faea2614fe4b1f7db73) and the self test will be performed for a given [SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1gacbc10d0d601442b66876d7010fa34ec0.html#a00027_1gacbc10d0d601442b66876d7010fa34ec0).

If there are active data acquisition sessions corresponding to this sensor, the [SensorResultType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1ga31887260a0a22e9c132287144a48abdc.html#a00027_1ga31887260a0a22e9c132287144a48abdc) will be set to [HISTORICAL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1ga31887260a0a22e9c132287144a48abdc.html#a00027_1gga31887260a0a22e9c132287144a48abdcaa3e8af05b6759a0aba249754444f7c1b) and the result will correspond to the previous self test performed for a given [SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1gacbc10d0d601442b66876d7010fa34ec0.html#a00027_1gacbc10d0d601442b66876d7010fa34ec0).

In case the self test for this sensor couldn’t be performed for a given [SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1gacbc10d0d601442b66876d7010fa34ec0.html#a00027_1gacbc10d0d601442b66876d7010fa34ec0), the callback is invoked with telux::common::ErrorCode::INFO\_UNAVAILABLE.

On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_PRIVILEGED\_OPS permission to invoke this API successfully.

- Parameters:

    - - **selfTestType** – **[in]** - The type of self test to be performed - [telux::sensor::SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1gacbc10d0d601442b66876d7010fa34ec0.html#a00027_1gacbc10d0d601442b66876d7010fa34ec0)
- **cb** – **[in]** - Callback to get the result of the self test initiated

- Returns:

    - status of the request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d). Note that the result of the self test done by the sensor is provided via the callback - [telux::sensor::SelfTestExResultCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00047_1gae47c17ff409dfa85ff6bc6be3f7599cf)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) registerListener(std::weak\_ptr&lt;[ISensorEventListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00622.html#_CPPv4N5telux6sensor20ISensorEventListenerE)&gt; listener) = 0

    - Register a listener for sensor related events

- Returns:

    - status of registration request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) deregisterListener(std::weak\_ptr&lt;[ISensorEventListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00622.html#_CPPv4N5telux6sensor20ISensorEventListenerE)&gt; listener) = 0

    - Deregister a sensor event listener

- Returns:

    - status of deregistration request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- inline virtual ~ISensorClient()

    - Destructor for [ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624).

Internally, the sensor client object is first deactivated and then destroyed.

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) enableLowPowerMode() = 0

    - Deprecated APIs Request the sensor to operate in low power mode. The sensor should be in deactivated state to exercise this API. The success of this request depends on the capabilities of the underlying hardware.

Deprecated This API is no longer supported.

- Returns:

    - status of request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) disableLowPowerMode() = 0

    - Request the sensor to exit low power mode. The sensor should be in deactivated state to exercise this API. The success of this request depends on the capabilities of the underlying hardware.

Deprecated This API is no longer supported.

- Returns:

    - status of request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) selfTest([SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6sensor12SelfTestTypeE) selfTestType, [SelfTestResultCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00047_1gacb4e3c1409c296a98585685fd8b28c7b.html#_CPPv4N5telux6sensor22SelfTestResultCallbackE) cb) = 0

    - Initiate self test on this sensor

If there are no active data acquistion sessions corresponding to this sensor, the self test will be performed based on the [SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1gacbc10d0d601442b66876d7010fa34ec0.html#a00027_1gacbc10d0d601442b66876d7010fa34ec0) passed.

If there are active data acquisition sessions corresponding to this sensor, the self test will not be performed and the callback will be invoked with telux::common::ErrorCode::DEVICE\_IN\_USE.

On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_PRIVILEGED\_OPS permission to invoke this API successfully.

Deprecated This API is no longer supported. Use [selfTest(SelfTestType selfTestType, SelfTestExResultCallback cb)](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624_1a65f85468f5c4948a6ec97c5d3ba41bd8) API instead.

- Parameters:

    - - **selfTestType** – **[in]** - The type of self test to be performed - [telux::sensor::SelfTestType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00027_1gacbc10d0d601442b66876d7010fa34ec0.html#a00027_1gacbc10d0d601442b66876d7010fa34ec0)
- **cb** – **[in]** - Callback to get the result of the self test initiated

- Returns:

    - status of the request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d). Note that the result of the self test done by the sensor is provided via the callback - [telux::sensor::SelfTestResultCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00047_1gacb4e3c1409c296a98585685fd8b28c7b)

- class ISensorManager

    - Sensor Manager class provides APIs to interact with the sensor sub-system and get access to other sensor objects which can be used to configure, activate or get data from the individual sensors available - Gyro, Accelero, etc.

Public Functions

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common13ServiceStatusE) getServiceStatus() = 0

    - Checks the status of sensor sub-system and returns the result.

- Returns:

    - the status of sensor sub-system status [telux::common::ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga7063b4a1071b6581022e30b730684e4d.html#a00023_1ga7063b4a1071b6581022e30b730684e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) getAvailableSensorInfo(std::vector&lt;[SensorInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00625.html#_CPPv4N5telux6sensor10SensorInfoE)&gt; &info) = 0

    - Get information related to the sensors available in the system.

- Parameters:

    - **info** – **[out]** List of information on sensors available in the system [telux::sensor::SensorInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625)

- Returns:

    - status of the request [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) getSensor(std::shared\_ptr&lt;[ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00624.html#_CPPv4N5telux6sensor13ISensorClientE)&gt; &sensor, std::string name) = 0

    - Get an instance of [ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624) to interact with the underlying sensor. The provided instance is not a singleton. Everytime this method is called a new sensor object is created. It is the caller’s responsibility to manage the object’s lifetime. Every instance of the sensor returned acts as new client and can configure the underlying sensor with it’s own configuration and it’s own callbacks for [telux::sensor::SensorEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00629) and configuration update among other events [telux::sensor::ISensorEventListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622).

Deprecated Use getSensorClient API.

- Parameters:

    - - **sensor** – **[out]** - An instance of [telux::sensor::ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624) to interact with the underlying sensor is provided as a result of the method If the initialization of the sensor and underlying system fails, sensor is set to nullptr
- **name** – **[in]** - The unique name of the sensor [telux::sensor::SensorInfo::name](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625_1acdb5fd740d05611965760dd68d84a06d) that was provided in the list of sensor information by [telux::sensor::ISensorManager::getAvailableSensorInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00635_1af90c201e77bf40b4524b75a281b49f96)

- Returns:

    - Status of request [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) getSensorClient(std::shared\_ptr&lt;[ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00624.html#_CPPv4N5telux6sensor13ISensorClientE)&gt; &sensor, std::string name) = 0

    - Get an instance of [ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624) to interact with the underlying sensor. The provided instance is not a singleton. Everytime this method is called a new sensor object is created. It is the caller’s responsibility to manage the object’s lifetime. Every instance of the sensor returned acts as new client and can configure the underlying sensor with it’s own configuration and it’s own callbacks for [telux::sensor::SensorEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00629) and configuration update among other events [telux::sensor::ISensorEventListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00622).

- Parameters:

    - - **sensor** – **[out]** - An instance of [telux::sensor::ISensorClient](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00624) to interact with the underlying sensor is provided as a result of the method If the initialization of the sensor and underlying system fails, sensor is set to nullptr
- **name** – **[in]** - The unique name of the sensor [telux::sensor::SensorInfo::name](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00625_1acdb5fd740d05611965760dd68d84a06d) that was provided in the list of sensor information by [telux::sensor::ISensorManager::getAvailableSensorInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00635_1af90c201e77bf40b4524b75a281b49f96)

- Returns:

    - Status of request [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) setEulerAngleConfig([EulerAngleConfig](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00626.html#_CPPv4N5telux6sensor16EulerAngleConfigE) eulerAngleConfig) = 0

    - This API is called to set Euler angles, used for sensor rotation matrix.

The sensor data should always be obtained w.r.t the vehicular frame. This API accepts the Euler angles which are used to compute the rotational matrix and provide the final rotated sensor data to the clients. It is advised to set the Euler angles by calling this API before activating any sensor clients.

On platforms with access control enabled, caller needs to have TELUX\_SENSOR\_PRIVILEGED\_OPS permission to invoke this API successfully.

- Parameters:

    - **eulerAngleConfig** – **[in]** - The Euler angle configuration.

- Returns:

    - status of Euler angle update request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- inline virtual ~ISensorManager()

    - Destructor for [ISensorManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00635)

Last Published: Apr 14, 2026

[Previous Topic
uncalibrated](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/sensor_service.md) [Next Topic
Sensor feature control](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/sensor_feature_control.md)