My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
runtime_dfg.h
Go to the documentation of this file.
1 /*
2 START OF LICENSE STUB
3  DeDOS: Declarative Dispersion-Oriented Software
4  Copyright (C) 2017 University of Pennsylvania, Georgetown University
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 END OF LICENSE STUB
19 */
24 #ifndef RUNTIME_DFG_H_
25 #define RUNTIME_DFG_H_
26 #include <netinet/ip.h>
27 #include "dfg.h"
28 
34 void set_local_runtime(struct dfg_runtime *rt);
35 
43 int init_runtime_dfg(char *filename, int runtime_id);
44 
50 int controller_address(struct sockaddr_in *addr);
51 
55 int local_runtime_id();
56 
60 int local_runtime_port();
61 
62 /*
63  * @returns the IP address on which the local runtime is listening
64  */
66 
70 struct dedos_dfg *get_dfg();
71 
75 void free_runtime_dfg();
76 
77 #endif
78 
79 
uint32_t local_runtime_ip()
Definition: runtime_dfg.c:107
void set_local_runtime(struct dfg_runtime *rt)
Sets the local runtime to be equal to the provided rt.
Definition: runtime_dfg.c:37
int local_runtime_port()
Definition: runtime_dfg.c:99
Representation of a runtime in the DFG.
Definition: dfg.h:73
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 r...
Definition: runtime_dfg.c:41
Top-level structure holding the data-flow graph.
Definition: dfg.h:239
Interfaces for the creation and modification of the data-flow-graph and and general description of th...
static int runtime_id(int runtime_fd)
unsigned int uint32_t
Definition: uthash.h:96
void free_runtime_dfg()
Frees the runtime's static instance of the DFG.
Definition: runtime_dfg.c:119
int controller_address(struct sockaddr_in *addr)
Gets the sockaddr associated with the global controller.
Definition: runtime_dfg.c:77
int local_runtime_id()
Definition: runtime_dfg.c:91
struct dedos_dfg * get_dfg()
Definition: runtime_dfg.c:115