2024-05-22 23:21:15 +08:00

1613 lines
31 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*@<40><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>@<40>ַ<EFBFBD><D6B7>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ȥ<EFBFBD><C8A5>*/
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
/*@<40><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>*/
#include "Dcm_DID.h"
#include "app_to_dcm.h"
/******************************************************************************
* Description: : Global Variable Definition Section
******************************************************************************/
/*@<40><><EFBFBD><EFBFBD>ȫ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>*/
/******************************************************************************
* Description: : Static Variable Definition Section
******************************************************************************/
/*@<40><><EFBFBD>徲̬<E5BEB2><CCAC><EFBFBD><EFBFBD>*/
/******************************************************************************
* Description: : Static Function Prototype Declaration
*****************************************************************************/
/*@<40><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
/******************************************************************************
* Description: : Write User Function Code
*****************************************************************************/
/*@<40><><EFBFBD><EFBFBD>ͷע<CDB7>͸<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD><D0BA><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>մ˸<D5B4>ʽע<CABD><D7A2>*/
/******************************************************************************
*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : @
*<2A><><EFBFBD><EFBFBD> : @
*<2A><><EFBFBD><EFBFBD>ֵ : @
*<2A><><EFBFBD><EFBFBD> : @
*<2A>༭ʱ<E0BCAD><CAB1> : @
*<2A><>ע : @
*****************************************************************************/
uint8 IO_Did_Enable_0x3A00;
uint8 Rec_Moto_Status_0x3A00;
uint8 Fan_Degree_0x3A00;
uint8 Mode_Moto_Status_0x3A00;
uint8 IO_Did_Enable_0x3A01 ;
uint8 Rec_Moto_Drive_Status_0x3A01;
uint8 Mode_Moto_Drive_Status_0x3A01 ;
/******************* Read 0x0200 ***************************/
uint8 Dcm_DidServices_0x0200_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[1];
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x0200_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x0201 ***************************/
uint8 Dcm_DidServices_0x0201_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[1];
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x0201_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF110 ***************************/
uint8 Dcm_DidServices_0xF110_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[8];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF110_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 8;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 8U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF110 **************************************/
uint8 Dcm_DidServices_0xF110_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF110_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF112 ***************************/
uint8 Dcm_DidServices_0xF112_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[8];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF112_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 8;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 8U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF112 **************************************/
uint8 Dcm_DidServices_0xF112_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF112_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF113 ***************************/
uint8 Dcm_DidServices_0xF113_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[4];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF113_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 4;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 4U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF15A **************************************/
uint8 Dcm_DidServices_0xF15A_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buff[30];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buff[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF15AWriteData(LaDCM_u_Buff))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF180 ***************************/
uint8 Dcm_DidServices_0xF180_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[10];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF180_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 10;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 10U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF181 ***************************/
uint8 Dcm_DidServices_0xF181_ReadData(uint8* LeDcm_0xF181_data,uint8* LeDcm_0xF181_dataLength)
{
uint8 LaDCM_u_Buf[15];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF181_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 15;i++)
{
LeDcm_0xF181_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_0xF181_dataLength) = 15U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF183 ***************************/
uint8 Dcm_DidServices_0xF183_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[12];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF183_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 12;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 12U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF186 ***************************/
uint8 Dcm_DidServices_0xF186_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF186_ReadData(&LaDCM_u_Buf))
{
*LeDcm_u_data = LaDCM_u_Buf;
(*LeDcm_u_dataLength) = 1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF187 ***************************/
uint8 Dcm_DidServices_0xF187_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[9];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF187_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 9;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 9U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF189 ***************************/
uint8 Dcm_DidServices_0xF189_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[15];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF189_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 15;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 15U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF18A ***************************/
uint8 Dcm_DidServices_0xF18A_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[6];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF18A_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 6;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 6U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF18B ***************************/
uint8 Dcm_DidServices_0xF18B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[4];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF18B_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 4;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 4U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF190 ***************************/
uint8 Dcm_DidServices_0xF190_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[17];
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF190_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 17;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 17U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF190 **************************************/
uint8 Dcm_DidServices_0xF190_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[20];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF190_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF191 ***************************/
uint8 Dcm_DidServices_0xF191_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[15];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF191_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 15;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 15U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF192 ***************************/
uint8 Dcm_DidServices_0xF192_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[12];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF192_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 12;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 12U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF193 ***************************/
uint8 Dcm_DidServices_0xF193_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[5];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF193_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 5;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 5U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF194 ***************************/
uint8 Dcm_DidServices_0xF194_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[12];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF194_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 12;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 12U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF195 ***************************/
uint8 Dcm_DidServices_0xF195_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[6];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF195_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 6;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 6U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF197 ***************************/
uint8 Dcm_DidServices_0xF197_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF197_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 8;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 8U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF197 **************************************/
uint8 Dcm_DidServices_0xF197_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF197_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF198 ***************************/
uint8 Dcm_DidServices_0xF198_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[16];
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF198_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 16;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 16U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF198 **************************************/
uint8 Dcm_DidServices_0xF198_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[16];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF198_WriteData(LaDCM_u_Buf))
{
for(i = 0;i < 16;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =16U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF199 ***************************/
uint8 Dcm_DidServices_0xF199_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[4];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF199_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 4;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =4U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF199 **************************************/
uint8 Dcm_DidServices_0xF199_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[4];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF199_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF19D ***************************/
uint8 Dcm_DidServices_0xF19D_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[4];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF19D_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 4;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =4U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF19D **************************************/
uint8 Dcm_DidServices_0xF19D_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[4];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF19D_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x6300 ***************************/
uint8 Dcm_DidServices_0x6300_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x6300_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x6308 ***************************/
uint8 Dcm_DidServices_0x6308_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x6308_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x630B ***************************/
uint8 Dcm_DidServices_0x630B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x630B_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x630C ***************************/
uint8 Dcm_DidServices_0x630C_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x630C_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x630D ***************************/
uint8 Dcm_DidServices_0x630D_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x630D_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x630F ***************************/
uint8 Dcm_DidServices_0x630F_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x630F_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xFD00 ***************************/
uint8 Dcm_DidServices_0xFD00_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xFD00_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) =1U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0x6300 **************************************/
uint8 Dcm_DidServices_0x6300_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x6300_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0x6308 **************************************/
uint8 Dcm_DidServices_0x6308_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x6308_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0x630B **************************************/
uint8 Dcm_DidServices_0x630B_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x630B_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0x630C **************************************/
uint8 Dcm_DidServices_0x630C_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x630C_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0x630E **************************************/
uint8 Dcm_DidServices_0x630E_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[8];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x630E_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF1A2 ***************************/
uint8 Dcm_DidServices_0xF1A2_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[3];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF1A2_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 3;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 3U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF1A2 **************************************/
uint8 Dcm_DidServices_0xF1A2_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[3];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF1A2_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF1A4 ***************************/
uint8 Dcm_DidServices_0xF1A4_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[12];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF1A4_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 12;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 12U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF1A5 ***************************/
uint8 Dcm_DidServices_0xF1A5_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[7];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF1A5_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 7;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 7U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF1A5 **************************************/
uint8 Dcm_DidServices_0xF1A5_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[7];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF1A5_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0xF1A6 ***************************/
uint8 Dcm_DidServices_0xF1A6_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[3];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF1A6_ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 3;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 3U;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Write 0xF1A6 **************************************/
uint8 Dcm_DidServices_0xF1A6_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
{
uint8 i;
uint8 LaDCM_u_Buf[3];
if(0 != GetVehicel_u_SpeedVal())
{
for(i = 0;i < (*LeDcm_u_dataLength);i++)
{
LaDCM_u_Buf[i] = LeDcm_u_data[i];
}
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF1A6_WriteData(LaDCM_u_Buf))
{
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x016B ***************************/
uint8 Dcm_DidServices_0x016B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x061BReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 1;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x016C ***************************/
uint8 Dcm_DidServices_0x016C_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[2];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x061CReadData(LaDCM_u_Buf))
{
for(i = 0;i < 2;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 2;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x016D ***************************/
uint8 Dcm_DidServices_0x016D_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[2];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x061DReadData(LaDCM_u_Buf))
{
for(i = 0;i < 2;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 2;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x016E ***************************/
uint8 Dcm_DidServices_0x016E_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x061EReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 1;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x016F ***************************/
uint8 Dcm_DidServices_0x016F_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[2];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x061FReadData(LaDCM_u_Buf))
{
for(i = 0;i < 2;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 2;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x0620 ***************************/
uint8 Dcm_DidServices_0x0620_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x0620ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 1;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x0621 ***************************/
uint8 Dcm_DidServices_0x0621_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[1];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x0621ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 1;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 1;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}
/******************* Read 0x0622 ***************************/
uint8 Dcm_DidServices_0x0622_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
{
uint8 LaDCM_u_Buf[2];
uint8 i;
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0x0622ReadData(LaDCM_u_Buf))
{
for(i = 0;i < 2;i++)
{
LeDcm_u_data[i] = LaDCM_u_Buf[i];
}
(*LeDcm_u_dataLength) = 2;
return DCM_CHECK_OK;
}
else
{
return DCM_NRC22;
}
}