Ejemplo n.º 1
0
        private void ProtocolInit()
        {
            Protocol = Commbox.CreateProtocol(ProtocolType.ISO14230);

            if (Protocol == null)
            {
                throw new Exception(Database.GetText("Not Protocol", "System"));
            }

            options.Baudrate      = 10416;
            options.ComLine       = 7;
            options.SourceAddress = TesterID;
            options.TargetAddress = ECUID;
            options.MsgMode       = KWPMode.Mode8X;
            options.LinkMode      = KWPMode.Mode8X;
            options.StartType     = KWPStartType.Fast;

            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"));
            }

            //byte[] keepLink = Database.GetCommand("Keep Link", "GW250");

            //Protocol.SetKeepLink(keepLink, 0, keepLink.Length, Pack);
            //Protocol.KeepLink(true);
        }
Ejemplo n.º 2
0
        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"));
            }
        }
Ejemplo n.º 3
0
        private void ProtocolInit()
        {
            Protocol = Commbox.CreateProtocol(ProtocolType.MIKUNI);

            if (Protocol == null)
            {
                throw new Exception(Database.GetText("Not Protocol", "System"));
            }

            Pack = new MikuniPack();

            if (!Protocol.Config(options))
            {
                throw new Exception(Database.GetText("Communication Fail", "System"));
            }
        }
Ejemplo n.º 4
0
 private static IChannel W80Create(Parameter param, Commbox.W80.W80Commbox box, ProtocolType type)
 {
     switch (type)
     {
         case ProtocolType.MikuniECU200:
             return new W80.MikuniECU200Channel(param, box);
         case ProtocolType.MikuniECU300:
             return new W80.MikuniECU300Channel(param, box);
         case ProtocolType.ISO14230:
             return new W80.ISO14230Channel(param, box);
         case ProtocolType.ISO9141_2:
             return new W80.ISO9141Channel(param, box);
         default:
             throw new NotImplementedException();
     }
 }