Beispiel #1
0
        public int OpenChannel(int ProtocolID, int Flags, int Baudrate)
        {
            var ChannelID = OpenChannels.Count + 1;

            switch (ProtocolID)
            {
            case 1:
                OpenChannels.Add(ProtocolID, new J1850VPWProtocol(this));
                break;

            case 5:
                OpenChannels.Add(ProtocolID, new CANProtocol(this));
                break;

            case 6:
                OpenChannels.Add(ProtocolID, new ISO15765Protocol(this));
                break;

            default:
                return(1);
            }
            return(ProtocolID);
        }
Beispiel #2
0
 public Kepler(string PortName)
 {
     Connect(PortName);
     OpenChannels.Add(0, new SystemProtocol(this));
 }