13#ifndef MAXMATRIX_SRC_COMMAND_COMMAND_H_
14#define MAXMATRIX_SRC_COMMAND_COMMAND_H_
83 uint8_t line_length_{0};
84 bool line_too_long_{
false};
93 static constexpr uint16_t kMaxLineLength{0xFF};
95 "a position in the line has to fit into a byte");
103 uint8_t value)
const;
104 static void AnswerPicture(
Matrix& matrix, Print& answer);
106 uint16_t maximum)
const;
107 static char ConvertToHexDigit(uint8_t value);
CommandState
What Command::Feed() says about the char it was given, when the line did not fail; why it failed is t...
Definition Command.h:30
@ kDone
Definition Command.h:32
@ kPending
Definition Command.h:31
@ kAnswered
Definition Command.h:33
The attributes of a later standard, as macros, where the compiler has them.
#define MAXMATRIX_NODISCARD
Marks a function whose result must not be dropped: the compiler warns where it is.
Definition MaxMatrixAttributes.h:37
Configuration of the MaxMatrix library.
#define MAXMATRIX_COMMAND_LINE_LENGTH
The chars of a line Command takes; it costs twice as many bytes of RAM.
Definition MaxMatrixConfig.h:60
Why a call did not do what it was asked.
The values of a switch of the configuration, and the end of a text.
A C array that knows its size, as std::array, and make_array(), which takes the size from the values.
Command()
Makes a reader at the start of an empty line.
Result< CommandState > Feed(Matrix &matrix, char c, Print &answer)
Takes the next char of a command line, and carries the line out and answers it at its end.
The matrix a sketch draws on: a chain of 8x8 modules, in the coordinates the viewer sees.
Definition MaxMatrix.h:81
What a getter of a single value returns: the value, or why there is none.
Definition MaxMatrixError.h:141
What a function that can fail returns when it has no value to return.
Definition MaxMatrixError.h:73
Elements that lie elsewhere, reached by index within their size, as std::span.
A C array of N elements that knows its size.
Definition array.h:42