private void InsertAt(int index, J2534Message value) { IntPtr pMessage = IntPtr.Add(pMessages, index * CONST.J2534MESSAGESIZE); Marshal.WriteInt32(pMessage, global_protocol_id); Marshal.WriteInt32(pMessage, 8, value.FlagsAsInt); MarshalIEnumerableToHeapData(pMessage, value.Data); }
public void StartPeriodicMessage(J2534Message Message, int Interval) { J2534ERR Status; lock (Device.Library.API_LOCK) { PeriodicMsgList.Add(new PeriodicMsg(Message, Interval)); if ((Status = StartPeriodicMessage(PeriodicMsgList.Count - 1)) != J2534ERR.STATUS_NOERROR) { PeriodicMsgList.RemoveAt(PeriodicMsgList.Count - 1); throw new J2534Exception(Status, Device.Library.GetLastError()); } } }
public J2534Message FastInit(J2534Message TxMessage) { J2534ERR Status; J2534HeapMessage Input = new J2534HeapMessage(TxMessage); J2534HeapMessage Output = new J2534HeapMessage(); lock (Device.Library.API_LOCK) { Status = (J2534ERR)Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.FAST_INIT, Input, Output); if (Status != J2534ERR.STATUS_NOERROR) { throw new J2534Exception(Status, Device.Library.GetLastError()); } return(Output); } }
public J2534Message FastInit(J2534Message TxMessage) { J2534Status Status = new J2534Status(); J2534HeapMessage Input = new J2534HeapMessage(ProtocolID, TxMessage.TxFlags, TxMessage.Data); J2534HeapMessage Output = new J2534HeapMessage(); lock (Device.Library.API_LOCK) { Status.Code = Device.Library.API.IOCtl(ChannelID, (int)J2534IOCTL.FAST_INIT, Input.Ptr, Output.Ptr); if (Status.IsNotOK) { Status.Description = Device.Library.GetLastError(); throw new J2534Exception(Status); } return(Output); } }
public J2534HeapMessage(J2534Message Message) { pMessage = Marshal.AllocHGlobal(CONST.J2534MESSAGESIZE); this.Message = Message; }
public void PopulateWith(J2534Message Message) { Length = 1; this[0] = Message; }