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

Unified Diff: tools/battor_agent/battor_agent.h

Issue 2826913002: [BattOr] Retry battor_agent commands when they fail. (Closed)
Patch Set: Swapped return with break Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/battor_agent/battor_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/battor_agent/battor_agent.h
diff --git a/tools/battor_agent/battor_agent.h b/tools/battor_agent/battor_agent.h
index 87be4fccfcee206daeb1fe4593b6d7562571f1f6..36bde7288865c7f13917bc847f85d0b92fb10800 100644
--- a/tools/battor_agent/battor_agent.h
+++ b/tools/battor_agent/battor_agent.h
@@ -126,8 +126,6 @@ class BattOrAgent : public BattOrConnection::Listener,
// Performs an action after a delay.
void PerformDelayedAction(Action action, base::TimeDelta delay);
-
-
// Requests a connection to the BattOr.
void BeginConnect();
@@ -136,12 +134,18 @@ class BattOrAgent : public BattOrConnection::Listener,
uint16_t param1,
uint16_t param2);
+ // Retry the last command.
+ void RetryCommand();
+
// Completes the command with the specified error.
void CompleteCommand(BattOrError error);
// Returns a formatted version of samples_ with timestamps and real units.
std::string SamplesToString();
+ // Sets and restarts the action timeout timer.
+ void SetActionTimeout(uint16_t timeout_seconds);
+
// The listener that handles the commands' results. It must outlive the agent.
Listener* listener_;
@@ -180,14 +184,8 @@ class BattOrAgent : public BattOrConnection::Listener,
// we receive frames in order.
uint32_t next_sequence_number_;
- // The number of times we've attempted to init the BattOr.
- uint8_t num_init_attempts_;
-
- // The number of times we've attempted the BattOr StartTracing command.
- uint8_t num_start_tracing_attempts_;
-
- // The number of times that we've attempted to read the last message.
- uint8_t num_read_attempts_;
+ // The number of times we've attempted a command.
+ uint8_t num_command_attempts_;
// The timeout that's run when an action times out.
base::CancelableClosure timeout_callback_;
« 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