code wiki / _hdl_build / nx_batt_facility.nx

nx_batt_facility.nx

buildroot/runtime/_hdl_build/nx_batt_facility.nx

3244 B50 linesdepth 1pulls 1 transitivereach 1 importersview sourcekind librarytopic batt
docsdependenciesstructsconstsfunctions

about

nx_batt_facility.nx -- R3 FIRE-SAFE FACILITY + self-service station INTERLOCK = the "laundromat where fires cant happen" as gated logic. A charging session is ADMITTED only if (never-ignite first) thermal auto-isolation is ARMED, the pack passed triage (UNSAFE/RETIRE packs are NEVER admitted to a charging bay), and it stays within the per-bay + facility energy/fire-load caps, the station current cap, and the regulatory Li-ion STORAGE cap (VSQG ~220 lb/mo, VERIFIED in the cost-basis). Plus auto-isolation: a bay over its thermal ceiling is cut from power. Data-driven FacilitySpec (#11). Composes R0 (never-ignite envelope) + R1 (nx_batt_intake verdict). license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_batt_intake.nx nx_batt_facility.nx nx_batt_facility_test.nx

imports: nx_batt_intake.nx

imported by: nx_batt_facility_test.nx

structs

10struct FacilitySpec

consts

8const NX_MAGIC_231703: i64 = 231703
20const NX_FAC_ADMIT: i64 = 0
21const NX_FAC_REFUSE_PACK_UNSAFE: i64 = 1
22const NX_FAC_REFUSE_BAY_FULL: i64 = 2
23const NX_FAC_REFUSE_ENERGY_CAP: i64 = 3
24const NX_FAC_REFUSE_STATION_RATE: i64 = 4
25const NX_FAC_REFUSE_NO_THERMAL: i64 = 5
26const NX_FAC_REFUSE_STORAGE_CAP: i64 = 6

functions

29func nx_fac_admit(spec: *FacilitySpec, pack_verdict: i64, active_bays: i64, active_energy_wh: i64,
called by 1: main
47func nx_fac_isolate(bay_temp_mc: i64, max_temp_mc: i64) -> i64
called by 1: main