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

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

Issue 1991403002: [battor agent] Fix the init sequence so it retries inits instead of resets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment Created 4 years, 6 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
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_CONNECTION_H_ 5 #ifndef TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_H_
6 #define TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_H_ 6 #define TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // protocol. 56 // protocol.
57 virtual void SendBytes(BattOrMessageType type, 57 virtual void SendBytes(BattOrMessageType type,
58 const void* buffer, 58 const void* buffer,
59 size_t bytes_to_send) = 0; 59 size_t bytes_to_send) = 0;
60 60
61 // Gets the next message available from the serial connection, reading the 61 // Gets the next message available from the serial connection, reading the
62 // correct number of bytes based on the specified message type, and calls the 62 // correct number of bytes based on the specified message type, and calls the
63 // listener's OnMessageRead() when complete. 63 // listener's OnMessageRead() when complete.
64 virtual void ReadMessage(BattOrMessageType type) = 0; 64 virtual void ReadMessage(BattOrMessageType type) = 0;
65 65
66 // Cancels the current message read operation.
67 virtual void CancelReadMessage() = 0;
68
66 // Flushes the serial connection to the BattOr. 69 // Flushes the serial connection to the BattOr.
67 virtual void Flush() = 0; 70 virtual void Flush() = 0;
68 71
69 protected: 72 protected:
70 // The listener receiving the results of the commands being executed. 73 // The listener receiving the results of the commands being executed.
71 Listener* listener_; 74 Listener* listener_;
72 75
73 private: 76 private:
74 DISALLOW_COPY_AND_ASSIGN(BattOrConnection); 77 DISALLOW_COPY_AND_ASSIGN(BattOrConnection);
75 }; 78 };
76 79
77 } // namespace battor 80 } // namespace battor
78 81
79 #endif // TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_H_ 82 #endif // TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_H_
OLDNEW
« no previous file with comments | « tools/battor_agent/battor_agent_unittest.cc ('k') | tools/battor_agent/battor_connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698