 
#include "Dcm_Cfg_Prot.h"
#include "DcmCore_DslDsd_Inf.h"
#include "Rte_Dcm.h"

/*TESTCODE-START
#include "DcmTest.h"
TESTCODE-END*/
#if((DCM_CFG_KWP_ENABLED != DCM_CFG_OFF)&&(DCM_CFG_SPLITRESPSUPPORTEDFORKWP != DCM_CFG_OFF))

#define DCM_START_SEC_CODE /*Adding this for memory mapping*/
#include "Dcm_MemMap.h"
/**
 * @ingroup DCM_TPL
 * DcmAppl_DcmGetRemainingResponseLength :-\n
 * This API shall be effective only for the KWP2000 services and when the splitting responses feature is enabled in the configuration by enabling the container DcmDslKWPSplitResponseFeatureRB.\n
 * This API shall be called by Dcm_TpTxConfirmation function in case the confirmation given from the lower layer is positive, to check if there are any more responses to be sent.\n
 * In case, there are any non zero length of response to be transmitted, then the service has to be called again in the next main cycle.
 * The same continues until this Application interface returns 0 length.\n
 * This API shall be called only from the Tx confirmation of the final response (not 0x78).
 * In case, the Tx confirmation is negative, then the API DcmAppl_DcmGetRemainingResponseLength shall not be called.
 * Also, if previously sent response (not 0x78), results in negative Tx confir-mation, then the further transmission if any shall be aborted.


 * @param[in]  dataSID_u8    : Service ID of the KWP service under process
 * @param[out] dataResponseLength  : The length of the next response to be transmitted.
 *
 * @retval     None
 *
 */
void DcmAppl_DcmGetRemainingResponseLength(
                                        uint8 dataSID_u8,
                                        PduLengthType * dataResponseLength
                                        )
{

	(void)dataSID_u8;
	*dataResponseLength = 0;
	/*TESTCODE-START
	   if(dataSID_u8 == 0xA8)
         {
            DcmTest_DcmAppl_DcmGetRemainingResponseLength(dataResponseLength);
         }
       else
        {
            *dataResponseLength = 0;
        }

	TESTCODE-END*/
}
#define DCM_STOP_SEC_CODE /*Adding this for memory mapping*/
#include "Dcm_MemMap.h"

#endif /* #if((DCM_CFG_KWP_ENABLED != DCM_CFG_OFF)&&(DCM_CFG_SPLITRESPSUPPORTEDFORKWP != DCM_CFG_OFF)) */
