55 for (
int i=0; i<DFG->
n_msus; i++) {
64 #define MAX_ROUTE_ID 9999
85 return pthread_mutex_init(&
dfg_mutex, NULL);
98 int rtn = pthread_mutex_unlock(&
dfg_mutex);
struct dedos_dfg * get_dfg(void)
int n_msus
The number of MSUs in dedos_dfg::msus.
static struct dedos_dfg * DFG
int global_ctl_port
Port of the global controller.
struct dfg_route * get_dfg_route(unsigned int id)
Returns the route with the given ID.
#define log_perror(fmt,...)
Logging of status messages to the terminal.
pthread_mutex_t dfg_mutex
struct dfg_route_endpoint * endpoints[256]
The endpoints of the route.
int n_endpoints
The number of endpoints in dfg_route::endpoints.
#define log_error(fmt,...)
void set_dfg(struct dedos_dfg *dfg_in)
Sets the local copy of the DFG, so it doesn't have to be passed in for each call. ...
Declares function for converting JSON to dedos_dfg.
int id
A unique identifier for the MSU.
int init_controller_dfg(char *filename)
Top-level structure holding the data-flow graph.
A route through which MSU messages can be passed.
struct dedos_dfg * parse_dfg_json_file(const char *filename)
Converts a json file to a dfg structure.
void set_haproxy_weights(int rt_id, int offset)
Interfaces for the creation and modification of the data-flow-graph and and general description of th...
uint32_t key
The key associated with this endpoint.
uint32_t generate_endpoint_key(struct dfg_route *route)
struct dfg_msu * msus[512]
The MSUs present in the application.