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

Initialization structure of the Extended Resource Manager.


Example

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data);
// Routing Management init section.
ucs_init_data.rm.xrm.most_port_status_fptr = &App_MostPortStatusCb;
ucs_init_data.rm.xrm.check_unmute_fptr = &App_CheckUnmuteStatusCb;
ucs_init_data.rm.xrm.debug_resource_status_fptr = &App_OnDebuggingXrmResources;
// Handle MOST Port Status event here
void App_MostPortStatusCb(uint16_t most_port_handle,
Ucs_Most_PortAvail_t availability,
uint16_t free_streaming_bw)
{
// Do what needs to be..
}
// Handle the Mute Pin check here
void App_CheckUnmuteStatusCb (uint16_t node_address)
{
// Check the state of the mute pin here before unmuting
}
// Debug interface for the XRM resources
void App_OnDebuggingXrmResources (Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, void *user_ptr)
{
switch (resource_infos)
{
// Resource has been built
break;
// resource has been destroyed
break;
//Resource cannot be built
break;
default:
// Resource cannot be destroyed
break;
}
}