UNPKG

9.01 kBYAMLView Raw
1title: 'Network protocol'
2description: 'Protocol for starting and stopping FBP networks, and finding out about their state.'
3
4output:
5 stopped:
6 description: 'Inform that a given network has stopped.'
7 properties:
8 time:
9 type: "string"
10 format: "date-time"
11 description: 'time when the network was stopped'
12 uptime:
13 type: "string"
14 format: "date-time"
15 description: 'time the network was running, in seconds'
16 graph:
17 type: "string"
18 description: 'graph the action targets'
19
20 started:
21 description: 'Inform that a given network has been started.'
22 properties:
23 time:
24 type: "string"
25 format: "date-time"
26 description: 'time when the network was started'
27 graph:
28 type: "string"
29 description: 'graph the action targets'
30
31 status:
32 description: 'Response to a getstatus message.'
33 properties:
34 running:
35 type: "boolean"
36 description: 'boolean tells whether the network is running or not'
37 graph:
38 type: "string"
39 description: 'graph the action targets'
40 uptime:
41 type: "string"
42 format: "date-time"
43 description: '(optional) time the network has been running, in seconds'
44
45 output:
46 description: 'An output message from a running network, roughly similar to STDOUT output of a Unix process, or a line of console.log in JavaScript. Output can also be used for passing images from the runtime to the UI.'
47 properties:
48 message:
49 type: "string"
50 description: 'contents of the output line'
51 type:
52 type: "string"
53 enum: ["message", "previewurl"]
54 description: '(optional) type of output, either message or previewurl'
55 url:
56 type: "string"
57 format: "uri"
58 description: '(optional) URL for an image generated by the runtime'
59
60 error:
61 description: 'An error from a running network, roughly similar to STDERR output of a Unix process, or a line of console.error in JavaScript.'
62 properties:
63 message:
64 type: "any"
65 description: 'contents of the error message'
66
67
68 icon:
69 description: 'Icon of a component instance has changed.'
70 properties:
71 id:
72 type: "string"
73 description: 'identifier of the node'
74 icon:
75 type: "string"
76 description: 'new icon for the component instance'
77 graph:
78 type: "string"
79 description: 'graph the action targets'
80
81
82
83 connect:
84 description: 'Beginning of transmission on an edge.'
85 properties:
86 id:
87 type: "string"
88 description: 'textual edge identifier, usually in form of a FBP language line'
89 src:
90 type: object
91 description: 'source node for the edge'
92 properties:
93 node:
94 type: "string"
95 description: 'node identifier'
96 port:
97 type: "string"
98 description: 'port name'
99 tgt:
100 type: object
101 description: 'target node for the edge'
102 properties:
103 node:
104 type: "string"
105 description: 'node identifier'
106 port:
107 type: "string"
108 description: 'port name'
109 graph:
110 type: "string"
111 description: 'graph the action targets'
112 subgraph:
113 type: "string"
114 description: '(optional): subgraph identifier for the event. An array of node IDs'
115
116 begingroup:
117 description: 'Beginning of a group (bracket IP) on an edge.'
118 properties:
119 id:
120 type: "string"
121 description: 'textual edge identifier, usually in form of a FBP language line'
122 src:
123 description: 'source node for the edge'
124 properties:
125 node:
126 type: "string"
127 description: 'node identifier'
128 port:
129 type: "string"
130 description: 'port name'
131 tgt:
132 description: 'target node for the edge'
133 properties:
134 node:
135 type: "string"
136 description: 'node identifier'
137 port:
138 type: "string"
139 description: 'port name'
140 group:
141 description: 'group name'
142 type: "string"
143 graph:
144 type: "string"
145 description: 'graph the action targets'
146 subgraph:
147 type: "array"
148 description: '(optional): subgraph identifier for the event. An array of node IDs'
149
150 data:
151 description: 'Data transmission on an edge.'
152 properties:
153 id:
154 type: "string"
155 description: 'textual edge identifier, usually in form of a FBP language line'
156 src:
157 type: object
158 description: 'source node for the edge'
159 properties:
160 node:
161 type: "string"
162 description: 'node identifier'
163 port:
164 type: "string"
165 description: 'port name'
166 tgt:
167 type: object
168 description: 'target node for the edge'
169 properties:
170 node:
171 type: "string"
172 description: 'node identifier'
173 port:
174 type: "string"
175 description: 'port name'
176 data:
177 type: "any"
178 description: 'actual data being transmitted, encoded in a way that can be carried over the protocol transport'
179 graph:
180 type: "string"
181 description: 'graph the action targets'
182 subgraph:
183 type: "string"
184 description: '(optional): subgraph identifier for the event. An array of node IDs'
185
186 endgroup:
187 description: 'Ending of a group (bracket IP) on an edge.'
188 properties:
189 id:
190 type: "string"
191 description: 'textual edge identifier, usually in form of a FBP language line'
192 src:
193 description: 'source node for the edge'
194 properties:
195 node:
196 type: "string"
197 description: 'node identifier'
198 port:
199 type: "string"
200 description: 'port name'
201 tgt:
202 description: 'target node for the edge'
203 properties:
204 node:
205 type: "string"
206 description: 'node identifier'
207 port:
208 type: "string"
209 description: 'port name'
210 group:
211 description: 'group name'
212 type: "string"
213 graph:
214 description: 'graph the action targets'
215 type: "string"
216 subgraph:
217 type: "array"
218 description: '(optional): subgraph identifier for the event. An array of node IDs'
219
220 disconnect:
221 description: 'End of transmission on an edge.'
222 properties:
223 id:
224 description: 'textual edge identifier, usually in form of a FBP language line'
225 src:
226 type: object
227 description: 'source node for the edge'
228 properties:
229 node:
230 type: "string"
231 description: 'node identifier'
232 port:
233 type: "string"
234 description: 'port name'
235 tgt:
236 type: object
237 description: 'target node for the edge'
238 properties:
239 node:
240 type: "string"
241 description: 'node identifier'
242 port:
243 type: "string"
244 description: 'port name'
245 graph:
246 type: "string"
247 description: 'graph the action targets'
248 subgraph:
249 type: "string"
250 description: '(optional): subgraph identifier for the event. An array of node IDs'
251
252
253
254input:
255
256 error:
257 description: 'Network error'
258
259 start:
260 description: 'Start execution of a FBP network based on a given graph.'
261 properties:
262 graph:
263 type: "string"
264 description: 'graph the action targets'
265
266 getstatus:
267 description: 'Get the current status of the runtime. The runtime should respond with a status message.'
268 properties:
269 graph:
270 type: "string"
271 description: 'graph the action targets'
272
273 stop:
274 description: 'Stop execution of a FBP network based on a given graph.'
275 properties:
276 graph:
277 type: "string"
278 description: 'graph the action targets'
279
280 edges:
281 description: 'List of edges user has selected for inspection in a user interface or debugger, sent from UI to a runtime.'
282 edges:
283 type: array
284 description: 'list of selected edges, each containing'
285 properties:
286 src:
287 type: object
288 description: 'source node for the edge'
289 properties:
290 node:
291 type: "string"
292 description: 'node identifier'
293 port:
294 type: "string"
295 description: 'port name'
296 tgt:
297 type: object
298 description: 'target node for the edge'
299 properties:
300 node:
301 type: "string"
302 description: 'node identifier'
303 port:
304 type: "string"
305 description: 'port name'
306 graph:
307 type: "string"
308 description: 'graph the action targets'