19 #include <uuid/console.h>
35 if (blocking_data->consume_line_feed_) {
36 const int input =
stream_.peek();
39 const unsigned char c = input;
41 blocking_data->consume_line_feed_ =
false;
65 const int input =
stream_.read();
68 const unsigned char c = input;
70 if (blocking_data->consume_line_feed_) {
71 blocking_data->consume_line_feed_ =
false;
93 const int input =
stream_.peek();
95 if (blocking_data->consume_line_feed_) {
97 const unsigned char c = input;
99 blocking_data->consume_line_feed_ =
false;
101 if (
previous_ ==
'\x0D' && c ==
'\x0A') {
121 return stream_.write(buffer, size);
Data for the Mode::BLOCKING shell mode.
int read() final override
Read one byte from the available input.
void flush() final override
Does nothing.
int available() final override
Check for available input.
size_t write(uint8_t data) final override
Write one byte to the output stream.
int peek() final override
Read one byte from the available input without advancing to the next one.
std::unique_ptr< ModeData > mode_data_