# Physical Sensors

## Accelerometer

All Accelerometer Sensor drivers are required to comply with this API. Any additional functionality for Accelerometer Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Accelerometer Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “accel”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_accel.proto”.
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute values in (m/s^2)/LSB unit.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in +/- m/s^2 unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING.
6. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. The Accelerometer Sensor handles the sns\_std\_sensor\_config message request with msgid SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_SENSOR\_CONFIG for all non-gated stream enable/update requests.
2. The Accelerometer Sensor handles the sns\_std\_sensor\_config message request with msgid SNS\_STD\_EVENT\_GATED\_SENSOR\_MSGID\_SNS\_STD\_SENSOR\_CONFIG for all gated stream enable/update requests. a. Accelerometer stream is gated on the motion detection feature available on most accel hardware. This feature is published via the “motion\_detect” Sensor by the same driver library as “accel” Sensor. b. If “motion\_detect” is not supported then the Sensor does not support stream gating. A gated client request shall be rejected in this case.
3. The Accelerometer Sensor uses batching\_period item in sns\_std\_request as the requested batching rate to determine hardware FIFO and DAE (if supported) watermarks.

*Publishing Stream Events:*

1. The Accelerometer Sensor publishes acceleration data stream events using the sns\_std\_sensor\_event message.
2. Each stream event contains three output data fields where data is in m/s^2 units and is factory calibrated.
3. Data in the stream is adjusted to Sensing Hub coordinate system. See Sensing Hub documentation for a complete definition. As an example on a mobile phone: if the device is held with screen facing the user in its natural orientation: X-axis: parallel to the screen pointing to the right Y-axis: parallel to the screen pointing to the top Z-axis: perpendicular to the screen pointing towards the user
4. Data in the stream event is ordered as:

data[0] = X-axis
        data[1] = Y-axis
        data[2] = Z-axis
        Copy to clipboard
5. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
6. The Accelerometer Sensor shall publish a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It shall publish this event each time there is change in hardware config of the sensor or when a client sends a streaming request.
7. The Accelerometer Sensor shall publish a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message (see sns\_cal.proto). It shall publish a cal event each time there is change in its factory calibration data or when a client sends a new streaming request.
8. When all outstanding requests to the Sensor are gated requests and the “motion\_detect” Sensor is enabled then the accel Sensor stops generating output events, and the motion sensor sends the SNS\_MOTION\_DETECT\_EVENT\_TYPE\_ENABLED event. a. If motion detect interrupt fires:

    - All existing accel gated stream requests are converted to non-gated stream requests. The accel Sensor publishes an event with message ID SNS\_STD\_EVENT\_GATED\_SENSOR\_MSGID\_GATED\_REQ\_CONVERTED\_TO\_NON\_GATED to to indicate this change to its gated clients.
    - The accel Sensor resumes generating output to all clients. b. The Sensor resumes generating output events if motion detect interrupt is disabled potentially due to a new non-gated accel stream request or the request to motion\_detect Sensor is disabled. In this case, gated requests are not converted to non-gated requests, and the motion sensor sends the SNS\_MOTION\_DETECT\_EVENT\_TYPE\_DISABLED event.
9. If all outstanding requests to the Sensor are gated requests but the “motion\_detect” Sensor is not enabled then the Sensor continues to generate output events.

*Processing Self-Test Requests:*

1. The Accelerometer Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Accelerometer Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The Accelerometer Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Accelerometer Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Ambient light

All Ambient Light Sensor drivers are required to comply with this API. Any additional functionality for Ambient Light Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Ambient Light Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “ambient\_light”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_ambient\_light.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute value in Lux/LSB.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in Lux unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING or SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE
6. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. An Ambient Light Sensor may support either streaming or on-change modes. The operating mode is configured in the sensors Registry. a. If a driver supports both modes, it must publish two sensors. One with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING, and a second with SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE.
2. The streaming Ambient Light Sensor handles the SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_SENSOR\_CONFIG request for all stream enable/update requests.
3. The on-change Ambient Light Sensor handles the SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_ON\_CHANGE\_CONFIG request for all stream enable/update requests.
4. In on-change mode the Sensor uses interrupt operation and reports samples for only significant change in ambient light. Example: +/- 10% change.

*Publishing Stream Events:*

1. The Ambient Light Sensor publishes current illumination events using the sns\_std\_sensor\_event message.
2. Each stream event contains two output data fields where data is factory calibrated and ordered as: data[0] = ambient light in Lux data[1] = raw ADC value associated with data[0]
3. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
4. The Ambient Light Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is change in hardware config of the sensor or when a client sends a new request.
5. The Ambient Light Sensor publishes a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message. It publishes this event each time there is change in its factory calibration data or when a client sends a new request.

*Processing Self-Test Requests:*

1. The Ambient Light Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Ambient Light Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API. The factory test for Ambient Light Sensor calibrates the sensor such that its output Lux value is comparable to a standard Luxmeter output in any lighting condition.
3. The Ambient Light Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Ambient Light Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Ambient temperature

All Ambient Temperature Sensor drivers are required to comply with this API. Any additional functionality for Ambient Temperature Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Ambient Temperature Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “ambient\_temperature”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_ambient\_temperature.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute value in degrees Celsius/LSB.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in degrees Celsius unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING or SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE
6. See sns\_std\_sensor.proto for other attributes.

*Procesing Stream Requests:*

1. A Ambient Temperature Sensor may support either streaming or on-change mode. The operating mode is configured in the Registry. a. If a driver supports both modes, it must publish two sensors. One with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING, and a second with SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE.
2. A streaming Ambient Temperature Sensor handles the sns\_std\_sensor\_config request for all stream enable/update requests.
3. An on-change Ambient Temperature Sensor handles the SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_ON\_CHANGE\_CONFIG request for all on-change enable/update requests.
4. If the physical sensor supports hardware FIFO then the Ambient Temperature Sensor uses batching\_period item in sns\_std\_request as the requested batching rate to determine hardware FIFO watermark.
5. In on-change mode the sensor reports samples only if Ambient Temperature changes by some threshold.

*Publishing Stream Events:*

1. The Ambient Temperature Sensor publishes data stream events using the sns\_std\_sensor\_event message.
2. Each stream event contains one output data field where data is factory calibrated and ordered as: data[0] = Ambient Temperature data in degrees Celsius
3. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
4. The Ambient Temperature Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is a change in hardware config of the sensor or when a client sends a new request.
5. The Ambient Temperature Sensor may publish a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message. If supported, it shall publish this event each time there is change in its factory calibration data or when a client sends a new request.

*Processing Self-Test Requests:*

1. The Ambient Temperature Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Ambient Temperature Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The Ambient Temperature Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Ambient Temperature Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Gyroscope

All Gyroscope Sensor drivers are required to comply with this API. Any additional functionality for Gyroscope Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Gyroscope Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “gyro”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_gyro.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute value in (radians/sec)/LSB.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in radians/sec unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING.
6. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. The Gyroscope Sensor handles the sns\_std\_sensor\_config message request for all stream enable/update requests.
2. The Gyroscope Sensor uses batching\_period item in sns\_std\_request as the requested batching rate to determine hardware FIFO and DAE (if supported) watermarks.

*Publishing Stream Events:*

1. The Gyroscope Sensor publishes device rotation data stream events using the sns\_std\_sensor\_event message.
2. Each stream event contains three output data fields where data is in radians/sec units and is factory calibrated.
3. Data in the stream is adjusted to Sensing Hub coordinate system. See Sensing Hub documentation for a complete definition. As an example on a mobile phone: if the device is held with screen facing the user in its natural orientation:

    - X-axis: parallel to the screen pointing to the right
    - Y-axis: parallel to the screen pointing to the top
    - Z-axis: perpendicular to the screen pointing towards the user Note: Positive rotation follows the right-hand rule.
4. Data in the stream event is ordered as:

data[0] = X-axis
        data[1] = Y-axis
        data[2] = Z-axis
        Copy to clipboard
5. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
6. The Gyroscope Sensor shall publish a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It shall publish this event each time there is change in hardware config of the sensor or when a client sends a new streaming request.
7. The Gyroscope Sensor shall publish a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message. It shall publish this event each time there is change in its factory calibration data or when a client sends a new streaming request.

*Processing Self-Test Requests:*

1. The Gyroscope Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Gyroscope Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The Gyroscope Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Gyroscope Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Hall

All Hall Sensor drivers are required to comply with this API. Any additional functionality for Hall Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Hall Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “hall”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_hall.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values as 0 and 1.
5. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. The Hall Sensor handles the SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_ON\_CHANGE\_CONFIG message ID for all stream enable/update requests.
2. The Hall Sensor operates in on-change mode and report samples only for magnet NEAR/FAR transitions.

*Publishing Stream Events:*

1. The Hall Sensor publishes magnetic field proximity data stream events using the [sns\_hall\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__hall__event) message.
2. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
3. The Hall Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is change in hardware config of the sensor or when a client sends a new request.

*Processing Self-Test Requests:*

1. The Hall Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Hall Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Hall Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

Enums

- enum sns\_hall\_msgid

    - Message IDs for hall Sensor.

*Values:*

- enumerator SNS\_HALL\_MSGID\_SNS\_HALL\_EVENT

    - Data event from the hall sensor to its client. Message: [sns\_hall\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__hall__event).

- enum sns\_hall\_event\_type

    - Hall Event Type.

*Values:*

- enumerator SNS\_HALL\_EVENT\_TYPE\_FAR

    - 

- enumerator SNS\_HALL\_EVENT\_TYPE\_NEAR

    -

- struct sns\_hall\_event

    - Public Members

- required sns\_hall\_event\_type hall\_event\_type [default=SNS\_HALL\_EVENT\_TYPE\_FAR]

    - Hall NEAR/FAR output event.

- required sns\_std\_sensor\_sample\_status status [default=SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE]

    - Hall sensor sample status.

## Humidity

All Humidity Sensor drivers are required to comply with this API. Any additional functionality for Humidity Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Humidity Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “humidity”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_humidity.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute value in RH/LSB, where RH is Relative Humidity.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in RH unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE.
6. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. The Humidity Sensor handles the SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_ON\_CHANGE\_CONFIG message ID for all stream enable/update requests.
2. The Humidity Sensor supports on-change mode of operation.
3. The Sensor should use interrupt operation and shall report samples for only a significant change in humidity. Example: +/- 5% change.

*Publishing Stream Events:*

1. The Humidity Sensor publishes ambient relative humidity data stream events using the sns\_std\_sensor\_event message.
2. Each stream event contains one output data field where data is factory calibrated and ordered as: data[0] = Humidity data in RH (% Relative Humidity)
3. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
4. The Humidity Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is change in hardware config of the sensor or when a client sends a new streaming request.
5. The Humidity Sensor may publish a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message. If supported, it shall publish this event each time there is change in its factory calibration data or when a client sends a new streaming request.

*Processing Self-Test Requests:*

1. The Humidity Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Humidity Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The Humidity Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Humidity Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Magnetometer

All Magnetometer Sensor drivers are required to comply with this API. Any additional functionality for Magnetometer Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Magnetometer Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “mag”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_mag.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute value in µT/LSB.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in µT unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING.
6. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. The Magnetometer Sensor handles the sns\_std\_sensor\_config message request for all stream enable/update requests.
2. If the physical sensor supports hardware FIFO then the Magnetometer Sensor uses batching\_period item in sns\_std\_request as the requested batching rate to determine hardware FIFO and DAE (if supported) watermark.

*Publishing Stream Events:*

1. The Magnetometer Sensor publishes ambient magnetic field data events using the sns\_std\_sensor\_event message.
2. Each stream event contains three output data fields where data is in µT (micro Tesla) units and is factory calibrated.
3. Data in the stream is adjusted to Sensing Hub coordinate system. See Sensing Hub documentation for a complete definition. As an example on a mobile phone: if the device is held with screen facing the user in its natural orientation: X-axis: parallel to the screen pointing to the right Y-axis: parallel to the screen pointing to the top Z-axis: perpendicular to the screen pointing towards the user
4. Data in the stream event is ordered as:

data[0] = X-axis
        data[1] = Y-axis
        data[2] = Z-axis
        Copy to clipboard
5. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
6. The Magnetometer Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is change in hardware config of the sensor or when a client sends a new streaming request.
7. The Magnetometer Sensor publishes a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message. It publishes this event each time there is change in its factory calibration data or when a client sends a new streaming request.

*Processing Self-Test Requests:*

1. The Magnetometer Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Magnetometer Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The Magnetometer Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Magnetometer Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Pressure

All Pressure Sensor drivers are required to comply with this API. Any additional functionality for Pressure Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Pressure Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “pressure”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_pressure.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute values in hectoPascal/LSB unit.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in hectoPascal unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING.
6. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. The Pressure Sensor handles the sns\_std\_sensor\_config message request for all stream enable/update requests.
2. If the physical sensor supports hardware FIFO then the Pressure Sensor uses batching\_period item in sns\_std\_request as the requested batching rate to determine hardware FIFO watermark.

*Publishing Stream Events:*

1. The Pressure Sensor publishes atmospheric pressure data stream events using the sns\_std\_sensor\_event message.
2. Each stream event contains one output data field where data is factory calibrated and ordered as: data[0] = Pressure data in hPa (hectoPascal)
3. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
4. The Pressure Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is change in hardware config of the sensor or when a client sends a new streaming request.
5. The Pressure Sensor publishes a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message. It publishes this event each time there is change in its factory calibration data or when a client sends a new streaming request.

*Processing Self-Test Requests:*

1. The Pressure Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Pressure Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The Pressure Sensor could implement other test types.

*Publishing Self-Test Events:*

1. The Pressure Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Proximity

All Proximity Sensor drivers are required to comply with this API. Any additional functionality for Proximity Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Proximity Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “proximity”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_proximity.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in cm unit (proximity distance).
4. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING or SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE
5. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. A Proximity Sensor may support either streaming or on-change mode. The operating mode is configured in the Registry. a. If a driver supports both modes, it must publish two sensors. One with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING, and a second with SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE.
2. A streaming Proximity Sensor handles the sns\_std\_sensor\_config request for all stream enable/update requests.
3. An on-change Proximity Sensor handles the SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_ON\_CHANGE\_CONFIG request for all on-change enable/update requests.

*Publishing Stream Events:*

1. A Proximity Sensor with STREAM\_TYPE\_STREAMING shall publish data events using the SNS\_PROXIMITY\_MSGID\_SNS\_PROXIMITY\_EVENT\_RECURRENT message ID.
2. A Proximity Sensor with STREAM\_TYPE\_ON\_CHANGE shall publish data events using the SNS\_PROXIMITY\_MSGID\_SNS\_PROXIMITY\_EVENT message ID. a. In on-change mode the Sensor should use interrupt operation and shall report samples only for NEAR/FAR transitions or when a new client request is received.
3. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
4. The Proximity Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is a change in hardware config or when a client sends a new request.

*Processing Self-Test Requests:*

1. The Proximity Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Proximity Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API. The factory test for Proximity Sensor calibrates the sensor to detect an object (including light and dark colored) at 5 cm distance from the physical sensor.
3. The Proximity Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Proximity Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

Enums

- enum sns\_proximity\_msgid

    - Message IDs for proximity Sensor.

*Values:*

- enumerator SNS\_PROXIMITY\_MSGID\_SNS\_PROXIMITY\_EVENT

    - A proximity data event from a proximity sensor with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE Message: [sns\_proximity\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__proximity__event).

- enumerator SNS\_PROXIMITY\_MSGID\_SNS\_PROXIMITY\_EVENT\_RECURRENT

    - A proximity data event from a proximity sensor with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING Message: [sns\_proximity\_event\_recurrent](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__proximity__event__recurrent).

- enum sns\_proximity\_event\_type

    - Event Types of Proximity Sensor.

*Values:*

- enumerator SNS\_PROXIMITY\_EVENT\_TYPE\_FAR

    - 

- enumerator SNS\_PROXIMITY\_EVENT\_TYPE\_NEAR

    -

- struct sns\_proximity\_event

    - Public Members

- required sns\_proximity\_event\_type proximity\_event\_type [default=SNS\_PROXIMITY\_EVENT\_TYPE\_FAR]

    - Proximity NEAR/FAR output event.

- required uint32 raw\_adc

    - Proximity sensor raw data.

- required sns\_std\_sensor\_sample\_status status [default=SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE]

    - Proximity sensor sample status.

- struct sns\_proximity\_event\_recurrent

    - Public Members

- required sns\_proximity\_event\_type proximity\_event\_type [default=SNS\_PROXIMITY\_EVENT\_TYPE\_FAR]

    - Proximity NEAR/FAR output event.

- required uint32 raw\_adc

    - Proximity sensor raw data.

- required sns\_std\_sensor\_sample\_status status [default=SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE]

    - Proximity sensor sample status.

## Sensor Temperature

All Sensor Temperature Sensor drivers are required to comply with this API. Any new functionality for Sensor Temperature Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The Sensor Temperature Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “sensor\_temperature”.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_sensor\_temperature.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RESOLUTIONS attribute value in degrees Celsius/LSB.
4. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in degrees Celsius unit.
5. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING.
6. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. The Sensor Temperature Sensor handles the sns\_std\_sensor\_config message request for all stream enable/update requests.
2. If the physical sensor supports hardware FIFO then the Sensor Temperature Sensor uses batching\_period item in sns\_std\_request as the requested batching rate to determine hardware FIFO watermark.

*Publishing Stream Events:*

1. The Sensor Temperature Sensor publishes physical sensor temperature data stream events using the sns\_std\_sensor\_event message.
2. Each stream event contains one output data field where data is factory calibrated and ordered as: data[0] = physical Sensor Temperature data in degrees Celsius
3. Each stream event publishes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
4. The Sensor Temperature Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is change in hardware config of the sensor or when a client sends a new streaming request.
5. The Sensor Temperature Sensor may publish a factory calibration event using the [sns\_cal\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__cal__event) message. If supported, it shall publish this event each time there is change in its factory calibration data or when a client sends a new streaming request.

*Processing Self-Test Requests:*

1. The Sensor Temperature Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The Sensor Temperature Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The Sensor Temperature Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The Sensor Temperature Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

## Significant Motion Detection

A significant motion sensor reports once if “significant motion” is detected.

*Attribute Requirements:*

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE is “sig\_motion”
2. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE: SNS\_STD\_SENSOR\_STREAM\_TYPE\_SINGLE\_OUTPUT
3. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_sig\_motion.proto”

*Processing Stream Requests: SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_ON\_CHANGE\_CONFIG*

No configuration is available for this sensor.

*Publishing Stream Events: SNS\_SIG\_MOTION\_MSGID\_SNS\_SIG\_MOTION\_EVENT*

Reported upon new detection of significant motion.

Enums

- enum sns\_sig\_motion\_msgid

    - Message IDs for Significant Motion Detect Sensor.

*Values:*

- enumerator SNS\_SIG\_MOTION\_MSGID\_SNS\_SIG\_MOTION\_EVENT

    - Empty Message.

## Specific Absorption Rate

SAR sensors typically detect human object proximity using change in capacitance levels of copper touch pads/buttons. All SAR Sensor drivers are required to comply with this API. Any new functionality for SAR Sensor may be defined in a device specific API file.

*Attribute Requirements:*

The SAR Sensor publishes:

1. SNS\_STD\_SENSOR\_ATTRID\_TYPE attribute value as “sar”. Each SAR sensor (example individual capacitive button) shall be published as an independent sensor with a unique Sensor UID.
2. SNS\_STD\_SENSOR\_ATTRID\_API attribute contains “sns\_sar.proto”
3. SNS\_STD\_SENSOR\_ATTRID\_RANGES attribute values in cm unit (proximity distance).
4. SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE as SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING or SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE
5. See sns\_std\_sensor.proto for other attributes.

*Processing Stream Requests:*

1. A SAR sensor may support either streaming or on-change modes. The operating mode is configured in the Registry. a. If a driver supports both modes, it must publish two sensors. One with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING, and a second with SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE.
2. In streaming mode, the SAR sensor handles the sns\_std\_sensor\_config client requests for all stream enable/update request types.
3. In on-change mode, the SAR sensor handles the SNS\_STD\_SENSOR\_MSGID\_SNS\_STD\_ON\_CHANGE\_CONFIG client requests.
4. The client must inspect the SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE to determine the operating mode and the correct request for the sensor.

*Publishing Stream Events:*

1. The SAR Sensor publishes human object proximity data events using a [sns\_sar\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__sar__event) message or [sns\_sar\_event\_recurrent](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__sar__event__recurrent) message. a. If this is a SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING sensor, it uses the [sns\_sar\_event\_recurrent](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__sar__event__recurrent) message. b. If this is a SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE sensor, it uses the [sns\_sar\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__sar__event) message.
2. If an ON\_CHANGE sensor, the SAR sensor shall report samples only for NEAR/FAR transitions triggered by the detection of an object (typically human) in proximity to the SAR sensor. Additionally, the SAR sensor shall publish a data event for each on-change client request.

1. Each event includes an accuracy field: SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE to mark invalid samples when hardware is yet to stabilize after the sensor is configured. SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_ACCURACY\_HIGH to mark samples when they are valid.
2. The SAR Sensor publishes a configuration event using the sns\_std\_sensor\_physical\_config\_event message. It publishes this event each time there is change in hardware config of the sensor or when a client sends a new request.

*Processing Self-Test Requests:*

1. The SAR Sensor implements SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_COM test type using the physical sensor test API.
2. The SAR Sensor may implement SNS\_PHYSICAL\_SENSOR\_TEST\_TYPE\_FACTORY test type to determine factory calibration parameters using the physical sensor test API.
3. The SAR Sensor may implement other test types.

*Publishing Self-Test Events:*

1. The SAR Sensor uses [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) message to publish a test completion event.
2. The test\_passed field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) is used to output the pass/fail result of self-test execution.
3. The test\_data field in [sns\_physical\_sensor\_test\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/algorithm.html#structsns__physical__sensor__test__event) may be used to output any driver-specific error data.

Enums

- enum sns\_sar\_msgid

    - Message IDs for SAR Sensor.

*Values:*

- enumerator SNS\_SAR\_MSGID\_SNS\_SAR\_EVENT

    - A SAR data event from a sensor with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_ON\_CHANGE Message: [sns\_sar\_event](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__sar__event).

- enumerator SNS\_SAR\_MSGID\_SNS\_SAR\_EVENT\_RECURRENT

    - A SAR data event from a sensor with SNS\_STD\_SENSOR\_ATTRID\_STREAM\_TYPE == SNS\_STD\_SENSOR\_STREAM\_TYPE\_STREAMING Message: [sns\_sar\_event\_recurrent](https://docs.qualcomm.com/doc/80-P9361-100/topic/driver.html#structsns__sar__event__recurrent).

- enum sns\_sar\_event\_type

    - Sar Event Type.

*Values:*

- enumerator SNS\_SAR\_EVENT\_TYPE\_FAR

    - 

- enumerator SNS\_SAR\_EVENT\_TYPE\_NEAR

    -

- struct sns\_sar\_event

    - Public Members

- required sns\_sar\_event\_type sar\_event\_type [default=SNS\_SAR\_EVENT\_TYPE\_FAR]

    - SAR NEAR/FAR output event.

- optional bytes additional\_sar\_data

    - SAR sensor raw data. Format of this data is driver specific.

- required sns\_std\_sensor\_sample\_status status [default=SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE]

    - SAR sensor sample status.

- struct sns\_sar\_event\_recurrent

    - Public Members

- required sns\_sar\_event\_type sar\_event\_type [default=SNS\_SAR\_EVENT\_TYPE\_FAR]

    - SAR NEAR/FAR output event.

- optional bytes additional\_sar\_data

    - SAR sensor raw data. Format of this data is driver specific.

- required sns\_std\_sensor\_sample\_status status [default=SNS\_STD\_SENSOR\_SAMPLE\_STATUS\_UNRELIABLE]

    - SAR sensor sample status.

Last Published: Jul 14, 2025

[Previous Topic
sns\_client\_qsocket\_msg::msg](https://docs.qualcomm.com/bundle/publicresource/80-P9361-100/topics/client.md)