示例#1
0
文件: OBDHTests.cs 项目: Centny/cswf
 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 }));
 }
示例#2
0
文件: RCRunner_m.cs 项目: Centny/cswf
 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();
 }
示例#3
0
文件: RCRunner_m.cs 项目: Centny/cswf
 public abstract NetwRunnerV createRunner(OBDH h, r.EvnListener evh);
示例#4
0
 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;
 }
示例#5
0
文件: DTM_C_j.cs 项目: Centny/cswf
 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;
 }