1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 #include <xdc-server-utils/stream.h>
8 
9 // Stream id used to send control messages between the host and debug device.
10 #define XDC_MSG_STREAM DEBUG_STREAM_ID_RESERVED
11 
12 // Control message opcodes used in xdc_msg_t.
13 #define XDC_NOTIFY_STREAM_STATE 0x01
14 
15 typedef struct {
16     uint32_t stream_id;
17     bool online;
18 } xdc_notify_stream_state_t;
19 
20 // Messages sent over the XDC_MSG_STREAM.
21 typedef struct {
22     uint8_t opcode;
23     union {
24         xdc_notify_stream_state_t notify_stream_state;
25     };
26 } xdc_msg_t;
27