modus
Menu
On this page

The entry filter

filter keeps the records of one stream that pass one condition . Its record input source is generic, of the count One, and takes the wiring terms output.Condition_Terms: one field of the record, one comparison and one value, the form of the condition of a row of a wiring list. Its record output kept takes the record of source.

At the wiring of source it checks the condition against the record of that wiring (output.writer_condition_of_terms, the one border of a condition): a field that the record does not have, a value of another kind than the field, or any other refusal ends kept at once with that error record, and nothing passes. Then it writes into kept each record that passes (output.writer_condition_holds, the one test of a condition). A gap record of source becomes a gap record of kept with the same count, and a joined record that is not 0 a gap of its count. The end of source ends kept with the same error record; an end word gives the record State of the unit Wirings, whose value is the end word. Two conditions are two filters.

Start: in a wiring list whose row to filter.source carries the terms. What a reader sees: no window; the records that pass, in kept. It stops itself with Done when kept ended.

See: Record outputs and record inputs of a module: typed streams of records between processes: Generic record inputs and the utility modules in the repository

filter module with an entry

Hash
ead9c0675ea7790def01bb2ce3116f1b10133c808e3f886d923504c1fcb5060a
Size
61440 bytes
Exports
0
Imports
0
Imported by
0
License
MIT

filter keeps the records of one stream that pass one condition

FactValue
KindModules with an entry
Sourcesrc/modules/libraries/filter
Boot imageyes: in the boot image, 61440 bytes in this build
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
entry()

entry

entry()
Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/libraries/filter/main.odin:49

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

WhatValueAs the root service says
Grantsnone
Other terms of its start grant setnone
Budget that it asks for
  • the least budget
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).

Condition_Terms type of the package output

Condition_Terms :: struct {...}

The terms of a condition, as the asker writes them after the lent.

src/library/modus/contract/output/condition.odin:50

source global variable of the package filter

source: system.Record_Input_With_Terms(system.Any_Record, output.Condition_Terms)

The stream to filter, with its condition as wiring terms.

src/modules/libraries/filter/main.odin:32