Prerequisite : It is recommended to read an introduction article.
When tester send the diagnostics request to DCM, the DCM process this request and invokes the call-out function associated with the service and it sub-function. Please note that opStatus us set to DCM_INITIAL when call-out is called for first time.
In case requested operation has been completed in the small call , then the call-out function shall set the ErrorCode to DCM_POS_RESP and returns E_OK. The DCM then sends the positive response to the tester.
In case requested operation has failed, then the call-out function shall set the ErrorCode to specific value (for example DCM_E_REQUESTOUTOFRANGE) and returns E_NOT_OK. The DCM then sends the negative response code with same value as in ErrorCode to the tester.