/****************************************************************************** * * Freescale Semiconductor Inc. * (c) Copyright 2008-2015 Freescale Semiconductor, Inc. * ALL RIGHTS RESERVED. * ******************************************************************************/ /**************************************************************************//** * @addtogroup diagnostic_group * @{ ******************************************************************************/ /**************************************************************************//** * * @file lin_diagnostic_service.h * * @author FPT Software * * @brief diagnostic service * ******************************************************************************/ /****************************************************************************** * * History: * * 20090407 v1.0 First version * *****************************************************************************/ #ifndef _LIN_DIAGNOSTIC_SERVICE_H #define _LIN_DIAGNOSTIC_SERVICE_H #include "lin.h" #if LIN_MODE == _SLAVE_MODE_ /* Unuse for GPIO */ #if (_LIN_GPIO_ == 0) && !defined(_MC9S08SC4_H)&& !defined(MCU_SKEAZN84) #if LIN_PROTOCOL == PROTOCOL_21 /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_diagservice_assign_frame_id_range ( void ) * @brief process assign frame id range request, and also prepare its response data * * * @return #void * * @SDD_ID LIN_SDD_359 * @endif * * @local_var * -# #l_u8 start_index * -# #l_s8 i * -# #l_s8 j * * @static_global_var * -# #tl_current_rx_pdu_ptr * -# #lin_configuration_RAM * * @details * This function to process assign frame id range request, and also prepare its response data. * This function is only for Slave Node. * Required: Mandatory. * For LIN 2.1 * * @see #lin_tl_make_slaveres_pdu * @see #lin_process_parity *//*END*----------------------------------------------------------------------*/ void lin_diagservice_assign_frame_id(); void lin_diagservice_assign_frame_id_range(void); /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_diagservice_read_by_identifier ( void ) * @brief process read by identifier request, and also prepare its response data * * * @return #void * * @SDD_ID LIN_SDD_360 * @endif * * @local_var * -# #l_u8 id * -# #l_u16 supid * -# #l_u16 fid * * @static_global_var * -# #tl_current_rx_pdu_ptr * -# #product_id * -# #tl_slaveresp_cnt * * @details * This function to process read by identifier request, and also prepare its response data
* This function is only for Slave Node
* Required: Mandatory
* For LIN 2.1 and 2.0
* * @see #lin_tl_make_slaveres_pdu *//*END*----------------------------------------------------------------------*/ void lin_diagservice_read_by_identifier(void); /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_diagsrv_functional_service ( void ) * @brief process functional request * * * @return #void * * @SDD_ID LIN_SDD_ * @endif * * @local_var * -# #l_u16 length * -# #l_u8 data[] * * @static_global_var * * @details * This function to process functional request. Slave do not response when receive a functional request * @see #ld_receive_message *//*END*----------------------------------------------------------------------*/ void lin_diagsrv_functional_service(void); /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_condittional_change_nad ( void ) * @brief process functional request * * * @return #void * * @SDD_ID LIN_SDD_ * @endif * * @local_var * -# #l_u16 length * -# #l_u8 data[] * * @static_global_var * * @details * This function to process functional request. Slave do not response when receive a functional request * @see #ld_receive_message *//*END*----------------------------------------------------------------------*/ void lin_condittional_change_nad(void); #endif /* End (LIN_PROTOCOL == PROTOCOL_21) */ #if LIN_PROTOCOL == PROTOCOL_J2602 /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_diagservice_target_reset ( void ) * @brief process read by identifier request, and also prepare its response data * * * @return #void * * @SDD_ID LIN_SDD_361 * @endif * * @local_var * -# #l_u8 *signal_data_ptr * -# #l_u8 nad * * @static_global_var * -# #tl_current_rx_pdu_ptr * -# #tl_slaveresp_cnt * * @details * This function to process read by identifier request, and also prepare its response data
* and Reset the Slave Node
* This function is only for Slave Node
* Required: Mandatory
* For J2602 * * @see #lin_tl_make_slaveres_pdu *//*END*----------------------------------------------------------------------*/ void lin_diagservice_target_reset(void); #endif /* End (LIN_PROTOCOL == PROTOCOL_J2602) */ #endif /* End (_LIN_GPIO_ == 0) && !defined(_MC9S08SC4_H) */ #endif /* LIN_MODE == _SLAVE_MODE_ */ #if LIN_MODE == _MASTER_MODE_ /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_diagservice_assign_frame_id_range ( l_ifc_handle iii ) * @brief process assign frame id range request, and also prepare its response data * * @param iii [IN] interface name * * @return #void * * @SDD_ID LIN_SDD_356 * @endif * * @local_var * -# #const lin_configuration conf * -# #lin_tl_descriptor tl_conf * -# #l_s8 i * -# #l_s8 j * -# #l_u8 start_index * -# #l_u8 cfg_frame_num * -# #lin_tl_pdu_data *lin_tl_pdu * * @static_global_var * -# #lin_ifc_configuration * * @details * This function to process assign frame id range request, and also prepare its response data * This function is only for Slave Node * Required: Mandatory * For LIN 2.1 * * @see #lin_tl_make_slaveres_pdu * @see #lin_process_parity *//*END*----------------------------------------------------------------------*/ void lin_diagservice_assign_frame_id_range(l_ifc_handle iii); /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_diagservice_read_by_identifier ( l_ifc_handle iii ) * @brief process assign frame id range request, and also prepare its response data * * @param iii [IN] interface name * * @return #void * * @SDD_ID LIN_SDD_357 * @endif * * @local_var * -# #const lin_configuration *conf * -# #const lin_node_attribute *node_conf * -# #lin_product_id node_conf * -# #lin_tl_descriptor *tl_conf * -# #lin_tl_pdu_data *lin_tl_pdu * -# #l_u8 id * -# #l_u16 supid * -# #l_u16 fid * * @static_global_var * -# #lin_ifc_configuration * * @details * This function to process read by identifier request, and also prepare its response data * This function is only for Slave Node * Required: Mandatory * For LIN 2.1 and 2.0 * * @see #lin_tl_make_slaveres_pdu *//*END*----------------------------------------------------------------------*/ void lin_diagservice_read_by_identifier(l_ifc_handle iii); /* J2602 */ /*FUNCTION*--------------------------------------------------------------*//** * @fn void lin_diagservice_target_reset ( l_ifc_handle iii ) * @brief process read by identifier request, and also prepare its response data * * @param iii [IN] interface name * * @return #void * * @SDD_ID LIN_SDD_358 * @endif * * @local_var * -# #const lin_configuration *conf * -# #lin_tl_descriptor1 *tl_conf * -# #lin_tl_pdu_data *pdu * -# #l_u8 *signal_data_ptr * -# #l_u8 *nad * * @static_global_var * -# #lin_ifc_configuration * -# #lin_tl_pdu * * @details * This function to process read by identifier request, and also prepare its response data * and Reset the Slave Node * This function is only for Slave Node * Required: Mandatory * For J2602 * * @see #lin_tl_make_slaveres_pdu *//*END*----------------------------------------------------------------------*/ void lin_diagservice_target_reset(l_ifc_handle iii); /*! * @brief Process Conditional Change NAD request * * @param iii Interface name * @return void */ void lin_condittional_change_nad(l_ifc_handle iii); #endif /* End (LIN_MODE == _MASTER_MODE_) */ #endif /* _LIN_DIAGNOSTIC_SERVICE_H */ /* End of definition if _LIN_DIAGNOSTIC_SERVICE_H */ /** @} */