private void ProtocolInit() { Protocol = Commbox.CreateProtocol(ProtocolType.ISO14230); if (Protocol == null) { throw new Exception(Database.GetText("Not Protocol", "System")); } options = new KWPOptions(); options.Baudrate = 10416; options.SourceAddress = TesterID; options.TargetAddress = Physical; options.MsgMode = KWPMode.Mode8X; options.LinkMode = KWPMode.Mode8X; options.StartType = KWPStartType.Fast; options.ComLine = 7; Pack = new KWPPack(); Pack.Config(options); options.FastCmd = Pack.Pack(startCommunication, 0, startCommunication.Length); if (!Protocol.Config(options)) { throw new Exception(Database.GetText("Communication Fail", "System")); } //Protocol.SetKeepLink(keepLink, 0, keepLink.Length, Pack); //Protocol.KeepLink(true); }
public bool Config(object options) { if (options is KWPOptions) { this.options = (KWPOptions)options; if (!ConfigLines()) { return(false); } return(startComms[this.options.StartType]()); } return(false); }
public bool Config(object options) { if (options is KWPOptions) { this.options = (KWPOptions)options; if (!ConfigLines()) return false; return startComms[this.options.StartType](); } return false; }