code wiki / (root) / nx_chemical_dispenser.nx

nx_chemical_dispenser.nx

buildroot/runtime/nx_chemical_dispenser.nx

11361 B210 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind orphan library
docsdependenciesstructsconstsfunctions

about

nx_chemical_dispenser.nx -- controlled-bolus chemical output (scent / pheromone / dose). module: nishi-core.perception.chemical_dispenser depends: nishi-core.perception.profile + nishi-core.perception.transducer_characterizer + nishi-core.perception.provenance_curve_store + nishi-core.io.syscalls disk_kb: 5 capability: PERCEPTION wired_status: PARTIAL_WIRED MISSING_CAPABILITIES: - VALVE_DRIVER_DISPATCH (control solenoid / piezo / peristaltic valve via MCU GPIO + PWM; depends on nx_mcu_gpio + nx_mcu_pwm from embedded substrate arc) - CARTRIDGE_INVENTORY_TRACK (per-cartridge remaining mass; depletes with each dispense; surfaces low-inventory alert) - DISPENSE_PROFILE_LOAD (per-cartridge-lot calibrated dispense curve from nx_provenance_curve_store, type DISPENSE_PROFILE) - LICENSE_TAG_ENFORCE (refuse to dispense substances without license/safety tag in cartridge manifest) - SAFETY_INTERLOCK (refuse dispense if subject too close to source, if temperature exceeds safe range, if previous dispense too recent) - INTEGRATION_WITH_REACTIVE_BEHAVIOR (composes with future nx_reactive_behavior so scent + audio + haptic fire as a coordinated prey-flight choreography in the dog toy) license_tier: PUBLIC_NISHI_SUBSTRATE genealogy_id: feedback-substrate-primitives-meta-not-one-off_2026 + feedback-multi-species-perceptual-substrate-not-anthropocentric_2026 + feedback-substrate-does-heavy-lifting-user-is-partner-not-gate + reference-ingest-citation-and-license-discipline + project-prey-spec-dog-toy + feedback-build-intelligence-never-strip-features Per cardinal [[feedback-multi-species-perceptual-substrate-not-anthropocentric]]: Scent is the KILLER FEATURE of the prey-spec dog toy. TV-quality audio + scent absent = the dog's nose says "nothing real" and the toy fails the perceptual gate. THIS primitive operates the cartridge mechanism that releases a controlled bolus of species-appropriate scent at substrate-determined timing (proximity-triggered prey-flight, periodic "alive" pulses, calming-pheromone steady-state, etc.).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_perceptual_profile.nx nx_transducer_characterizer.nx nx_provenance_curve_store.nx nx_chemical_dispenser.nx

imports: nx_syscalls.nxnx_perceptual_profile.nxnx_transducer_characterizer.nxnx_provenance_curve_store.nx

imported by: nobody (leaf or entry point)

structs

141struct NxChemDispenseParams

consts

65const NX_CHEM_DISP_SOLENOID_VALVE: i64 = 1 // electromagnetic pulse valve
66const NX_CHEM_DISP_PIEZO_VALVE: i64 = 2 // piezoelectric microvalve
67const NX_CHEM_DISP_PERISTALTIC_PUMP: i64 = 3 // tube-roller pump
68const NX_CHEM_DISP_ATOMIZER_PIEZO: i64 = 4 // mesh-nebulizer for fine particles
69const NX_CHEM_DISP_HEATED_RELEASE: i64 = 5 // thermal volatilization (wax-bed)
70const NX_CHEM_DISP_FAN_DIFFUSION: i64 = 6 // fan-assisted ambient diffusion
71const NX_CHEM_DISP_REFILLABLE_WICK: i64 = 7 // passive wick; rate set by air flow
89const NX_CHEM_SUBST_PREY_SCENT: i64 = 1 // rabbit / squirrel / bird / mouse
90const NX_CHEM_SUBST_CALMING_PHEROMONE: i64 = 2 // synthetic DAP, FAS, etc.
91const NX_CHEM_SUBST_TRAINING_TARGET: i64 = 3 // SAR / detection training scent
92const NX_CHEM_SUBST_QUEEN_PHEROMONE: i64 = 4 // bee
93const NX_CHEM_SUBST_FOOD_ATTRACTANT: i64 = 5 // aquaculture / wildlife monitoring
94const NX_CHEM_SUBST_AVERSIVE_SCENT: i64 = 6 // humane pest deterrence
95const NX_CHEM_SUBST_VETERINARY_MED: i64 = 7 // requires veterinary license
96const NX_CHEM_SUBST_USER_DEFINED: i64 = 8
112const NX_CHEM_DISP_OK: i64 = 0
113const NX_CHEM_DISP_FAIL_BAD_MECHANISM: i64 = 1
114const NX_CHEM_DISP_FAIL_BAD_SUBSTANCE: i64 = 2
115const NX_CHEM_DISP_FAIL_CARTRIDGE_EMPTY: i64 = 3
116const NX_CHEM_DISP_FAIL_CARTRIDGE_NOT_CALIBRATED: i64 = 4 // no DISPENSE_PROFILE curve
117const NX_CHEM_DISP_FAIL_LICENSE_REFUSED: i64 = 5 // substance lacks
119const NX_CHEM_DISP_FAIL_SAFETY_INTERLOCK: i64 = 6 // proximity / temperature /
121const NX_CHEM_DISP_FAIL_VALVE_STUCK: i64 = 7 // mechanical failure detected
122const NX_CHEM_DISP_FAIL_DEPENDENCY_MISSING: i64 = 8 // PARTIAL_WIRED default

functions

73func nx_chem_disp_mech_name(m: i64) -> *u8
98func nx_chem_subst_name(s: i64) -> *u8
124func nx_chem_disp_verdict_name(v: i64) -> *u8
160func nx_chem_dispense(params_ptr: *NxChemDispenseParams) -> i64
170func nx_chem_dispense_cartridge_remaining_uL_x10(cartridge_serial_ptr: *u8,
181func nx_chem_dispense_register_cartridge(cartridge_serial_ptr: *u8, cartridge_serial_len: i64,
199func nx_chem_dispense_is_safe_to_fire(cartridge_serial_ptr: *u8, cartridge_serial_len: i64,
208func nx_chem_dispense_get_last_verdict() -> i64