| // 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; |
| }; |
| |
| /// Protocol representing a LoWPAN driver instance. |
| protocol Driver { |
| /// Request protocols to control this device. |
| /// Unsupported protocols are closed. |
| GetProtocols(resource struct { |
| protocols Protocols; |
| }); |
| }; |
| |
| /// Protocol for registering LoWPAN interfaces and their |
| /// associated control protocols with the LoWPAN service. |
| @discoverable |
| protocol Register { |
| /// Registers the given LoWPAN device with the LoWPAN Service |
| /// using the given interface name. |
| RegisterDevice(resource struct { |
| name fuchsia.lowpan.InterfaceName; |
| driver client_end:Driver; |
| }); |
| }; |