Logo
UNICENS V2.1.0-3491
User Manual and API Reference
Ucs_Rm_ReportCb_t report_fptr

Optional report callback function pointer for all routes.

Note
The passed result callback function does not only report the result of the build operation but also monitors the status of the created routes during their whole lifetime. That is, the callback function also reports the various states of a route (Refer to Ucs_Rm_RouteInfos_t for more infos). Furthermore the result of Ucs_Rm_SetRouteActive() function call is reported by this result callback function.


Example

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data);
// Routing Management init section.
ucs_init_data.rm.report_fptr = &App_OnRoutingResult;
// The report callback function for all routes
static void App_OnRoutingResult(uint16_t route_id, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)
{
// Do whatever is necessary here
switch (route_infos)
{
// Route has been built
break;
// Route has been destroyed
break;
// Route cannot be processed anymore due to UNICENS Termination
break;
default:
// Route has been suspended
break;
}
}