blob: 42d427d231462592c060f3203e42e6e0707ec16b [file] [log] [blame]
// Copyright 2022 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.lowpan.driver;
using fuchsia.lowpan;
using fuchsia.lowpan.device;
using fuchsia.lowpan.test;
using fuchsia.lowpan.thread;
using fuchsia.lowpan.experimental;
/// Table of protocol requests that is passed into `Driver.GetProtocols()`.
type Protocols = resource table {
1: device server_end:fuchsia.lowpan.device.Device;
2: device_extra server_end:fuchsia.lowpan.device.DeviceExtra;
3: device_test server_end:fuchsia.lowpan.test.DeviceTest;
4: device_route server_end:fuchsia.lowpan.experimental.DeviceRoute;
5: device_route_extra server_end:fuchsia.lowpan.experimental.DeviceRouteExtra;
6: counters server_end:fuchsia.lowpan.device.Counters;
7: thread_legacy_joining server_end:fuchsia.lowpan.experimental.LegacyJoining;
8: thread_dataset server_end:fuchsia.lowpan.thread.Dataset;
9: energy_scan server_end:fuchsia.lowpan.device.EnergyScan;
10: experimental_device server_end:fuchsia.lowpan.experimental.Device;
11: experimental_device_extra server_end:fuchsia.lowpan.experimental.DeviceExtra;
12: meshcop server_end:fuchsia.lowpan.thread.Meshcop;
13: telemetry_provider server_end:fuchsia.lowpan.experimental.TelemetryProvider;
14: thread_feature server_end:fuchsia.lowpan.thread.Feature;
15: capabilities server_end:fuchsia.lowpan.thread.ThreadCapabilities;
};
/// Protocol representing a LoWPAN driver instance.
closed protocol Driver {
/// Request protocols to control this device.
/// Unsupported protocols are closed.
strict GetProtocols(resource struct {
protocols Protocols;
});
};
/// Protocol for registering LoWPAN interfaces and their
/// associated control protocols with the LoWPAN service.
@discoverable
closed protocol Register {
/// Registers the given LoWPAN device with the LoWPAN Service
/// using the given interface name.
strict RegisterDevice(resource struct {
name fuchsia.lowpan.InterfaceName;
driver client_end:Driver;
});
};