The publicly accessible copy of the routing table.
int id
A unque identifier for the endpoint (msu ID)
unsigned int runtime_id
The ID for the runtime on which the endpoint resides.
The core of the routing system, the routing table lists a route's destinations.
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.
int n_endpoints
The number of destinations this route contains.
int get_n_endpoints(struct routing_table *table)
int get_endpoint_by_index(struct routing_table *table, int index, struct msu_endpoint *endpoint)
Gets endpoint witih given index in route set.
int remove_route_endpoint(int route_id, int msu_id)
Removes destination from route with given ID.
Container for linked list message queue.
msu_locality
Whether an MSU is located on the same runtime or a remote runtime.
struct routing_table ** routes
int modify_route_endpoint(int route_id, int msu_id, uint32_t new_key)
Modifies key associated with MSU in route.
struct msg_queue * queue
if msu_endpoint::locality == MSU_IS_LOCAL, the queue for the msu endpoint
int type_id
The type-id associated with the destinations in this table.
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.
Structures and functions for enqueueing and dequeuing general-purpose messages from a queue...
enum msu_locality locality
Whether the endpoint is on the local machine or remote.
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.
int init_msu_endpoint(int msu_id, int runtime_id, struct msu_endpoint *endpoint)
Initializes an endpoint structure to point to the relevant msu.
int add_route_endpoint(int route_id, struct msu_endpoint endpoint, uint32_t key)
Adds an endpoint to the route with the given ID.
int init_route(int route_id, int type_id)
Initializes a new route with the given route_id and type_id.
struct msu_endpoint endpoints[128]
The destinations themselves.
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.
int rm_route_from_set(struct route_set *set, int route_id)
Removes a route from a set of routes.
Interfaces for the creation and modification of the data-flow-graph and and general description of th...
unsigned int route_id
The ID for the route used to get to the endpoint.
static int runtime_id(int runtime_fd)
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.
An endpoint to which an msu_msg can be delivered.
int add_route_to_set(struct route_set *set, int route_id)
Adds a route to a set of routes.