#! Generated by VisualDCT v2.6
#! DBDSTART
#! DBD("/home/zamofing_t/Documents/prj/SwissFEL/test_ioc/MasterDBD/dbd/test.dbd")
#! DBDEND


#record(motor, "$(P):$(Q)X") {}
#record(motor, "$(P):$(Q)Y") {}
#record(motor, "$(P):$(Q)U") {}
#record(motor, "$(P):$(Q)V") {}
#record(motor, "$(P):$(Q)W") {}
record(calc, "$(P):5CAM_X") {
  field(CALC, "A/B")
  field(INPA, "$(P):$(Q)X.VAL")
  field(INPB, "$(P):$(Q)X.MRES")
}

record(calc, "$(P):5CAM_Y") {
  field(CALC, "A/B")
  field(INPA, "$(P):$(Q)Y.VAL")
  field(INPB, "$(P):$(Q)Y.MRES")
}

record(calc, "$(P):5CAM_U") {
  field(CALC, "A/B")
  field(INPA, "$(P):$(Q)U.VAL")
  field(INPB, "$(P):$(Q)U.MRES")
}

record(calc, "$(P):5CAM_V") {
  field(CALC, "A/B")
  field(INPA, "$(P):$(Q)V.VAL")
  field(INPB, "$(P):$(Q)V.MRES")
}

record(calc, "$(P):5CAM_W") {
  field(CALC, "A/B")
  field(INPA, "$(P):$(Q)W.VAL")
  field(INPB, "$(P):$(Q)W.MRES")
}

# record(asyn, "$(P):asyn") {
#   field(DESC, "asyn record")
#   field(PORT, "$(PORT)")
# }
#record (stringout, "$(P):debug$(ID)") is limited to 40 characters therefore use waveform record
record(waveform, "$(P):debug$(ID)") {
  field(DESC, "debug$(ID)")
  field(FTVL, "CHAR")
  field(NELM, "256")
  field(DTYP, "stream")
  field(INP, "@stream.cfg debug $(PORT)")
}

# # debug0 does not expect a response
# record(waveform, "$(P):debug0") {
#   field(FTVL, "CHAR")
#   field(NELM, "256")
#   field(DESC, "debug")
#   field(DTYP, "stream")
#   field(INP, "@stream.cfg debug0 $(PORT)")
# }

record(bo, "$(P):MOVE_XYUVW") {
  field(DESC, "move complex")
  field(DTYP, "stream")
  field(OUT, "@stream.cfg moveXYUVW($(P):5CAM_) $(PORT)")
}

#! Further lines contain data used by VisualDCT
#! View(0,160,1.0)
#! Record("$(P):5CAM_X",300,22,0,0,"$(P):5CAM_X")
#! Field("$(P):5CAM_X.INPA",16777215,0,"$(P):5CAM_X.INPA")
#! Field("$(P):5CAM_X.INPB",16777215,0,"$(P):5CAM_X.INPB")
#! Field("$(P):5CAM_X.VAL",16777215,1,"$(P):5CAM_X.VAL")
#! Record("$(P):5CAM_Y",300,202,0,0,"$(P):5CAM_Y")
#! Field("$(P):5CAM_Y.INPA",16777215,0,"$(P):5CAM_Y.INPA")
#! Field("$(P):5CAM_Y.INPB",16777215,0,"$(P):5CAM_Y.INPB")
#! Field("$(P):5CAM_Y.VAL",16777215,1,"$(P):5CAM_Y.VAL")
#! Record("$(P):5CAM_U",280,382,0,0,"$(P):5CAM_U")
#! Field("$(P):5CAM_U.INPA",16777215,0,"$(P):5CAM_U.INPA")
#! Field("$(P):5CAM_U.INPB",16777215,0,"$(P):5CAM_U.INPB")
#! Field("$(P):5CAM_U.VAL",16777215,1,"$(P):5CAM_U.VAL")
#! Record("$(P):5CAM_V",280,562,0,0,"$(P):5CAM_V")
#! Field("$(P):5CAM_V.INPA",16777215,0,"$(P):5CAM_V.INPA")
#! Field("$(P):5CAM_V.INPB",16777215,0,"$(P):5CAM_V.INPB")
#! Field("$(P):5CAM_V.VAL",16777215,1,"$(P):5CAM_V.VAL")
#! Record("$(P):5CAM_W",280,742,0,0,"$(P):5CAM_W")
#! Field("$(P):5CAM_W.INPA",16777215,0,"$(P):5CAM_W.INPA")
#! Field("$(P):5CAM_W.INPB",16777215,0,"$(P):5CAM_W.INPB")
#! Field("$(P):5CAM_W.VAL",16777215,1,"$(P):5CAM_W.VAL")
#! Record("$(P):debug$(ID)",660,274,0,0,"$(P):debug$(ID)")
#! Record("$(P):MOVE_XYUVW",660,128,0,0,"$(P):MOVE_XYUVW")
#! Record(SEL,660,414,0,1,"SEL")
#! Field("SEL.INPA",16777215,0,"SEL.INPA")
#! Link("SEL.INPA","$(P):5CAM_X.VAL")
#! Field("SEL.INPB",16777215,0,"SEL.INPB")
#! Link("SEL.INPB","$(P):5CAM_Y.VAL")
#! Field("SEL.INPC",16777215,0,"SEL.INPC")
#! Link("SEL.INPC","$(P):5CAM_U.VAL")
#! Field("SEL.INPD",16777215,0,"SEL.INPD")
#! Link("SEL.INPD","$(P):5CAM_V.VAL")
#! Field("SEL.INPE",16777215,0,"SEL.INPE")
#! Link("SEL.INPE","$(P):5CAM_W.VAL")
