| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.lightsensor |
| |
| <div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div> |
| |
| |
| ## **PROTOCOLS** |
| |
| ## Sensor {#Sensor} |
| *Defined in [fuchsia.lightsensor/sensor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lightsensor/sensor.fidl;l=9)* |
| <p><code>Sensor</code> will return calibrated readings from a product-configured light |
| sensor.</p> |
| |
| |
| ### Watch {#Sensor.Watch} |
| |
| <p>Gets the current [LightSensorData]. Returns immediately on first call; |
| subsequent calls return when the value changes.</p> |
| |
| |
| |
| #### Request {#Sensor.Watch_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Sensor.Watch_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>data</code></td> |
| <td> |
| <code><a class='link' href='#LightSensorData'>LightSensorData</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **STRUCTS** |
| |
| ### Rgbc {#Rgbc data-text="Rgbc"} |
| *Defined in [fuchsia.lightsensor/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lightsensor/types.fidl;l=7)* |
| <p>Device-specific intensity values for the color channels in the light sensor.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Rgbc.red_intensity"> |
| <td><code>red_intensity</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td><p>Intensity of red light measured by the light sensor.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Rgbc.green_intensity"> |
| <td><code>green_intensity</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td><p>Intensity of green light measured by the light sensor.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Rgbc.blue_intensity"> |
| <td><code>blue_intensity</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td><p>Intensity of blue light measured by the light sensor.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Rgbc.clear_intensity"> |
| <td><code>clear_intensity</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td><p>Intensity of clear light measured by the light sensor.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| |
| |
| ## **TABLES** |
| |
| ### LightSensorData {#LightSensorData data-text="LightSensorData"} |
| |
| |
| *Defined in [fuchsia.lightsensor/sensor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lightsensor/sensor.fidl;l=17)* |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="LightSensorData.rgbc"> |
| <td><h3 id="LightSensorData.rgbc" class="add-link hide-from-toc">1</h3></td> |
| <td><code>rgbc</code></td> |
| <td> |
| <code><a class='link' href='#Rgbc'>Rgbc</a></code> |
| </td> |
| <td><p>Light intensities measured by the light sensor.</p> |
| </td> |
| </tr> |
| <tr id="LightSensorData.calculated_lux"> |
| <td><h3 id="LightSensorData.calculated_lux" class="add-link hide-from-toc">2</h3></td> |
| <td><code>calculated_lux</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td><p>A weighted sum of the RGBC intensities.</p> |
| </td> |
| </tr> |
| <tr id="LightSensorData.correlated_color_temperature"> |
| <td><h3 id="LightSensorData.correlated_color_temperature" class="add-link hide-from-toc">3</h3></td> |
| <td><code>correlated_color_temperature</code></td> |
| <td> |
| <code>float32</code> |
| </td> |
| <td><p>The color temperature of the measured light.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| |