openc3 7.5.1 → 7.6.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.
- checksums.yaml +4 -4
- data/Gemfile +0 -0
- data/bin/openc3cli +82 -5
- data/data/config/_params.yaml +3 -0
- data/data/config/command_modifiers.yaml +5 -3
- data/data/config/default_plugins.yaml +1 -0
- data/data/config/interface_modifiers.yaml +17 -1
- data/data/config/item_modifiers.yaml +24 -1
- data/data/config/microservice.yaml +15 -1
- data/data/config/parameter_modifiers.yaml +4 -4
- data/data/config/plugins.yaml +511 -3
- data/data/config/settings.yaml +17 -0
- data/data/config/target.yaml +53 -0
- data/data/config/telemetry.yaml +58 -2
- data/data/config/widgets.yaml +30 -0
- data/lib/openc3/accessors/accessor.rb +14 -2
- data/lib/openc3/accessors/binary_accessor.rb +25 -5
- data/lib/openc3/api/CLAUDE.md +1 -0
- data/lib/openc3/api/api.rb +1 -0
- data/lib/openc3/api/cmd_api.rb +9 -1
- data/lib/openc3/api/interface_api.rb +7 -2
- data/lib/openc3/api/limits_api.rb +93 -41
- data/lib/openc3/api/router_api.rb +7 -2
- data/lib/openc3/api/settings_api.rb +4 -1
- data/lib/openc3/api/shared_resource_api.rb +107 -0
- data/lib/openc3/api/tlm_api.rb +10 -0
- data/lib/openc3/interfaces/http_client_interface.rb +84 -27
- data/lib/openc3/interfaces/protocols/preidentified_protocol.rb +6 -2
- data/lib/openc3/interfaces/tcpip_server_interface.rb +205 -125
- data/lib/openc3/io/json_api.rb +2 -10
- data/lib/openc3/io/json_api_object.rb +2 -10
- data/lib/openc3/logs/packet_log_writer.rb +8 -3
- data/lib/openc3/microservices/decom_common.rb +4 -1
- data/lib/openc3/microservices/decom_microservice.rb +52 -6
- data/lib/openc3/microservices/interface_decom_common.rb +13 -0
- data/lib/openc3/microservices/interface_microservice.rb +50 -11
- data/lib/openc3/microservices/limits_group_microservice.rb +513 -0
- data/lib/openc3/microservices/log_microservice.rb +22 -8
- data/lib/openc3/microservices/microservice.rb +8 -2
- data/lib/openc3/microservices/multi_microservice.rb +76 -22
- data/lib/openc3/microservices/queue_microservice.rb +29 -24
- data/lib/openc3/migrations/20260704000000_default_bridge.rb +1 -2
- data/lib/openc3/migrations/20261103000001_limits_group_backfill.rb +193 -0
- data/lib/openc3/models/bridge_model.rb +3 -3
- data/lib/openc3/models/cvt_model.rb +3 -1
- data/lib/openc3/models/host_interface_microservice_model.rb +4 -4
- data/lib/openc3/models/interface_model.rb +27 -7
- data/lib/openc3/models/microservice_group.rb +167 -0
- data/lib/openc3/models/microservice_model.rb +88 -2
- data/lib/openc3/models/panel_model.rb +109 -0
- data/lib/openc3/models/plugin_model.rb +1006 -26
- data/lib/openc3/models/plugin_store_model.rb +6 -1
- data/lib/openc3/models/protected_storage_model.rb +64 -0
- data/lib/openc3/models/queue_model.rb +19 -10
- data/lib/openc3/models/scope_model.rb +80 -3
- data/lib/openc3/models/setting_model.rb +2 -2
- data/lib/openc3/models/shared_resource_model.rb +381 -0
- data/lib/openc3/models/target_model.rb +324 -68
- data/lib/openc3/operators/microservice_operator.rb +76 -9
- data/lib/openc3/operators/operator.rb +29 -0
- data/lib/openc3/packets/commands.rb +16 -16
- data/lib/openc3/packets/limits.rb +2 -0
- data/lib/openc3/packets/packet.rb +75 -4
- data/lib/openc3/packets/packet_config.rb +152 -13
- data/lib/openc3/packets/packet_item.rb +35 -14
- data/lib/openc3/packets/packet_item_limits.rb +67 -6
- data/lib/openc3/packets/parsers/limits_parser.rb +69 -2
- data/lib/openc3/packets/parsers/packet_item_parser.rb +6 -0
- data/lib/openc3/packets/parsers/packet_parser.rb +45 -0
- data/lib/openc3/packets/parsers/state_parser.rb +1 -1
- data/lib/openc3/script/CLAUDE.md +1 -0
- data/lib/openc3/script/api_shared.rb +17 -9
- data/lib/openc3/script/calendar.rb +18 -6
- data/lib/openc3/script/commands.rb +11 -9
- data/lib/openc3/script/critical_cmd.rb +22 -2
- data/lib/openc3/script/metadata.rb +30 -4
- data/lib/openc3/script/plugins.rb +8 -0
- data/lib/openc3/script/script.rb +8 -24
- data/lib/openc3/script/web_socket_api.rb +23 -17
- data/lib/openc3/system/system.rb +9 -3
- data/lib/openc3/top_level.rb +17 -0
- data/lib/openc3/topics/command_topic.rb +7 -1
- data/lib/openc3/topics/decom_interface_topic.rb +9 -3
- data/lib/openc3/topics/discovery_topic.rb +84 -0
- data/lib/openc3/topics/limits_event_topic.rb +236 -17
- data/lib/openc3/topics/telemetry_decom_topic.rb +12 -3
- data/lib/openc3/topics/topic.rb +2 -1
- data/lib/openc3/utilities/authentication.rb +67 -16
- data/lib/openc3/utilities/cli_generator.rb +117 -25
- data/lib/openc3/utilities/client_ip_header_filter.rb +38 -0
- data/lib/openc3/utilities/config_overlay.rb +24 -1
- data/lib/openc3/utilities/cosmos_rails_formatter.rb +18 -10
- data/lib/openc3/utilities/hardware_discovery.rb +279 -0
- data/lib/openc3/utilities/limits_rollup.rb +81 -0
- data/lib/openc3/utilities/local_mode.rb +48 -5
- data/lib/openc3/utilities/questdb_client.rb +130 -22
- data/lib/openc3/utilities/reingest_job.rb +12 -3
- data/lib/openc3/utilities/running_script.rb +206 -49
- data/lib/openc3/utilities/script.rb +24 -12
- data/lib/openc3/utilities/script_env.rb +164 -0
- data/lib/openc3/utilities/script_message_signing.rb +133 -0
- data/lib/openc3/utilities/store_autoload.rb +32 -1
- data/lib/openc3/utilities/store_queued.rb +5 -1
- data/lib/openc3/version.rb +6 -6
- data/templates/command_validator/command_validator.py +9 -9
- data/templates/{tool_react/pnpm-workspace.yaml → panel/.prettierrc.cjs} +7 -5
- data/templates/panel/Rakefile +24 -0
- data/templates/panel/package.json +17 -0
- data/templates/{tool_angular → panel}/pnpm-workspace.yaml +5 -0
- data/templates/panel/src/Panel.js +52 -0
- data/templates/panel/src/Panel.vue +60 -0
- data/templates/panel/src/panelSdk.js +24 -0
- data/templates/panel/vite-Panel.config.js +43 -0
- data/templates/tool_vue/package.json +3 -3
- data/templates/widget/package.json +2 -2
- metadata +24 -56
- data/templates/tool_angular/.editorconfig +0 -16
- data/templates/tool_angular/.gitignore +0 -44
- data/templates/tool_angular/.vscode/extensions.json +0 -4
- data/templates/tool_angular/.vscode/launch.json +0 -20
- data/templates/tool_angular/.vscode/tasks.json +0 -42
- data/templates/tool_angular/angular.json +0 -111
- data/templates/tool_angular/extra-webpack.config.js +0 -8
- data/templates/tool_angular/package.json +0 -48
- data/templates/tool_angular/src/app/app-routing.module.ts +0 -15
- data/templates/tool_angular/src/app/app.component.html +0 -22
- data/templates/tool_angular/src/app/app.component.scss +0 -18
- data/templates/tool_angular/src/app/app.component.spec.ts +0 -29
- data/templates/tool_angular/src/app/app.component.ts +0 -52
- data/templates/tool_angular/src/app/app.module.ts +0 -30
- data/templates/tool_angular/src/app/custom-overlay-container.ts +0 -17
- data/templates/tool_angular/src/app/empty-route/empty-route.component.ts +0 -7
- data/templates/tool_angular/src/app/openc3-api.d.ts +0 -1
- data/templates/tool_angular/src/assets/.gitkeep +0 -0
- data/templates/tool_angular/src/environments/environment.prod.ts +0 -3
- data/templates/tool_angular/src/environments/environment.ts +0 -16
- data/templates/tool_angular/src/favicon.ico +0 -0
- data/templates/tool_angular/src/index.html +0 -13
- data/templates/tool_angular/src/main.single-spa.ts +0 -40
- data/templates/tool_angular/src/single-spa/asset-url.ts +0 -12
- data/templates/tool_angular/src/single-spa/single-spa-props.ts +0 -8
- data/templates/tool_angular/src/styles.scss +0 -1
- data/templates/tool_angular/tsconfig.app.json +0 -13
- data/templates/tool_angular/tsconfig.json +0 -33
- data/templates/tool_angular/tsconfig.spec.json +0 -14
- data/templates/tool_react/.eslintrc +0 -7
- data/templates/tool_react/.gitignore +0 -71
- data/templates/tool_react/.prettierignore +0 -8
- data/templates/tool_react/babel.config.json +0 -29
- data/templates/tool_react/jest.config.js +0 -12
- data/templates/tool_react/package.json +0 -51
- data/templates/tool_react/src/openc3-tool_name.js +0 -24
- data/templates/tool_react/src/root.component.js +0 -88
- data/templates/tool_react/src/root.component.test.js +0 -9
- data/templates/tool_react/webpack.config.js +0 -27
- data/templates/tool_svelte/.gitignore +0 -71
- data/templates/tool_svelte/.prettierignore +0 -8
- data/templates/tool_svelte/.prettierrc.js +0 -5
- data/templates/tool_svelte/babel.config.js +0 -12
- data/templates/tool_svelte/build/smui.css +0 -1
- data/templates/tool_svelte/jest.config.js +0 -9
- data/templates/tool_svelte/package.json +0 -49
- data/templates/tool_svelte/pnpm-workspace.yaml +0 -20
- data/templates/tool_svelte/rollup.config.js +0 -74
- data/templates/tool_svelte/src/App.svelte +0 -42
- data/templates/tool_svelte/src/App.test.js +0 -9
- data/templates/tool_svelte/src/theme/_smui-theme.scss +0 -25
- data/templates/tool_svelte/src/tool_name.js +0 -17
- data/templates/widget/LICENSE.md +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b995ad566e1322b31713a2e69cd92fcfb3b199f860dc3774799983da87f989ee
|
|
4
|
+
data.tar.gz: 7542e5d0d4efd2ffaa66f0f7985b602f07db25d3a4339b4dc4d72d6c6ff6cc86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5aab7a477356ad45c1bb8d96ba7296b5740660e4cc098dcf641a8f6eb1432858da293e1c7f4f6f0783e3e85863a589435bf5acdab325edcc944f7e9140fc3e7f
|
|
7
|
+
data.tar.gz: aca4aca96f4f6ab8d7e9eda39ff77f3918974a819fa8cab2226667090f393996d9e6c8784bd8c42883bfff8a283f1a260cb81c845942d5ee5e310b32282d495d
|
data/Gemfile
CHANGED
|
File without changes
|
data/bin/openc3cli
CHANGED
|
@@ -65,6 +65,7 @@ def print_usage
|
|
|
65
65
|
puts " cli irb # Runs irb in the local directory"
|
|
66
66
|
puts " cli script # Interact with scripts. Run with --help for more info."
|
|
67
67
|
puts " cli validate /PATH/FILENAME.gem SCOPE variables.json # Validate a COSMOS plugin gem file"
|
|
68
|
+
puts " OPTIONS: --plugin-hash plugin_hash.json validates a plugin hash of an uploaded gem (used by Admin)"
|
|
68
69
|
puts " cli load /PATH/FILENAME.gem SCOPE plugin_hash.json # Loads a COSMOS plugin gem file"
|
|
69
70
|
puts " OPTIONS: --variables lets you pass a path to a JSON file containing your plugin's variables"
|
|
70
71
|
puts " cli list <SCOPE> # Lists installed plugins, SCOPE is DEFAULT if not given"
|
|
@@ -279,6 +280,52 @@ ensure
|
|
|
279
280
|
exit(result)
|
|
280
281
|
end
|
|
281
282
|
|
|
283
|
+
# Internal: run by PluginModel.modified_diff in a child process, like
|
|
284
|
+
# load_plugin is for installs. Writes {"files": [...]} or {"error": "message"}
|
|
285
|
+
# to result_file.
|
|
286
|
+
def plugin_modified_diff(scope, plugin_hash_file, result_file)
|
|
287
|
+
plugin_hash = JSON.parse(File.read(plugin_hash_file), allow_nan: true)
|
|
288
|
+
files = OpenC3::PluginModel.install_phase2(plugin_hash, scope: scope, diff_only: true)
|
|
289
|
+
File.write(result_file, JSON.generate({ 'files' => files }))
|
|
290
|
+
rescue Exception => e
|
|
291
|
+
File.write(result_file, JSON.generate({ 'error' => e.message })) rescue nil
|
|
292
|
+
puts e.formatted
|
|
293
|
+
exit(ERROR_CODE)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Validate a plugin hash from the plugin dialog (its variables and possibly
|
|
297
|
+
# edited plugin.txt lines) with a dry run install of its gem, which is fetched
|
|
298
|
+
# from the gem server. Prints the result as JSON on the last line for
|
|
299
|
+
# PluginModel.validate: {"valid":true} or {"valid":false,"error":"..."}
|
|
300
|
+
def validate_plugin_hash(plugin_hash_file, scope:)
|
|
301
|
+
ENV['OPENC3_NO_STORE'] = '1' # Don't publish the dry run's log messages
|
|
302
|
+
OpenC3::Logger.stdout = false
|
|
303
|
+
plugin_hash = JSON.parse(File.read(plugin_hash_file), allow_nan: true, create_additions: true)
|
|
304
|
+
OpenC3::PluginModel.install_phase2(plugin_hash, scope: scope || 'DEFAULT', validate_only: true)
|
|
305
|
+
result = { 'valid' => true }
|
|
306
|
+
rescue Exception => e # Anything the plugin's code raises is a validation error
|
|
307
|
+
result = { 'valid' => false, 'error' => OpenC3::PluginModel.validation_error(e) }
|
|
308
|
+
ensure
|
|
309
|
+
$stdout.puts JSON.generate(result || { 'valid' => false, 'error' => 'Validation failed' })
|
|
310
|
+
$stdout.flush
|
|
311
|
+
exit(result && result['valid'] ? 0 : ERROR_CODE)
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Render the plugin.txt of a plugin hash from the plugin dialog for its
|
|
315
|
+
# preview. Prints {"preview":{...}} on the last line for PluginModel.preview.
|
|
316
|
+
def preview_plugin_hash(plugin_hash_file, scope:)
|
|
317
|
+
ENV['OPENC3_NO_STORE'] = '1'
|
|
318
|
+
OpenC3::Logger.stdout = false
|
|
319
|
+
plugin_hash = JSON.parse(File.read(plugin_hash_file), allow_nan: true, create_additions: true)
|
|
320
|
+
result = OpenC3::PluginModel.render_preview(plugin_hash, scope: scope || 'DEFAULT')
|
|
321
|
+
rescue Exception => e
|
|
322
|
+
result = { 'error' => e.message }
|
|
323
|
+
ensure
|
|
324
|
+
$stdout.puts JSON.generate({ 'preview' => result || { 'error' => 'Preview failed' } })
|
|
325
|
+
$stdout.flush
|
|
326
|
+
exit(0)
|
|
327
|
+
end
|
|
328
|
+
|
|
282
329
|
def update_plugin(plugin_file_path, plugin_name, variables: nil, plugin_txt_lines: nil, scope:, existing_plugin_name:, force: false, username: nil, version_history_files: nil)
|
|
283
330
|
new_gem = File.basename(plugin_file_path)
|
|
284
331
|
old_gem = existing_plugin_name.split("__")[0]
|
|
@@ -501,6 +548,9 @@ def unload_plugin(plugin_name, scope:)
|
|
|
501
548
|
begin
|
|
502
549
|
plugin_model = OpenC3::PluginModel.get_model(name: plugin_name, scope: scope)
|
|
503
550
|
plugin_model.destroy
|
|
551
|
+
# Uninstall-only, like the Version History below: an upgrade keeps the
|
|
552
|
+
# files uploaded for VARIABLE_FILE
|
|
553
|
+
OpenC3::PluginModel.cleanup_uploads(plugin_model.variables, scope: scope)
|
|
504
554
|
OpenC3::LocalMode.remove_local_plugin(plugin_name, scope: scope)
|
|
505
555
|
# Remove the backing gem now that no PluginModel references it,
|
|
506
556
|
# so it disappears from the admin Packages tab.
|
|
@@ -1054,7 +1104,9 @@ if not ARGV[0].nil? # argument(s) given
|
|
|
1054
1104
|
|
|
1055
1105
|
when 'validate'
|
|
1056
1106
|
if ARGV[1].nil? || ARGV[1] == '--help' || ARGV[1] == '-h'
|
|
1057
|
-
puts "Usage:
|
|
1107
|
+
puts "Usage:"
|
|
1108
|
+
puts " cli validate PLUGIN.gem [SCOPE] [VARIABLES.json]"
|
|
1109
|
+
puts " cli validate --plugin-hash PLUGIN_HASH.json [SCOPE]"
|
|
1058
1110
|
puts ""
|
|
1059
1111
|
puts "Validate a COSMOS plugin gem file"
|
|
1060
1112
|
puts ""
|
|
@@ -1064,9 +1116,24 @@ if not ARGV[0].nil? # argument(s) given
|
|
|
1064
1116
|
puts " VARIABLES.json Variables JSON file (optional)"
|
|
1065
1117
|
puts ""
|
|
1066
1118
|
puts "Options:"
|
|
1119
|
+
puts " --plugin-hash PLUGIN_HASH.json"
|
|
1120
|
+
puts " Validate a plugin hash (name, variables and plugin_txt_lines)"
|
|
1121
|
+
puts " of a gem on the COSMOS gem server and print the result as JSON."
|
|
1122
|
+
puts " Used by the Admin plugin dialog."
|
|
1123
|
+
puts " --preview PLUGIN_HASH.json"
|
|
1124
|
+
puts " Render the plugin.txt of a plugin hash for the Admin plugin"
|
|
1125
|
+
puts " dialog preview and print the result as JSON."
|
|
1067
1126
|
puts " -h, --help Show this help message"
|
|
1068
1127
|
exit(ARGV[1].nil? ? 1 : 0)
|
|
1069
1128
|
end
|
|
1129
|
+
if ARGV[1] == '--preview'
|
|
1130
|
+
abort("Usage: cli validate --preview PLUGIN_HASH.json [SCOPE]") unless ARGV[2]
|
|
1131
|
+
preview_plugin_hash(ARGV[2], scope: ARGV[3])
|
|
1132
|
+
end
|
|
1133
|
+
if ARGV[1] == '--plugin-hash'
|
|
1134
|
+
abort("Usage: cli validate --plugin-hash PLUGIN_HASH.json [SCOPE]") unless ARGV[2]
|
|
1135
|
+
validate_plugin_hash(ARGV[2], scope: ARGV[3])
|
|
1136
|
+
end
|
|
1070
1137
|
validate_plugin(ARGV[1], scope: ARGV[2], variables_file: ARGV[3])
|
|
1071
1138
|
|
|
1072
1139
|
when 'load'
|
|
@@ -1275,14 +1342,14 @@ if not ARGV[0].nil? # argument(s) given
|
|
|
1275
1342
|
if ARGV[1].nil? || ARGV[1] == '--help' || ARGV[1] == '-h'
|
|
1276
1343
|
puts "Usage: cli bridgeenroll BRIDGE_NAME APP_PUBLIC_KEY [SCOPE]"
|
|
1277
1344
|
puts ""
|
|
1278
|
-
puts "Authorize an openc3-app control identity for a bridge (Iroh hub) and"
|
|
1279
|
-
puts "print that bridge's current connection ticket. Used by openc3-app to"
|
|
1345
|
+
puts "Authorize an openc3-cosmos-app control identity for a bridge (Iroh hub) and"
|
|
1346
|
+
puts "print that bridge's current connection ticket. Used by openc3-cosmos-app to"
|
|
1280
1347
|
puts "auto-enroll over the local Docker control plane: the bridge then only"
|
|
1281
1348
|
puts "accepts api/* control connections from the given app identity."
|
|
1282
1349
|
puts ""
|
|
1283
1350
|
puts "Arguments:"
|
|
1284
1351
|
puts " BRIDGE_NAME Name of the bridge (hub)"
|
|
1285
|
-
puts " APP_PUBLIC_KEY openc3-app's Iroh public key (EndpointId, hex)"
|
|
1352
|
+
puts " APP_PUBLIC_KEY openc3-cosmos-app's Iroh public key (EndpointId, hex)"
|
|
1286
1353
|
puts " SCOPE Scope (optional, default: OPENC3_SCOPE or DEFAULT)"
|
|
1287
1354
|
puts ""
|
|
1288
1355
|
puts "On success the bridge ticket is printed alone on stdout."
|
|
@@ -1304,7 +1371,7 @@ if not ARGV[0].nil? # argument(s) given
|
|
|
1304
1371
|
old_app_public_key = model.app_public_key
|
|
1305
1372
|
model.app_public_key = app_public_key
|
|
1306
1373
|
model.update
|
|
1307
|
-
# Print ONLY the ticket so openc3-app can capture it from stdout.
|
|
1374
|
+
# Print ONLY the ticket so openc3-cosmos-app can capture it from stdout.
|
|
1308
1375
|
puts model.ticket
|
|
1309
1376
|
|
|
1310
1377
|
when 'bridgegem'
|
|
@@ -1662,6 +1729,16 @@ if not ARGV[0].nil? # argument(s) given
|
|
|
1662
1729
|
when 'migratepassword'
|
|
1663
1730
|
migrate_password_hash()
|
|
1664
1731
|
|
|
1732
|
+
when 'modifieddiff'
|
|
1733
|
+
# Internal, used by PluginModel.modified_diff (not listed in print_usage)
|
|
1734
|
+
if ARGV[1].nil? || ARGV[3].nil? || ARGV[1] == '--help' || ARGV[1] == '-h'
|
|
1735
|
+
puts "Usage: cli modifieddiff SCOPE PLUGIN_HASH.json RESULT.json"
|
|
1736
|
+
puts ""
|
|
1737
|
+
puts "Internal: list modified target files that installing the plugin would supersede"
|
|
1738
|
+
exit(ARGV[1].nil? ? 1 : 0)
|
|
1739
|
+
end
|
|
1740
|
+
plugin_modified_diff(ARGV[1], ARGV[2], ARGV[3])
|
|
1741
|
+
|
|
1665
1742
|
when 'migratetouv'
|
|
1666
1743
|
if ARGV[1].nil? || ARGV[1] == '--help' || ARGV[1] == '-h'
|
|
1667
1744
|
puts "Usage: cli migratetouv PLUGIN_NAME [SCOPE]"
|
data/data/config/_params.yaml
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
description:
|
|
26
26
|
Default value for this parameter. You must provide a default
|
|
27
27
|
but if you mark the parameter REQUIRED then scripts will be forced to specify a value.
|
|
28
|
+
REQUIRED parameters can use nil, none, or null to have no default.
|
|
28
29
|
values: .*
|
|
29
30
|
- name: Description
|
|
30
31
|
required: false
|
|
@@ -49,6 +50,8 @@
|
|
|
49
50
|
description:
|
|
50
51
|
Default value for this parameter. You must provide a default
|
|
51
52
|
but if you mark the parameter REQUIRED then scripts will be forced to specify a value.
|
|
53
|
+
REQUIRED parameters can use nil, none, or null to have no default.
|
|
54
|
+
The default must fit in the Bit Size unless the parameter uses OVERFLOW TRUNCATE.
|
|
52
55
|
values: .*
|
|
53
56
|
- name: Description
|
|
54
57
|
required: false
|
|
@@ -407,6 +407,8 @@ VALIDATOR:
|
|
|
407
407
|
|
|
408
408
|
Defined in custom_validator.py:
|
|
409
409
|
|
|
410
|
+
from openc3.packets.command_validator import CommandValidator, CommandValidatorResult
|
|
411
|
+
|
|
410
412
|
class CustomValidator(CommandValidator):
|
|
411
413
|
# Both the pre_check and post_check are passed the command packet that was sent
|
|
412
414
|
# You can inspect the command in your checks as follows:
|
|
@@ -416,15 +418,15 @@ VALIDATOR:
|
|
|
416
418
|
# packet.read("ITEM", :RAW) => raw value
|
|
417
419
|
def pre_check(self, command):
|
|
418
420
|
if tlm("TGT PKT ITEM") == 0:
|
|
419
|
-
return
|
|
421
|
+
return CommandValidatorResult(False, "TGT PKT ITEM is 0")
|
|
420
422
|
self.cmd_acpt_cnt = tlm("INST HEALTH_STATUS CMD_ACPT_CNT")
|
|
421
423
|
# Return true to indicate Success, false to indicate Failure,
|
|
422
424
|
# and None to indicate Unknown. The second value is the optional message.
|
|
423
|
-
return
|
|
425
|
+
return CommandValidatorResult(True, None)
|
|
424
426
|
|
|
425
427
|
def post_check(self, command):
|
|
426
428
|
wait_check(f"INST HEALTH_STATUS CMD_ACPT_CNT > {self.cmd_acpt_cnt}", 10)
|
|
427
429
|
# Return true to indicate Success, false to indicate Failure,
|
|
428
430
|
# and None to indicate Unknown. The second value is the optional message.
|
|
429
|
-
return
|
|
431
|
+
return CommandValidatorResult(True, None)
|
|
430
432
|
since: 5.19.0
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
- openc3-cosmos-tool-cmdqueue # Enterprise only
|
|
22
22
|
- openc3-cosmos-tool-cmdhistory # Enterprise only
|
|
23
23
|
- openc3-cosmos-tool-cmdtlmserver
|
|
24
|
+
- openc3-cosmos-tool-dashboards
|
|
24
25
|
- openc3-cosmos-tool-dataextractor
|
|
25
26
|
- openc3-cosmos-tool-dataviewer
|
|
26
27
|
- openc3-cosmos-tool-docs
|
|
@@ -275,7 +275,7 @@ ROUTE_PREFIX:
|
|
|
275
275
|
parameters:
|
|
276
276
|
- name: Route Prefix
|
|
277
277
|
required: true
|
|
278
|
-
description: Route prefix. Must be unique across all scopes. Something like /myprefix
|
|
278
|
+
description: Route prefix. Must be unique across all scopes. Something like /myprefix. Made of one or more path segments containing only letters, numbers, underscore and dash. The first segment can't be openc3-api, script-api, tools, files, login, js, css, fonts, icons, img, assets, auth, metrics, grafana or mcp which are used by COSMOS
|
|
279
279
|
values: .*
|
|
280
280
|
example: |
|
|
281
281
|
ROUTE_PREFIX /interface
|
|
@@ -301,6 +301,22 @@ DB_SHARD:
|
|
|
301
301
|
values: \d+
|
|
302
302
|
example: |
|
|
303
303
|
DB_SHARD 0
|
|
304
|
+
SHARED_RESOURCE:
|
|
305
|
+
summary: Share this interface's resource between scopes so it is only active in one scope at a time
|
|
306
|
+
description:
|
|
307
|
+
Interfaces, routers, microservices, and targets with the same shared resource name form a shared
|
|
308
|
+
resource. Each scope that installs one of them becomes a member, but the resource is only active in
|
|
309
|
+
one scope at a time. The first scope to install the resource owns it. Members in other scopes are
|
|
310
|
+
installed but their microservices are not started until the resource is switched to their scope with
|
|
311
|
+
switch_shared_resource. Can not be used with BRIDGE. See [Shared Resources](plugins#shared-resources).
|
|
312
|
+
since: 7.6.0
|
|
313
|
+
parameters:
|
|
314
|
+
- name: Shared Resource Name
|
|
315
|
+
required: true
|
|
316
|
+
description: Name of the shared resource. Must only contain letters, numbers, and single underscores.
|
|
317
|
+
values: .+
|
|
318
|
+
example: |
|
|
319
|
+
SHARED_RESOURCE THERMAL_VAC_CHAMBER
|
|
304
320
|
BRIDGE:
|
|
305
321
|
summary: Name of the bridge to run this interface on
|
|
306
322
|
description: Run this interface on a bridge host rather than within COSMOS. Note only python is supported.
|
|
@@ -129,9 +129,30 @@ LIMITS:
|
|
|
129
129
|
RED_LOW at 1 and below, YELLOW_LOW at 2-3, GREEN_LOW at 4, BLUE at 5,
|
|
130
130
|
GREEN_HIGH at 6, YELLOW_HIGH at 7-8 and RED_HIGH at 9 and above. Without
|
|
131
131
|
the green limits, 4-6 would all be GREEN.
|
|
132
|
+
|
|
133
|
+
Instead of numeric limits, a telemetry item can be checked against its previous
|
|
134
|
+
value by passing a change type and a color in place of the limits values:
|
|
135
|
+
`LIMITS DEFAULT <Persistence> <Initial State> <SEQUENCE/CHANGE/STATIC> <RED/YELLOW> <Sequence Step>`.
|
|
136
|
+
SEQUENCE requires the value to change by exactly the sequence step each sample. The
|
|
137
|
+
step is an optional non-zero integer that defaults to 1, so a step of 2 accepts 2, 4, 6, 8
|
|
138
|
+
and a step of -1 accepts a countdown. Only SEQUENCE takes a step. Raw INT and UINT
|
|
139
|
+
items (without a read conversion) roll over at their bit size, for example 254 to 0
|
|
140
|
+
on a UINT 8 with a step of 2. CHANGE requires the value to be different every sample.
|
|
141
|
+
STATIC requires the value to never change. When the check fails the item goes to the given color (RED or
|
|
142
|
+
YELLOW) and when it passes the item is GREEN. For example, a SEQUENCE item that goes
|
|
143
|
+
0, 1, 2, 4 goes RED at 4 and back to GREEN at 5. The first value received is always GREEN.
|
|
144
|
+
These change limits are reported like STATE colors so they appear in Limits Monitor
|
|
145
|
+
and notifications, but they have no numeric values so LIMITSBAR style widgets don't
|
|
146
|
+
display them. They can only be defined in the DEFAULT limits set, can't be combined
|
|
147
|
+
with numeric limits on the same item, and can't be changed with set_limits.
|
|
132
148
|
example: |
|
|
133
149
|
LIMITS DEFAULT 3 ENABLED -80.0 -70.0 60.0 80.0 -20.0 20.0
|
|
134
150
|
LIMITS TVAC 3 ENABLED -80.0 -30.0 30.0 80.0
|
|
151
|
+
# Change limits examples (use only one LIMITS line per item)
|
|
152
|
+
LIMITS DEFAULT 1 ENABLED SEQUENCE RED
|
|
153
|
+
LIMITS DEFAULT 1 ENABLED SEQUENCE RED 2
|
|
154
|
+
LIMITS DEFAULT 1 ENABLED CHANGE YELLOW
|
|
155
|
+
LIMITS DEFAULT 1 ENABLED STATIC RED
|
|
135
156
|
parameters:
|
|
136
157
|
- name: Limits Set
|
|
137
158
|
required: true
|
|
@@ -153,7 +174,9 @@ LIMITS:
|
|
|
153
174
|
- name: Red Low Limit
|
|
154
175
|
required: true
|
|
155
176
|
description: If the telemetry value is less than or equal to this value a
|
|
156
|
-
Red Low condition will be detected
|
|
177
|
+
Red Low condition will be detected. For change limits this is instead
|
|
178
|
+
SEQUENCE, CHANGE, or STATIC followed by RED or YELLOW. SEQUENCE can also
|
|
179
|
+
take an optional integer step (default 1). No other parameters are allowed.
|
|
157
180
|
values: .+
|
|
158
181
|
- name: Yellow Low Limit
|
|
159
182
|
required: true
|
|
@@ -157,7 +157,7 @@ MICROSERVICE:
|
|
|
157
157
|
parameters:
|
|
158
158
|
- name: Route Prefix
|
|
159
159
|
required: true
|
|
160
|
-
description: Route prefix. Must be unique across all scopes. Something like /myprefix
|
|
160
|
+
description: Route prefix. Must be unique across all scopes. Something like /myprefix. Made of one or more path segments containing only letters, numbers, underscore and dash. The first segment can't be openc3-api, script-api, tools, files, login, js, css, fonts, icons, img, assets, auth, metrics, grafana or mcp which are used by COSMOS
|
|
161
161
|
values: .*
|
|
162
162
|
example: |
|
|
163
163
|
MICROSERVICE CFDP CFDP
|
|
@@ -198,3 +198,17 @@ MICROSERVICE:
|
|
|
198
198
|
since: 6.2.0
|
|
199
199
|
example: |
|
|
200
200
|
STOPPED
|
|
201
|
+
SHARED_RESOURCE:
|
|
202
|
+
summary: Share this microservice's resource between scopes so it is only active in one scope at a time
|
|
203
|
+
description:
|
|
204
|
+
The microservice only runs in the scope where the shared resource is active. In other scopes it is
|
|
205
|
+
installed but not started until the resource is switched to their scope with switch_shared_resource.
|
|
206
|
+
See [Shared Resources](plugins#shared-resources).
|
|
207
|
+
since: 7.6.0
|
|
208
|
+
parameters:
|
|
209
|
+
- name: Shared Resource Name
|
|
210
|
+
required: true
|
|
211
|
+
description: Name of the shared resource. Must only contain letters, numbers, and single underscores.
|
|
212
|
+
values: .+
|
|
213
|
+
example: |
|
|
214
|
+
SHARED_RESOURCE THERMAL_VAC_CHAMBER
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<%= MetaConfigParser.load('param_item_modifiers.yaml').to_meta_config_yaml(0) %>
|
|
3
3
|
REQUIRED:
|
|
4
4
|
summary: Parameter is required to be populated in scripts
|
|
5
|
-
description: When sending the command
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
description: When sending the command a value must always be given for the
|
|
6
|
+
current command parameter. This prevents the user from relying on a default
|
|
7
|
+
value. Command Sender shows the parameter as empty until a value is entered.
|
|
8
|
+
Since the default is never used, the PARAMETER default can be nil, none, or null.
|
|
9
9
|
MINIMUM_VALUE:
|
|
10
10
|
summary: Override the defined minimum value
|
|
11
11
|
parameters:
|