/* BEGIN_FILE_HDR ******************************************************************************** * NOTICE * This software is the property of HiRain Technologies. Any information * contained in this doc should not be reproduced, or used, or disclosed * without the written authorization from HiRain Technologies. ******************************************************************************** * File Name : Crc_GetVersionInfo.c ******************************************************************************** * Project/Product : AUTOSAR 4.2.2 AUTOSAR 4.3.1 AUTOSAR 4.4.0 * Title : Get CRC module Version information * Author : Hirain ******************************************************************************** * Description : This service returns the version information of this module. * ******************************************************************************** * Limitations : None * ******************************************************************************** * ******************************************************************************** * Revision History: * * Version Date Initials CR# Descriptions * --------- ---------- ------------ ---------- --------------- * 04.00.00 13/11/2018 Qiang.Yang N/A Original ******************************************************************************** * END_FILE_HDR*/ /******************************************************************************* * Includes *******************************************************************************/ #include "Crc.h" #include "Std_Types.h" #include "Crc_Version.h" /******************************************************************************* * General QAC Suppression *******************************************************************************/ /*PRQA S 3214,0862,3614 EOF*/ /* According to the requirements of AUTOSAR Specification,when locating address segments in the files of each module,#include "Crc_MemMap.h" is required.Defined XXX_START_SEC_ will undefine in Crc_MemMap.h */ /*PRQA S 3432 EOF*/ /* P2VAR and other macros in the Compiler conforms to AUTOSAR standard.There's no need to revise. */ /******************************************************************************* * Version Check *******************************************************************************/ #if(STD_ON == CRC_PRIVATE_VERSION_CHECK) /* check Version with other import module */ /* check Version with cfg file */ #if ((CRC_AR_RELEASE_MAJOR_VERSION != CRC_AR_RELEASE_MAJOR_VERSION_CFG) || \ (CRC_AR_RELEASE_MINOR_VERSION != CRC_AR_RELEASE_MINOR_VERSION_CFG)) #error "AutoSar Version Numbers of CRC and its cfg file are different" #endif #if ((CRC_SW_MAJOR_VERSION != CRC_SW_MAJOR_VERSION_CFG) || \ (CRC_SW_MINOR_VERSION != CRC_SW_MINOR_VERSION_CFG)) #error "SW Version Numbers of CRC and its cfg file are different" #endif #endif/*#if(STD_ON == CRC_PRIVATE_AR_VERSION_CHECK)*/ #define CRC_START_SEC_CODE #include "Crc_MemMap.h" /* BEGIN_FUNCTION_HDR ******************************************************************************** * Function Name: Crc_GetVersionInfo * * Description: This service returns the version information of this module. * * * Inputs: None * * Outputs: Versioninfo: Pointer to where to store the version information of this module. * * Limitations: None ******************************************************************************** END_FUNCTION_HDR*/ /*CRC21,CRC11,CRC17,CRC18*/ FUNC(void, CRC_CODE) Crc_GetVersionInfo ( P2VAR(Std_VersionInfoType, AUTOMATIC, CRC_APPL_DATA) Versioninfo ) { if(Versioninfo != NULL_PTR) { Versioninfo->vendorID = CRC_VENDOR_ID; Versioninfo->moduleID = CRC_MODULE_ID; Versioninfo->sw_major_version = (uint8)CRC_SW_MAJOR_VERSION; Versioninfo->sw_minor_version = (uint8)CRC_SW_MINOR_VERSION; Versioninfo->sw_patch_version = (uint8)CRC_SW_PATCH_VERSION; } } #define CRC_STOP_SEC_CODE #include "Crc_MemMap.h"