public void start(SCApplication app) { vehicleBLL = app.VehicleBLL; vehicleService = app.VehicleService; segmentBLL = app.SegmentBLL; addressesBLL = app.AddressesBLL; guideBLL = app.GuideBLL; cmdBLL = app.CMDBLL; unitBLL = app.UnitBLL; commObjCacheManager = app.getCommObjCacheManager(); var vhs = app.getEQObjCacheManager().getAllVehicle(); lineService = app.LineService; foreach (AVEHICLE vh in vhs) { vh.CommandComplete += Vh_CommandComplete; vh.BatteryLevelChange += Vh_BatteryLevelChange; vh.BatteryCapacityChange += Vh_BatteryCapacityChange; } //註冊各個Coupler的Status變化,在有其中一個有變化的時候要通知AGV目前所有coupler的狀態 List <AUNIT> chargers = unitBLL.OperateCatch.loadUnits(); foreach (AUNIT charger in chargers) { //charger.CouplerStatusChanged += Charger_CouplerStatusChanged; charger.CouplerHPSafetyChaged += Charger_CouplerHPSafetyChaged; } }
public List <ASECTION> loadSectionsBySegmentID(CommObjCacheManager cache, string segment_num) { var query = from section in cache.getSections() where section.SEG_NUM == segment_num.Trim() select section; return(query.ToList()); }
public List <ASECTION> loadByFromAdr(CommObjCacheManager cache, string from_adr) { var query = from section in cache.getSections() where section.FROM_ADR_ID.Trim() == from_adr.Trim() select section; return(query.ToList()); }
public ASECTION getFirstSecBySegmentID(CommObjCacheManager cache, string seg_id) { var query = from section in cache.getSections() where section.SEG_NUM == seg_id.Trim() orderby section.SEG_ORDER_NUM select section; return(query.FirstOrDefault()); }
public ASECTION getByID(CommObjCacheManager cache, String section_id) { var query = from s in cache.getSections() where s.SEC_ID.Trim() == section_id.Trim() orderby s.SEC_ID select s; return(query.FirstOrDefault()); }
public List <ASECTION> loadSecBySecIds(CommObjCacheManager cache, List <string> sec_ids) { var query = from sec in cache.getSections() //where sec_ids.Any(s => sec.SEC_ID.Contains(s.Trim())) where sec_ids.Contains(sec.SEC_ID.Trim()) select sec; return(query.ToList()); }
public List <ASECTION> loadByFromAdrs(CommObjCacheManager cache, List <string> from_adrs) { if (from_adrs == null || from_adrs.Count == 0) { return(null); } var query = from section in cache.getSections() //where to_adrs.Contains(section.TO_ADR_ID.Trim()) where from_adrs.Any(from_adr => from_adr.Trim() == section.FROM_ADR_ID.Trim()) select section; return(query.ToList()); }
public List <ASECTION> loadByFromOrToAdr(CommObjCacheManager cache, string adr) { if (string.IsNullOrWhiteSpace(adr)) { return(null); } var query = from s in cache.getSections() where s.FROM_ADR_ID.Trim() == adr.Trim() || s.TO_ADR_ID.Trim() == adr.Trim() orderby s.SEC_ID select s; return(query.ToList()); }
public ASECTION getByFromToAdr(CommObjCacheManager cache, string from_adr, string to_adr) { if (string.IsNullOrWhiteSpace(from_adr) || string.IsNullOrWhiteSpace(to_adr)) { return(null); } var query = from s in cache.getSections() where s.FROM_ADR_ID.Trim() == from_adr.Trim() && s.TO_ADR_ID.Trim() == to_adr.Trim() orderby s.SEC_ID select s; return(query.FirstOrDefault()); }
public void start(SCApplication app) { scApp = app; railDAO = scApp.RailDao; adrDAO = scApp.AddressDao; portDAO = scApp.PortDao; portIconDAO = scApp.PortIconDao; pointDAO = scApp.PointDao; groupRailDAO = scApp.GroupRailDao; sectionDAO = scApp.SectionDao; segmentDAO = scApp.SegmentDao; vehicleDAO = scApp.VehicleDao; blockZoneMasterDao = scApp.BlockZoneMasterDao; blockZoneDetaiDao = scApp.BolckZoneDetaiDao; blockZoneQueueDao = scApp.BlockZoneQueueDao; commObjCacheManager = scApp.getCommObjCacheManager(); }
public void start(SCApplication app) { vehicleBLL = app.VehicleBLL; vehicleService = app.VehicleService; segmentBLL = app.SegmentBLL; addressesBLL = app.AddressesBLL; guideBLL = app.GuideBLL; cmdBLL = app.CMDBLL; unitBLL = app.UnitBLL; commObjCacheManager = app.getCommObjCacheManager(); var vhs = app.getEQObjCacheManager().getAllVehicle(); foreach (AVEHICLE vh in vhs) { vh.CommandComplete += Vh_CommandComplete; vh.BatteryLevelChange += Vh_BatteryLevelChange; vh.BatteryCapacityChange += Vh_BatteryCapacityChange; } }
public Cache(CommObjCacheManager commObjCacheManager) { CommObjCacheManager = commObjCacheManager; }
public List <ASECTION> loadAllSection(CommObjCacheManager cache) { return(cache.getSections()); }
public Cache(CommObjCacheManager _commObjCache) { commObjCache = _commObjCache; }
public Catch(CommObjCacheManager _cache_manager) { CacheManager = _cache_manager; }