blob: 38ce44d91c21f3757faa938e644f62f9c0828887 [file] [log] [blame]
// 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.power.sensor;
using zx;
@available(added=14)
const MAX_SENSOR_NAME_LEN uint32 = 256;
/// An arbritrary, human-readable string that uniquely identifies a power sensor.
@available(added=14)
alias SensorName = string:MAX_SENSOR_NAME_LEN;
@discoverable
closed protocol Device {
strict GetPowerWatts() -> (struct {
power float32;
}) error zx.Status;
strict GetVoltageVolts() -> (struct {
voltage float32;
}) error zx.Status;
@available(added=14)
strict GetSensorName() -> (struct {
name SensorName;
});
};
service Service {
device client_end:Device;
};