openc3 5.0.8 → 5.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/openc3cli +128 -95
- data/data/config/_id_items.yaml +2 -1
- data/data/config/_id_params.yaml +2 -1
- data/data/config/_items.yaml +2 -1
- data/data/config/_params.yaml +2 -1
- data/data/config/command_modifiers.yaml +30 -0
- data/data/config/item_modifiers.yaml +10 -0
- data/data/config/microservice.yaml +12 -0
- data/data/config/param_item_modifiers.yaml +10 -0
- data/data/config/plugins.yaml +0 -9
- data/data/config/telemetry_modifiers.yaml +10 -0
- data/data/config/widgets.yaml +49 -73
- data/ext/openc3/ext/packet/packet.c +20 -2
- data/ext/openc3/ext/structure/structure.c +12 -17
- data/lib/openc3/accessors/accessor.rb +71 -0
- data/lib/openc3/accessors/binary_accessor.rb +1226 -0
- data/lib/openc3/accessors/cbor_accessor.rb +83 -0
- data/lib/openc3/accessors/html_accessor.rb +28 -0
- data/lib/openc3/accessors/json_accessor.rb +131 -0
- data/lib/openc3/accessors/xml_accessor.rb +67 -0
- data/lib/openc3/accessors.rb +23 -0
- data/lib/openc3/api/cmd_api.rb +5 -2
- data/lib/openc3/api/interface_api.rb +15 -0
- data/lib/openc3/api/limits_api.rb +3 -3
- data/lib/openc3/config/config_parser.rb +10 -4
- data/lib/openc3/core_ext/file.rb +5 -0
- data/lib/openc3/core_ext/tempfile.rb +20 -0
- data/lib/openc3/io/json_rpc.rb +3 -3
- data/lib/openc3/microservices/cleanup_microservice.rb +7 -5
- data/lib/openc3/models/cvt_model.rb +1 -10
- data/lib/openc3/models/interface_model.rb +41 -0
- data/lib/openc3/models/microservice_model.rb +33 -1
- data/lib/openc3/models/plugin_model.rb +1 -1
- data/lib/openc3/models/target_model.rb +85 -68
- data/lib/openc3/packets/binary_accessor.rb +2 -1207
- data/lib/openc3/packets/packet.rb +106 -6
- data/lib/openc3/packets/packet_config.rb +30 -7
- data/lib/openc3/packets/parsers/limits_response_parser.rb +1 -3
- data/lib/openc3/packets/parsers/processor_parser.rb +1 -2
- data/lib/openc3/packets/parsers/xtce_parser.rb +68 -3
- data/lib/openc3/packets/structure.rb +39 -14
- data/lib/openc3/packets/structure_item.rb +15 -1
- data/lib/openc3/script/storage.rb +19 -1
- data/lib/openc3/utilities/local_mode.rb +521 -0
- data/lib/openc3/utilities/simulated_target.rb +3 -2
- data/lib/openc3/utilities/target_file.rb +146 -0
- data/lib/openc3/version.rb +5 -5
- data/lib/openc3.rb +1 -0
- metadata +45 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e37b2aa61abbfe13cc757b9b154bcb2147c1743cbade962b0d6cbea83ae9eed3
|
4
|
+
data.tar.gz: 123104220cc22dc2d48a492a0986228bd01789e15b7e52e6fea9a880b31fc89b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa546888f0e71f7cd4aca771d41012e3ce34cd5c5c5a801d0d0344b199073bbeb6e8b9622243d4d2a82cf67ddcfb6a869f189964a493106915ebefd32e3daa1c
|
7
|
+
data.tar.gz: 5632e8f84d341f00af0d49bbc048102cd66a53b50f5760d98783557ec462443705a0541f4a53eac59b2d5ee1db9c3e1e1a3ce9d6bc96fc0fcec829f05fc5567b
|
data/bin/openc3cli
CHANGED
@@ -21,9 +21,11 @@
|
|
21
21
|
# This file will handle OpenC3 tasks such as instantiating a new project
|
22
22
|
|
23
23
|
require 'openc3'
|
24
|
+
require 'openc3/utilities/local_mode'
|
24
25
|
require 'openc3/utilities/s3'
|
25
26
|
require 'openc3/models/scope_model'
|
26
27
|
require 'openc3/models/plugin_model'
|
28
|
+
require 'openc3/models/gem_model'
|
27
29
|
require 'openc3/packets/packet_config'
|
28
30
|
require 'openc3/bridge/bridge'
|
29
31
|
require 'ostruct'
|
@@ -35,6 +37,7 @@ require 'json'
|
|
35
37
|
require 'redis'
|
36
38
|
require 'psych'
|
37
39
|
require 'erb'
|
40
|
+
require 'pp'
|
38
41
|
|
39
42
|
$redis_url = "redis://#{ENV['OPENC3_REDIS_HOSTNAME']}:#{ENV['OPENC3_REDIS_PORT']}"
|
40
43
|
|
@@ -313,18 +316,30 @@ ensure
|
|
313
316
|
exit(result)
|
314
317
|
end
|
315
318
|
|
316
|
-
def update_plugin(plugin_file_path, plugin_name, variables: nil, plugin_txt_lines: nil, scope:)
|
319
|
+
def update_plugin(plugin_file_path, plugin_name, variables: nil, plugin_txt_lines: nil, scope:, existing_plugin_name:)
|
317
320
|
new_gem = File.basename(plugin_file_path)
|
318
|
-
old_gem =
|
319
|
-
puts "Updating existing plugin: #{
|
320
|
-
plugin_model = OpenC3::PluginModel.get_model(name:
|
321
|
+
old_gem = existing_plugin_name.split("__")[0]
|
322
|
+
puts "Updating existing plugin: #{existing_plugin_name} with #{File.basename(plugin_file_path)}"
|
323
|
+
plugin_model = OpenC3::PluginModel.get_model(name: existing_plugin_name, scope: scope)
|
321
324
|
begin
|
322
325
|
# Only update if something has changed
|
323
|
-
if (new_gem != old_gem) or (variables != plugin_model.variables) or (plugin_txt_lines != plugin_model.plugin_txt_lines)
|
326
|
+
if (new_gem != old_gem) or (variables and variables != plugin_model.variables) or (plugin_txt_lines and plugin_txt_lines != plugin_model.plugin_txt_lines)
|
327
|
+
puts "Gem version change detected - New: #{new_gem}, Old: #{old_gem}" if new_gem != old_gem
|
328
|
+
if variables and variables != plugin_model.variables
|
329
|
+
pp_variables = ""
|
330
|
+
PP.pp(variables, pp_variables)
|
331
|
+
pp_plugin_model_variables = ""
|
332
|
+
PP.pp(plugin_model.variables, pp_plugin_model_variables)
|
333
|
+
puts "Variables change detected\nNew:\n#{pp_variables}\nOld:\n#{pp_plugin_model_variables}"
|
334
|
+
end
|
335
|
+
puts "plugin.txt change detected\nNew:\n#{plugin_txt_lines.join("\n")}\n\nOld:\n#{plugin_model.plugin_txt_lines.join("\n")}\n" if plugin_txt_lines and plugin_txt_lines != plugin_model.plugin_txt_lines
|
324
336
|
variables = plugin_model.variables unless variables
|
325
337
|
plugin_model.destroy
|
338
|
+
|
326
339
|
plugin_hash = OpenC3::PluginModel.install_phase1(plugin_file_path, existing_variables: variables, existing_plugin_txt_lines: plugin_txt_lines, process_existing: true, scope: scope)
|
327
|
-
|
340
|
+
puts "Updating plugin: #{plugin_file_path}\n#{plugin_hash}"
|
341
|
+
plugin_hash = OpenC3::PluginModel.install_phase2(plugin_hash, scope: scope)
|
342
|
+
OpenC3::LocalMode.update_local_plugin(plugin_file_path, plugin_hash, old_plugin_name: plugin_name, scope: scope)
|
328
343
|
else
|
329
344
|
puts "No changes detected - Exiting without change"
|
330
345
|
end
|
@@ -354,6 +369,7 @@ def load_plugin(plugin_file_path, scope:, plugin_hash_file: nil)
|
|
354
369
|
# Only create the scope if it doesn't already exist
|
355
370
|
unless OpenC3::ScopeModel.names.include?(scope)
|
356
371
|
begin
|
372
|
+
puts "Creating scope: #{scope}"
|
357
373
|
scope_model = OpenC3::ScopeModel.new(name: scope, scope: scope)
|
358
374
|
scope_model.create
|
359
375
|
scope_model.deploy(".", {})
|
@@ -381,7 +397,9 @@ def load_plugin(plugin_file_path, scope:, plugin_hash_file: nil)
|
|
381
397
|
found = true
|
382
398
|
# Upgrade if version changed else do nothing
|
383
399
|
if file_full_name != full_name
|
384
|
-
update_plugin(plugin_file_path, plugin_name, scope: scope)
|
400
|
+
update_plugin(plugin_file_path, plugin_name, scope: scope, existing_plugin_name: plugin_name)
|
401
|
+
else
|
402
|
+
puts "No version change detected for: #{plugin_name}"
|
385
403
|
end
|
386
404
|
end
|
387
405
|
end
|
@@ -394,16 +412,24 @@ def load_plugin(plugin_file_path, scope:, plugin_hash_file: nil)
|
|
394
412
|
existing_plugin_hash = OpenC3::PluginModel.get(name: plugin_hash['name'], scope: scope)
|
395
413
|
|
396
414
|
# Existing plugin hash will be present if plugin is being edited or upgraded
|
397
|
-
#
|
398
|
-
#
|
415
|
+
# However, a missing existing could also be that a plugin was updated in local mode directly from across installations
|
416
|
+
# changing the plugin name without really meaning to create a new instance of the plugin
|
417
|
+
# ie.
|
418
|
+
# User on machine 1 checks in a changed plugin_instance.json with a different name - There is still only one plugin desired and committed
|
419
|
+
# User on machine 2 starts up with the new configuration, OpenC3::PluginModel.get will return nil because the exact name is different
|
420
|
+
# In this case, the plugin should be updated without installing a second instance. analyze_local_mode figures this out.
|
421
|
+
unless existing_plugin_hash
|
422
|
+
existing_plugin_hash = OpenC3::LocalMode.analyze_local_mode(plugin_name: plugin_hash['name'], scope: scope)
|
423
|
+
end
|
399
424
|
|
400
425
|
if existing_plugin_hash
|
401
426
|
# Upgrade or Edit
|
402
|
-
update_plugin(plugin_file_path, plugin_hash['name'], variables: plugin_hash['variables'], plugin_txt_lines: plugin_hash['plugin_txt_lines'], scope: scope)
|
427
|
+
update_plugin(plugin_file_path, plugin_hash['name'], variables: plugin_hash['variables'], plugin_txt_lines: plugin_hash['plugin_txt_lines'], scope: scope, existing_plugin_name: existing_plugin_hash['name'])
|
403
428
|
else
|
404
429
|
# New Install
|
405
430
|
puts "Loading new plugin: #{plugin_file_path}\n#{plugin_hash}"
|
406
|
-
OpenC3::PluginModel.install_phase2(plugin_hash, scope: scope)
|
431
|
+
plugin_hash = OpenC3::PluginModel.install_phase2(plugin_hash, scope: scope)
|
432
|
+
OpenC3::LocalMode.update_local_plugin(plugin_file_path, plugin_hash, scope: scope)
|
407
433
|
end
|
408
434
|
rescue => err
|
409
435
|
abort("Error installing plugin: #{scope}: #{plugin_file_path}: #{err.formatted}")
|
@@ -414,6 +440,7 @@ def unload_plugin(plugin_name, scope:)
|
|
414
440
|
scope ||= 'DEFAULT'
|
415
441
|
begin
|
416
442
|
OpenC3::PluginModel.new(name: plugin_name, scope: scope).destroy
|
443
|
+
OpenC3::LocalMode.remove_local_plugin(plugin_name, scope: scope)
|
417
444
|
OpenC3::Logger.info("PluginModel destroyed: #{plugin_name}", scope: scope)
|
418
445
|
rescue => err
|
419
446
|
abort("Error uninstalling plugin: #{scope}: #{plugin_name}: #{err.formatted}")
|
@@ -450,113 +477,119 @@ def get_redis_keys
|
|
450
477
|
puts "Packets Defs: #{keys.select { |item| item[/^tlm__/] }}"
|
451
478
|
end
|
452
479
|
|
453
|
-
if
|
480
|
+
if __FILE__ == $0
|
481
|
+
if not ARGV[0].nil? # argument(s) given
|
454
482
|
|
455
|
-
|
456
|
-
|
483
|
+
# Handle each task
|
484
|
+
case ARGV[0].downcase
|
457
485
|
|
458
|
-
|
459
|
-
|
486
|
+
when 'rake'
|
487
|
+
puts `rake #{ARGV[1..-1].join(' ')}`
|
460
488
|
|
461
|
-
|
462
|
-
|
489
|
+
when 'validate'
|
490
|
+
validate_plugin(ARGV[1], scope: ARGV[2], variables_file: ARGV[3])
|
463
491
|
|
464
|
-
|
465
|
-
|
492
|
+
when 'load'
|
493
|
+
load_plugin(ARGV[1], scope: ARGV[2], plugin_hash_file: ARGV[3])
|
466
494
|
|
467
|
-
|
468
|
-
|
495
|
+
when 'unload'
|
496
|
+
unload_plugin(ARGV[1], scope: ARGV[2])
|
469
497
|
|
470
|
-
|
471
|
-
|
498
|
+
when 'geminstall'
|
499
|
+
gem_install(ARGV[1])
|
472
500
|
|
473
|
-
|
474
|
-
|
501
|
+
when 'generate'
|
502
|
+
generate(ARGV[1..-1])
|
475
503
|
|
476
|
-
|
477
|
-
|
504
|
+
when 'migrate'
|
505
|
+
migrate(ARGV[1..-1])
|
478
506
|
|
479
|
-
|
480
|
-
|
507
|
+
when 'rubysloc'
|
508
|
+
puts `ruby /openc3/bin/rubysloc #{ARGV[1..-1].join(' ')}`
|
481
509
|
|
482
|
-
|
483
|
-
|
510
|
+
when 'cstol_converter'
|
511
|
+
puts `ruby /openc3/bin/cstol_converter #{ARGV[1..-1].join(' ')}`
|
484
512
|
|
485
|
-
|
486
|
-
|
513
|
+
when 'xtce_converter'
|
514
|
+
xtce_converter(ARGV[1..-1])
|
487
515
|
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
516
|
+
when 'bridge'
|
517
|
+
ENV['OPENC3_NO_STORE'] = '1'
|
518
|
+
filename = ARGV[1]
|
519
|
+
filename = 'bridge.txt' unless filename
|
520
|
+
bridge = OpenC3::Bridge.new(filename)
|
521
|
+
begin
|
522
|
+
while true
|
523
|
+
sleep(1)
|
524
|
+
end
|
525
|
+
rescue Interrupt
|
526
|
+
exit(0)
|
496
527
|
end
|
497
|
-
rescue Interrupt
|
498
|
-
exit(0)
|
499
|
-
end
|
500
528
|
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
when 'help'
|
510
|
-
print_usage()
|
529
|
+
when 'bridgesetup'
|
530
|
+
ENV['OPENC3_NO_STORE'] = '1'
|
531
|
+
filename = ARGV[1]
|
532
|
+
filename = 'bridge.txt' unless filename
|
533
|
+
unless File.exist?(filename)
|
534
|
+
OpenC3::BridgeConfig.generate_default(filename)
|
535
|
+
end
|
511
536
|
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
537
|
+
when 'help'
|
538
|
+
print_usage()
|
539
|
+
|
540
|
+
when 'redis'
|
541
|
+
case (ARGV[1])
|
542
|
+
when 'keys'
|
543
|
+
get_redis_keys()
|
544
|
+
when 'hget'
|
545
|
+
redis = Redis.new(url: $redis_url, username: ENV['OPENC3_REDIS_USERNAME'], password: ENV['OPENC3_REDIS_PASSWORD'])
|
546
|
+
puts JSON.parse(redis.hget(ARGV[2], ARGV[3]), :allow_nan => true, :create_additions => true)
|
547
|
+
else
|
548
|
+
puts "Unknown redis task: #{ARGV[1]}\n"
|
549
|
+
puts "Valid redis tasks: keys, hget"
|
550
|
+
end
|
523
551
|
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
552
|
+
when 'removebase'
|
553
|
+
# Used to remove tool base to better support enterprise upgrade
|
554
|
+
scopes = OpenC3::ScopeModel.all
|
555
|
+
scopes.each do |scope_name, scope|
|
556
|
+
plugins = OpenC3::PluginModel.all(scope: scope_name)
|
557
|
+
plugins.each do |plugin_name, plugin|
|
558
|
+
if plugin["name"] =~ /tool-base/ and plugin["name"] !~ /enterprise/
|
559
|
+
unload_plugin(plugin_name, scope: scope_name)
|
560
|
+
end
|
561
|
+
if plugin["name"] =~ /tool-admin/ and plugin["name"] !~ /enterprise/
|
562
|
+
unload_plugin(plugin_name, scope: scope_name)
|
563
|
+
end
|
535
564
|
end
|
536
565
|
end
|
537
|
-
end
|
538
566
|
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
567
|
+
when 'removeenterprise'
|
568
|
+
# Used to remove enterprise plugins to better support downgrade
|
569
|
+
scopes = OpenC3::ScopeModel.all
|
570
|
+
scopes.each do |scope_name, scope|
|
571
|
+
plugins = OpenC3::PluginModel.all(scope: scope_name)
|
572
|
+
plugins.each do |plugin_name, plugin|
|
573
|
+
if plugin["name"] =~ /enterprise/
|
574
|
+
unload_plugin(plugin_name, scope: scope_name)
|
575
|
+
end
|
547
576
|
end
|
548
577
|
end
|
549
|
-
end
|
550
578
|
|
551
|
-
|
552
|
-
|
553
|
-
|
579
|
+
when 'destroyscope'
|
580
|
+
scope = OpenC3::ScopeModel.get_model(name: ARGV[1])
|
581
|
+
scope.destroy
|
582
|
+
|
583
|
+
when 'localinit'
|
584
|
+
OpenC3::LocalMode.local_init()
|
554
585
|
|
555
|
-
|
586
|
+
else # Unknown task
|
587
|
+
print_usage()
|
588
|
+
abort("Unknown task: #{ARGV[0]}")
|
589
|
+
end
|
590
|
+
|
591
|
+
else # No arguments given
|
556
592
|
print_usage()
|
557
|
-
abort("Unknown task: #{ARGV[0]}")
|
558
593
|
end
|
559
594
|
|
560
|
-
|
561
|
-
print_usage()
|
562
|
-
end
|
595
|
+
end
|
data/data/config/_id_items.yaml
CHANGED
@@ -20,5 +20,6 @@
|
|
20
20
|
values: "['\"].*['\"]"
|
21
21
|
- name: Endianness
|
22
22
|
required: false
|
23
|
-
description: Indicates if the item is to be interpreted in Big Endian or Little Endian format
|
23
|
+
description: Indicates if the item is to be interpreted in Big Endian or Little Endian format.
|
24
|
+
See guide on <a href="https://openc3.com/docs/v5/little-endian-bitfields">Little Endian Bitfields</a>.
|
24
25
|
values: <%= %w(BIG_ENDIAN LITTLE_ENDIAN) %>
|
data/data/config/_id_params.yaml
CHANGED
@@ -31,7 +31,8 @@
|
|
31
31
|
values: "['\"].*['\"]"
|
32
32
|
- name: Endianness
|
33
33
|
required: false
|
34
|
-
description: Indicates if the data in this command is to be sent in Big Endian or Little Endian format
|
34
|
+
description: Indicates if the data in this command is to be sent in Big Endian or Little Endian format.
|
35
|
+
See guide on <a href="https://openc3.com/docs/v5/little-endian-bitfields">Little Endian Bitfields</a>.
|
35
36
|
values: <%= %w(BIG_ENDIAN LITTLE_ENDIAN) %>
|
36
37
|
UINT:
|
37
38
|
parameters: *params
|
data/data/config/_items.yaml
CHANGED
@@ -16,5 +16,6 @@
|
|
16
16
|
values: "['\"].*['\"]"
|
17
17
|
- name: Endianness
|
18
18
|
required: false
|
19
|
-
description: Indicates if the item is to be interpreted in Big Endian or Little Endian format
|
19
|
+
description: Indicates if the item is to be interpreted in Big Endian or Little Endian format.
|
20
|
+
See guide on <a href="https://openc3.com/docs/v5/little-endian-bitfields">Little Endian Bitfields</a>.
|
20
21
|
values: <%= %w(BIG_ENDIAN LITTLE_ENDIAN) %>
|
data/data/config/_params.yaml
CHANGED
@@ -32,7 +32,8 @@
|
|
32
32
|
values: '[''"].*[''"]'
|
33
33
|
- name: Endianness
|
34
34
|
required: false
|
35
|
-
description: Indicates if the data in this command is to be sent in Big Endian or Little Endian format
|
35
|
+
description: Indicates if the data in this command is to be sent in Big Endian or Little Endian format.
|
36
|
+
See guide on <a href="https://openc3.com/docs/v5/little-endian-bitfields">Little Endian Bitfields</a>.
|
36
37
|
values: <%= %w(BIG_ENDIAN LITTLE_ENDIAN) %>
|
37
38
|
UINT:
|
38
39
|
parameters: *params
|
@@ -158,3 +158,33 @@ HAZARDOUS:
|
|
158
158
|
required: false
|
159
159
|
description: Description for why the command is hazardous which must be enclosed with quotes
|
160
160
|
values: "['\"].*['\"]"
|
161
|
+
ACCESSOR:
|
162
|
+
summary: Defines the class used to read and write raw values from the packet
|
163
|
+
description: Defines the class that is used too read raw values from the packet. Defaults to BinaryAccessor.
|
164
|
+
Provided accessors also include JsonAccessor, CborAccessor, HtmlAccessor, and XmlAccessor.
|
165
|
+
parameters:
|
166
|
+
- name: Accessor Class Name
|
167
|
+
required: true
|
168
|
+
description: The name of the accessor class
|
169
|
+
values: .+
|
170
|
+
since: 5.0.10
|
171
|
+
TEMPLATE:
|
172
|
+
summary: Defines a template string used to initialize the command before default values are filled in
|
173
|
+
description: Generally the template string is formatted in JSON or HTML and then values are filled in with
|
174
|
+
command parameters. Must be UTF-8 encoded.
|
175
|
+
parameters:
|
176
|
+
- name: Template
|
177
|
+
required: true
|
178
|
+
description: The template string which should be enclosed in quotes
|
179
|
+
values: "['\"].*['\"]"
|
180
|
+
since: 5.0.10
|
181
|
+
TEMPLATE_FILE:
|
182
|
+
summary: Defines a template file used to initialize the command before default values are filled in
|
183
|
+
description: Generally the template file is formatted in JSON or HTML and then values are filled in with
|
184
|
+
command parameters. Can be binary or UTF-8.
|
185
|
+
parameters:
|
186
|
+
- name: Template File Path
|
187
|
+
required: true
|
188
|
+
description: The relative path to the template file. Filename should generally start with an underscore.
|
189
|
+
values: .+
|
190
|
+
since: 5.0.10
|
@@ -219,3 +219,13 @@ LIMITS_RESPONSE:
|
|
219
219
|
description: Variable length number of options that will be passed to the
|
220
220
|
class constructor
|
221
221
|
values: .+
|
222
|
+
KEY:
|
223
|
+
summary: Defines the key used to access this raw value in the packet.
|
224
|
+
description: Keys are often JsonPath or XPath strings
|
225
|
+
example: KEY $.book.title
|
226
|
+
parameters:
|
227
|
+
- name: Key string
|
228
|
+
required: true
|
229
|
+
description: The key to access this item
|
230
|
+
values: .+
|
231
|
+
since: 5.0.10
|
@@ -32,6 +32,18 @@ MICROSERVICE:
|
|
32
32
|
required: true
|
33
33
|
description: Working directory to run the microservice CMD in. Can be a path relative to the microservice folder in the plugin, or an absolute path in the container the microservice runs in.
|
34
34
|
values: .+
|
35
|
+
PORT:
|
36
|
+
summary: Open port for the microservice
|
37
|
+
description: Kubernetes needs a Service to be applied to open a port so this is required for Kubernetes support
|
38
|
+
parameters:
|
39
|
+
- name: Number
|
40
|
+
required: true
|
41
|
+
description: Port number
|
42
|
+
values: \d+
|
43
|
+
- name: Protocol
|
44
|
+
required: false
|
45
|
+
description: Port protocol. Default is TCP.
|
46
|
+
values: .+
|
35
47
|
TOPIC:
|
36
48
|
summary: Associate a Redis topic
|
37
49
|
description: Redis topic to associate with this microservice. Standard OpenC3 microservices such as decom_microservice use this information to know what packet streams to subscribe to. The TOPIC keyword can be used as many times as necessary to associate all needed topics.
|
@@ -50,3 +50,13 @@ OVERLAP:
|
|
50
50
|
If an item's bit offset overlaps another item, OpenC3 issues a warning. This keyword explicitly
|
51
51
|
allows an item to overlap another and supresses the warning message.
|
52
52
|
since: 4.4.1
|
53
|
+
KEY:
|
54
|
+
summary: Defines the key used to access this raw value in the packet.
|
55
|
+
description: Keys are often JsonPath or XPath strings
|
56
|
+
example: KEY $.book.title
|
57
|
+
parameters:
|
58
|
+
- name: Key string
|
59
|
+
required: true
|
60
|
+
description: The key to access this item
|
61
|
+
values: .+
|
62
|
+
since: 5.0.10
|
data/data/config/plugins.yaml
CHANGED
@@ -38,15 +38,6 @@ INTERFACE:
|
|
38
38
|
documentation for more details.
|
39
39
|
ROUTER:
|
40
40
|
modifiers:
|
41
|
-
ROUTE:
|
42
|
-
summary: Map an interface to a router
|
43
|
-
description: Once an interface has been mapped to a router, all its received telemetry
|
44
|
-
will be sent out through the router.
|
45
|
-
parameters:
|
46
|
-
- name: Interface
|
47
|
-
required: true
|
48
|
-
description: Name of the interface
|
49
|
-
values: .+
|
50
41
|
<%= MetaConfigParser.load('interface_modifiers.yaml').to_meta_config_yaml(4) %>
|
51
42
|
summary: Create router to receive commands and output telemetry packets from one or more interfaces
|
52
43
|
description: Creates an router which receives command packets from
|
@@ -157,3 +157,13 @@ HIDDEN:
|
|
157
157
|
It also hides this telemetry from appearing in the Script Runner popup helper
|
158
158
|
when writing scripts. The telemetry still exists in the system and can received
|
159
159
|
and checked by scripts.
|
160
|
+
ACCESSOR:
|
161
|
+
summary: Defines the class used to read and write raw values from the packet
|
162
|
+
description: Defines the class that is used too read raw values from the packet. Defaults to BinaryAccessor.
|
163
|
+
Provided accessors also include JsonAccessor, CborAccessor, HtmlAccessor, and XmlAccessor.
|
164
|
+
parameters:
|
165
|
+
- name: Accessor Class Name
|
166
|
+
required: true
|
167
|
+
description: The name of the accessor class
|
168
|
+
values: .+
|
169
|
+
since: 5.0.10
|