Logo
UNICENS V2.1.0-3491
User Manual and API Reference
uint16_t Ucs_Rm_GetConnectionLabel ( Ucs_Inst_t self,
Ucs_Rm_Route_t route_ptr 
)

Retrieves the ConnectionLabel of the given route.

Parameters
selfThe UNICENS instance pointer.
route_ptrReference to the route to be looked for.
Returns
The ConnectionLabel of the route. The ConnectionLabel value falls within the range [0x000C...0x017F] when route is built. Otherwise, 0 is returned.



Example

// Source and Sink Endpoints
static Ucs_Rm_EndPoint_t endpoint_src = { UCS_RM_EP_SOURCE, &xrm_job_out[0], &node_src };
static Ucs_Rm_EndPoint_t endpoint_sink = { UCS_RM_EP_SINK, &xrm_job_in[0], &node_sink };
// Routes Specification
static Ucs_Rm_Route_t route_66[] = { {&endpoint_src, &endpoint_sink, is_active, 0x066U} };
// Main function
void main(uint8_t argc, char *argv[])
{
uint16_t rt66_cl;
bool rt66_is_built;
// Starts routes processing
(void)Ucs_Rm_Start(ucs_inst_ptr, &route_66[0], 1U);
// ...
// Retrieve "ConnectionLabel" of route_66.
if (rt66_is_built)
{
rt66_cl = Ucs_Rm_GetConnectionLabel(ucs_inst_ptr, &route_66[0]);
//printf("CL:route_0x%02X --> {0x%X}\r\n", (&route_66[0])->route_id, rt66_cl);
}
}