Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: tools/battor_agent/battor_agent.h

Issue 2343973003: Prototype of fix for mac FTDI crash where the entire trace is read even if there is an error (e.g.,…
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/battor_agent/battor_agent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_AGENT_H_ 5 #ifndef TOOLS_BATTOR_AGENT_BATTOR_AGENT_H_
6 #define TOOLS_BATTOR_AGENT_BATTOR_AGENT_H_ 6 #define TOOLS_BATTOR_AGENT_BATTOR_AGENT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // The actual data samples recorded. 168 // The actual data samples recorded.
169 std::vector<RawBattOrSample> samples_; 169 std::vector<RawBattOrSample> samples_;
170 170
171 // The expected sequence number of the next frame. We use this to ensure that 171 // The expected sequence number of the next frame. We use this to ensure that
172 // we receive frames in order. 172 // we receive frames in order.
173 uint32_t next_sequence_number_; 173 uint32_t next_sequence_number_;
174 174
175 // The number of times we've attempted to init the BattOr. 175 // The number of times we've attempted to init the BattOr.
176 uint8_t num_init_attempts_; 176 uint8_t num_init_attempts_;
177 177
178 // The number of times that we've attempted to read the last message.
179 uint8_t num_read_attempts_;
180
181 // The timeout that's run when an action times out. 178 // The timeout that's run when an action times out.
182 base::CancelableClosure timeout_callback_; 179 base::CancelableClosure timeout_callback_;
183 180
181 // First error that was encountered while reading frames. It is necessary
182 // to handle read errors at the end of the read because the FTDI serial
183 // device crashes on OSX if there is data that arrives in the FTDI device's
184 // buffer after the file descriptor is closed.
185 BattOrError read_frame_error_;
186
184 DISALLOW_COPY_AND_ASSIGN(BattOrAgent); 187 DISALLOW_COPY_AND_ASSIGN(BattOrAgent);
185 }; 188 };
186 189
187 } // namespace battor 190 } // namespace battor
188 191
189 #endif // TOOLS_BATTOR_AGENT_BATTOR_AGENT_H_ 192 #endif // TOOLS_BATTOR_AGENT_BATTOR_AGENT_H_
OLDNEW
« no previous file with comments | « no previous file | tools/battor_agent/battor_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698