summaryrefslogtreecommitdiffstats
path: root/device/serial/serial_serialization.mojom
blob: 8ea495c44ea9934b8a6e7542fd2549ac097ec43f (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
30
31
// 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.

import "serial.mojom"
import "data_stream_serialization.mojom"

module device.serial {

// 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;
  int8[]? queuedReceiveData;
  Connection connection;
  SerializedDataSender sender;
  SerializedDataReceiver receiver;
};

}