17typedef enum : uint32_t {
22typedef enum : uint8_t {
29typedef enum : uint64_t {
33typedef enum : uint8_t {
40 "the",
"quick",
"reader",
"turns",
"another",
"page",
"while",
"morning",
41 "light",
"settles",
"across",
"quiet",
"margins",
"and",
"chapter",
"headings",
42 "gather",
"small",
"notes",
"between",
"lines",
"of",
"steady",
"prose",
43 "carried",
"through",
"paper",
"towns",
"by",
"patient",
"hands",
"again",
63 uint64_t value = *state;
109 const uint8_t result = (uint8_t)word[state->
word_offset];
135 if ((payload ==
nullptr) || (workspace ==
nullptr) ||
143 for (uint32_t index = 0U; index < count; ++index) {
144 checkpoints[index] = state;
145 if ((index + 1U) < count) {
152 .checkpoint_count = count,
153 .cursor_state = checkpoints[0]};
161 if ((payload ==
nullptr) || (buffer ==
nullptr)) {
175 for (uint32_t i = 0U; i < skip; ++i) {
179 for (uint32_t i = 0U; i < length; ++i) {
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
@ k_ra8_err_out_of_range
Sensor or peripheral output out of valid range.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_null_ptr
Pointer was NULL where a valid pointer was required.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Serializable pseudo-text generator cursor.
uint32_t word_index
Selected word or sentinel.
uint32_t word_offset
Byte position in the selected word.
uint8_t phase
Word/separator phase.
uint32_t sentence_words
Words emitted in the current sentence.
Resettable exact pseudo-text byte source with bounded checkpoints.
uint64_t cursor_offset
End offset cached for sequential reads.
const void * checkpoints
Caller-owned generator-state index.
cbs_payload_state_t cursor_state
State at cursor_offset.
uint32_t checkpoint_count
Entries in the index.
Module-private seams shared by the #208 sweep translation units.
@ k_cbs_blob_bytes
8 MiB payload (2^23; all sizes divide it).
@ k_cbs_words_per_dot
Words per sentence in the text filler.
RA8_PRIV int priv_payload_init(cbs_payload_t *payload, void *workspace, size_t capacity)
Build the payload source index into caller-owned storage.
@ k_cbs_no_word
Generator needs a new word.
@ k_cbs_payload_checkpoint_bytes
Maximum seek regeneration.
static RA8_INTERNAL uint8_t internal_payload_next(cbs_payload_state_t *state)
Emit one byte from the deterministic pseudo-text state machine.
RA8_PRIV ra8_err_t priv_payload_read(void *ctx, uint64_t offset, uint8_t *buffer, uint32_t length)
Read exact historical pseudo-text bytes at any bounded offset.
@ k_cbs_payload_seed
Initial generator state.
static RA8_INTERNAL uint64_t internal_payload_rng(uint64_t *state)
Advance the deterministic payload pseudo-random generator.
static const char *const s_payload_words[]
RA8_PRIV size_t priv_payload_workspace_required(void)
Return exact workspace bytes required by the pseudo-text source index.
@ k_cbs_payload_shift_a
First xorshift distance.
@ k_cbs_payload_shift_c
Final xorshift distance.
@ k_cbs_payload_shift_b
Middle xorshift distance.
@ k_cbs_phase_dot
Emit a sentence period.
@ k_cbs_phase_word
Emit a word byte.
@ k_cbs_phase_newline
Emit a line break.
@ k_cbs_phase_space
Emit a word separator.