34#ifndef _UTILS_NUMBERDUMPER_HXX_
35#define _UTILS_NUMBERDUMPER_HXX_
49 void add(uint16_t data)
53 nextChunk_ = displayFlow_.
alloc();
56 nextChunk_->data()->data[nextOfs_] = data;
57 if (++nextOfs_ >= BUFSIZE)
59 displayFlow_.
send(nextChunk_);
64 static constexpr uint16_t EOLN = 0xffffu;
67 static constexpr unsigned BUFSIZE = 128;
71 uint16_t data[BUFSIZE];
75 unsigned nextOfs_ = 0;
90 return call_immediately(
STATE(render));
97 bool send_off =
false;
100 return release_and_exit();
#define STATE(_fn)
Turns a function name into an argument to be supplied to functions expecting a state.
Base class for all QMember types that hold data in an expandable format.
MessageType * alloc()
Synchronously allocates a message buffer from the pool of this flow.
Action entry() override
Entry into the StateFlow activity.
char * endp_
Pointer in the buffer to the terminating null.
uint16_t nextOfs_
Index into the input number array where to continue rendering.
char output[320]
Output buffer where we render the numbers.
char * thisLineLimit_
Pointer in the buffer where the current line should end the latest.
static constexpr uint8_t MIN_LINE
Desired length of a line.
Collection of related state machines that pend on incoming messages.
State flow with a given typed input queue.
Base::Action Action
Allows using Action without having StateFlowBase:: prefix in front of it.
void send(MessageType *msg, unsigned priority=UINT_MAX) OVERRIDE
Sends a message to the state flow for processing.
#define GLOBAL_LOG_OUTPUT
Used for writing log buffersto the log output.