public bool Config(object options) { if (options is ISO9141Options) { this.options = options as ISO9141Options; return true; } return false; }
public bool Config(object options) { if (options is ISO9141Options) { this.options = options as ISO9141Options; return(true); } return(false); }
private void ProtocolInit() { options = new ISO9141Options(); options.AddrCode = 0x33; options.ComLine = 7; options.Header = 0x68; options.LLine = true; options.SourceAddress = 0xF1; options.TargetAddress = 0x6A; Protocol = Commbox.CreateProtocol(ProtocolType.ISO9141_2); if (Protocol == null) throw new Exception(Database.GetText("Not Protocol", "System")); Pack = new ISO9141Pack(); if (!Protocol.Config(options) || !Pack.Config(options)) throw new Exception(Database.GetText("Communication Fail", "System")); }