summaryrefslogtreecommitdiffstats
path: root/device/serial/serial_serialization.mojom
blob: 08c2356f65e7ecd2adc6a75e7f1bf16d9419278f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 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;
};