private void setCouplerTypeAddressInfo(AADDRESS couplerAddress) { // CouplerInfo coupler_info = GetCouplerInfo(couplerAddress.ADR_ID); CouplerInfo coupler_info = scApp.CouplerInfoDao.getCouplerInfo(scApp, couplerAddress.ADR_ID); if (coupler_info == null) { throw new Exception($"CouplerInfo not exist!,Adr id:{couplerAddress.ADR_ID}"); } (couplerAddress as ICpuplerType).ChargerID = coupler_info.ChargerID; (couplerAddress as ICpuplerType).CouplerNum = (CouplerNum)coupler_info.CouplerNum; (couplerAddress as ICpuplerType).Priority = coupler_info.Priority; (couplerAddress as ICpuplerType).Priority = coupler_info.Priority; (couplerAddress as ICpuplerType).TrafficControlSegment = coupler_info.TrafficControlSegment.Split('-'); //if (!SCUtility.isMatche(couplerAddress.ADR_ID, "24002")) (couplerAddress as ICpuplerType).IsEnable = true; //AUNIT charger = scApp.getEQObjCacheManager().getUnitByUnitID(coupler_info.ChargerID); //if (charger != null) //{ // if(coupler_info.CouplerNum == 1) // { // charger.Coupler1Address = couplerAddress.ADR_ID; // } // else if(coupler_info.CouplerNum == 2) // { // charger.Coupler2Address = couplerAddress.ADR_ID; // } // else if (coupler_info.CouplerNum == 3) // { // charger.Coupler3Address = couplerAddress.ADR_ID; // } //} }
private void setCouplerTypeAddressInfo(AADDRESS couplerAddress) { // CouplerInfo coupler_info = GetCouplerInfo(couplerAddress.ADR_ID); CouplerInfo coupler_info = scApp.CouplerInfoDao.getCouplerInfo(scApp, couplerAddress.ADR_ID); if (coupler_info == null) { throw new Exception($"CouplerInfo not exist!,Adr id:{couplerAddress.ADR_ID}"); } (couplerAddress as ICpuplerType).ChargerID = coupler_info.ChargerID; (couplerAddress as ICpuplerType).CouplerNum = (CouplerNum)coupler_info.CouplerNum; (couplerAddress as ICpuplerType).Priority = coupler_info.Priority; (couplerAddress as ICpuplerType).Priority = coupler_info.Priority; (couplerAddress as ICpuplerType).TrafficControlSegment = coupler_info.TrafficControlSegment.Split('-'); //if (!SCUtility.isMatche(couplerAddress.ADR_ID, "24002")) (couplerAddress as ICpuplerType).IsEnable = true; }