Sets the given route to active
respectively inactive
and triggers the routing process to handle the route.
When setting a route to active
the routing process will start building the route and all related resources and return the result to the user callback function (Refer to Routing Management Init Structure). When setting a route to inactive
the routing process will start destroying the route and all related resources and return the result to the user callback function.
- Parameters
-
self | The UNICENS instance. |
route_ptr | Reference to the routes to be destroyed. |
active | Specifies whether the route should be activated or not. true is active and false inactive. |
- Returns
- Possible return values are shown in the table below.
Value | Description |
UCS_RET_SUCCESS | No error |
UCS_RET_ERR_PARAM | At least one parameter is NULL. |
UCS_RET_ERR_ALREADY_SET | The given route is already active or inactive |
UCS_RET_ERR_NOT_SUPPORTED | API is not supported in the current Network Supervisor Mode. |
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized |
- Note
- The build up or the destruction of a route can take some times in case the routing process may need to perform retries when uncritical errors occur (e.g.: transmission error, processing error, etc.) or when certain conditions are not met yet (e.g. network not available, node not available, etc.). By the way, the maximum number of retries is 0xFF and the minimum time between the retries is 50ms. This results in a minimum time of ca. 13s to get a route built or suspended (if the maximum retries are reached).
- Attention
- To suit your specific system needs and setup, change the default values of the following Resources Management macros:
-
Use the
UCS_ADDR_LOCAL_NODE
macro to address the local device when specifying connection routes to or from this device.
The following address ranges are supported:
- [0x10 ... 0x2FF]
- [0x500 ... 0xFEF]
- UCS_ADDR_LOCAL_NODE