# Used to check if chain A and B are consistent.
# If they're consistent, value is the value they both have
# If they're inconsistent, value is 2, INVALID status
# truth table:
#  A | B | Value
#-----------------
#  0 | 0 | 0
#  0 | 1 | 2
#  1 | 0 | 2
#  1 | 1 | 1
record(calc, "$(calcname)") {
  field(SCAN, ".1 second")
  field(DESC, "$(descCalc=summary_calculation)")
  field(FLNK, "$(sumname)")
  field(CALC, "A=B?A:2")
  field(INPA, "$(chainA) MS")
  field(INPB, "$(chainB) MS")
}

record(mbbi, "$(sumname)") {
  field(SCAN, "Passive")
  field(DESC, "$(descSum=summary)")
  field(DTYP, "Soft Channel")
  field(ZRST, "$(zname)")
  field(ONST, "$(oname)")
  field(INP, "$(calcname) MS")
  field(ZRSV,  "$(zsv=NO_ALARM)")
  field(ONSV,  "$(osv=NO_ALARM)")
  field(TWST, "INVALID")
  field(TWSV, "INVALID")

}


