public void onCmdTest() { OBDH h = new OBDH(); h.addh(0, new H(1)); h.addh(1, new H(2)); h.addh(2, new H(3)); NetwImplV.Wrapper wrapper = new NetwImplV.Wrapper(null, null); h.onCmd(null, new BysImplV(wrapper, null, new byte[2] { 0, 1 })); h.onCmd(null, new BysImplV(wrapper, null, new byte[2] { 1, 2 })); h.onCmd(null, new BysImplV(wrapper, null, new byte[2] { 2, 3 })); //not found h.onCmd(null, new BysImplV(wrapper, null, new byte[2] { 3, 4 })); }
protected override void DailRunner() { this.Connected = 0; this.obdh = new OBDH(); this.Runner = this.createRunner(this.obdh, this.evnq); this.Exec_ = new ExecCm(new NetwImplV.Wrapper(this.Runner, new OBDC(this.Runner.netw, CMD_S)), this.Runner); obdh.addh(CMD_S, this.Exec_); // obdh.addh(CMD_C, new ExecH(this.HM)); // obdh.addh(MSG_C, this.H); // this.MsgC = new NetwImplV.Wrapper(this.Runner, new OBDC(this.Runner.netw, MSG_S)); // this.Connected = 1; this.lck.Set(); this.CallLogin(); }
public abstract NetwRunnerV createRunner(OBDH h, r.EvnListener evh);
public override NetwRunnerV createRunner(OBDH h, r.EvnListener evh) { NetwRunnerV runner = new Wrapper(this, h, evh); new Task(con => runner.runc(con as Netw), runner.doCon()).Start(); return runner; }
public override NetwRunnerV createRunner(OBDH h, r.EvnListener evn) { NetwRunnerV runner = new Wrapper(this, h, evn); new Task(con => runner.runc(con as Netw), runner.doCon(), TaskCreationOptions.LongRunning).Start(); return runner; }