public void StartPeriodicMessage(SAEMessage Message)
        {
            J1850Message MessageParser = new J1850Message(default_message_prototype);

            MessageParser.TargetAddress = Message.Address;
            MessageParser.SAEMode       = Message.Mode;
            MessageParser.Data          = Message.Data;

            J2534Message TesterPresent = new J2534Message(J2534PROTOCOL.J1850PWM, J2534TXFLAG.NONE, MessageParser.RawMessage);

            channel.StartPeriodicMessage(TesterPresent, 3000);
        }
        public SAEMessage SAETxRx(SAEMessage Message, int RxDataIndex)
        {
            //GetMessageResults Results;
            //object _handle = CreateRxHandle(Addr, Mode, Params);

            //TxMessage.SAEMode = Mode;
            //TxMessage.PID = PID_record_num;
            //TxMessage.TargetAddress = Module.Address;
            //Results = channel.MessageTransaction(TxMessage, 1, TxMessage.DefaultRxComparer);
            //if (Results.Status == J2534ERR.STATUS_NOERROR)
            //    Module.Parse_PID_Validation_Bytes(PID_record_num, Results.Messages[0].Data);
            throw new NotImplementedException();
        }
Example #3
0
        public SAEMessage SAETxRx(SAEMessage Message, int RxDataIndex)
        {
            J1850Message      message = new J1850Message(default_message_prototype);
            GetMessageResults Results;
            SAEMessage        ReturnMessage = new SAEMessage();

            message.TargetAddress = Message.Addr;
            message.SAEMode       = Message.Mode;
            message.Data          = Message.Data;
            message.RxDataIndex   = RxDataIndex;

            Results = channel.MessageTransaction(message.RawMessage, 1, message.DefaultRxComparer);
            if (Results.Status == J2534ERR.STATUS_NOERROR)
            {
                message.RawMessage    = Results.Messages[0].Data;
                ReturnMessage.Mode    = message.SAEMode;
                ReturnMessage.Data    = message.Data;
                ReturnMessage.IsValid = true;
            }
            return(ReturnMessage);
        }
Example #4
0
        public void SAETx(SAEMessage Message)
        {
            J1850Message MessageParser = new J1850Message(default_message_prototype);

            MessageParser.TargetAddress = Message.Address;
            MessageParser.SAEMode       = Message.Mode;

            List <J2534Message> J2534Messages = new List <J2534Message>();

            Message.DataList.ForEach(data =>
            {
                MessageParser.Data = data;
                J2534Messages.Add(new J2534Message(SessionProtocol, SessionTxFlags, MessageParser.RawMessage));
            });

            J2534Status Status = channel.SendMessages(J2534Messages);

            if (Status.IsNotOK)
            {
                throw new J2534Exception(Status);
            }
        }
Example #5
0
        public SAEMessage SAETxRx(SAEMessage Message, int RxDataIndex)
        {
            J1850Message      MessageParser = new J1850Message(default_message_prototype);
            GetMessageResults Results;
            SAEMessage        ReturnMessage = new SAEMessage();

            MessageParser.TargetAddress = Message.Address;
            MessageParser.SAEMode       = Message.Mode;
            MessageParser.Data          = Message.Data;
            MessageParser.RxDataIndex   = RxDataIndex;

            Results = channel.MessageTransaction(MessageParser.RawMessage, 1, MessageParser.DefaultRxComparer);
            if (Results.Status.IsOK)
            {
                MessageParser.RawMessage = (byte [])Results.Messages[0].Data;
                ReturnMessage.Mode       = MessageParser.SAEMode;
                ReturnMessage.Data       = MessageParser.Data;
                ReturnMessage.Response   = MessageParser.ResponseByte;
                ReturnMessage.IsValid    = true;
            }
            return(ReturnMessage);
        }
 public void SAETx(SAEMessage Message)
 {
     throw new NotImplementedException();
 }