Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
stream_budget.h
Go to the documentation of this file.
1
6#ifndef NEXUS_STREAM_BUDGET_H
7#define NEXUS_STREAM_BUDGET_H
8#include "nexus/core/time.h"
9#include "nexus/io/stream.h"
10#ifdef __cplusplus
11extern "C" {
12#endif
14typedef struct {
15 size_t capacity;
18 uint64_t epoch;
19 uint32_t losses;
23
52
61
75#ifdef __cplusplus
76}
77#endif
78#endif
nx_result_t
Operation result; success at submission means admission only.
Definition status.h:21
Bounded caller-owned blocks with explicit producer/consumer loans.
nx_result_t nx_stream_budget_calculate(const nx_stream_budget_t *budget, nx_stream_budget_result_t *out)
Checked cold calculation, no stream mutation or allocation.
nx_result_t nx_stream_observe(const nx_stream_t *stream, nx_stream_observation_t *out)
Snapshot maintained metadata under one short IRQ guard.
Conservative declared-assumption budget; never physical evidence.
Explicit engineering assumptions, no inferred hardware rate.
nx_time_us_t target_delay_us
uint64_t units_per_second
nx_time_us_t release_delay_us
O(1) aggregate facts; free total does not imply cursor is free.
Caller-owned stream control, initialized before publication.
Definition stream.h:53
Absolute monotonic microsecond deadlines and wrap extension.
uint64_t nx_time_us_t
Microseconds in one boot/clock domain; no wall-clock semantics.
Definition time.h:20