Interactions with the global dfg from an individual runtime's perspective. More...
#include "runtime_dfg.h"#include "dfg_reader.h"#include "logging.h"#include "dfg_instantiation.h"#include "msu_type.h"#include <stdlib.h>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... | |
Variables | |
| static struct dedos_dfg * | DFG = NULL |
| Static (global) variable for accessing a lodaed Dfg. More... | |
| static struct dfg_runtime * | LOCAL_RUNTIME = NULL |
| Static (global) variable holding this runtime's dfg. More... | |
Interactions with the global dfg from an individual runtime's perspective.
Definition in file runtime_dfg.c.
| 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.
|
static |
Static (global) variable for accessing a lodaed Dfg.
Definition at line 33 of file runtime_dfg.c.
|
static |
Static (global) variable holding this runtime's dfg.
Definition at line 35 of file runtime_dfg.c.
1.8.6