Exemplo n.º 1
0
        public bool ProcessMessage(BlockMessage in_msg, ref BlockMessage out_msg)
        {
            bool bRet = false;

            if (in_msg.GetTA() == ADDRESS_ABS)
            {
                bRet = ProcessMessage_ABS(in_msg, ref out_msg);
            }
            else if (in_msg.GetTA() == ADDRESS_OBD)
            {
                bRet = ProcessMessage_OBD(in_msg, ref out_msg);
            }
            return(bRet);
        }
Exemplo n.º 2
0
        public bool ProcessMessage(BlockMessage in_msg, ref BlockMessage out_msg)
        {
            bool bRet = false;

            if (in_msg.GetTA() == ADDRESS_ABS)
            {
                bRet = ProcessMessage_ABS(in_msg, ref out_msg);
            }
            else if (in_msg.GetTA() == ADDRESS_OBD)
            {
                bRet = ProcessMessage_OBD(in_msg, ref out_msg);
            }
            OBD_DTC_Data_Queue.Clear();
            ABS_DTC_Data_Queue.Clear();
            return(bRet);
        }
Exemplo n.º 3
0
        private BlockMessage PrepareResponse_StartCommunication_ABS(BlockMessage in_msg, ref BlockMessage out_msg)
        {
            List <byte> out_list = new List <byte>();

            out_list.Add((byte)(ABS_KeyByte_for_StartCommunication & 0xff));
            out_list.Add((byte)((ABS_KeyByte_for_StartCommunication >> 8) & 0xff));
            out_msg = new BlockMessage((byte)((((uint)MSG_A1A0_MODE.WITH_ADDRESS_INFO) << 6)), in_msg.GetSA(), in_msg.GetTA(),
                                       (byte)(in_msg.GetSID() | RETURN_SID_OR_VALUE), out_list, true);          // for format_4
            return(out_msg);
        }
Exemplo n.º 4
0
        private BlockMessage PrepareResponse_ReadDiagnosticTroubleCodesByStatus_OBD(BlockMessage in_msg, ref BlockMessage out_msg)
        {
            //List<byte> out_list = GenerateFixednResponseData_OBD();
            List <byte> out_list = GenerateQueuedResponseData_OBD();

            out_msg = new BlockMessage((byte)((((uint)MSG_A1A0_MODE.WITH_ADDRESS_INFO) << 6)), in_msg.GetSA(), in_msg.GetTA(),
                                       (byte)(in_msg.GetSID() | RETURN_SID_OR_VALUE), out_list, false);          // for format_2
            return(out_msg);
        }
Exemplo n.º 5
0
        private BlockMessage PrepareResponse_StopCommunication_OBD(BlockMessage in_msg, ref BlockMessage out_msg)
        {
            List <byte> out_list = new List <byte>();

            out_msg = new BlockMessage((byte)((((uint)MSG_A1A0_MODE.WITH_ADDRESS_INFO) << 6)), in_msg.GetSA(), in_msg.GetTA(),
                                       (byte)(in_msg.GetSID() | RETURN_SID_OR_VALUE), out_list, false);          // for format_2
            return(out_msg);
        }
Exemplo n.º 6
0
        private BlockMessage PrepareNegativeResponse_MsgErrort_ReadDiagnosticTroubleCodesByStatus_ABS(BlockMessage in_msg, ref BlockMessage out_msg)
        {
            List <byte> out_list = new List <byte>();

            out_list.Add(in_msg.GetSID());
            out_list.Add(NegativeResponse_MsgError_ReadDiagnosticTroubleCodesByStatus_ResponseCode);
            out_msg = new BlockMessage((byte)((((uint)MSG_A1A0_MODE.WITH_ADDRESS_INFO) << 6)), in_msg.GetSA(), in_msg.GetTA(),
                                       NEGATIVE_RESPONSE_SID, out_list, true);          // for format_4
            return(out_msg);
        }