measurement:
  f: flow
  p: pressure
  t: temperature
  l: level
  a: analysis
  s: speed
  w: weight
  d: density
  j: power
  h: moisture

modifiers:
  i: { role: indicator, virtual: true }
  r: { role: recorder, virtual: true }
  t: { role: transmitter, data_points: [.pv] }
  c: { role: controller, data_points: [.sp, .op] }
  q: { role: totalizer, data_points: [.qv, "qv.value"] }
  s: { role: switch, data_points: [.instate0, .instate1] }
  a: { role: alarm }
  y: { role: interlock-relay }
  z: { role: positioner }

auto_pair:
  - if_role: controller
    create:
      role: control-valve
      id_pattern: "{meas}cv-{loop}"
      display_pattern: "{MEAS}CV-{loop}"

special_prefixes:
  xv: { role: shutdown-valve, measures: null }
  sdv: { role: shutdown-valve, measures: null }
  fy: { role: interlock-relay, measures: flow }
  fz: { role: positioner, measures: flow }
  p: { role: power_equipment, measures: null, equipment_type: pump }
  k: { role: power_equipment, measures: null, equipment_type: compressor }
  ag: { role: power_equipment, measures: null, equipment_type: agitator }
  b: { role: power_equipment, measures: null, equipment_type: blower }
  f: { role: power_equipment, measures: null, equipment_type: fan }

confidence:
  high_when:
    - prefix matches measurement OR special_prefixes
    - all modifiers resolved
    - data_points present and consistent
  medium_when:
    - prefix matches but some data_points missing
    - modifiers contain unknown letter
  low_when:
    - special_prefixes only AND data_points unusual
    - first letter not in measurement table
