Interactions with global dfg from individual runtime. More...
Go to the source code of this file.
Functions | |
void | set_local_runtime (struct dfg_runtime *rt) |
Sets the local runtime to be equal to the provided rt. More... | |
int | init_runtime_dfg (char *filename, int runtime_id) |
Initializes the DFG as loaded from a JSON file, and sets the global variables such that the DFG and runtime can be accessed. More... | |
int | controller_address (struct sockaddr_in *addr) |
Gets the sockaddr associated with the global controller. More... | |
int | local_runtime_id () |
int | local_runtime_port () |
uint32_t | local_runtime_ip () |
struct dedos_dfg * | get_dfg () |
void | free_runtime_dfg () |
Frees the runtime's static instance of the DFG. More... | |
Interactions with global dfg from individual runtime.
Definition in file runtime_dfg.h.
int controller_address | ( | struct sockaddr_in * | addr | ) |
Gets the sockaddr associated with the global controller.
addr | Output parameter to be filled with controller's ip and port |
Definition at line 77 of file runtime_dfg.c.
void free_runtime_dfg | ( | ) |
Frees the runtime's static instance of the DFG.
Definition at line 119 of file runtime_dfg.c.
struct dedos_dfg* get_dfg | ( | ) |
Definition at line 115 of file runtime_dfg.c.
int init_runtime_dfg | ( | char * | filename, |
int | runtime_id | ||
) |
Initializes the DFG as loaded from a JSON file, and sets the global variables such that the DFG and runtime can be accessed.
filename | File from which to load the json DFG |
runtime_id | Idenitifer for this runtime |
Definition at line 41 of file runtime_dfg.c.
int local_runtime_id | ( | ) |
Definition at line 91 of file runtime_dfg.c.
uint32_t local_runtime_ip | ( | ) |
Definition at line 107 of file runtime_dfg.c.
int local_runtime_port | ( | ) |
Definition at line 99 of file runtime_dfg.c.
void set_local_runtime | ( | struct dfg_runtime * | rt | ) |
Sets the local runtime to be equal to the provided rt.
Really should only be used from testing. Use init_runtime_dfg instead
Definition at line 37 of file runtime_dfg.c.