#include "can_app.h"
#include "Com_Cfg.h"
#include "Com.h"
#include "led_app.h"
#include "common_memory.h"
#include "WheelHeat.h"
typedef struct
{
    uint8_t sws_r_multimedia;
    uint8_t sws_r_left_menu;
    uint8_t sws_r_voicd_expand_2;
    uint8_t sws_r_auto_show_in;
    uint8_t sws_r_auto_show_out;
    uint8_t sws_r_mileage_clear;
	uint8_t SWS_R_MediaReset;
    uint8_t SWS_R_OtherRecover;
}event_sig_tx_valid_count_type;



event_sig_tx_valid_count_type event_sig_tx_valid_count;

IpduMPC_316_bufType app_can_mpc_316;
IpduMETER_055_bufType app_can_meter_055;
IpduBCM_1_12D_bufType app_can_bcm_1_12d;
IpduBCM_2_50D_bufType app_can_bcm_2_50d;
IpduMOD_4G_49A_bufType app_can_mod_4g_49a;
IpduMultimedia_385_bufType app_can_multimedia_385;
IpduCloud_services_0A2_bufType app_can_cloud_services_0a2;
IpduBCM_EvP2_394_bufType app_can_bcm_evp2_394;
IpduAir_condition_ctrl_2DB_bufType app_can_air_condition_ctrl_2db;
IpduVCU_40D_bufType app_can_vcu_40d;
IpduBCM_L_407_bufType app_can_bcm_l_407;
IpduMETER_1_dir_4BF_bufType app_can_meter_1_dir_4bf;
IpduBCM_R_4E6_bufType app_can_bcm_r_4e6;
IpduHEAT_4C1_bufType app_can_heat_4c1;
IpduADS_29C_bufType app_can_ads_29c;


uint8_t ucCAN_ControlBy;



uint8_t CAN_GetControlBy(void)
{
    return (ucCAN_ControlBy);
}

void CAN_SetControlBy(uint8_t ControlBy)
{
    ucCAN_ControlBy = ControlBy;
}


void can_app_init(void)
{
    common_memory_clear((uint8_t *)&event_sig_tx_valid_count, sizeof(event_sig_tx_valid_count));

    common_memory_copys((uint8_t *)&app_can_mpc_316, (uint8_t *)&RxIpduMPC_316DefualtValue,sizeof(app_can_mpc_316));
    common_memory_copys((uint8_t *)&app_can_meter_055,(uint8_t *)&RxIpduMETER_055DefualtValue, sizeof(app_can_meter_055));
    common_memory_copys((uint8_t *)&app_can_bcm_1_12d, (uint8_t *)&RxIpduBCM_1_12DDefualtValue,sizeof(app_can_bcm_1_12d));
    common_memory_copys((uint8_t *)&app_can_bcm_2_50d, (uint8_t *)&RxIpduBCM_2_50DDefualtValue,sizeof(app_can_bcm_2_50d));
    common_memory_copys((uint8_t *)&app_can_mod_4g_49a, (uint8_t *)&RxIpduMOD_4G_49ADefualtValue,sizeof(app_can_mod_4g_49a));
    common_memory_copys((uint8_t *)&app_can_multimedia_385, (uint8_t *)&RxIpduMultimedia_385DefualtValue,sizeof(app_can_multimedia_385));
    common_memory_copys((uint8_t *)&app_can_cloud_services_0a2, (uint8_t *)&RxIpdCloud_services_0A2DefualtValue,sizeof(app_can_cloud_services_0a2));
    common_memory_copys((uint8_t *)&app_can_bcm_evp2_394, (uint8_t *)&RxIpduBCM_EvP2_394DefualtValue,sizeof(app_can_bcm_evp2_394));
    common_memory_copys((uint8_t *)&app_can_air_condition_ctrl_2db, (uint8_t *)&RxIpduAir_condition_ctrl_2DBDefualtValue,sizeof(app_can_air_condition_ctrl_2db));
    common_memory_copys((uint8_t *)&app_can_vcu_40d, (uint8_t *)&RxIpduVCU_40DDefualtValue,sizeof(app_can_vcu_40d));
    common_memory_copys((uint8_t *)&app_can_bcm_l_407, (uint8_t *)&RxIpduBCM_L_407DefualtValue,sizeof(app_can_bcm_l_407));
    common_memory_copys((uint8_t *)&app_can_meter_1_dir_4bf, (uint8_t *)&RxIpduMETER_1_dir_4BFDefualtValue,sizeof(app_can_meter_1_dir_4bf));
    common_memory_copys((uint8_t *)&app_can_bcm_r_4e6, (uint8_t *)&RxIpduBCM_R_4E6DefualtValue,sizeof(app_can_bcm_r_4e6));
    common_memory_copys((uint8_t *)&app_can_heat_4c1, (uint8_t *)&RxIpduHEAT_4C1DefualtValue,sizeof(app_can_heat_4c1));
    common_memory_copys((uint8_t *)&app_can_ads_29c, (uint8_t *)&RxIpduADS_29CDefualtValue,sizeof(app_can_ads_29c));
}

void CanApp_WakeupProcess(void)
{
    common_memory_clear((uint8_t *)&event_sig_tx_valid_count, sizeof(event_sig_tx_valid_count));

    common_memory_copys((uint8_t *)&app_can_mpc_316, (uint8_t *)&RxIpduMPC_316DefualtValue,sizeof(app_can_mpc_316));
    common_memory_copys((uint8_t *)&app_can_meter_055,(uint8_t *)&RxIpduMETER_055DefualtValue, sizeof(app_can_meter_055));
    common_memory_copys((uint8_t *)&app_can_bcm_2_50d, (uint8_t *)&RxIpduBCM_2_50DDefualtValue,sizeof(app_can_bcm_2_50d));
    common_memory_copys((uint8_t *)&app_can_mod_4g_49a, (uint8_t *)&RxIpduMOD_4G_49ADefualtValue,sizeof(app_can_mod_4g_49a));
    common_memory_copys((uint8_t *)&app_can_multimedia_385, (uint8_t *)&RxIpduMultimedia_385DefualtValue,sizeof(app_can_multimedia_385));
    common_memory_copys((uint8_t *)&app_can_cloud_services_0a2, (uint8_t *)&RxIpdCloud_services_0A2DefualtValue,sizeof(app_can_cloud_services_0a2));
    common_memory_copys((uint8_t *)&app_can_bcm_evp2_394, (uint8_t *)&RxIpduBCM_EvP2_394DefualtValue,sizeof(app_can_bcm_evp2_394));
    common_memory_copys((uint8_t *)&app_can_air_condition_ctrl_2db, (uint8_t *)&RxIpduAir_condition_ctrl_2DBDefualtValue,sizeof(app_can_air_condition_ctrl_2db));
    common_memory_copys((uint8_t *)&app_can_vcu_40d, (uint8_t *)&RxIpduVCU_40DDefualtValue,sizeof(app_can_vcu_40d));
    common_memory_copys((uint8_t *)&app_can_bcm_l_407, (uint8_t *)&RxIpduBCM_L_407DefualtValue,sizeof(app_can_bcm_l_407));
    common_memory_copys((uint8_t *)&app_can_meter_1_dir_4bf, (uint8_t *)&RxIpduMETER_1_dir_4BFDefualtValue,sizeof(app_can_meter_1_dir_4bf));
    common_memory_copys((uint8_t *)&app_can_bcm_r_4e6, (uint8_t *)&RxIpduBCM_R_4E6DefualtValue,sizeof(app_can_bcm_r_4e6));
    common_memory_copys((uint8_t *)&app_can_heat_4c1, (uint8_t *)&RxIpduHEAT_4C1DefualtValue,sizeof(app_can_heat_4c1));
    common_memory_copys((uint8_t *)&app_can_ads_29c, (uint8_t *)&RxIpduADS_29CDefualtValue,sizeof(app_can_ads_29c));
}




void app_mpc_316_rx_conf(void)
{
}


void app_meter_055_rx_conf(void)
{
    uint8_t i;
    for(i = 0; i < 8; i ++)
    {
        app_can_meter_055._c[i] = RxIpduMETER_055._c[i];
    }
}

void app_bcm_1_12d_rx_conf(void)
{
    if(RxIpduBCM_1_12D.IpduBCM_1_12D.BCM1_power_gear != POWER_GEAR_INVALID)
    {
        if(app_can_bcm_1_12d.IpduBCM_1_12D.BCM1_power_gear != RxIpduBCM_1_12D.IpduBCM_1_12D.BCM1_power_gear)
        {
            if(RxIpduBCM_1_12D.IpduBCM_1_12D.BCM1_power_gear == POWER_GEAR_OFF)
            {
                WheelHeat_SetGearEvevt(POWER_GEAR_EVENT_OFF);
            }
            else if(RxIpduBCM_1_12D.IpduBCM_1_12D.BCM1_power_gear == POWER_GEAR_ACC)
            {
                WheelHeat_SetGearEvevt(POWER_GEAR_EVENT_ACC);
            }
            else if(RxIpduBCM_1_12D.IpduBCM_1_12D.BCM1_power_gear == POWER_GEAR_ON)
            {
                WheelHeat_SetGearEvevt(POWER_GEAR_EVENT_ON);
            }
            else
            {

            }
        }
        app_can_bcm_1_12d.IpduBCM_1_12D.BCM1_power_gear = RxIpduBCM_1_12D.IpduBCM_1_12D.BCM1_power_gear;
    }
}

void app_bcm_2_50d_rx_conf(void)
{
}

void app_mod_4g_49a_rx_conf(void)
{
    uint8_t i;
    uint8_t checksum;
    checksum = (RxIpduMOD_4G_49A._c[0] + RxIpduMOD_4G_49A._c[1] \
              + RxIpduMOD_4G_49A._c[2] + RxIpduMOD_4G_49A._c[3] \
              + RxIpduMOD_4G_49A._c[4] + RxIpduMOD_4G_49A._c[5] \
              + RxIpduMOD_4G_49A._c[6]) ^ 0xffu;
    if(checksum  == RxIpduMOD_4G_49A._c[7])
    {
        for(i = 0; i < 8; i ++)
        {
            app_can_mod_4g_49a._c[i] = RxIpduMOD_4G_49A._c[i];
        }
    }
}

void app_multimedia_385_rx_conf(void)
{

    app_can_multimedia_385.IpduMultimedia_385.MULTIMEDIA_Sw_heat = RxIpduMultimedia_385.IpduMultimedia_385.MULTIMEDIA_Sw_heat;
    if(app_can_multimedia_385.IpduMultimedia_385.MULTIMEDIA_Sw_heat == 0x01u)
    {
        (void)WheelHeat_SetEvent(WHEEL_HEAT_EVENT_CLOSE);
    }
    else if (app_can_multimedia_385.IpduMultimedia_385.MULTIMEDIA_Sw_heat == 0x02u)
    {
        (void)WheelHeat_SetEvent(WHEEL_HEAT_EVENT_OPEN);
        WheelHeat_SetHeating_Gear(HEAT_LV3);
    }
    else
    {

    }



}

void app_cloud_services_0a2_rx_conf(void)
{

    app_can_cloud_services_0a2.IpduCloud_services_0A2.Cloud_Service_remote_cmd = RxIpdCloud_services_0A2.IpduCloud_services_0A2.Cloud_Service_remote_cmd;
    app_can_cloud_services_0a2.IpduCloud_services_0A2.Cloud_Service_Sw_heat = RxIpdCloud_services_0A2.IpduCloud_services_0A2.Cloud_Service_Sw_heat;
    if(app_can_cloud_services_0a2.IpduCloud_services_0A2.Cloud_Service_remote_cmd == 0x33)
    {
        if(app_can_cloud_services_0a2.IpduCloud_services_0A2.Cloud_Service_Sw_heat == 0x01u)
        {
            (void)WheelHeat_SetEvent(WHEEL_HEAT_EVENT_CLOSE);
        }
        else if(app_can_cloud_services_0a2.IpduCloud_services_0A2.Cloud_Service_Sw_heat == 0x02u)
        {
            (void)WheelHeat_SetEvent(WHEEL_HEAT_EVENT_OPEN);
            WheelHeat_SetHeating_Gear(HEAT_LV3);
        }
        else
        {
        }
    }


}

void app_bcm_evp2_394_rx_conf(void)
{
}

void app_air_condition_ctrl_2db_rx_conf(void)
{
}

void app_vcu_40d_rx_conf(void)
{
}

void app_bcm_l_407_rx_conf(void)
{
}


void app_meter_1_dir_4bf_rx_conf(void)
{
    LowPower4BFMsgWakeUpFlag_Set();
     app_can_meter_1_dir_4bf.IpduMETER_1_dir_4BF.METER1_BackgroundLightLvlCmd = RxIpduMETER_1_dir_4BF.IpduMETER_1_dir_4BF.METER1_BackgroundLightLvlCmd;
    app_can_meter_1_dir_4bf.IpduMETER_1_dir_4BF.The_Limit_Acc = RxIpduMETER_1_dir_4BF.IpduMETER_1_dir_4BF.The_Limit_Acc;
    
    if((app_can_meter_1_dir_4bf.IpduMETER_1_dir_4BF.The_Limit_Acc == 0x01u)\
    ||(app_can_meter_1_dir_4bf.IpduMETER_1_dir_4BF.The_Limit_Acc == 0x02u))
    {
        WheelHeat_Set_Heat_Limit_ACC(Heat_Limit_ACC_Enbale);
        (void)WheelHeat_SetEvent(WHEEL_HEAT_EVENT_CLOSE);   
    }
    else
    {
        WheelHeat_Set_Heat_Limit_ACC(Heat_Limit_ACC_DISABLE);   
    }
}


void app_bcm_r_4e6_rx_conf(void)
{
}

void app_bcm_heat_4c1_rx_conf(void)
{
   // app_can_lost_communication.heat_4c1 = 0u;
    app_can_heat_4c1.IpduHEAT_4C1.HEAT_heat_gear= RxIpduHEAT_4C1.IpduHEAT_4C1.HEAT_heat_gear;
    app_can_heat_4c1.IpduHEAT_4C1.HEAT_subid= RxIpduHEAT_4C1.IpduHEAT_4C1.HEAT_subid;
    if(app_can_heat_4c1.IpduHEAT_4C1.HEAT_subid == 0x22)
    {
        if(app_can_heat_4c1.IpduHEAT_4C1.HEAT_heat_gear== HEAT_LV1)
        {
            (void)WheelHeat_SetHeating_Gear(HEAT_LV1);
        }
        else if(app_can_heat_4c1.IpduHEAT_4C1.HEAT_heat_gear== HEAT_LV2 )
        {
            (void)WheelHeat_SetHeating_Gear(HEAT_LV2);
        }
        else if(app_can_heat_4c1.IpduHEAT_4C1.HEAT_heat_gear== HEAT_LV3 )
        {
            (void)WheelHeat_SetHeating_Gear(HEAT_LV3);
        }
        else
        {

        }
    }
}

void app_ads_29c_rx_conf(void)
{
    uint8_t i;
    for(i = 0; i < 8; i ++)
    {
        app_can_ads_29c._c[i] = RxIpduADS_29C._c[i];
    }
}








void app_mpc_316_to_conf(void)
{
}


void app_meter_055_to_conf(void)
{
}

void app_bcm_1_12d_to_conf(void)
{
}

void app_bcm_2_50d_to_conf(void)
{
}

void app_mod_4g_49a_to_conf(void)
{
}

void app_multimedia_385_to_conf(void)
{
}

void app_cloud_services_0a2_to_conf(void)
{
}

void app_bcm_evp2_394_to_conf(void)
{
}

void app_air_condition_ctrl_2db_to_conf(void)
{
}

void app_vcu_40d_to_conf(void)
{
}

void app_bcm_l_407_to_conf(void)
{
}


void app_meter_1_dir_4bf_to_conf(void)
{
    LowPower4BFMsgWakeUpFlag_Clear();
}


void app_bcm_r_4e6_to_conf(void)
{
}

void app_bcm_heat_4c1_to_conf(void)
{
}

void app_ads_29c_to_conf(void)
{
}

void app_sig_sws_r_multimedia_tx_process(uint8_t value, uint8_t tx_count, uint8_t valid_count)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = tx_count;
    Com_SendSignal(COM_TX_SIGSWS_R_MULTIMEDIA, &value);
    event_sig_tx_valid_count.sws_r_multimedia = valid_count;
}


void app_sig_sws_r_left_menu_tx_process(uint8_t value, uint8_t tx_count, uint8_t valid_count)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = tx_count;
    Com_SendSignal(COM_TX_SIGSWS_R_LEFT_MENU, &value);
    event_sig_tx_valid_count.sws_r_left_menu = valid_count;
}


void app_sig_sws_r_voicd_expand_2_tx_process(uint8_t value, uint8_t tx_count, uint8_t valid_count)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = tx_count;
    Com_SendSignal(COM_TX_SIGSWS_R_VOICD_EXPAND_2, &value);
    event_sig_tx_valid_count.sws_r_voicd_expand_2 = valid_count;
}

void app_sig_sws_r_auto_show_in_tx_process(uint8_t value, uint8_t tx_count, uint8_t valid_count)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = tx_count;
    Com_SendSignal(COM_TX_SIGSWS_R_AUTO_SHOW_IN, &value);
    event_sig_tx_valid_count.sws_r_auto_show_in = valid_count;
}

void app_sig_sws_r_auto_show_out_tx_process(uint8_t value, uint8_t tx_count, uint8_t valid_count)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = tx_count;
    Com_SendSignal(COM_TX_SIGSWS_R_AUTO_SHOW_OUT, &value);
    event_sig_tx_valid_count.sws_r_auto_show_out = valid_count;
}

void app_sig_sws_r_mileage_clear_tx_process(uint8_t value, uint8_t tx_count, uint8_t valid_count)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = tx_count;
    Com_SendSignal(COM_TX_SIGSWS_R_MILEAGE_CLEAR, &value);
    event_sig_tx_valid_count.sws_r_mileage_clear = valid_count;
}

void AppCan_EventSig_SWS_R_MediaReset_TxProcess(uint8_t Value, uint8_t TxNum, uint8_t EventSigTxNum)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = TxNum;
    Com_SendSignal(COM_TX_SIGSWS_R_MEDIA_RESET, &Value);
    event_sig_tx_valid_count.SWS_R_MediaReset = EventSigTxNum;
}

void AppCan_EventSig_SWS_R_OtherRecover_TxProcess(uint8_t Value, uint8_t TxNum, uint8_t EventSigTxNum)
{
    COM_IpduRepetitionTxNumTable[COM_TXIPDUSTEERING_RIGHT_SWITCH_4A8] = TxNum;
    Com_SendSignal(COM_TX_SIGSWS_R_OTHER_RECOVER, &Value);
    event_sig_tx_valid_count.SWS_R_OtherRecover = EventSigTxNum;
}

void app_sig_sws_r_multimedia_tx_conf(void)
{
    if(event_sig_tx_valid_count.sws_r_multimedia)
    {
        event_sig_tx_valid_count.sws_r_multimedia --;
    }
    if(event_sig_tx_valid_count.sws_r_multimedia == 0)
    {
	    TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_Multimedia = 0x0u;
    }
}


void app_sig_sws_r_left_menu_tx_conf(void)
{
    if(event_sig_tx_valid_count.sws_r_left_menu)
    {
        event_sig_tx_valid_count.sws_r_left_menu --;
    }
    if(event_sig_tx_valid_count.sws_r_left_menu == 0)
    {
	    TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_LEFT_Menu = 0x0u;
    }
}


void app_sig_sws_r_voicd_expand_2_tx_conf(void)
{
    if(event_sig_tx_valid_count.sws_r_voicd_expand_2)
    {
        event_sig_tx_valid_count.sws_r_voicd_expand_2 --;
    }
    if(event_sig_tx_valid_count.sws_r_voicd_expand_2 == 0)
    {
	    TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_voicd_expand_2 = 0x2u;
    }
}


void app_sig_sws_r_auto_show_in_tx_conf(void)
{
    if(event_sig_tx_valid_count.sws_r_auto_show_in)
    {
        event_sig_tx_valid_count.sws_r_auto_show_in --;
    }
    if(event_sig_tx_valid_count.sws_r_auto_show_in == 0)
    {
	    TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_auto_show_in = 0x0u;
    }
}


void app_sig_sws_r_auto_show_out_tx_conf(void)
{
    if(event_sig_tx_valid_count.sws_r_auto_show_out)
    {
        event_sig_tx_valid_count.sws_r_auto_show_out --;
    }
    if(event_sig_tx_valid_count.sws_r_auto_show_out == 0)
    {
	    TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_auto_show_out = 0x0u;
    }
}

void app_sig_sws_r_mileage_clear_tx_conf(void)
{
    if(event_sig_tx_valid_count.sws_r_mileage_clear)
    {
        event_sig_tx_valid_count.sws_r_mileage_clear --;
    }
    if(event_sig_tx_valid_count.sws_r_mileage_clear == 0)
    {
	    TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_mileage_clear = 0x0u;
    }
}

void AppCan_EventSig_SWS_R_MediaReset_TxConf(void)
{
    if(event_sig_tx_valid_count.SWS_R_MediaReset)
    {
        event_sig_tx_valid_count.SWS_R_MediaReset --;
        if(event_sig_tx_valid_count.SWS_R_MediaReset == 0u)
        {
            TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_Media_Reset = 0x0u;
        }
    }

}

void AppCan_EventSig_SWS_R_OtherRecover_TxConf(void)
{
    if(event_sig_tx_valid_count.SWS_R_OtherRecover)
    {
        event_sig_tx_valid_count.SWS_R_OtherRecover --;
        if(event_sig_tx_valid_count.SWS_R_OtherRecover == 0u)
        {
            TxIpduSteering_RIGHT_switch_4A8.IpduSteering_RIGHT_switch_4A8.SWS_R_Other_Recover = 0x0u;
        }
    }

}

void  App_ReceiveSigMPC_L_lt_status(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mpc_316.IpduMPC_316.MPC_L_lt_status;
}
void  App_ReceiveSigMPC_R_lt_status(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mpc_316.IpduMPC_316.MPC_R_lt_status;
}
void  App_ReceiveSigMPC_Ld_alarm_mode_sta(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mpc_316.IpduMPC_316.MPC_Ld_alarm_mode_sta;
}

//meter
void  App_ReceiveSigMETER_BackgroundLightLvlCmd(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_meter_055.IpduMETER_055.METER_BackgroundLightLvlCmd;
}

//bcm1
void  App_ReceiveSigBCM1_power_gear(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_bcm_1_12d.IpduBCM_1_12D.BCM1_power_gear;
}
void  App_ReceiveSigBCM1_vehicle_state(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_bcm_1_12d.IpduBCM_1_12D.BCM1_vehicle_state;
}
void  App_ReceiveSigBCM1_vehicle_state1(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_bcm_1_12d.IpduBCM_1_12D.BCM1_vehicle_state1;
}
//bcm2
void  App_ReceiveSigBCM2_nm_sleep_state(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_bcm_2_50d.IpduBCM_2_50D.BCM2_nm_sleep_state;
}



//4g mod
void  App_ReceiveSigMOD_4G_Ecl_power_req(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mod_4g_49a.IpduMOD_4G_49A.MOD_4G_Ecl_power_req;
}
void  App_ReceiveSigMOD_4G_ota_light_req(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mod_4g_49a.IpduMOD_4G_49A.MOD_4G_ota_light_req;
}

void  App_ReceiveSigMOD_4G_enter_ota_mode_req(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mod_4g_49a.IpduMOD_4G_49A.MOD_4G_enter_ota_mode_req;
}

void  App_ReceiveSigMOD_4G_ota_update_req(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mod_4g_49a.IpduMOD_4G_49A.MOD_4G_ota_update_req;
}

void  App_ReceiveSigMOD_4G_checksum(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_mod_4g_49a.IpduMOD_4G_49A.MOD_4G_checksum;
}



//multi
void  App_ReceiveSigMULTIMEDIA_Sw_heat(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_multimedia_385.IpduMultimedia_385.MULTIMEDIA_Sw_heat;
}


//cloud service
void  App_ReceiveSigCloud_Service_remote_cmd(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_cloud_services_0a2.IpduCloud_services_0A2.Cloud_Service_remote_cmd;
}

//cloud service
void  App_ReceiveSigCloud_Service_Sw_heat(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_cloud_services_0a2.IpduCloud_services_0A2.Cloud_Service_Sw_heat;
}

//bcm evp2
void  App_ReceiveSigBCM_EVP2_vehicle_state(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_bcm_evp2_394.IpduBCM_EvP2_394.BCM_EVP2_vehicle_state;
}

//air condition ctrl
void  App_ReceiveSigAIR_CD_ctrl_temp_show(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_air_condition_ctrl_2db.IpduAir_condition_ctrl_2DB.AIR_CD_ctrl_temp_show;
}


void  App_ReceiveSigVCU_ECM_Vehicle_code_s(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_vcu_40d.IpduVCU_40D.VCU_ECM_Vehicle_code_s;
}

//vcu
void  App_ReceiveSigBCM_L_nm_type(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_bcm_l_407.IpduBCM_L_407.BCM_L_nm_type;
}


//BCM L
void  App_ReceiveSigMETER1_BackgroundLightLvlCmd(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_meter_1_dir_4bf.IpduMETER_1_dir_4BF.METER1_BackgroundLightLvlCmd;
}

void  App_ReceiveSigThe_Limit_Acc(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_meter_1_dir_4bf.IpduMETER_1_dir_4BF.The_Limit_Acc;
}
//METER 1 DIR
void  App_ReceiveSigBCM_R_air_temp_show(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_bcm_r_4e6.IpduBCM_R_4E6.BCM_R_air_temp_show;
}

//BCM R
void  App_ReceiveSigHEAT_subid(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_heat_4c1.IpduHEAT_4C1.HEAT_subid;
}

//HEAT_SUB_ID
void  App_ReceiveSigHEAT_auto_heat(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_heat_4c1.IpduHEAT_4C1.HEAT_auto_heat;
}

//HEAT_AUTO
void  App_ReceiveSigHEAT_heat_gear(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_heat_4c1.IpduHEAT_4C1.HEAT_heat_gear;
}

//HEAT_GEAR
void  App_ReceiveSigADS_ACC_Mode_Displayl(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_ads_29c.IpduADS_29C.ADS_ACC_Mode_Displayl;
}
//DNP_STATS

//DNP_WARNING
void  App_ReceiveSigADS_DNP_Stats(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_ads_29c.IpduADS_29C.ADS_DNP_Stats;
}

void  App_ReceiveSigADS_DNP_Take_Over_Req_S(void* SigValue)
{
	(*(uint8 *)SigValue) = app_can_ads_29c.IpduADS_29C.ADS_DNP_Take_Over_Req_S;
}




/*PRQA S 1503--*/

COM_CONST COM_ReceivedSignalFun App_ReceivedSignalFunPrt[COM_RXSIGNUM]={
	App_ReceiveSigMPC_L_lt_status,
	App_ReceiveSigMPC_R_lt_status,
	App_ReceiveSigMPC_Ld_alarm_mode_sta,
	App_ReceiveSigMETER_BackgroundLightLvlCmd,
	App_ReceiveSigBCM1_power_gear,
	App_ReceiveSigBCM1_vehicle_state,
	App_ReceiveSigBCM1_vehicle_state1,
	App_ReceiveSigBCM2_nm_sleep_state,
	App_ReceiveSigMOD_4G_Ecl_power_req,
	App_ReceiveSigMOD_4G_ota_light_req,
	App_ReceiveSigMOD_4G_enter_ota_mode_req,
	App_ReceiveSigMOD_4G_ota_update_req,
	App_ReceiveSigMOD_4G_checksum,
	App_ReceiveSigMULTIMEDIA_Sw_heat,
	App_ReceiveSigCloud_Service_remote_cmd,
	App_ReceiveSigCloud_Service_Sw_heat,
	App_ReceiveSigBCM_EVP2_vehicle_state,
	App_ReceiveSigAIR_CD_ctrl_temp_show,
	App_ReceiveSigVCU_ECM_Vehicle_code_s,
	App_ReceiveSigBCM_L_nm_type,
	App_ReceiveSigMETER1_BackgroundLightLvlCmd,
    App_ReceiveSigThe_Limit_Acc,
	App_ReceiveSigBCM_R_air_temp_show,
	App_ReceiveSigHEAT_subid,
	App_ReceiveSigHEAT_auto_heat,
	App_ReceiveSigHEAT_heat_gear,
	App_ReceiveSigADS_ACC_Mode_Displayl,
	App_ReceiveSigADS_DNP_Stats,
	App_ReceiveSigADS_DNP_Take_Over_Req_S,
};


void can_app_receive_signal(uint8_t rx_sig_id, void *signal_data_ptr)
{
    if(rx_sig_id < COM_RXSIGNUM)
    {
        App_ReceivedSignalFunPrt[rx_sig_id](signal_data_ptr);
    }
}