コード例 #1
0
ファイル: Channel.cs プロジェクト: syntroniks/J2534-Sharp
 /// <summary>
 /// Stops and clears a list of functional address filters for this channel
 /// </summary>
 /// <param name="AddressList">Address list to stop</param>
 public void DeleteFromFunctMsgLookupTable(IEnumerable <byte> AddressList)
 {
     using (HeapSByteArray hSByteArray = new HeapSByteArray(AddressList.ToArray()))
     {
         lock (sync)
         {
             API.CheckResult(API.PTIoctl(channelId, (int)IOCTL.DELETE_FROM_FUNCT_MSG_LOOKUP_TABLE, (IntPtr)hSByteArray, IntPtr.Zero));
         }
     }
 }
コード例 #2
0
ファイル: Channel.cs プロジェクト: syntroniks/J2534-Sharp
 /// <summary>
 /// Starts a list of functional message address filters for this channel
 /// </summary>
 /// <param name="AddressList">Address list to pass</param>
 public void AddToFunctMsgLookupTable(List <byte> AddressList)
 {
     using (HeapSByteArray hSByteArray = new HeapSByteArray(AddressList.ToArray()))
     {
         lock (sync)
         {
             API.CheckResult(API.PTIoctl(channelId, (int)IOCTL.ADD_TO_FUNCT_MSG_LOOKUP_TABLE, (IntPtr)hSByteArray, IntPtr.Zero));
         }
     }
 }
コード例 #3
0
ファイル: Channel.cs プロジェクト: syntroniks/J2534-Sharp
 /// <summary>
 /// Performs a 5 baud handshake for ISO9141 initialization
 /// </summary>
 /// <param name="TargetAddress">Address to handshake with</param>
 /// <returns>byte[2]</returns>
 public byte[] FiveBaudInit(byte TargetAddress)
 {
     using (HeapSByteArray hInput = new HeapSByteArray(new byte[] { TargetAddress }))
         using (HeapSByteArray hOutput = new HeapSByteArray(new byte[2]))
         {
             lock (sync)
             {
                 API.CheckResult(API.PTIoctl(channelId, (int)IOCTL.FIVE_BAUD_INIT, (IntPtr)hInput, (IntPtr)hOutput));
             }
             return(hOutput.ToSByteArray());
         }
 }