+ if trigger_id == "dd-ctrl-dut":
+ try:
+ options = \
+ generate_options(sorted(self.spec_tbs[dd_dut].keys()))
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-ctrl-dut-value": dd_dut,
+ "dd-ctrl-phy-value": str(),
+ "dd-ctrl-phy-options": options,
+ "dd-ctrl-phy-disabled": disabled,
+ "dd-ctrl-area-value": str(),
+ "dd-ctrl-area-options": list(),
+ "dd-ctrl-area-disabled": True,
+ "dd-ctrl-test-value": str(),
+ "dd-ctrl-test-options": list(),
+ "dd-ctrl-test-disabled": True,
+ "cl-ctrl-core-options": list(),
+ "cl-ctrl-core-value": list(),
+ "cl-ctrl-core-all-value": list(),
+ "cl-ctrl-core-all-options": C.CL_ALL_DISABLED,
+ "cl-ctrl-framesize-options": list(),
+ "cl-ctrl-framesize-value": list(),
+ "cl-ctrl-framesize-all-value": list(),
+ "cl-ctrl-framesize-all-options": C.CL_ALL_DISABLED,
+ "cl-ctrl-testtype-options": list(),
+ "cl-ctrl-testtype-value": list(),
+ "cl-ctrl-testtype-all-value": list(),
+ "cl-ctrl-testtype-all-options": C.CL_ALL_DISABLED,
+ })
+ elif trigger_id == "dd-ctrl-phy":
+ try:
+ dut = ctrl_panel.get("dd-ctrl-dut-value")
+ phy = self.spec_tbs[dut][dd_phy]
+ options = [{"label": label(v), "value": v} \
+ for v in sorted(phy.keys())]
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-ctrl-phy-value": dd_phy,
+ "dd-ctrl-area-value": str(),
+ "dd-ctrl-area-options": options,
+ "dd-ctrl-area-disabled": disabled,
+ "dd-ctrl-test-value": str(),
+ "dd-ctrl-test-options": list(),
+ "dd-ctrl-test-disabled": True,
+ "cl-ctrl-core-options": list(),
+ "cl-ctrl-core-value": list(),
+ "cl-ctrl-core-all-value": list(),
+ "cl-ctrl-core-all-options": C.CL_ALL_DISABLED,
+ "cl-ctrl-framesize-options": list(),
+ "cl-ctrl-framesize-value": list(),
+ "cl-ctrl-framesize-all-value": list(),
+ "cl-ctrl-framesize-all-options": C.CL_ALL_DISABLED,
+ "cl-ctrl-testtype-options": list(),
+ "cl-ctrl-testtype-value": list(),
+ "cl-ctrl-testtype-all-value": list(),
+ "cl-ctrl-testtype-all-options": C.CL_ALL_DISABLED,
+ })
+ elif trigger_id == "dd-ctrl-area":
+ try:
+ dut = ctrl_panel.get("dd-ctrl-dut-value")
+ phy = ctrl_panel.get("dd-ctrl-phy-value")
+ area = self.spec_tbs[dut][phy][dd_area]
+ options = generate_options(sorted(area.keys()))
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-ctrl-area-value": dd_area,
+ "dd-ctrl-test-value": str(),
+ "dd-ctrl-test-options": options,
+ "dd-ctrl-test-disabled": disabled,
+ "cl-ctrl-core-options": list(),
+ "cl-ctrl-core-value": list(),
+ "cl-ctrl-core-all-value": list(),
+ "cl-ctrl-core-all-options": C.CL_ALL_DISABLED,
+ "cl-ctrl-framesize-options": list(),
+ "cl-ctrl-framesize-value": list(),
+ "cl-ctrl-framesize-all-value": list(),
+ "cl-ctrl-framesize-all-options": C.CL_ALL_DISABLED,
+ "cl-ctrl-testtype-options": list(),
+ "cl-ctrl-testtype-value": list(),
+ "cl-ctrl-testtype-all-value": list(),
+ "cl-ctrl-testtype-all-options": C.CL_ALL_DISABLED,
+ })
+ elif trigger_id == "dd-ctrl-test":
+ dut = ctrl_panel.get("dd-ctrl-dut-value")
+ phy = ctrl_panel.get("dd-ctrl-phy-value")
+ area = ctrl_panel.get("dd-ctrl-area-value")
+ if all((dut, phy, area, dd_test, )):
+ test = self.spec_tbs[dut][phy][area][dd_test]
+ ctrl_panel.set({
+ "dd-ctrl-test-value": dd_test,
+ "cl-ctrl-core-options": \
+ generate_options(sorted(test["core"])),
+ "cl-ctrl-core-value": list(),
+ "cl-ctrl-core-all-value": list(),
+ "cl-ctrl-core-all-options": C.CL_ALL_ENABLED,
+ "cl-ctrl-framesize-options": \
+ generate_options(sorted(test["frame-size"])),
+ "cl-ctrl-framesize-value": list(),
+ "cl-ctrl-framesize-all-value": list(),
+ "cl-ctrl-framesize-all-options": C.CL_ALL_ENABLED,
+ "cl-ctrl-testtype-options": \
+ generate_options(sorted(test["test-type"])),
+ "cl-ctrl-testtype-value": list(),
+ "cl-ctrl-testtype-all-value": list(),
+ "cl-ctrl-testtype-all-options": C.CL_ALL_ENABLED,
+ })
+ elif trigger_id == "cl-ctrl-core":
+ val_sel, val_all = sync_checklists(
+ options=ctrl_panel.get("cl-ctrl-core-options"),
+ sel=cl_core,
+ all=list(),
+ id=""
+ )
+ ctrl_panel.set({
+ "cl-ctrl-core-value": val_sel,
+ "cl-ctrl-core-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-core-all":
+ val_sel, val_all = sync_checklists(
+ options = ctrl_panel.get("cl-ctrl-core-options"),
+ sel=list(),
+ all=cl_core_all,
+ id="all"
+ )
+ ctrl_panel.set({
+ "cl-ctrl-core-value": val_sel,
+ "cl-ctrl-core-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-framesize":
+ val_sel, val_all = sync_checklists(
+ options = ctrl_panel.get("cl-ctrl-framesize-options"),
+ sel=cl_framesize,
+ all=list(),
+ id=""
+ )
+ ctrl_panel.set({
+ "cl-ctrl-framesize-value": val_sel,
+ "cl-ctrl-framesize-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-framesize-all":
+ val_sel, val_all = sync_checklists(
+ options = ctrl_panel.get("cl-ctrl-framesize-options"),
+ sel=list(),
+ all=cl_framesize_all,
+ id="all"
+ )
+ ctrl_panel.set({
+ "cl-ctrl-framesize-value": val_sel,
+ "cl-ctrl-framesize-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-testtype":
+ val_sel, val_all = sync_checklists(
+ options = ctrl_panel.get("cl-ctrl-testtype-options"),
+ sel=cl_testtype,
+ all=list(),
+ id=""
+ )
+ ctrl_panel.set({
+ "cl-ctrl-testtype-value": val_sel,
+ "cl-ctrl-testtype-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-testtype-all":
+ val_sel, val_all = sync_checklists(
+ options = ctrl_panel.get("cl-ctrl-testtype-options"),
+ sel=list(),
+ all=cl_testtype_all,
+ id="all"
+ )
+ ctrl_panel.set({
+ "cl-ctrl-testtype-value": val_sel,
+ "cl-ctrl-testtype-all-value": val_all,
+ })
+ elif trigger_id == "btn-ctrl-add":
+ _ = btn_add
+ dut = ctrl_panel.get("dd-ctrl-dut-value")
+ phy = ctrl_panel.get("dd-ctrl-phy-value")
+ area = ctrl_panel.get("dd-ctrl-area-value")
+ test = ctrl_panel.get("dd-ctrl-test-value")
+ cores = ctrl_panel.get("cl-ctrl-core-value")
+ framesizes = ctrl_panel.get("cl-ctrl-framesize-value")
+ testtypes = ctrl_panel.get("cl-ctrl-testtype-value")