blob: 59420f6dccfc55390f64366bea234272a7f238c7 [file] [log] [blame] [edit]
// 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.
library fuchsia.developer.bridge;
using fuchsia.device;
using fuchsia.net;
using fuchsia.buildinfo;
struct TargetIp {
fuchsia.net.IpAddress ip;
uint32 scope_id;
};
struct TargetIpPort {
fuchsia.net.IpAddress ip;
uint32 scope_id;
uint16 port;
};
// TODO(awdavies): Add serial number.
union TargetAddrInfo {
1: TargetIp ip;
2: TargetIpPort ip_port;
};
// TODO(awdavies): Add more target states once they're more well defined.
enum TargetState {
UNKNOWN = 1;
};
// TODO(awdavies): Add more target types. Hardware? Product state?
enum TargetType {
UNKNOWN = 1;
};
/// Current known state of the remote control
enum RemoteControlState {
UP = 1;
DOWN = 2;
UNKNOWN = 3;
};
table Target {
1: string:fuchsia.device.DEVICE_NAME_MAX nodename;
2: vector<TargetAddrInfo>:256 addresses;
3: uint64 age_ms;
4: RemoteControlState rcs_state;
5: TargetType target_type;
6: TargetState target_state;
// Contains the string used for the product in `fx set`, for example
// `fx set core.x64` would make this value "core".
7: string:fuchsia.buildinfo.MAX_STRING_LENGTH product_config;
// Contains the string used for the board in `fx set`, for example
// `fx set core.x64` would make this value "x64".
8: string:fuchsia.buildinfo.MAX_STRING_LENGTH board_config;
};