public CANPark(ParkInfo park, CommComponent commport, ParkBase parent) : base(park, parent) { _commComponent = commport; if (park.SubParks != null && park.SubParks.Count > 0) { foreach (ParkInfo subPark in park.SubParks) { CANPark sub = new CANPark(subPark, _commComponent, this); AddSubPark(sub); } } foreach (EntranceInfo en in park.Entrances) { AddEntrance(en, false); } BeginBackGroudWork(); }
public CANEntrance(CommComponent comPort, EntranceInfo info, ParkBase parent) : base(info, parent) { _CommComponent = comPort; _CommComponent.ReportReceviced += RecevicedPacketEventHandler; if (info.Address == CanAddress.HostEntrance) { SyncTime(); SetEntranceMode(Parent.WorkMode); //设置工作模式 ////控制器复位 ,由于控制板在车压地感时复位会使其它地址加一,且厂家也推荐不要经常进行复位操作,但由于一号板偶尔会不正常,所以目前只复位一号板 //Thread t1 = new Thread(ResetHardWare_Thread); //t1.IsBackground = true; //t1.Start(); Thread t2 = new Thread(OnlineQuery_Thread); t2.IsBackground = true; t2.Start(); } }