The entry output_counter
A writer of one record output for the streams of the console . The console starts it, and reads its record output by its typed name: output_counter.counts.
It writes one record each COUNT_INTERVAL_MILLISECONDS while a reader is wired, and none while no reader is: it waits for a wiring, so the serial of each record is the count of the records before it, and no record is discarded. A record whose serial leaves 2 when divided by 3 has the status 404, each other one the status 200, so a condition on the status keeps one record of three.
Start: start("output_counter") in the console. What a reader sees: no window; one line when it starts, and one line each time its reader leaves. It runs until a principal stops it: stop("output_counter").
output_counter module with an entry
- Hash
2b0aefe54d6a491e369194588c8c7fb85f7951821447806a14fee817daa67726- Size
49152 bytes- Exports
0- Imports
0- Imported by
0- License
- MIT
A writer of one record output for the streams of the console
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/tests/output_counter |
| Boot image | yes: in the boot image, 49152 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
entry() |
entry
entry()
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/tests/output_counter/main.odin:38
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | none | The writer of the streams of the console: its end comes in its wiring ring when the console reads output_counter.counts, and it needs no grant. |
| Other terms of its start grant set | none | |
| Budget that it asks for |
| No MODULE_BUDGET in its source: it asks for the least budget. |
The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module; the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).
counts global variable of the package output_counter
counts: system.Record_Output(Counted)
One record each time the writer counts, while a reader is wired.
