plc_control/crates
caoqianming 2a6dde9e0e Restore SIMULATE_PLC chaos task and run feedback
Bring back crates/app_feeder_distributor/src/control/simulate.rs which
was dropped when feeder's local connection/telemetry/websocket modules
moved into core; the restored module reuses core's equivalents via
plc_platform_core::{connection, service, telemetry, websocket}.

Also restore the call sites that were lost alongside it:
- app.rs starts the chaos task when SIMULATE_PLC=true
- engine.rs fires simulate_run_feedback after each pulse command so
  the auto-control state machine sees the RUN bit transition it
  would get from a real PLC
- handler/control.rs does the same after manual start/stop commands

The SIMULATE_PLC flag is now read via simulate::enabled() from the
environment rather than state.config.simulate_plc (the old config
struct was removed with the module migration). To expose equipment
ids by kind (used for run feedback), build_equipment_maps now also
returns HashMap<kind, Uuid>.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 10:33:51 +08:00
..
app_feeder_distributor Restore SIMULATE_PLC chaos task and run feedback 2026-04-22 10:33:51 +08:00
app_operation_system Clean feeder core dependency boundaries 2026-04-21 16:22:11 +08:00
plc_platform_core Rename persist_and_broadcast to record_platform_event 2026-04-22 08:33:28 +08:00