persistable sclass SignalWithStrength {
  settable S type;
  
  settable S reason;
  
  // 0 = no signal, 100 = full signal
  // can be outside of [0; 100] too
  settable double strength;
  
  settable O createdBy;
  
  toString {
    ret (nempty(reason) ? reason : or2(type, "Unspecified ") + " signal")
      + appendRoundBracketed( 
        strength >= 100 ? null : iround(strength) + "%"
      );
  }
  
  bool isTrigger() { ret strength >= 100; }
  bool nonNegative() { ret strength >= 0; }
  bool positive() { ret strength > 0; }
}