コード例 #1
0
ファイル: J2534Channel.cs プロジェクト: wojtst/Unlimited-Diag
        public void DeleteFromFunctMsgLookupTable(List <byte> AddressList)
        {
            J2534ERR       Status;
            HeapSByteArray SByteArray = new HeapSByteArray(AddressList.ToArray());

            lock (Device.Library.API_LOCK)
                Status = (J2534ERR)Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.DELETE_FROM_FUNCT_MSG_LOOKUP_TABLE, SByteArray, IntPtr.Zero);
            if (Status != J2534ERR.STATUS_NOERROR)
            {
                throw new J2534Exception(Status, Device.Library.GetLastError());
            }
        }
コード例 #2
0
ファイル: J2534Channel.cs プロジェクト: wojtst/Unlimited-Diag
        public void AddToFunctMsgLookupTable(byte Addr)
        {
            J2534ERR       Status;
            HeapSByteArray SByteArray = new HeapSByteArray(Addr);

            lock (Device.Library.API_LOCK)
                Status = Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.ADD_TO_FUNCT_MSG_LOOKUP_TABLE, SByteArray, IntPtr.Zero);
            if (Status != J2534ERR.STATUS_NOERROR)
            {
                throw new J2534Exception(Status, Device.Library.GetLastError());
            }
        }
コード例 #3
0
        public void DeleteFromFunctMsgLookupTable(IEnumerable <byte> AddressList)
        {
            J2534Status    Status     = new J2534Status();
            HeapSByteArray SByteArray = new HeapSByteArray(AddressList.ToArray());

            lock (Device.Library.API_LOCK)
            {
                Status.Code = Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.DELETE_FROM_FUNCT_MSG_LOOKUP_TABLE, SByteArray.Ptr, IntPtr.Zero);
                if (Status.IsNotOK)
                {
                    Status.Description = Device.Library.GetLastError();
                    throw new J2534Exception(Status);
                }
            }
        }
コード例 #4
0
        public void AddToFunctMsgLookupTable(byte Addr)
        {
            J2534Status    Status     = new J2534Status();
            HeapSByteArray SByteArray = new HeapSByteArray(Addr);

            lock (Device.Library.API_LOCK)
            {
                Status.Code = Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.ADD_TO_FUNCT_MSG_LOOKUP_TABLE, SByteArray.Ptr, IntPtr.Zero);
                if (Status.IsNotOK)
                {
                    Status.Description = Device.Library.GetLastError();
                    throw new J2534Exception(Status);
                }
            }
        }
コード例 #5
0
ファイル: J2534Channel.cs プロジェクト: wojtst/Unlimited-Diag
        public byte[] FiveBaudInit(byte TargetAddress)
        {
            J2534ERR       Status;
            HeapSByteArray Input  = new HeapSByteArray(new byte[] { TargetAddress });
            HeapSByteArray Output = new HeapSByteArray(new byte[2]);

            lock (Device.Library.API_LOCK)
            {
                Status = (J2534ERR)Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.FIVE_BAUD_INIT, Input, Output);
                if (Status != J2534ERR.STATUS_NOERROR)
                {
                    throw new J2534Exception(Status, Device.Library.GetLastError());
                }
                return(Output);
            }
        }
コード例 #6
0
        public byte[] FiveBaudInit(byte TargetAddress)
        {
            J2534Status    Status = new J2534Status();
            HeapSByteArray Input  = new HeapSByteArray(new byte[] { TargetAddress });
            HeapSByteArray Output = new HeapSByteArray(new byte[2]);

            lock (Device.Library.API_LOCK)
            {
                Status.Code = Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.FIVE_BAUD_INIT, Input.Ptr, Output.Ptr);
                if (Status.IsNotOK)
                {
                    Status.Description = Device.Library.GetLastError();
                    throw new J2534Exception(Status);
                }
                return(Output);
            }
        }