OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_BATTOR_AGENT_BATTOR_PROTOCOL_H_ | 5 #ifndef TOOLS_BATTOR_AGENT_BATTOR_PROTOCOL_H_ |
6 #define TOOLS_BATTOR_AGENT_BATTOR_PROTOCOL_H_ | 6 #define TOOLS_BATTOR_AGENT_BATTOR_PROTOCOL_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 namespace battor { | 10 namespace battor { |
9 | 11 |
10 // Control characters in the BattOr protocol. | 12 // Control characters in the BattOr protocol. |
11 enum BattOrControlByte : uint8_t { | 13 enum BattOrControlByte : uint8_t { |
12 // Indicates the start of a message in the protocol. All other instances of | 14 // Indicates the start of a message in the protocol. All other instances of |
13 // this byte must be escaped (with BATTOR_SPECIAL_BYTE_ESCAPE). | 15 // this byte must be escaped (with BATTOR_SPECIAL_BYTE_ESCAPE). |
14 BATTOR_CONTROL_BYTE_START = 0x00, | 16 BATTOR_CONTROL_BYTE_START = 0x00, |
15 // Indicates the end of a message in the protocol. All other instances of | 17 // Indicates the end of a message in the protocol. All other instances of |
16 // this byte must be escaped (with BATTOR_SPECIAL_BYTE_ESCAPE). | 18 // this byte must be escaped (with BATTOR_SPECIAL_BYTE_ESCAPE). |
17 BATTOR_CONTROL_BYTE_END = 0x01, | 19 BATTOR_CONTROL_BYTE_END = 0x01, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 struct BattOrControlMessageAck { | 76 struct BattOrControlMessageAck { |
75 BattOrControlMessageType type; | 77 BattOrControlMessageType type; |
76 uint8_t param; | 78 uint8_t param; |
77 }; | 79 }; |
78 | 80 |
79 #pragma pack(pop) | 81 #pragma pack(pop) |
80 | 82 |
81 } // namespace battor | 83 } // namespace battor |
82 | 84 |
83 #endif // TOOLS_BATTOR_AGENT_BATTOR_PROTOCOL_H_ | 85 #endif // TOOLS_BATTOR_AGENT_BATTOR_PROTOCOL_H_ |
OLD | NEW |