- elif trigger_id == "cl-ctrl-core":
- val_sel, val_all = sync_checklists(
- options=ctrl_panel.get("cl-core-options"),
- sel=cl_core,
- all=list(),
- id=""
- )
- ctrl_panel.set({
- "cl-core-value": val_sel,
- "cl-core-all-value": val_all,
- })
- elif trigger_id == "cl-ctrl-core-all":
- val_sel, val_all = sync_checklists(
- options = ctrl_panel.get("cl-core-options"),
- sel=list(),
- all=cl_core_all,
- id="all"
- )
- ctrl_panel.set({
- "cl-core-value": val_sel,
- "cl-core-all-value": val_all,
- })
- elif trigger_id == "cl-ctrl-framesize":
- val_sel, val_all = sync_checklists(
- options = ctrl_panel.get("cl-framesize-options"),
- sel=cl_framesize,
- all=list(),
- id=""
- )
- ctrl_panel.set({
- "cl-framesize-value": val_sel,
- "cl-framesize-all-value": val_all,
- })
- elif trigger_id == "cl-ctrl-framesize-all":
- val_sel, val_all = sync_checklists(
- options = ctrl_panel.get("cl-framesize-options"),
- sel=list(),
- all=cl_framesize_all,
- id="all"
- )
- ctrl_panel.set({
- "cl-framesize-value": val_sel,
- "cl-framesize-all-value": val_all,
- })
- elif trigger_id == "cl-ctrl-testtype":
- val_sel, val_all = sync_checklists(
- options = ctrl_panel.get("cl-testtype-options"),
- sel=cl_testtype,
- all=list(),
- id=""
- )
- ctrl_panel.set({
- "cl-testtype-value": val_sel,
- "cl-testtype-all-value": val_all,
- })
- elif trigger_id == "cl-ctrl-testtype-all":
+ on_draw = True
+ elif trigger.type == "normalize":
+ ctrl_panel.set({"cl-normalize-val": normalize})
+ on_draw = True
+ elif trigger.type == "ctrl-dd":
+ if trigger.idx == "rls":
+ try:
+ options = generate_options(
+ self._spec_tbs[trigger.value].keys()
+ )
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-rls-val": trigger.value,
+ "dd-dut-val": str(),
+ "dd-dut-opt": options,
+ "dd-dut-dis": disabled,
+ "dd-dutver-val": str(),
+ "dd-dutver-opt": list(),
+ "dd-dutver-dis": True,
+ "dd-phy-val": str(),
+ "dd-phy-opt": list(),
+ "dd-phy-dis": True,
+ "dd-area-val": str(),
+ "dd-area-opt": list(),
+ "dd-area-dis": True,
+ "dd-test-val": str(),
+ "dd-test-opt": list(),
+ "dd-test-dis": True,
+ "cl-core-opt": list(),
+ "cl-core-val": list(),
+ "cl-core-all-val": list(),
+ "cl-core-all-opt": C.CL_ALL_DISABLED,
+ "cl-frmsize-opt": list(),
+ "cl-frmsize-val": list(),
+ "cl-frmsize-all-val": list(),
+ "cl-frmsize-all-opt": C.CL_ALL_DISABLED,
+ "cl-tsttype-opt": list(),
+ "cl-tsttype-val": list(),
+ "cl-tsttype-all-val": list(),
+ "cl-tsttype-all-opt": C.CL_ALL_DISABLED,
+ "btn-add-dis": True
+ })
+ elif trigger.idx == "dut":
+ try:
+ rls = ctrl_panel.get("dd-rls-val")
+ dut = self._spec_tbs[rls][trigger.value]
+ options = generate_options(dut.keys())
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-dut-val": trigger.value,
+ "dd-dutver-val": str(),
+ "dd-dutver-opt": options,
+ "dd-dutver-dis": disabled,
+ "dd-phy-val": str(),
+ "dd-phy-opt": list(),
+ "dd-phy-dis": True,
+ "dd-area-val": str(),
+ "dd-area-opt": list(),
+ "dd-area-dis": True,
+ "dd-test-val": str(),
+ "dd-test-opt": list(),
+ "dd-test-dis": True,
+ "cl-core-opt": list(),
+ "cl-core-val": list(),
+ "cl-core-all-val": list(),
+ "cl-core-all-opt": C.CL_ALL_DISABLED,
+ "cl-frmsize-opt": list(),
+ "cl-frmsize-val": list(),
+ "cl-frmsize-all-val": list(),
+ "cl-frmsize-all-opt": C.CL_ALL_DISABLED,
+ "cl-tsttype-opt": list(),
+ "cl-tsttype-val": list(),
+ "cl-tsttype-all-val": list(),
+ "cl-tsttype-all-opt": C.CL_ALL_DISABLED,
+ "btn-add-dis": True
+ })
+ elif trigger.idx == "dutver":
+ try:
+ rls = ctrl_panel.get("dd-rls-val")
+ dut = ctrl_panel.get("dd-dut-val")
+ dutver = self._spec_tbs[rls][dut][trigger.value]
+ options = generate_options(dutver.keys())
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-dutver-val": trigger.value,
+ "dd-phy-val": str(),
+ "dd-phy-opt": options,
+ "dd-phy-dis": disabled,
+ "dd-area-val": str(),
+ "dd-area-opt": list(),
+ "dd-area-dis": True,
+ "dd-test-val": str(),
+ "dd-test-opt": list(),
+ "dd-test-dis": True,
+ "cl-core-opt": list(),
+ "cl-core-val": list(),
+ "cl-core-all-val": list(),
+ "cl-core-all-opt": C.CL_ALL_DISABLED,
+ "cl-frmsize-opt": list(),
+ "cl-frmsize-val": list(),
+ "cl-frmsize-all-val": list(),
+ "cl-frmsize-all-opt": C.CL_ALL_DISABLED,
+ "cl-tsttype-opt": list(),
+ "cl-tsttype-val": list(),
+ "cl-tsttype-all-val": list(),
+ "cl-tsttype-all-opt": C.CL_ALL_DISABLED,
+ "btn-add-dis": True
+ })
+ elif trigger.idx == "phy":
+ try:
+ rls = ctrl_panel.get("dd-rls-val")
+ dut = ctrl_panel.get("dd-dut-val")
+ dutver = ctrl_panel.get("dd-dutver-val")
+ phy = self._spec_tbs[rls][dut][dutver][trigger.value]
+ options = [{"label": label(v), "value": v} \
+ for v in sorted(phy.keys())]
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-phy-val": trigger.value,
+ "dd-area-val": str(),
+ "dd-area-opt": options,
+ "dd-area-dis": disabled,
+ "dd-test-val": str(),
+ "dd-test-opt": list(),
+ "dd-test-dis": True,
+ "cl-core-opt": list(),
+ "cl-core-val": list(),
+ "cl-core-all-val": list(),
+ "cl-core-all-opt": C.CL_ALL_DISABLED,
+ "cl-frmsize-opt": list(),
+ "cl-frmsize-val": list(),
+ "cl-frmsize-all-val": list(),
+ "cl-frmsize-all-opt": C.CL_ALL_DISABLED,
+ "cl-tsttype-opt": list(),
+ "cl-tsttype-val": list(),
+ "cl-tsttype-all-val": list(),
+ "cl-tsttype-all-opt": C.CL_ALL_DISABLED,
+ "btn-add-dis": True
+ })
+ elif trigger.idx == "area":
+ try:
+ rls = ctrl_panel.get("dd-rls-val")
+ dut = ctrl_panel.get("dd-dut-val")
+ dutver = ctrl_panel.get("dd-dutver-val")
+ phy = ctrl_panel.get("dd-phy-val")
+ area = \
+ self._spec_tbs[rls][dut][dutver][phy][trigger.value]
+ options = generate_options(area.keys())
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-area-val": trigger.value,
+ "dd-test-val": str(),
+ "dd-test-opt": options,
+ "dd-test-dis": disabled,
+ "cl-core-opt": list(),
+ "cl-core-val": list(),
+ "cl-core-all-val": list(),
+ "cl-core-all-opt": C.CL_ALL_DISABLED,
+ "cl-frmsize-opt": list(),
+ "cl-frmsize-val": list(),
+ "cl-frmsize-all-val": list(),
+ "cl-frmsize-all-opt": C.CL_ALL_DISABLED,
+ "cl-tsttype-opt": list(),
+ "cl-tsttype-val": list(),
+ "cl-tsttype-all-val": list(),
+ "cl-tsttype-all-opt": C.CL_ALL_DISABLED,
+ "btn-add-dis": True
+ })
+ elif trigger.idx == "test":
+ rls = ctrl_panel.get("dd-rls-val")
+ dut = ctrl_panel.get("dd-dut-val")
+ dutver = ctrl_panel.get("dd-dutver-val")
+ phy = ctrl_panel.get("dd-phy-val")
+ area = ctrl_panel.get("dd-area-val")
+ if all((rls, dut, dutver, phy, area, trigger.value, )):
+ test = self._spec_tbs[rls][dut][dutver][phy][area]\
+ [trigger.value]
+ ctrl_panel.set({
+ "dd-test-val": trigger.value,
+ "cl-core-opt": generate_options(test["core"]),
+ "cl-core-val": list(),
+ "cl-core-all-val": list(),
+ "cl-core-all-opt": C.CL_ALL_ENABLED,
+ "cl-frmsize-opt": \
+ generate_options(test["frame-size"]),
+ "cl-frmsize-val": list(),
+ "cl-frmsize-all-val": list(),
+ "cl-frmsize-all-opt": C.CL_ALL_ENABLED,
+ "cl-tsttype-opt": \
+ generate_options(test["test-type"]),
+ "cl-tsttype-val": list(),
+ "cl-tsttype-all-val": list(),
+ "cl-tsttype-all-opt": C.CL_ALL_ENABLED,
+ "btn-add-dis": True
+ })
+ elif trigger.type == "ctrl-cl":
+ param = trigger.idx.split("-")[0]
+ if "-all" in trigger.idx:
+ c_sel, c_all, c_id = list(), trigger.value, "all"
+ else:
+ c_sel, c_all, c_id = trigger.value, list(), str()