Functions for routing MSU messages between MSUs. More...
Go to the source code of this file.
Classes | |
| struct | msu_endpoint |
| An endpoint to which an msu_msg can be delivered. More... | |
| struct | route_set |
| The publicly accessible copy of the routing table. More... | |
Functions | |
| int | init_route (int route_id, int type_id) |
| Initializes a new route with the given route_id and type_id. More... | |
| int | get_route_endpoint (struct routing_table *table, uint32_t key, struct msu_endpoint *endpoint) |
| Gets the endpoint associated with the given key in the provided route. More... | |
| int | get_shortest_queue_endpoint (struct routing_table *table, uint32_t key, struct msu_endpoint *endpoint) |
| Gets the local endpoint from a route with the shortest queue length. More... | |
| int | get_endpoint_by_index (struct routing_table *table, int index, struct msu_endpoint *endpoint) |
| Gets endpoint witih given index in route set. More... | |
| int | get_endpoint_by_id (struct routing_table *table, int msu_id, struct msu_endpoint *endpoint) |
| Gets endpoint with the given MSU ID in the provided route. More... | |
| int | get_endpoints_by_runtime_id (struct routing_table *table, int runtime_id, struct msu_endpoint *endpoints, int n_endpoints) |
| Gets all of the endpoints in the provided routing table with the right runtime id. More... | |
| struct routing_table * | get_type_from_route_set (struct route_set *routes, int type_id) |
| Gets the route from the provided array of routes which has the correct type ID. More... | |
| int | get_n_endpoints (struct routing_table *table) |
| int | add_route_endpoint (int route_id, struct msu_endpoint endpoint, uint32_t key) |
| Adds an endpoint to the route with the given ID. More... | |
| int | remove_route_endpoint (int route_id, int msu_id) |
| Removes destination from route with given ID. More... | |
| int | modify_route_endpoint (int route_id, int msu_id, uint32_t new_key) |
| Modifies key associated with MSU in route. More... | |
| int | add_route_to_set (struct route_set *set, int route_id) |
| Adds a route to a set of routes. More... | |
| int | rm_route_from_set (struct route_set *set, int route_id) |
| Removes a route from a set of routes. More... | |
| int | init_msu_endpoint (int msu_id, int runtime_id, struct msu_endpoint *endpoint) |
| Initializes an endpoint structure to point to the relevant msu. More... | |
Functions for routing MSU messages between MSUs.
Definition in file routing.h.
| int add_route_endpoint | ( | int | route_id, |
| struct msu_endpoint | endpoint, | ||
| uint32_t | key | ||
| ) |
| int add_route_to_set | ( | struct route_set * | set, |
| int | route_id | ||
| ) |
| int get_endpoint_by_id | ( | struct routing_table * | table, |
| int | msu_id, | ||
| struct msu_endpoint * | endpoint | ||
| ) |
| int get_endpoint_by_index | ( | struct routing_table * | table, |
| int | index, | ||
| struct msu_endpoint * | endpoint | ||
| ) |
| int get_endpoints_by_runtime_id | ( | struct routing_table * | table, |
| int | runtime_id, | ||
| struct msu_endpoint * | endpoints, | ||
| int | n_endpoints | ||
| ) |
Gets all of the endpoints in the provided routing table with the right runtime id.
| table | The table to search for endpoints |
| runtime_id | The ID of the runtime on which endpoints must reside |
| endpoints | An array of endpoints to be filled. |
| n_endpoints | The amount of endpoints allocated in endpoints |
endpoints, or -1 if n_endpoints is too low | int get_n_endpoints | ( | struct routing_table * | table | ) |
| int get_route_endpoint | ( | struct routing_table * | table, |
| uint32_t | key, | ||
| struct msu_endpoint * | endpoint | ||
| ) |
| int get_shortest_queue_endpoint | ( | struct routing_table * | table, |
| uint32_t | key, | ||
| struct msu_endpoint * | endpoint | ||
| ) |
Gets the local endpoint from a route with the shortest queue length.
Ignores enpoints on remote runtimes.
| table | The route to search for the shortest queue length |
| key | Used as a tiebreaker in the case of multiple MSUs with same queue length |
| endpoint | Points to appropriate endpoint on success |
| struct routing_table* get_type_from_route_set | ( | struct route_set * | routes, |
| int | type_id | ||
| ) |
Gets the route from the provided array of routes which has the correct type ID.
| routes | Pointer to array of routes to search |
| n_routes | Number of routes in route array |
| type_id | Type ID to search for |
| int init_msu_endpoint | ( | int | msu_id, |
| int | runtime_id, | ||
| struct msu_endpoint * | endpoint | ||
| ) |
| int init_route | ( | int | route_id, |
| int | type_id | ||
| ) |
| int modify_route_endpoint | ( | int | route_id, |
| int | msu_id, | ||
| uint32_t | new_key | ||
| ) |
| int remove_route_endpoint | ( | int | route_id, |
| int | msu_id | ||
| ) |
1.8.6