示例#1
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);
        }
示例#2
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);
        }
示例#3
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);
        }
示例#4
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);
        }