blob: a24c7d6df8774c0cedf9eed58e6812173055c3a3 [file] [log] [blame]
// Copyright 2021 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.device.runtime.test;
using zx;
const MAX_TRANSFER_SIZE uint32 = 4096;
type RuntimeRequest = strict enum {
GET_DATA = 1;
};
closed protocol TestDevice {
/// Sets the test data that can be retrieved from this device using a runtime channel.
strict SetTestData(struct {
in vector<uint8>:MAX_TRANSFER_SIZE;
}) -> () error zx.Status;
};
closed protocol TestDeviceChild {
/// Returns the test data stored in the parent device using the runtime channel.
/// If `sync` is true, the child device will make a synchronous channel call,
/// otherwise it will do a write and asynchronous read.
strict GetParentDataOverRuntimeChannel(struct {
sync bool;
}) -> (struct {
out vector<uint8>:MAX_TRANSFER_SIZE;
}) error zx.Status;
};
@discoverable
@transport("Driver")
closed protocol Parent {};
service Service {
parent client_end:Parent;
};