public J2534HeapMessage(J2534PROTOCOL ProtocolID, J2534TXFLAG TxFlags, byte[] Data) { pMessage = Marshal.AllocHGlobal(CONST.J2534MESSAGESIZE); this.ProtocolID = ProtocolID; this.TxFlags = TxFlags; this.Data = Data; }
public void InsertSingle(J2534PROTOCOL ProtocolID, J2534TXFLAG TxFlags, IEnumerable <byte> Data) { Length = 1; Marshal.WriteInt32(pMessages, (int)ProtocolID); Marshal.WriteInt32(pMessages, 8, (int)TxFlags); MarshalIEnumerableToHeapData(pMessages, Data); }
public void PopulateWith(J2534PROTOCOL ProtocolID, J2534TXFLAG TxFlags, byte[] Data) { Length = 1; Marshal.WriteInt32(pMessages, (int)ProtocolID); Marshal.WriteInt32(pMessages, 8, (int)TxFlags); Marshal.WriteInt32(pMessages, 16, Data.Length); Marshal.Copy(Data, 0, IntPtr.Add(pMessages, 24), Data.Length); }
//Channel Constructor internal Channel(J2534Device Device, J2534PROTOCOL ProtocolID, J2534BAUD Baud, J2534CONNECTFLAG ConnectFlags) { HeapMessageArray = new J2534HeapMessageArray(CONST.HEAPMESSAGEBUFFERSIZE); this.Device = Device; this.ProtocolID = ProtocolID; this.Baud = (int)Baud; this.ConnectFlags = ConnectFlags; DefaultTxTimeout = 50; DefaultRxTimeout = 250; DefaultTxFlag = J2534TXFLAG.NONE; Connect(); }
public J2534Message(J2534PROTOCOL ProtocolID, J2534TXFLAG TxFlags, byte[] Data) { this.ProtocolID = ProtocolID; this.TxFlags = TxFlags; if (Data == null) { this.Data = Array.Empty <byte>(); } else { this.Data = Data; } }
public void DeepCopy(J2534MessageList Messages) { if (Messages.Count > array_max_length) { throw new ArgumentException("J2534MessageList Count exceeds J2534HeapMessageArray buffer length!"); } ProtocolID = Messages.ProtocolID; int index = 0; for (; index < Messages.Count; index++) { InsertAt(index, Messages[index]); index++; } Length = index; }
public J2534HeapMessage(J2534PROTOCOL ProtocolID, J2534TXFLAG TxFlags, IEnumerable <byte> Data) : this() { this.ProtocolID = ProtocolID; this.TxFlags = TxFlags; this.Data = Data; }
public Channel ConstructChannel(J2534PROTOCOL ProtocolID, J2534BAUD Baud, J2534CONNECTFLAG ConnectFlags) { return(new Channel(this, ProtocolID, Baud, ConnectFlags)); }