Exemplo n.º 1
0
def get_three_way_cutter():
    if os.environ.get(NOSERUNNER):
        from testlib.common.map import DeviceMap
        mapObj = DeviceMap()
        three_way_cutter = mapObj.getValue("three_way_cutter")
        print "[info]---get three way cutter by map.conf:", three_way_cutter
    else:
        from acs_test_scripts.Equipment.EquipmentManager import EquipmentManager
        io_card = EquipmentManager().get_io_cards()["IO_CARD"]
        three_way_cutter = io_card.get_bench_params().get_param_value("ThreeChargingModeSwitchCutter")
        print "[info]---get three way cutter by Bench:", three_way_cutter
    return ThreeWayCutter(three_way_cutter)
Exemplo n.º 2
0
def get_power_supply_obj():
    if os.environ.get(NOSERUNNER):
        from testlib.common.map import DeviceMap
        mapObj = DeviceMap()
        power_supply_port = mapObj.getValue("power_supply")
        print "[info]---get power supply port by map.conf:", power_supply_port
    else:
        from acs_test_scripts.Equipment.EquipmentManager import EquipmentManager
        io_card = EquipmentManager().get_io_cards()["IO_CARD"]
        power_supply_port = io_card.get_bench_params().get_param_value("DaXin")
        print "[info]---get power supply port by Bench:", power_supply_port
    return PowerSupply(power_supply_port)