openc3 6.10.1 → 6.10.2
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/data/config/command_modifiers.yaml +2 -0
- data/data/config/plugins.yaml +2 -1
- data/data/config/target_config.yaml +2 -2
- data/data/config/telemetry_modifiers.yaml +2 -0
- data/lib/openc3/core_ext/string.rb +11 -3
- data/lib/openc3/microservices/microservice.rb +1 -0
- data/lib/openc3/packets/packet.rb +69 -1
- data/lib/openc3/version.rb +5 -5
- data/templates/tool_angular/package.json +2 -2
- data/templates/tool_react/package.json +1 -1
- data/templates/tool_svelte/package.json +1 -1
- data/templates/tool_vue/package.json +3 -3
- data/templates/widget/package.json +2 -2
- metadata +3 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5cc7320f928c8941c9d4ecc2a4bc04eade3ebde86c278dfdad90aa7ac24f9d2
|
|
4
|
+
data.tar.gz: eb9cd8b34986f982c187dbccbdf0c4067f61df733161cab067a5c689b1ba53a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5973122351e2b191d365092984db9c23ad877c8fc71c7173b014fa3a5ae363258a2eeca7863571d9206be0f781ff361586843eac57d7fa56065fef515398c06b
|
|
7
|
+
data.tar.gz: 7b664d2a9a8615a5c651002b412cd7248ca0b33e67f6af0618b04354f3ea080b5d81f7d8031ea4e98a013ca2ca4714e3fdb6b30ae5302223d7bdafd88d8c63bb
|
|
@@ -100,6 +100,7 @@ STRUCTURE:
|
|
|
100
100
|
modifiers:
|
|
101
101
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
|
102
102
|
summary: Adds and flattens a structure (generally a virtual packet) into the current packet. The specific named item is BLOCK type and hidden.
|
|
103
|
+
since: 6.10.0
|
|
103
104
|
parameters:
|
|
104
105
|
- name: Name
|
|
105
106
|
required: true
|
|
@@ -134,6 +135,7 @@ APPEND_STRUCTURE:
|
|
|
134
135
|
modifiers:
|
|
135
136
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
|
136
137
|
summary: Adds and flattens a structure (generally a virtual packet) into the current packet. The specific named item is BLOCK type and hidden.
|
|
138
|
+
since: 6.10.0
|
|
137
139
|
parameters:
|
|
138
140
|
- name: Name
|
|
139
141
|
required: true
|
data/data/config/plugins.yaml
CHANGED
|
@@ -92,7 +92,8 @@ WIDGET:
|
|
|
92
92
|
SCRIPT_ENGINE:
|
|
93
93
|
summary: Define a script engine to add language support to Script Runner
|
|
94
94
|
example: SCRIPT_ENGINE .print print_script_engine.py
|
|
95
|
-
description: Defines a script engine to add language support to Script Runner
|
|
95
|
+
description: Defines a script engine to add language support to Script Runner. For a realistic example, see our [CSTOL](https://github.com/OpenC3/openc3-cosmos-script-engine-cstol) plugin.
|
|
96
|
+
since: 6.5.0
|
|
96
97
|
parameters:
|
|
97
98
|
- name: Extension
|
|
98
99
|
description: Extension that will use this script engine
|
|
@@ -91,13 +91,13 @@ CMD_UNIQUE_ID_MODE:
|
|
|
91
91
|
Ideally all commands for a target are identified using the exact same bit offset, size,
|
|
92
92
|
and type field in each command. If ANY command identifiers differ then this flag must be set
|
|
93
93
|
to force a brute force identification method.
|
|
94
|
-
warning: Using this mode significantly slows packet identification
|
|
95
94
|
since: 4.4.0
|
|
95
|
+
deprecated: Since 6.10.0 this condition is now automatically detected
|
|
96
96
|
TLM_UNIQUE_ID_MODE:
|
|
97
97
|
summary: Telemetry packets identifiers don't all share the same bit offset, size, and type
|
|
98
98
|
description:
|
|
99
99
|
Ideally all telemetry for a target are identified using the exact same bit offset, size,
|
|
100
100
|
and type field in each packet. If ANY telemetry identifiers differ then this flag must be set
|
|
101
101
|
to force a brute force identification method.
|
|
102
|
-
warning: Using this mode significantly slows packet identification
|
|
103
102
|
since: 4.4.0
|
|
103
|
+
deprecated: Since 6.10.0 this condition is now automatically detected
|
|
@@ -90,6 +90,7 @@ STRUCTURE:
|
|
|
90
90
|
modifiers:
|
|
91
91
|
<%= MetaConfigParser.load('item_modifiers.yaml').to_meta_config_yaml(4) %>
|
|
92
92
|
summary: Adds and flattens a structure (generally a virtual packet) into the current packet. The specific named item is BLOCK type and hidden.
|
|
93
|
+
since: 6.10.0
|
|
93
94
|
parameters:
|
|
94
95
|
- name: Name
|
|
95
96
|
required: true
|
|
@@ -124,6 +125,7 @@ APPEND_STRUCTURE:
|
|
|
124
125
|
modifiers:
|
|
125
126
|
<%= MetaConfigParser.load('item_modifiers.yaml').to_meta_config_yaml(4) %>
|
|
126
127
|
summary: Adds and flattens a structure (generally a virtual packet) into the current packet. The specific named item is BLOCK type and hidden.
|
|
128
|
+
since: 6.10.0
|
|
127
129
|
parameters:
|
|
128
130
|
- name: Name
|
|
129
131
|
required: true
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
require 'openc3/packets/binary_accessor'
|
|
24
24
|
require 'openc3/ext/string' if RUBY_ENGINE == 'ruby' and !ENV['OPENC3_NO_EXT']
|
|
25
|
+
require 'yaml'
|
|
25
26
|
|
|
26
27
|
# OpenC3 specific additions to the Ruby String class
|
|
27
28
|
class String
|
|
@@ -40,6 +41,8 @@ class String
|
|
|
40
41
|
HEX_CHECK_REGEX = /\A\s*0[xX][\dabcdefABCDEF]+\s*\z/
|
|
41
42
|
# Regular expression to identify a String as an Array of numbers
|
|
42
43
|
ARRAY_CHECK_REGEX = /\A\s*\[.*\]\s*\z/
|
|
44
|
+
# Regular expression to identify a String containing object notation
|
|
45
|
+
OBJECT_CHECK_REGEX = /\A\s*\{.*\}\s*\z/
|
|
43
46
|
|
|
44
47
|
# Displays a String containing binary data in a human readable format by
|
|
45
48
|
# converting each byte to the hex representation.
|
|
@@ -209,6 +212,11 @@ class String
|
|
|
209
212
|
if ARRAY_CHECK_REGEX.match?(self) then true else false end
|
|
210
213
|
end
|
|
211
214
|
|
|
215
|
+
# @return [Boolean] Whether the String represents an Object
|
|
216
|
+
def is_object?
|
|
217
|
+
if OBJECT_CHECK_REGEX.match?(self) then true else false end
|
|
218
|
+
end
|
|
219
|
+
|
|
212
220
|
# @return [Boolean] Whether the string contains only printable characters
|
|
213
221
|
def is_printable?
|
|
214
222
|
if NON_PRINTABLE_REGEX.match?(self) then false else true end
|
|
@@ -238,9 +246,9 @@ class String
|
|
|
238
246
|
elsif self.is_hex?
|
|
239
247
|
# Hex
|
|
240
248
|
return_value = Integer(self)
|
|
241
|
-
elsif self.is_array?
|
|
242
|
-
# Array
|
|
243
|
-
return_value =
|
|
249
|
+
elsif self.is_array? or self.is_object?
|
|
250
|
+
# Array or Object
|
|
251
|
+
return_value = YAML.safe_load(self)
|
|
244
252
|
end
|
|
245
253
|
rescue Exception
|
|
246
254
|
# Something went wrong so just return the string as is
|
|
@@ -55,6 +55,7 @@ module OpenC3
|
|
|
55
55
|
MicroserviceStatusModel.set(microservice.as_json(), scope: microservice.scope)
|
|
56
56
|
microservice.state = 'RUNNING'
|
|
57
57
|
microservice.run
|
|
58
|
+
Logger.info("Microservice #{name} run method returned cleanly and will now shutdown.")
|
|
58
59
|
microservice.state = 'FINISHED'
|
|
59
60
|
rescue Exception => e
|
|
60
61
|
if SystemExit === e or SignalException === e
|
|
@@ -905,6 +905,11 @@ module OpenC3
|
|
|
905
905
|
write_item(item, item.structure.buffer(false), :RAW, buffer)
|
|
906
906
|
end
|
|
907
907
|
elsif not item.default.nil? and not item.parent_item
|
|
908
|
+
# Skip writing default for accessor-based items when template is used
|
|
909
|
+
# The template already contains the correct default value
|
|
910
|
+
# Only skip if key is explicitly set (different from item name) - this distinguishes
|
|
911
|
+
# JsonAccessor (key="$.field") from TemplateAccessor (key=name="FIELD")
|
|
912
|
+
next if item.key and item.key != item.name and @template and use_template
|
|
908
913
|
write_item(item, item.default, :CONVERTED, buffer) unless skip_item_names and upcase_skip_item_names.include?(item.name)
|
|
909
914
|
end
|
|
910
915
|
end
|
|
@@ -1233,7 +1238,20 @@ module OpenC3
|
|
|
1233
1238
|
# Items with derived items last
|
|
1234
1239
|
@sorted_items.each do |item|
|
|
1235
1240
|
if item.data_type != :DERIVED
|
|
1236
|
-
|
|
1241
|
+
item_hash = item.as_json(*a)
|
|
1242
|
+
# For accessor-based items with a template, extract the default from the template
|
|
1243
|
+
# Only extract for items with explicit keys (different from item name) - this distinguishes
|
|
1244
|
+
# JsonAccessor (key="$.field") from TemplateAccessor (key=name="FIELD")
|
|
1245
|
+
if item.key and item.key != item.name and @template
|
|
1246
|
+
begin
|
|
1247
|
+
template_value = read_item_from_template(item)
|
|
1248
|
+
item_hash['default'] = template_value unless template_value.nil?
|
|
1249
|
+
rescue => e
|
|
1250
|
+
# If we can't read from template, keep the original default
|
|
1251
|
+
Logger.debug("Could not read template default for #{@target_name} #{@packet_name} #{item.name}: #{e.message}")
|
|
1252
|
+
end
|
|
1253
|
+
end
|
|
1254
|
+
items << item_hash
|
|
1237
1255
|
end
|
|
1238
1256
|
end
|
|
1239
1257
|
@sorted_items.each do |item|
|
|
@@ -1358,6 +1376,56 @@ module OpenC3
|
|
|
1358
1376
|
|
|
1359
1377
|
protected
|
|
1360
1378
|
|
|
1379
|
+
# Read item value from template, handling PythonProxy accessors
|
|
1380
|
+
# For PythonProxy, parse template directly since the proxy's class method returns a string
|
|
1381
|
+
def read_item_from_template(item)
|
|
1382
|
+
accessor_class = @accessor.class
|
|
1383
|
+
|
|
1384
|
+
# For PythonProxy, accessor.class returns the class name as a string
|
|
1385
|
+
# We need to parse the template directly based on the accessor type
|
|
1386
|
+
if accessor_class.is_a?(String)
|
|
1387
|
+
case accessor_class
|
|
1388
|
+
when 'JsonAccessor'
|
|
1389
|
+
return read_json_template_item(item)
|
|
1390
|
+
when 'CborAccessor'
|
|
1391
|
+
return read_cbor_template_item(item)
|
|
1392
|
+
when 'XmlAccessor'
|
|
1393
|
+
return read_xml_template_item(item)
|
|
1394
|
+
else
|
|
1395
|
+
# Unknown accessor type - can't read from template
|
|
1396
|
+
return nil
|
|
1397
|
+
end
|
|
1398
|
+
else
|
|
1399
|
+
# Normal accessor - use the class method
|
|
1400
|
+
return accessor_class.read_item(item, @template)
|
|
1401
|
+
end
|
|
1402
|
+
end
|
|
1403
|
+
|
|
1404
|
+
# Parse JSON template and extract item value using JSONPath key
|
|
1405
|
+
def read_json_template_item(item)
|
|
1406
|
+
require 'json'
|
|
1407
|
+
require 'jsonpath'
|
|
1408
|
+
json_data = JSON.parse(@template.to_s, allow_nan: true, create_additions: true)
|
|
1409
|
+
JsonPath.new(item.key).first(json_data)
|
|
1410
|
+
end
|
|
1411
|
+
|
|
1412
|
+
# Parse CBOR template and extract item value using JSONPath key
|
|
1413
|
+
def read_cbor_template_item(item)
|
|
1414
|
+
require 'cbor'
|
|
1415
|
+
require 'jsonpath'
|
|
1416
|
+
cbor_data = CBOR.decode(@template.to_s)
|
|
1417
|
+
JsonPath.new(item.key).first(cbor_data)
|
|
1418
|
+
end
|
|
1419
|
+
|
|
1420
|
+
# Parse XML template and extract item value using XPath key
|
|
1421
|
+
def read_xml_template_item(item)
|
|
1422
|
+
require 'nokogiri'
|
|
1423
|
+
doc = Nokogiri::XML(@template.to_s)
|
|
1424
|
+
node = doc.xpath(item.key).first
|
|
1425
|
+
return nil unless node
|
|
1426
|
+
node.text
|
|
1427
|
+
end
|
|
1428
|
+
|
|
1361
1429
|
def handle_limits_states(item, value)
|
|
1362
1430
|
# Retrieve limits state for the given value
|
|
1363
1431
|
limits_state = item.state_colors[value]
|
data/lib/openc3/version.rb
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# encoding: ascii-8bit
|
|
2
2
|
|
|
3
|
-
OPENC3_VERSION = '6.10.
|
|
3
|
+
OPENC3_VERSION = '6.10.2'
|
|
4
4
|
module OpenC3
|
|
5
5
|
module Version
|
|
6
6
|
MAJOR = '6'
|
|
7
7
|
MINOR = '10'
|
|
8
|
-
PATCH = '
|
|
8
|
+
PATCH = '2'
|
|
9
9
|
OTHER = ''
|
|
10
|
-
BUILD = '
|
|
10
|
+
BUILD = 'f10cec058f400e8a289b54400c3731e01d20357e'
|
|
11
11
|
end
|
|
12
|
-
VERSION = '6.10.
|
|
13
|
-
GEM_VERSION = '6.10.
|
|
12
|
+
VERSION = '6.10.2'
|
|
13
|
+
GEM_VERSION = '6.10.2'
|
|
14
14
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= tool_name %>",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "ng serve",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@angular/platform-browser-dynamic": "^18.2.6",
|
|
24
24
|
"@angular/router": "^18.2.6",
|
|
25
25
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
26
|
-
"@openc3/js-common": "6.10.
|
|
26
|
+
"@openc3/js-common": "6.10.2",
|
|
27
27
|
"rxjs": "~7.8.0",
|
|
28
28
|
"single-spa": "^5.9.5",
|
|
29
29
|
"single-spa-angular": "^9.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= tool_name %>",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
14
|
-
"@openc3/js-common": "6.10.
|
|
15
|
-
"@openc3/vue-common": "6.10.
|
|
14
|
+
"@openc3/js-common": "6.10.2",
|
|
15
|
+
"@openc3/vue-common": "6.10.2",
|
|
16
16
|
"axios": "^1.7.7",
|
|
17
17
|
"date-fns": "^4.1.0",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= widget_name %>",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
11
|
-
"@openc3/vue-common": "6.10.
|
|
11
|
+
"@openc3/vue-common": "6.10.2",
|
|
12
12
|
"vuetify": "^3.7.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openc3
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.10.
|
|
4
|
+
version: 6.10.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Melton
|
|
@@ -10,20 +10,6 @@ bindir: bin
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: bundler
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '2.3'
|
|
20
|
-
type: :runtime
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '2.3'
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: pg
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -422,14 +408,14 @@ dependencies:
|
|
|
422
408
|
requirements:
|
|
423
409
|
- - "~>"
|
|
424
410
|
- !ruby/object:Gem::Version
|
|
425
|
-
version: '0.
|
|
411
|
+
version: '0.7'
|
|
426
412
|
type: :runtime
|
|
427
413
|
prerelease: false
|
|
428
414
|
version_requirements: !ruby/object:Gem::Requirement
|
|
429
415
|
requirements:
|
|
430
416
|
- - "~>"
|
|
431
417
|
- !ruby/object:Gem::Version
|
|
432
|
-
version: '0.
|
|
418
|
+
version: '0.7'
|
|
433
419
|
- !ruby/object:Gem::Dependency
|
|
434
420
|
name: opentelemetry-exporter-otlp
|
|
435
421
|
requirement: !ruby/object:Gem::Requirement
|