- engine.rs: use is_none_or instead of map_or, remove redundant closures
- service/control.rs: move get_equipment_role_points before test module
- event.rs: replace complex 7-element tuple with PersistableEvent struct
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace verbose fully-qualified paths with top-level use imports
for plc_platform_core types and services throughout control.rs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The feeder router uses platform_routes() directly from core,
making these re-export modules unused. The only actual dependency
(SignalRolePoint) now references plc_platform_core directly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move TelemetryProcessor (PointNewValue batching/dedup/broadcast) from feeder to
plc_platform_core. PlatformBuilder.build() now auto-wires telemetry processing and
reconnect task. PlatformContext.emit_event() handles connection management side effects
(connect/reconnect/disconnect/subscribe/unsubscribe) directly. Simplify PlatformEventSink
trait from 6 methods to single on_event(). Feeder's AppEvent now only contains business
events; FeederPlatformEventSink only handles UnitsChanged for control runtime.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move source/point/equipment/tag/page handlers from feeder to plc_platform_core
using State<PlatformContext>; feeder re-exports via handler modules
- Keep batch_set_point_value in feeder (requires app-specific write key auth)
- Add PlatformEvent enum and persist_and_broadcast() in core for platform event
persistence to DB + WebSocket broadcast
- Add PlatformContext::emit_event() that handles both sink notification and
async persistence in one call
- Add platform_routes<S>() in core for centralized route registration;
both feeder and ops merge it instead of duplicating route definitions
- Implement FromRef<AppState> for PlatformContext in both apps
- Add FeederPlatformEventSink adapter bridging core events to feeder's
EventManager + ControlRuntimeStore
- Add event namespace prefixes: platform.source.created, feeder.unit.fault_locked, etc.
- Register full platform CRUD routes in ops app
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- PlatformContext now holds pool, connection_manager, ws_manager
- bootstrap_platform returns PlatformBuilder for pre-Arc setup
- Feeder AppState embeds PlatformContext (state.platform.pool etc.)
- Ops AppState embeds PlatformContext with real DB connection
- Remove WebSocket type duplication: feeder re-exports from core
- Add subscribe_room/send_to_room/remove_room_if_empty to WebSocketManager
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>