blob: 08c2356f65e7ecd2adc6a75e7f1bf16d9419278f [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module device.serial;
import "serial.mojom";
import "data_stream_serialization.mojom";
// The client state of a serial connection.
struct ConnectionState {
uint32 connectionId;
bool paused = false;
bool persistent = false;
string name = "";
uint32 receiveTimeout = 0;
uint32 sendTimeout = 0;
uint32 bufferSize = 4096;
};
// A serialized serial connection.
struct SerializedConnection {
ConnectionState state;
ReceiveError queuedReceiveError = NONE;
array<int8>? queuedReceiveData;
Connection connection;
SerializedDataSender sender;
SerializedDataReceiver receiver;
};