code wiki / (root) / nx_chemotaxis.nx

nx_chemotaxis.nx

buildroot/runtime/nx_chemotaxis.nx

2873 B82 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_chemotaxis.nx -- service discovery via signal gradient. Biology: chemotaxis is movement of cells along chemical gradients (immune cells toward inflammation, bacteria toward nutrients). Substrate: discover service location by following published signal gradients (signal strength = quality of match).

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_tier.nx nx_chemotaxis.nx nx_chemotaxis_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_chemotaxis_test.nx

structs

18struct NxChemoTarget

consts

10const NX_MAGIC_1024: i64 = 1024
12const NX_CT_V_FOUND: nx_int = 0
13const NX_CT_V_NOT_FOUND: nx_int = 1
14const NX_CT_V_GRADIENT_WEAK: nx_int = 2
15const NX_CT_V_NULL: nx_int = 3
16const NX_CT_V_N: nx_int = 4
26const NX_CT_BYTES: nx_int = 40

functions

28func nx_ct_v_is_valid(v: nx_int) -> nx_int
called by 1: main
34func nx_ct_target_new(target_id: nx_int,
called by 1: main calls 1: sys_mmap
52func nx_ct_target_score_q10(t: *NxChemoTarget) -> nx_int
59func nx_ct_target_is_fresh(t: *NxChemoTarget, now_us: nx_size,
called by 1: main
67func nx_ct_classify(t: *NxChemoTarget, threshold_q10: nx_int) -> nx_int
called by 1: main calls 1: nx_ct_target_score_q10
75func nx_ct_pick_strongest(a: *NxChemoTarget, b: *NxChemoTarget) -> *NxChemoTarget
called by 1: main calls 1: nx_ct_target_score_q10