blob: 8e0b05401c0ac727b40dc4619d375225d36c0c9c [file] [log] [blame]
// Copyright 2019 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=7)
library fuchsia.hwinfo;
using fuchsia.intl;
const MAX_VALUE_SIZE uint8 = 255;
type Architecture = flexible enum {
X64 = 1;
ARM64 = 2;
};
/// Collection of properties that is unique per device.
type DeviceInfo = table {
1: serial_number string:MAX_VALUE_SIZE;
2: is_retail_demo bool;
3: retail_sku string:MAX_VALUE_SIZE;
};
/// Collection of properties that is shared with other devices within the same
/// product line.
type ProductInfo = table {
1: sku string;
2: language string;
3: regulatory_domain fuchsia.intl.RegulatoryDomain;
4: locale_list vector<fuchsia.intl.LocaleId>;
5: name string;
6: model string;
7: manufacturer string;
8: build_date string;
9: build_name string:MAX_VALUE_SIZE;
10: colorway string:MAX_VALUE_SIZE;
11: display string:MAX_VALUE_SIZE;
12: memory string:MAX_VALUE_SIZE;
13: nand_storage string:MAX_VALUE_SIZE;
14: emmc_storage string:MAX_VALUE_SIZE;
15: microphone string:MAX_VALUE_SIZE;
16: audio_amplifier string:MAX_VALUE_SIZE;
};
/// Collection of properties that are common among a set of devices based on
/// hardware type
type BoardInfo = table {
1: name string;
2: revision string;
3: cpu_architecture Architecture;
};
/// Device provides an interface to retrieve device-specific properties.
@discoverable
closed protocol Device {
strict GetInfo() -> (struct {
info DeviceInfo;
});
};
/// Product provides an interface to retrieve product-specific properties.
@discoverable
closed protocol Product {
strict GetInfo() -> (struct {
info ProductInfo;
});
};
/// Board provides an interface to retrieve hardware-specific information.
@discoverable
closed protocol Board {
strict GetInfo() -> (struct {
info BoardInfo;
});
};