| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @available(added=11) |
| library fuchsia.hardware.temperature; |
| |
| using zx; |
| |
| @available(added=14) |
| const MAX_SENSOR_NAME_LEN uint32 = 256; |
| |
| /// An arbritrary, human-readable string that uniquely identifies a temperature sensor. |
| @available(added=14) |
| alias SensorName = string:MAX_SENSOR_NAME_LEN; |
| |
| closed protocol Device { |
| /// Get the current temperature in degrees Celsius. |
| strict GetTemperatureCelsius() -> (struct { |
| status zx.Status; |
| temp float32; |
| }); |
| @available(added=14) |
| strict GetSensorName() -> (struct { |
| name SensorName; |
| }); |
| }; |