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

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

Issue 1586173002: tools/battor_agent: Prints real BattOr samples instead of raw ones (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_eeprom
Patch Set: Fixed size_t build error Created 4 years, 11 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void BeginConnect(); 106 void BeginConnect();
107 107
108 // Sends a control message over the connection. 108 // Sends a control message over the connection.
109 void SendControlMessage(BattOrControlMessageType type, 109 void SendControlMessage(BattOrControlMessageType type,
110 uint16_t param1, 110 uint16_t param1,
111 uint16_t param2); 111 uint16_t param2);
112 112
113 // Completes the command with the specified error. 113 // Completes the command with the specified error.
114 void CompleteCommand(BattOrError error); 114 void CompleteCommand(BattOrError error);
115 115
116 // Returns a formatted version of samples_ with timestamps and real units.
117 std::string SamplesToString();
118
116 // The listener that handles the commands' results. It must outlive the agent. 119 // The listener that handles the commands' results. It must outlive the agent.
117 Listener* listener_; 120 Listener* listener_;
118 121
119 // The last action executed by the agent. This should only be updated in 122 // The last action executed by the agent. This should only be updated in
120 // PerformAction(). 123 // PerformAction().
121 Action last_action_; 124 Action last_action_;
122 125
123 // The tracing command currently being executed by the agent. 126 // The tracing command currently being executed by the agent.
124 Command command_; 127 Command command_;
125 128
(...skipping 11 matching lines...) Expand all
137 140
138 // The number of times that we've attempted to read the last message. 141 // The number of times that we've attempted to read the last message.
139 uint8_t num_read_attempts_; 142 uint8_t num_read_attempts_;
140 143
141 DISALLOW_COPY_AND_ASSIGN(BattOrAgent); 144 DISALLOW_COPY_AND_ASSIGN(BattOrAgent);
142 }; 145 };
143 146
144 } // namespace battor 147 } // namespace battor
145 148
146 #endif // TOOLS_BATTOR_AGENT_BATTOR_AGENT_H_ 149 #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