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 void start(SCApplication _app) { LineBLL = _app.LineBLL; CMDBLL = _app.CMDBLL; VehicleBLL = _app.VehicleBLL; MapBLL = _app.MapBLL; SegmentBLL = _app.SegmentBLL; SectionBLL = _app.SectionBLL; PortStationBLL = _app.PortStationBLL; ReportBLL = _app.ReportBLL; VehicleService = _app.VehicleService; LineService = _app.LineService; RouteGuide = _app.RouteGuide; NodeBLL = _app.NodeBLL; app = _app; }