import org.lsst.ccs.description.groovy.CCSBuilder
import org.lsst.ccs.subsystem.pathfinder.HexValve
import org.lsst.ccs.subsystem.pathfinder.HexValveMain
import org.lsst.ccs.subsystem.pathfinder.ValveMaq20Device

CCSBuilder builder = ["hexvalves"]

builder.main (HexValveMain) {

    Maq20 (ValveMaq20Device, modules: ["DOUT", "DINP", "DINP"]) {
        PVC1L (HexValve, set: "0:0", getOpen: "2:13", getShut: "2:15")
        PVC1V (HexValve, set: "0:1", getOpen: "2:4", getShut: "2:5")
        PVC1R (HexValve, set: "0:2", getOpen: "1:9", getShut: "1:8")
        PVC2L (HexValve, set: "0:3", getOpen: "2:12", getShut: "2:14")
        PVC2V (HexValve, set: "0:4", getOpen: "2:2", getShut: "2:3")
        PVC2R (HexValve, set: "0:5", getOpen: "1:7", getShut: "1:10")
        PVC3L (HexValve, set: "0:6", getOpen: "2:11", getShut: "2:16")
        PVC3V (HexValve, set: "0:7", getOpen: "2:0", getShut: "2:1")
        PVC3R (HexValve, set: "0:8", getOpen: "1:6", getShut: "1:11")
        PVC4L (HexValve, set: "0:9", getOpen: "2:6", getShut: "2:9")
        PVC4V (HexValve, set: "0:10", getOpen: "1:12", getShut: "1:13")
        PVC4R (HexValve, set: "0:11", getOpen: "1:3", getShut: "1:4")
        PVC5L (HexValve, set: "0:12", getOpen: "2:17", getShut: "2:8") // normal
//        PVC5L (HexValve, set: "0:12", getOpen: "2:17", getShut: "1:10") // swapped
        PVC5V (HexValve, set: "0:13", getOpen: "1:14", getShut: "1:15")
        PVC5R (HexValve, set: "0:14", getOpen: "1:2", getShut: "1:1")
        PVC6L (HexValve, set: "0:15", getOpen: "2:10", getShut: "2:7")
        PVC6V (HexValve, set: "0:16", getOpen: "1:16", getShut: "1:17")
        PVC6R (HexValve, set: "0:17", getOpen: "1:0", getShut: "1:5")
    }

}
