node-red-contrib-ax25 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.eslintignore +5 -0
  2. package/.prettierignore +7 -0
  3. package/ARCHITECTURE.md +174 -0
  4. package/CONTEXT.md +90 -0
  5. package/MESSAGES.md +314 -0
  6. package/README.md +317 -0
  7. package/examples/beacons.json +130 -0
  8. package/examples/beacons.png +0 -0
  9. package/examples/bye_subflow.json +107 -0
  10. package/examples/bye_subflow.png +0 -0
  11. package/examples/delete_all_my_messages.json +491 -0
  12. package/examples/delete_all_my_messages.png +0 -0
  13. package/examples/get_message_list_subflow.json +129 -0
  14. package/examples/get_message_list_subflow.png +0 -0
  15. package/examples/send_message_subflow.json +367 -0
  16. package/examples/send_message_subflow.png +0 -0
  17. package/examples/send_test_message.json +643 -0
  18. package/examples/send_test_message.png +0 -0
  19. package/jsconfig.json +37 -0
  20. package/lib/agwpe-client-transport.js +99 -0
  21. package/lib/agwpe-frame-builder.js +176 -0
  22. package/lib/agwpe-frame-pretty.js +107 -0
  23. package/lib/ax25-codec.js +382 -0
  24. package/lib/frame-router.js +95 -0
  25. package/lib/frame-segmentation.js +53 -0
  26. package/lib/message-utils.js +59 -0
  27. package/lib/runtime-store.js +94 -0
  28. package/lib/session-registry.js +142 -0
  29. package/local/buffer_compare.json +135 -0
  30. package/local/debug-d-frame.js +84 -0
  31. package/local/raw-out-test.json +128 -0
  32. package/nodes/agwpe-client.html +70 -0
  33. package/nodes/agwpe-client.js +771 -0
  34. package/nodes/agwpe-client.js.bak +871 -0
  35. package/nodes/connect.html +128 -0
  36. package/nodes/connect.js +450 -0
  37. package/nodes/decode.html +83 -0
  38. package/nodes/decode.js +56 -0
  39. package/nodes/disconnect.html +55 -0
  40. package/nodes/disconnect.js +47 -0
  41. package/nodes/encode.html +117 -0
  42. package/nodes/encode.js +164 -0
  43. package/nodes/monitor-in.html +48 -0
  44. package/nodes/monitor-in.js +42 -0
  45. package/nodes/raw-in.html +50 -0
  46. package/nodes/raw-in.js +72 -0
  47. package/nodes/raw-out.html +76 -0
  48. package/nodes/raw-out.js +144 -0
  49. package/nodes/send.html +91 -0
  50. package/nodes/send.js +373 -0
  51. package/nodes/ui-in.html +64 -0
  52. package/nodes/ui-in.js +68 -0
  53. package/nodes/ui-out.html +80 -0
  54. package/nodes/ui-out.js +133 -0
  55. package/package.json +47 -0
@@ -0,0 +1,367 @@
1
+ [
2
+ {
3
+ "id": "f7f34a0fbba6409d",
4
+ "type": "subflow",
5
+ "name": "Send message",
6
+ "info": "",
7
+ "category": "",
8
+ "in": [
9
+ {
10
+ "x": 100,
11
+ "y": 120,
12
+ "wires": [
13
+ {
14
+ "id": "090399aff5479949"
15
+ }
16
+ ]
17
+ }
18
+ ],
19
+ "out": [
20
+ {
21
+ "x": 410,
22
+ "y": 540,
23
+ "wires": [
24
+ {
25
+ "id": "1afee35f8b39aeae",
26
+ "port": 0
27
+ }
28
+ ]
29
+ },
30
+ {
31
+ "x": 400,
32
+ "y": 440,
33
+ "wires": [
34
+ {
35
+ "id": "b03019b9ac2774bd",
36
+ "port": 1
37
+ }
38
+ ]
39
+ }
40
+ ],
41
+ "env": [],
42
+ "meta": {},
43
+ "color": "#DDAA99",
44
+ "inputLabels": [
45
+ "Input"
46
+ ],
47
+ "outputLabels": [
48
+ "Error",
49
+ "Ok"
50
+ ]
51
+ },
52
+ {
53
+ "id": "b03019b9ac2774bd",
54
+ "type": "function",
55
+ "z": "f7f34a0fbba6409d",
56
+ "name": "done",
57
+ "func": "\"use strict\";\n\nif (!msg.match || !msg.match.startsWith('ENTER COMMAND')) {\n node.error(\"Expected ENTER COMMAND\", msg);\n return [{ sessionId: msg.sessionId }, null];\n}\n\nflow.set(msg.sessionId, undefined);\n\nreturn [null, { sessionId: msg.sessionId }];\n",
58
+ "outputs": 2,
59
+ "timeout": 0,
60
+ "noerr": 0,
61
+ "initialize": "",
62
+ "finalize": "",
63
+ "libs": [],
64
+ "x": 230,
65
+ "y": 420,
66
+ "wires": [
67
+ [
68
+ "4b0c0af1ad7ff1f2"
69
+ ],
70
+ []
71
+ ]
72
+ },
73
+ {
74
+ "id": "1f73bfe9965d5eba",
75
+ "type": "send",
76
+ "z": "f7f34a0fbba6409d",
77
+ "name": "",
78
+ "timeout": "",
79
+ "waitFor": "",
80
+ "x": 510,
81
+ "y": 320,
82
+ "wires": [
83
+ [
84
+ "f297ea382d23401a"
85
+ ],
86
+ [
87
+ "b03019b9ac2774bd"
88
+ ]
89
+ ]
90
+ },
91
+ {
92
+ "id": "55133ce425ecb905",
93
+ "type": "function",
94
+ "z": "f7f34a0fbba6409d",
95
+ "name": "message",
96
+ "func": "\"use strict\";\n\nif (!msg.match || !msg.match.startsWith('ENTER MESSAGE')) {\n node.error(\"Expected ENTER MESSAGE\", msg);\n return [{ sessionId: msg.sessionId }, null];\n}\n\nconst p = flow.get(msg.sessionId);\n\nconst payload = p.message.split(/\\r\\n|\\r|\\n/);\npayload.push('/ex');\n\nreturn [null, {\n sessionId: msg.sessionId,\n payload,\n waitFor: \"^ENTER COMMAND\",\n timeout: 30000,\n}];\n",
97
+ "outputs": 2,
98
+ "timeout": 0,
99
+ "noerr": 0,
100
+ "initialize": "",
101
+ "finalize": "",
102
+ "libs": [],
103
+ "x": 240,
104
+ "y": 320,
105
+ "wires": [
106
+ [
107
+ "5535e8c84873b0cf"
108
+ ],
109
+ [
110
+ "1f73bfe9965d5eba"
111
+ ]
112
+ ]
113
+ },
114
+ {
115
+ "id": "3b57302d2e4b02e0",
116
+ "type": "send",
117
+ "z": "f7f34a0fbba6409d",
118
+ "name": "",
119
+ "timeout": "",
120
+ "waitFor": "",
121
+ "x": 510,
122
+ "y": 220,
123
+ "wires": [
124
+ [
125
+ "5f4f636755d763be"
126
+ ],
127
+ [
128
+ "55133ce425ecb905"
129
+ ]
130
+ ]
131
+ },
132
+ {
133
+ "id": "373827068969f974",
134
+ "type": "function",
135
+ "z": "f7f34a0fbba6409d",
136
+ "name": "subject",
137
+ "func": "\"use strict\";\n\nif (!msg.match || !msg.match.startsWith('SUBJECT')) {\n node.error(\"Expected SUBJECT\", msg);\n return [{ sessionId: msg.sessionId }, null];\n}\n\nconst p = flow.get(msg.sessionId);\n\nreturn [null, {\n sessionId: msg.sessionId,\n payload: p.subject,\n waitFor: \"^ENTER MESSAGE\",\n timeout: 30000,\n}];\n",
138
+ "outputs": 2,
139
+ "timeout": 0,
140
+ "noerr": 0,
141
+ "initialize": "",
142
+ "finalize": "",
143
+ "libs": [],
144
+ "x": 240,
145
+ "y": 220,
146
+ "wires": [
147
+ [
148
+ "c64ee163811b7b1c"
149
+ ],
150
+ [
151
+ "3b57302d2e4b02e0"
152
+ ]
153
+ ]
154
+ },
155
+ {
156
+ "id": "5cf73512bec967fe",
157
+ "type": "send",
158
+ "z": "f7f34a0fbba6409d",
159
+ "name": "",
160
+ "timeout": "",
161
+ "waitFor": "",
162
+ "x": 510,
163
+ "y": 120,
164
+ "wires": [
165
+ [
166
+ "1821e4baa068a563"
167
+ ],
168
+ [
169
+ "373827068969f974"
170
+ ]
171
+ ]
172
+ },
173
+ {
174
+ "id": "090399aff5479949",
175
+ "type": "function",
176
+ "z": "f7f34a0fbba6409d",
177
+ "name": "ST",
178
+ "func": "\"use strict\";\n\nconst required = [\"sessionId\", \"to\", \"subject\", \"message\"];\n\nfor (let i = 0; i < required.length; i++) {\n const p = required[i];\n \n if (!msg.hasOwnProperty(p) || msg[p].length === 0) {\n const errorCode = 'PAYLOAD_INVALID';\n const errorText = p + \" not found\";\n\n node.error(`[${errorCode}] ${errorText}`);\n\n return [{\n sessionId: msg.sessionId,\n status: 'error',\n errorCode,\n errorText,\n msg,\n }, null];\n }\n}\n\nflow.set(msg.sessionId, {\n to: msg.to,\n subject: msg.subject,\n message: msg.message\n});\n\nreturn [null, {\n sessionId: msg.sessionId,\n payload: \"ST \" + msg.to,\n waitFor: \"^SUBJECT\",\n timeout: 30000,\n}];",
179
+ "outputs": 2,
180
+ "timeout": 0,
181
+ "noerr": 0,
182
+ "initialize": "",
183
+ "finalize": "",
184
+ "libs": [],
185
+ "x": 230,
186
+ "y": 120,
187
+ "wires": [
188
+ [
189
+ "f711de2a83d0482b"
190
+ ],
191
+ [
192
+ "5cf73512bec967fe"
193
+ ]
194
+ ]
195
+ },
196
+ {
197
+ "id": "1afee35f8b39aeae",
198
+ "type": "link in",
199
+ "z": "f7f34a0fbba6409d",
200
+ "name": "error",
201
+ "links": [
202
+ "f711de2a83d0482b",
203
+ "c64ee163811b7b1c",
204
+ "5535e8c84873b0cf",
205
+ "4b0c0af1ad7ff1f2",
206
+ "81e3e712c3900aa4",
207
+ "1292b88c4fa4bb3b",
208
+ "87ab14e10118b86d"
209
+ ],
210
+ "x": 255,
211
+ "y": 540,
212
+ "wires": [
213
+ []
214
+ ]
215
+ },
216
+ {
217
+ "id": "4b0c0af1ad7ff1f2",
218
+ "type": "link out",
219
+ "z": "f7f34a0fbba6409d",
220
+ "name": "link out 38",
221
+ "mode": "link",
222
+ "links": [
223
+ "1afee35f8b39aeae"
224
+ ],
225
+ "x": 375,
226
+ "y": 400,
227
+ "wires": []
228
+ },
229
+ {
230
+ "id": "f711de2a83d0482b",
231
+ "type": "link out",
232
+ "z": "f7f34a0fbba6409d",
233
+ "name": "link out 35",
234
+ "mode": "link",
235
+ "links": [
236
+ "1afee35f8b39aeae"
237
+ ],
238
+ "x": 375,
239
+ "y": 80,
240
+ "wires": []
241
+ },
242
+ {
243
+ "id": "c64ee163811b7b1c",
244
+ "type": "link out",
245
+ "z": "f7f34a0fbba6409d",
246
+ "name": "link out 36",
247
+ "mode": "link",
248
+ "links": [
249
+ "1afee35f8b39aeae"
250
+ ],
251
+ "x": 375,
252
+ "y": 200,
253
+ "wires": []
254
+ },
255
+ {
256
+ "id": "5535e8c84873b0cf",
257
+ "type": "link out",
258
+ "z": "f7f34a0fbba6409d",
259
+ "name": "link out 37",
260
+ "mode": "link",
261
+ "links": [
262
+ "1afee35f8b39aeae"
263
+ ],
264
+ "x": 375,
265
+ "y": 300,
266
+ "wires": []
267
+ },
268
+ {
269
+ "id": "87ab14e10118b86d",
270
+ "type": "link out",
271
+ "z": "f7f34a0fbba6409d",
272
+ "name": "link out 41",
273
+ "mode": "link",
274
+ "links": [
275
+ "1afee35f8b39aeae"
276
+ ],
277
+ "x": 885,
278
+ "y": 300,
279
+ "wires": []
280
+ },
281
+ {
282
+ "id": "1292b88c4fa4bb3b",
283
+ "type": "link out",
284
+ "z": "f7f34a0fbba6409d",
285
+ "name": "link out 40",
286
+ "mode": "link",
287
+ "links": [
288
+ "1afee35f8b39aeae"
289
+ ],
290
+ "x": 895,
291
+ "y": 200,
292
+ "wires": []
293
+ },
294
+ {
295
+ "id": "81e3e712c3900aa4",
296
+ "type": "link out",
297
+ "z": "f7f34a0fbba6409d",
298
+ "name": "link out 39",
299
+ "mode": "link",
300
+ "links": [
301
+ "1afee35f8b39aeae"
302
+ ],
303
+ "x": 895,
304
+ "y": 100,
305
+ "wires": []
306
+ },
307
+ {
308
+ "id": "1821e4baa068a563",
309
+ "type": "function",
310
+ "z": "f7f34a0fbba6409d",
311
+ "name": "check error",
312
+ "func": "\"use strict\";\n\nif (msg.status === 'error') {\n node.error(`[${msg.errorCode}] ${msg.errorText}`, msg);\n return msg;\n}\nreturn null;",
313
+ "outputs": 1,
314
+ "timeout": 0,
315
+ "noerr": 0,
316
+ "initialize": "",
317
+ "finalize": "",
318
+ "libs": [],
319
+ "x": 750,
320
+ "y": 100,
321
+ "wires": [
322
+ [
323
+ "81e3e712c3900aa4"
324
+ ]
325
+ ]
326
+ },
327
+ {
328
+ "id": "5f4f636755d763be",
329
+ "type": "function",
330
+ "z": "f7f34a0fbba6409d",
331
+ "name": "check error",
332
+ "func": "\"use strict\";\n\nif (msg.status === 'error') {\n node.error(`[${msg.errorCode}] ${msg.errorText}`, msg);\n return msg;\n}\nreturn null;",
333
+ "outputs": 1,
334
+ "timeout": 0,
335
+ "noerr": 0,
336
+ "initialize": "",
337
+ "finalize": "",
338
+ "libs": [],
339
+ "x": 750,
340
+ "y": 200,
341
+ "wires": [
342
+ [
343
+ "1292b88c4fa4bb3b"
344
+ ]
345
+ ]
346
+ },
347
+ {
348
+ "id": "f297ea382d23401a",
349
+ "type": "function",
350
+ "z": "f7f34a0fbba6409d",
351
+ "name": "check error",
352
+ "func": "\"use strict\";\n\nif (msg.status === 'error') {\n node.error(`[${msg.errorCode}] ${msg.errorText}`, msg);\n return msg;\n}\nreturn null;",
353
+ "outputs": 1,
354
+ "timeout": 0,
355
+ "noerr": 0,
356
+ "initialize": "",
357
+ "finalize": "",
358
+ "libs": [],
359
+ "x": 750,
360
+ "y": 300,
361
+ "wires": [
362
+ [
363
+ "87ab14e10118b86d"
364
+ ]
365
+ ]
366
+ }
367
+ ]