/* -----------------------------------------------------------------------------
  Filename:    appdesc.h
  Description: Interface towards the application used by CANdesc.
                
                Manufacturer: Vector
                EcuDocFile:   C:\1_sangshulin\SVN\V2X\30_DevelopLibrary\03_SW\99_Others\CANbedded\Geny_For_CanMatrix5_1\Tbox4.00.cdd
                Variant:      Base_Variant

  Generated by CANdelaGen, Fri Oct 16 10:47:20 2020
 
 ----------------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------
  C O P Y R I G H T
 -------------------------------------------------------------------------------
  Copyright (c) 2001-2013 by Vector Informatik GmbH. All rights reserved.
 
  This software is copyright protected and proprietary to Vector Informatik 
  GmbH.
  
  Vector Informatik GmbH grants to you only those rights as set out in the 
  license conditions.
  
  All other rights remain with Vector Informatik GmbH.
 -------------------------------------------------------------------------------
 ----------------------------------------------------------------------------- */

#if !defined(__APPDESC_H__)
#define __APPDESC_H__

/* -----------------------------------------------------------------------------
    &&&~ Configuration switches
 ----------------------------------------------------------------------------- */

#if !defined(__DESC_H__)
# error "Include sequence error! You must include desc.h before appDesc.h."
#endif



/* -----------------------------------------------------------------------------
    &&&~ Preprocessor constants (defines)
 ----------------------------------------------------------------------------- */

/* This magic number provides inter CANdesc generation process consistency check.All CANdesc files must have the same one. */
#define DESC_APPLICATION_INTERFACE_MAGIC_NUMBER                      25928


/* -----------------------------------------------------------------------------
    &&&~ Function prototypes
 ----------------------------------------------------------------------------- */

#if defined (DESC_ENABLE_DEBUG_USER ) || defined (DESC_ENABLE_DEBUG_INTERNAL)
/* Assertion function for better integration support. */
void DESC_API_CALLBACK_TYPE ApplDescFatalError(vuint8 errorCode, vuint16 lineNumber);
#endif

#if defined (DESC_ENABLE_SPONTANEOUS_RES)
void DESC_API_CALLBACK_TYPE ApplDescSpontaneousResponseConfirmation(DESC_CONTEXT_FORMAL_PARAM_DEF_FIRST vuint8 status);
#endif

vuint8 DESC_API_CALL_TYPE ApplDescInitPosResFblBusInfo(t_descUsdtNetBus* pBusInfo);

/* If RCR-RP has been forced this confirmation function will notify the application about the transmission result. */
void DESC_API_CALLBACK_TYPE ApplDescRcrRpConfirmation(vuint8 status);
void DESC_API_CALLBACK_TYPE ApplDescOnTransitionSession(DescStateGroup newState, DescStateGroup formerState);
void DESC_API_CALLBACK_TYPE ApplDescOnTransitionSecurityAccess(DescStateGroup newState, DescStateGroup formerState);
void DESC_API_CALLBACK_TYPE ApplDescEcuResetHard(DescMsgContext* pMsgContext);
/* Request length check can not be performed. Please, implement length check in your Main-Handler!! */
void DESC_API_CALLBACK_TYPE ApplDescClearDiagInfo(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDtcRNODTCBSM(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDtcRDTCBSM(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDtcRDTCEDRBDN(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDtcRSUPDTC(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDideCall_official_number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDideCall_enable_disable(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidautomatic_eCall_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidmanual_eCall_cancellation_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDideCall_test_number_1(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDiddial_test_number_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidtest_mode_call_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDideCall_max_attempts(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidECU_Configuration(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidWrite_Programming_Fingerprint(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidConfiguration_Fingerprint(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidVehicle_Manufacturer_Spare_Part_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidECU_Serial_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescWriteDidVehicle_Identification_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescIoCtrlRetCtrlToEcueCall_control(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescIoCtrlShortTermAdjeCall_control(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescIoCtrlRetCtrlToEcubackup_battery_boost_control(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescIoCtrlShortTermAdjbackup_battery_boost_control(DescMsgContext* pMsgContext);
/* Request length check can not be performed. Please, implement length check in your Main-Handler!! */
void DESC_API_CALLBACK_TYPE ApplDescRequestDownload(DescMsgContext* pMsgContext);
/* Request length check can not be performed. Please, implement length check in your Main-Handler!! */
void DESC_API_CALLBACK_TYPE ApplDescTransferData(DescMsgContext* pMsgContext);
/* Request length check can not be performed. Please, implement length check in your Main-Handler!! */
void DESC_API_CALLBACK_TYPE ApplDescRequestTransferExit(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescRequestFileTransferUpload_Download(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescControlDtcSettingEnable(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescControlDtcSettingDisable(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescPreGetLevel_1_Request_Seed(void);
void DESC_API_CALLBACK_TYPE ApplDescPreSendLevel_1_sendKey_1(void);
void DESC_API_CALLBACK_TYPE ApplDescPreGetLevel_4_Request_Seed(void);
void DESC_API_CALLBACK_TYPE ApplDescPreSendLevel_4_send_Key(void);
void DESC_API_CALLBACK_TYPE ApplDescPostGetLevel_1_Request_Seed(vuint8 status);
void DESC_API_CALLBACK_TYPE ApplDescPostSendLevel_1_sendKey_1(vuint8 status);
void DESC_API_CALLBACK_TYPE ApplDescPostGetLevel_4_Request_Seed(vuint8 status);
void DESC_API_CALLBACK_TYPE ApplDescPostSendLevel_4_send_Key(vuint8 status);
/* Application condition checks */
void DESC_API_CALLBACK_TYPE ApplDescCheckCommCtrl(DESC_CONTEXT_FORMAL_PARAM_DEF_FIRST DescOemCommControlInfo *commControlInfo);

#if defined (DESC_ENABLE_COMM_CTRL_SUBNET_SUPPORT)
void DESC_API_CALLBACK_TYPE ApplDescSetCommMode(DescOemCommControlInfo *commControlInfo);
#endif

#if defined (DESC_ENABLE_RX_COMM_CONTROL)
void DESC_API_CALLBACK_TYPE ApplDescSetCommModeOnRxPath(DescOemCommControlInfo *commControlInfo);
#endif

/* Notification functions */
void DESC_API_CALLBACK_TYPE ApplDescOnCommunicationDisable(void);
void DESC_API_CALLBACK_TYPE ApplDescOnCommunicationEnable(void);

void DESC_API_CALLBACK_TYPE ApplDescCheckSessionTransition(DescStateGroup newState, DescStateGroup formerState);
/* application function which returns a randomly generated value each time it is called 
 * (e.g. current free running timer value)
 */
void ApplDescSecurityAccessGetSeed(DescSecurityAccessContext* pDescSecurityAccessContext);
/* application function which must evaluate the received key and confirm its validity.
 */
void ApplDescSecurityAccessCheckKey(DescSecurityAccessContext* pDescSecurityAccessContext);

#if defined (DESC_ENABLE_REPORT_ATT_CNTR_STATE)
/* application notification on time expiration */
void ApplDescSecurityAccessOnAttCntrChanged(DESC_LEVEL_FORMAL_PARAM_DEF_FIRST DescSecAccAttCtrChgEvType chgEv, vuint8 newAttCounter);
#endif

void DESC_API_CALLBACK_TYPE ApplDescReadDidbackup_battery_healthy_status(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidvehicle_location_information(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidIMEI(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidICCID(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidSIM_card_status(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidSIM_card_airplane_mode(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidcellular_network_signal_strength(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidcellular_network_signal_level(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidcellular_network_type(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidbackup_battery_temp(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDideCall_official_number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidreprogramming_result(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidIMU_calibration_confidence_percent(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDideCall_enable_disable(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidautomatic_eCall_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidmanual_eCall_cancellation_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDideCall_test_number_1(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDiddial_test_number_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidtest_mode_call_allowed(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDideCall_max_attempts(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDideCall_already_attempted_times(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidBLE_MAC_address(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDideCall_control_state(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidbackup_battery_boost_control(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidReprogramming_Attempt_Counter(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidECU_Configuration(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidVehicle_Manufacture_Hardware_Part_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidVehicle_Manufacture_Hardware_Baseline(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidVehicle_Manufacturer_Software_Part_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidVehicle_Manufacture_Software_Baseline(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidECALL_Software_Part_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidBootloader_Version_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidRead_Programming_Fingerprint(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidConfiguration_Fingerprint(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidRead_Active_Diagnostic_Session(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidVehicle_Manufacturer_Spare_Part_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidSystem_Supplier_Identifier(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidECU_Manufacturing_Date(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidECU_Serial_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidVehicle_Identification_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidSystem_Supplier_Hardware_Version_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidSystem_Supplier_Software_Version_Number(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidSystem_Name(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidECU_Programming_Date(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescReadDidECU_Diagnostic_Database_Version(DescMsgContext* pMsgContext);
#if defined (DESC_ENABLE_MULTI_CFG_SUPPORT)
/* Additionaly reject a supported PID (multi ECU configuration) */
DescBool ApplDescIsDataIdSupported(vuint16 pid);
#endif

void DESC_API_CALLBACK_TYPE ApplDescRtnCtrlStartCheck_Programming_Preconditions(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescRtnCtrlStartSSH_control_in_production_env(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescRtnCtrlStartinstall_cert(DescMsgContext* pMsgContext);
/* Request length check can not be performed. Please, implement length check in your Main-Handler!! */
void DESC_API_CALLBACK_TYPE ApplDescRtnCtrlStarttest_cert_installation(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescRtnCtrlStartstart_sideloading(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescRtnCtrlStartErase_Memory(DescMsgContext* pMsgContext);
void DESC_API_CALLBACK_TYPE ApplDescRtnCtrlStartCheck_Programming_Dependence(DescMsgContext* pMsgContext);


#endif /* __APPDESC_H__ */
