openc3 5.11.3 → 5.13.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of openc3 might be problematic. Click here for more details.

Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/bin/openc3cli +29 -15
  4. data/data/config/_id_items.yaml +6 -4
  5. data/data/config/_id_params.yaml +9 -6
  6. data/data/config/_items.yaml +6 -4
  7. data/data/config/_params.yaml +3 -2
  8. data/data/config/graph_settings.yaml +1 -1
  9. data/data/config/interface_modifiers.yaml +1 -1
  10. data/data/config/item_modifiers.yaml +1 -2
  11. data/data/config/microservice.yaml +10 -1
  12. data/data/config/parameter_modifiers.yaml +13 -14
  13. data/data/config/plugins.yaml +13 -3
  14. data/data/config/screen.yaml +1 -2
  15. data/data/config/target.yaml +9 -0
  16. data/data/config/target_config.yaml +14 -6
  17. data/data/config/tool.yaml +12 -3
  18. data/lib/openc3/api/api.rb +1 -1
  19. data/lib/openc3/api/cmd_api.rb +123 -59
  20. data/lib/openc3/api/config_api.rb +12 -12
  21. data/lib/openc3/api/limits_api.rb +4 -3
  22. data/lib/openc3/api/settings_api.rb +5 -2
  23. data/lib/openc3/api/tlm_api.rb +70 -34
  24. data/lib/openc3/conversions/unix_time_conversion.rb +8 -6
  25. data/lib/openc3/interfaces/mqtt_interface.rb +11 -9
  26. data/lib/openc3/interfaces/mqtt_stream_interface.rb +78 -0
  27. data/lib/openc3/interfaces/tcpip_server_interface.rb +0 -7
  28. data/lib/openc3/io/json_drb.rb +3 -2
  29. data/lib/openc3/io/json_rpc.rb +6 -6
  30. data/lib/openc3/logs/buffered_packet_log_writer.rb +4 -2
  31. data/lib/openc3/logs/packet_log_reader.rb +2 -2
  32. data/lib/openc3/logs/packet_log_writer.rb +22 -7
  33. data/lib/openc3/logs/text_log_writer.rb +3 -2
  34. data/lib/openc3/microservices/cleanup_microservice.rb +8 -1
  35. data/lib/openc3/microservices/decom_microservice.rb +1 -1
  36. data/lib/openc3/microservices/interface_microservice.rb +2 -2
  37. data/lib/openc3/microservices/microservice.rb +5 -2
  38. data/lib/openc3/microservices/reaction_microservice.rb +1 -0
  39. data/lib/openc3/microservices/timeline_microservice.rb +7 -5
  40. data/lib/openc3/microservices/trigger_group_microservice.rb +2 -1
  41. data/lib/openc3/migrations/20231022000000_tlm_viewer_config.rb +22 -0
  42. data/lib/openc3/models/activity_model.rb +21 -3
  43. data/lib/openc3/models/cvt_model.rb +2 -1
  44. data/lib/openc3/models/gem_model.rb +4 -1
  45. data/lib/openc3/models/interface_model.rb +11 -5
  46. data/lib/openc3/models/metadata_model.rb +11 -0
  47. data/lib/openc3/models/microservice_model.rb +16 -3
  48. data/lib/openc3/models/model.rb +18 -0
  49. data/lib/openc3/models/note_model.rb +11 -0
  50. data/lib/openc3/models/plugin_model.rb +56 -4
  51. data/lib/openc3/models/python_package_model.rb +104 -0
  52. data/lib/openc3/models/scope_model.rb +2 -0
  53. data/lib/openc3/models/sorted_model.rb +17 -8
  54. data/lib/openc3/models/target_model.rb +53 -18
  55. data/lib/openc3/models/tool_config_model.rb +9 -3
  56. data/lib/openc3/models/tool_model.rb +22 -7
  57. data/lib/openc3/models/widget_model.rb +19 -3
  58. data/lib/openc3/operators/microservice_operator.rb +2 -0
  59. data/lib/openc3/packets/json_packet.rb +46 -15
  60. data/lib/openc3/packets/limits.rb +6 -18
  61. data/lib/openc3/packets/packet.rb +1 -0
  62. data/lib/openc3/packets/packet_config.rb +2 -1
  63. data/lib/openc3/packets/parsers/format_string_parser.rb +4 -4
  64. data/lib/openc3/packets/parsers/limits_parser.rb +4 -4
  65. data/lib/openc3/packets/parsers/limits_response_parser.rb +5 -5
  66. data/lib/openc3/packets/parsers/processor_parser.rb +4 -4
  67. data/lib/openc3/packets/parsers/state_parser.rb +3 -3
  68. data/lib/openc3/packets/parsers/xtce_parser.rb +5 -1
  69. data/lib/openc3/script/api_shared.rb +81 -63
  70. data/lib/openc3/script/calendar.rb +109 -0
  71. data/lib/openc3/script/commands.rb +18 -19
  72. data/lib/openc3/script/limits.rb +1 -1
  73. data/lib/openc3/script/{gems.rb → packages.rb} +20 -16
  74. data/lib/openc3/script/script.rb +49 -38
  75. data/lib/openc3/script/storage.rb +4 -4
  76. data/lib/openc3/script/web_socket_api.rb +2 -2
  77. data/lib/openc3/streams/mqtt_stream.rb +109 -0
  78. data/lib/openc3/system/system.rb +2 -0
  79. data/lib/openc3/system/target.rb +10 -1
  80. data/lib/openc3/top_level.rb +2 -2
  81. data/lib/openc3/utilities/aws_bucket.rb +3 -2
  82. data/lib/openc3/utilities/bucket_file_cache.rb +1 -1
  83. data/lib/openc3/utilities/cli_generator.rb +33 -20
  84. data/lib/openc3/utilities/local_mode.rb +5 -3
  85. data/lib/openc3/utilities/logger.rb +18 -17
  86. data/lib/openc3/utilities/process_manager.rb +1 -1
  87. data/lib/openc3/utilities/ruby_lex_utils.rb +0 -8
  88. data/lib/openc3/version.rb +6 -6
  89. data/templates/conversion/conversion.py +28 -0
  90. data/templates/conversion/conversion.rb +1 -18
  91. data/templates/limits_response/response.py +37 -0
  92. data/templates/limits_response/response.rb +0 -17
  93. data/templates/microservice/microservices/TEMPLATE/microservice.py +54 -0
  94. data/templates/microservice/microservices/TEMPLATE/microservice.rb +0 -7
  95. data/templates/plugin/.gitignore +1 -0
  96. data/templates/target/targets/TARGET/lib/target.py +9 -0
  97. data/templates/target/targets/TARGET/procedures/procedure.py +3 -0
  98. data/templates/tool_angular/package.json +22 -21
  99. data/templates/tool_angular/yarn.lock +2319 -3156
  100. data/templates/tool_react/package.json +16 -16
  101. data/templates/tool_react/yarn.lock +763 -645
  102. data/templates/tool_svelte/package.json +15 -14
  103. data/templates/tool_svelte/src/services/openc3-api.js +33 -82
  104. data/templates/tool_svelte/yarn.lock +748 -538
  105. data/templates/tool_vue/package.json +15 -14
  106. data/templates/tool_vue/yarn.lock +150 -64
  107. data/templates/widget/package.json +14 -13
  108. data/templates/widget/yarn.lock +133 -58
  109. metadata +60 -7
@@ -11,36 +11,37 @@
11
11
  "smui-theme": "smui-theme compile build/smui.css -i src/theme"
12
12
  },
13
13
  "dependencies": {
14
- "@openc3/tool-common": "5.11.3",
14
+ "@openc3/tool-common": "5.13.0",
15
+ "@astrouxds/astro-web-components": "7.19.1",
15
16
  "@smui/button": "^7.0.0-beta.15",
16
17
  "@smui/card": "^7.0.0-beta.15",
17
18
  "@smui/list": "^7.0.0-beta.15",
18
19
  "@smui/menu": "^7.0.0-beta.15",
19
- "axios": "1.5.0",
20
+ "axios": "1.6.2",
20
21
  "single-spa-svelte": "^2.1.1",
21
22
  "sirv-cli": "^2.0.2",
22
23
  "svelte-portal": "^2.2.0"
23
24
  },
24
25
  "devDependencies": {
25
- "@babel/core": "^7.22.17",
26
- "@babel/preset-env": "^7.22.15",
27
- "@rollup/plugin-commonjs": "^25.0.4",
28
- "@rollup/plugin-node-resolve": "^15.2.1",
29
- "@testing-library/jest-dom": "^6.1.3",
30
- "@testing-library/svelte": "^4.0.3",
26
+ "@babel/core": "^7.23.6",
27
+ "@babel/preset-env": "^7.23.6",
28
+ "@rollup/plugin-commonjs": "^25.0.7",
29
+ "@rollup/plugin-node-resolve": "^15.2.3",
30
+ "@testing-library/jest-dom": "^6.1.5",
31
+ "@testing-library/svelte": "^4.0.5",
31
32
  "babel-jest": "^29.7.0",
32
- "concurrently": "^8.2.1",
33
+ "concurrently": "^8.2.2",
33
34
  "jest": "^29.7.0",
34
- "postcss": "^8.4.29",
35
- "prettier": "^3.0.3",
36
- "prettier-plugin-svelte": "^3.0.3",
37
- "rollup": "^3.29.1",
35
+ "postcss": "^8.4.32",
36
+ "prettier": "^3.1.1",
37
+ "prettier-plugin-svelte": "^3.1.2",
38
+ "rollup": "^4.8.0",
38
39
  "rollup-plugin-livereload": "^2.0.5",
39
40
  "rollup-plugin-postcss": "^4.0.2",
40
41
  "rollup-plugin-svelte": "^7.1.6",
41
42
  "rollup-plugin-terser": "^7.0.2",
42
43
  "smui-theme": "^7.0.0-beta.15",
43
- "svelte": "^4.2.0",
44
+ "svelte": "^4.2.8",
44
45
  "svelte-jester": "^3.0.0"
45
46
  }
46
47
  }
@@ -30,7 +30,7 @@ export class OpenC3Api {
30
30
  async exec(method, params, kwparams = {}, headerOptions = {}) {
31
31
  try {
32
32
  let refreshed = await OpenC3Auth.updateToken(
33
- OpenC3Auth.defaultMinValidity
33
+ OpenC3Auth.defaultMinValidity,
34
34
  )
35
35
  if (refreshed) {
36
36
  OpenC3Auth.setTokens()
@@ -56,7 +56,7 @@ export class OpenC3Api {
56
56
  'Content-Type': 'application/json-rpc',
57
57
  ...headerOptions,
58
58
  },
59
- }
59
+ },
60
60
  )
61
61
  // var data = response.data
62
62
  // if (data.error) {
@@ -180,11 +180,6 @@ export class OpenC3Api {
180
180
  return this.exec('get_target_interfaces', [])
181
181
  }
182
182
 
183
- // DEPRECATED
184
- get_all_target_info() {
185
- return this.exec('get_all_target_info', [])
186
- }
187
-
188
183
  get_tlm_cnts(target_commands) {
189
184
  return this.exec('get_tlm_cnts', [target_commands])
190
185
  }
@@ -193,40 +188,8 @@ export class OpenC3Api {
193
188
  return this.exec('get_item', [target, packet, item])
194
189
  }
195
190
 
196
- get_parameter(target, packet, item) {
197
- return this.exec('get_parameter', [target, packet, item])
198
- }
199
-
200
- get_all_packet_logger_info() {
201
- return this.exec('get_all_packet_logger_info', [])
202
- }
203
-
204
- start_logging() {
205
- return this.exec('start_logging', [])
206
- }
207
-
208
- stop_logging() {
209
- return this.exec('stop_logging', [])
210
- }
211
-
212
- start_cmd_log(log_writer_name) {
213
- return this.exec('start_cmd_log', [log_writer_name])
214
- }
215
-
216
- start_tlm_log(log_writer_name) {
217
- return this.exec('start_tlm_log', [log_writer_name])
218
- }
219
-
220
- stop_cmd_log(log_writer_name) {
221
- return this.exec('stop_cmd_log', [log_writer_name])
222
- }
223
-
224
- stop_tlm_log(log_writer_name) {
225
- return this.exec('stop_tlm_log', [log_writer_name])
226
- }
227
-
228
- get_server_status() {
229
- return this.exec('get_server_status', [])
191
+ get_param(target, packet, item) {
192
+ return this.exec('get_param', [target, packet, item])
230
193
  }
231
194
 
232
195
  get_limits_sets() {
@@ -241,18 +204,6 @@ export class OpenC3Api {
241
204
  return this.exec('set_limits_set', [limits_set])
242
205
  }
243
206
 
244
- get_background_tasks() {
245
- return this.exec('get_background_tasks', [])
246
- }
247
-
248
- start_background_task(name) {
249
- return this.exec('start_background_task', [name])
250
- }
251
-
252
- stop_background_task(name) {
253
- return this.exec('stop_background_task', [name])
254
- }
255
-
256
207
  // ***********************************************
257
208
  // End CmdTlmServer APIs
258
209
  // ***********************************************
@@ -265,16 +216,16 @@ export class OpenC3Api {
265
216
  return this.exec('get_target_names', [])
266
217
  }
267
218
 
268
- get_telemetry(target_name, packet_name) {
269
- return this.exec('get_telemetry', [target_name, packet_name])
219
+ get_tlm(target_name, packet_name) {
220
+ return this.exec('get_tlm', [target_name, packet_name])
270
221
  }
271
222
 
272
- get_all_telemetry(target_name) {
273
- return this.exec('get_all_telemetry', [target_name])
223
+ get_all_tlm(target_name) {
224
+ return this.exec('get_all_tlm', [target_name])
274
225
  }
275
226
 
276
- get_all_telemetry_names(target_name) {
277
- return this.exec('get_all_telemetry_names', [target_name])
227
+ get_all_tlm_names(target_name) {
228
+ return this.exec('get_all_tlm_names', [target_name])
278
229
  }
279
230
 
280
231
  async get_tlm_packet(target_name, packet_name, value_type, stale_time = 30) {
@@ -356,14 +307,14 @@ export class OpenC3Api {
356
307
  target_name,
357
308
  packet_name,
358
309
  item_hash = null,
359
- value_type = 'CONVERTED'
310
+ value_type = 'CONVERTED',
360
311
  ) {
361
312
  data = await this.exec(
362
313
  'inject_tlm',
363
314
  [target_name, packet_name, item_hash],
364
315
  {
365
316
  type: value_type,
366
- }
317
+ },
367
318
  )
368
319
  }
369
320
 
@@ -389,16 +340,16 @@ export class OpenC3Api {
389
340
  })
390
341
  }
391
342
 
392
- get_all_commands(target_name) {
393
- return this.exec('get_all_commands', [target_name])
343
+ get_all_cmds(target_name) {
344
+ return this.exec('get_all_cmds', [target_name])
394
345
  }
395
346
 
396
- get_all_command_names(target_name) {
397
- return this.exec('get_all_command_names', [target_name])
347
+ get_all_cmd_names(target_name) {
348
+ return this.exec('get_all_cmd_names', [target_name])
398
349
  }
399
350
 
400
- get_command(target_name, command_name) {
401
- return this.exec('get_command', [target_name, command_name])
351
+ get_cmd(target_name, command_name) {
352
+ return this.exec('get_cmd', [target_name, command_name])
402
353
  }
403
354
 
404
355
  get_cmd_cnts(target_commands) {
@@ -409,7 +360,7 @@ export class OpenC3Api {
409
360
  target_name,
410
361
  packet_name,
411
362
  parameter_name,
412
- value_type = 'CONVERTED'
363
+ value_type = 'CONVERTED',
413
364
  ) {
414
365
  return this.exec('get_cmd_value', [
415
366
  target_name,
@@ -438,7 +389,7 @@ export class OpenC3Api {
438
389
  method,
439
390
  [target_name, command_name, param_list],
440
391
  {},
441
- headerOptions
392
+ headerOptions,
442
393
  )
443
394
  }
444
395
 
@@ -450,7 +401,7 @@ export class OpenC3Api {
450
401
  'get_cmd_hazardous',
451
402
  target_name,
452
403
  command_name,
453
- param_list
404
+ param_list,
454
405
  )
455
406
  }
456
407
  }
@@ -464,7 +415,7 @@ export class OpenC3Api {
464
415
  target_name,
465
416
  command_name,
466
417
  param_list,
467
- headerOptions
418
+ headerOptions,
468
419
  )
469
420
  }
470
421
  }
@@ -477,7 +428,7 @@ export class OpenC3Api {
477
428
  'cmd_no_range_check',
478
429
  target_name,
479
430
  command_name,
480
- param_list
431
+ param_list,
481
432
  )
482
433
  }
483
434
  }
@@ -498,7 +449,7 @@ export class OpenC3Api {
498
449
  'cmd_raw_no_range_check',
499
450
  target_name,
500
451
  command_name,
501
- param_list
452
+ param_list,
502
453
  )
503
454
  }
504
455
  }
@@ -511,7 +462,7 @@ export class OpenC3Api {
511
462
  'cmd_no_hazardous_check',
512
463
  target_name,
513
464
  command_name,
514
- param_list
465
+ param_list,
515
466
  )
516
467
  }
517
468
  }
@@ -532,7 +483,7 @@ export class OpenC3Api {
532
483
  'cmd_raw_no_hazardous_check',
533
484
  target_name,
534
485
  command_name,
535
- param_list
486
+ param_list,
536
487
  )
537
488
  }
538
489
  }
@@ -545,16 +496,16 @@ export class OpenC3Api {
545
496
  'cmd_raw_no_checks',
546
497
  target_name,
547
498
  command_name,
548
- param_list
499
+ param_list,
549
500
  )
550
501
  }
551
502
  }
552
503
 
553
- build_command(target_name, command_name, param_list) {
504
+ build_cmd(target_name, command_name, param_list) {
554
505
  if (command_name === undefined) {
555
- return this.exec('build_command', target_name)
506
+ return this.exec('build_cmd', target_name)
556
507
  } else {
557
- return this._cmd('build_command', target_name, command_name, param_list)
508
+ return this._cmd('build_cmd', target_name, command_name, param_list)
558
509
  }
559
510
  }
560
511
 
@@ -614,8 +565,8 @@ export class OpenC3Api {
614
565
  return this.exec('get_settings', array)
615
566
  }
616
567
 
617
- save_setting(name, data) {
618
- return this.exec('save_setting', [name, data])
568
+ set_setting(name, data) {
569
+ return this.exec('set_setting', [name, data])
619
570
  }
620
571
 
621
572
  get_metrics() {
@@ -631,7 +582,7 @@ export class OpenC3Api {
631
582
  // The resulting hash is stored in an array buffer
632
583
  const hashAsArrayBuffer = await crypto.subtle.digest(
633
584
  'SHA-256',
634
- arrayBuffer
585
+ arrayBuffer,
635
586
  )
636
587
  // To create a string we will get the hexadecimal value of each byte of the array buffer
637
588
  // This gets us an array where each byte of the array buffer becomes one item in the array