erpc icon indicating copy to clipboard operation
erpc copied to clipboard

erpc robustness

Open tmordeko opened this issue 5 years ago • 1 comments

Hi,

Is it possible to recover gracefully from an erpc error during one of the remote procedures calls ? currently the server and client are stuck.

/Tzvika

tmordeko avatar Oct 26 '20 11:10 tmordeko

Hello @tmordeko , as stated in #145 , one can catch the status return value of the server run/poll function on the server side. On the client side you need to set client error handler function, like this:

    #include "erpc_error_handler.h"
    erpc_client_set_error_handler(erpc_error_handler);
    for (;;)
    {
        erpcFunctionCall();

        /* Check if some error occurred in eRPC */
        if (g_erpc_error_occurred)
        {
            /* Exit program loop or do whatever is needed in your app. */
            break;
        }
    }

Hope it helps. Michal

MichalPrincNXP avatar Dec 18 '20 15:12 MichalPrincNXP