"""当前业务口径:安全监控判开停,重大设备只提供风量。""" SOURCE_SYSTEM_BY_ROLE = {'fan_state': 'safety', 'flow': 'equipment'} def source_policy(): return {'version': 'main-fan-sources-2026-10-21', 'fan_state': 'safety', 'flow': 'equipment', 'equipment_state_used_for_switch': False} def select_history_points(points): return [point for point in points if SOURCE_SYSTEM_BY_ROLE.get(point.role) == point.system] def validate_history_sources(points): for point in points: if SOURCE_SYSTEM_BY_ROLE.get(point.role) != point.system: raise ValueError('开停以安全监控为准,重大设备只取风量;请调整测点计划:' + point.node_id + ' (' + point.system + '/' + point.role + ')')