Skip to content

Commit

Permalink
Full port in db better
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoAldea committed Feb 20, 2024
1 parent c20140b commit 409b298
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,22 +225,22 @@ def get_cycler_station_info(self) -> CyclerDataCyclerStationC|None: #pylint: dis
setattr(device, att_name, CyclerDataDeviceTypeE(getattr(comp_dev_res,db_name)))
device.check_power_device()
log.critical(device.device_type)
elif att_name == "iface_name":
if comp_dev_res.DeviceType is DrvDbDeviceTypeE.SOURCE.value:
setattr(device, att_name,
"/dev/wattrex/source/"+getattr(detected_dev_res,db_name))
elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.LOAD.value:
setattr(device, att_name,
"/dev/wattrex/loads/"+getattr(detected_dev_res,db_name))
elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.BISOURCE.value:
setattr(device, att_name,
"/dev/wattrex/bisource/"+getattr(detected_dev_res,db_name))
elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.FLOW.value:
setattr(device, att_name,
"/dev/wattrex/flow/"+getattr(detected_dev_res,db_name))
elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.BK.value:
setattr(device, att_name,
"/dev/wattrex/bk/"+getattr(detected_dev_res,db_name))
# elif att_name == "iface_name":
# if comp_dev_res.DeviceType is DrvDbDeviceTypeE.SOURCE.value:
# setattr(device, att_name,
# "/dev/wattrex/source/"+getattr(detected_dev_res,db_name))
# elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.LOAD.value:
# setattr(device, att_name,
# "/dev/wattrex/loads/"+getattr(detected_dev_res,db_name))
# elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.BISOURCE.value:
# setattr(device, att_name,
# "/dev/wattrex/bisource/"+getattr(detected_dev_res,db_name))
# elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.FLOW.value:
# setattr(device, att_name,
# "/dev/wattrex/flow/"+getattr(detected_dev_res,db_name))
# elif comp_dev_res.DeviceType is DrvDbDeviceTypeE.BK.value:
# setattr(device, att_name,
# "/dev/wattrex/bk/"+getattr(detected_dev_res,db_name))
elif db_name in detected_dev_res.__dict__:
setattr(device, att_name, getattr(detected_dev_res,db_name))
else:
Expand Down

0 comments on commit 409b298

Please sign in to comment.