openc3 6.4.2 → 6.5.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/bin/openc3cli +172 -97
- data/data/config/_graph_params.yaml +4 -4
- data/data/config/conversions.yaml +2 -1
- data/data/config/item_modifiers.yaml +1 -0
- data/data/config/plugins.yaml +14 -1
- data/data/config/processors.yaml +51 -0
- data/data/config/telemetry_modifiers.yaml +1 -0
- data/lib/openc3/api/tlm_api.rb +10 -5
- data/lib/openc3/microservices/interface_microservice.rb +15 -9
- data/lib/openc3/models/plugin_model.rb +5 -4
- data/lib/openc3/models/scope_model.rb +87 -57
- data/lib/openc3/models/script_engine_model.rb +93 -0
- data/lib/openc3/models/script_status_model.rb +4 -0
- data/lib/openc3/models/target_model.rb +7 -1
- data/lib/openc3/script/script.rb +5 -1
- data/lib/openc3/script_engines/script_engine.rb +118 -0
- data/lib/openc3/topics/interface_topic.rb +23 -3
- data/lib/openc3/utilities/cli_generator.rb +42 -15
- data/lib/openc3/utilities/running_script.rb +1460 -0
- data/lib/openc3/version.rb +6 -6
- data/templates/conversion/conversion.py +1 -1
- data/templates/conversion/conversion.rb +1 -1
- data/templates/processor/processor.py +32 -0
- data/templates/processor/processor.rb +36 -0
- 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 +7 -1
data/lib/openc3/version.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
OPENC3_VERSION = '6.
|
3
|
+
OPENC3_VERSION = '6.5.0'
|
4
4
|
module OpenC3
|
5
5
|
module Version
|
6
6
|
MAJOR = '6'
|
7
|
-
MINOR = '
|
8
|
-
PATCH = '
|
7
|
+
MINOR = '5'
|
8
|
+
PATCH = '0'
|
9
9
|
OTHER = ''
|
10
|
-
BUILD = '
|
10
|
+
BUILD = '492046952832ad5a3a4d16f2e52e9f712374fbe1'
|
11
11
|
end
|
12
|
-
VERSION = '6.
|
13
|
-
GEM_VERSION = '6.
|
12
|
+
VERSION = '6.5.0'
|
13
|
+
GEM_VERSION = '6.5.0'
|
14
14
|
end
|
@@ -3,7 +3,7 @@ from openc3.conversions.conversion import Conversion
|
|
3
3
|
# from openc3.api.tlm_api import tlm
|
4
4
|
|
5
5
|
# Custom conversion class
|
6
|
-
# See https://docs.openc3.com/docs/configuration/
|
6
|
+
# See https://docs.openc3.com/docs/configuration/conversions
|
7
7
|
class <%= conversion_class %>(Conversion):
|
8
8
|
def __init__(self):
|
9
9
|
super().__init__()
|
@@ -3,7 +3,7 @@ require 'openc3/conversions/conversion'
|
|
3
3
|
|
4
4
|
module OpenC3
|
5
5
|
# Custom conversion class
|
6
|
-
# See https://docs.openc3.com/docs/configuration/
|
6
|
+
# See https://docs.openc3.com/docs/configuration/conversions
|
7
7
|
class <%= conversion_class %> < Conversion
|
8
8
|
def initialize
|
9
9
|
super()
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import math
|
2
|
+
from openc3.processors.processor import Processor
|
3
|
+
|
4
|
+
# Custom processor class
|
5
|
+
# See https://docs.openc3.com/docs/configuration/processors
|
6
|
+
class <%= processor_class %>(Processor):
|
7
|
+
def __init__(self, item_name, num_samples, value_type='CONVERTED'):
|
8
|
+
super().__init__(value_type)
|
9
|
+
self.item_name = item_name.upper()
|
10
|
+
self.num_samples = int(num_samples)
|
11
|
+
self.reset()
|
12
|
+
|
13
|
+
def call(self, value, packet, buffer):
|
14
|
+
value = packet.read(self.item_name, self.value_type, buffer)
|
15
|
+
# Don't process NaN or Infinite values
|
16
|
+
if math.isnan(value) or math.isinf(value):
|
17
|
+
return
|
18
|
+
|
19
|
+
self.samples.append(value)
|
20
|
+
if len(self.samples) > self.num_samples:
|
21
|
+
self.samples = self.samples[-self.num_samples :]
|
22
|
+
|
23
|
+
# Calculate something based on the collected samples
|
24
|
+
# For example, calculate the rate of change:
|
25
|
+
if len(self.samples) > 1:
|
26
|
+
self.results['RATE_OF_CHANGE'] = (self.samples[-1] - self.samples[0]) / (len(self.samples) - 1)
|
27
|
+
else:
|
28
|
+
self.results['RATE_OF_CHANGE'] = None
|
29
|
+
|
30
|
+
def reset(self):
|
31
|
+
self.samples = []
|
32
|
+
self.results['RATE_OF_CHANGE'] = None
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
require 'openc3/processors/processor'
|
3
|
+
|
4
|
+
module OpenC3
|
5
|
+
# Custom processor class
|
6
|
+
# See https://docs.openc3.com/docs/configuration/processors
|
7
|
+
class <%= processor_class %> < Processor
|
8
|
+
def initialize(item_name, num_samples, value_type = :CONVERTED)
|
9
|
+
super(value_type)
|
10
|
+
@item_name = item_name.to_s.upcase
|
11
|
+
@num_samples = Integer(num_samples)
|
12
|
+
reset()
|
13
|
+
end
|
14
|
+
|
15
|
+
# This is where the processor does its work.
|
16
|
+
# All processor results should be stored in the @results hash.
|
17
|
+
# Results are accessed via a ProcessorConversion
|
18
|
+
def call(packet, buffer)
|
19
|
+
value = packet.read(@item_name, @value_type, buffer)
|
20
|
+
# Don't process NaN or Infinite values
|
21
|
+
return if value.to_f.nan? || value.to_f.infinite?
|
22
|
+
|
23
|
+
@samples << value
|
24
|
+
@samples = @samples[-@num_samples..-1] if @samples.length > @num_samples
|
25
|
+
# Calculate something based on the collected samples
|
26
|
+
# For example, calculate the rate of change:
|
27
|
+
@results[:RATE_OF_CHANGE] = (@samples.last - @samples.first) / (@samples.length - 1) if @samples.length > 1
|
28
|
+
end
|
29
|
+
|
30
|
+
# Reset any state
|
31
|
+
def reset
|
32
|
+
@samples = []
|
33
|
+
@results[:RATE_OF_CHANGE] = nil
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "<%= tool_name %>",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.5.0",
|
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.
|
26
|
+
"@openc3/js-common": "6.5.0",
|
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.
|
3
|
+
"version": "6.5.0",
|
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.
|
15
|
-
"@openc3/vue-common": "6.
|
14
|
+
"@openc3/js-common": "6.5.0",
|
15
|
+
"@openc3/vue-common": "6.5.0",
|
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.
|
3
|
+
"version": "6.5.0",
|
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.
|
11
|
+
"@openc3/vue-common": "6.5.0",
|
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.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -824,6 +824,7 @@ files:
|
|
824
824
|
- data/config/param_item_modifiers.yaml
|
825
825
|
- data/config/parameter_modifiers.yaml
|
826
826
|
- data/config/plugins.yaml
|
827
|
+
- data/config/processors.yaml
|
827
828
|
- data/config/protocols.yaml
|
828
829
|
- data/config/screen.yaml
|
829
830
|
- data/config/settings.yaml
|
@@ -1034,6 +1035,7 @@ files:
|
|
1034
1035
|
- lib/openc3/models/router_model.rb
|
1035
1036
|
- lib/openc3/models/router_status_model.rb
|
1036
1037
|
- lib/openc3/models/scope_model.rb
|
1038
|
+
- lib/openc3/models/script_engine_model.rb
|
1037
1039
|
- lib/openc3/models/script_status_model.rb
|
1038
1040
|
- lib/openc3/models/secret_model.rb
|
1039
1041
|
- lib/openc3/models/setting_model.rb
|
@@ -1096,6 +1098,7 @@ files:
|
|
1096
1098
|
- lib/openc3/script/tables.rb
|
1097
1099
|
- lib/openc3/script/telemetry.rb
|
1098
1100
|
- lib/openc3/script/web_socket_api.rb
|
1101
|
+
- lib/openc3/script_engines/script_engine.rb
|
1099
1102
|
- lib/openc3/streams/mqtt_stream.rb
|
1100
1103
|
- lib/openc3/streams/serial_stream.rb
|
1101
1104
|
- lib/openc3/streams/stream.rb
|
@@ -1154,6 +1157,7 @@ files:
|
|
1154
1157
|
- lib/openc3/utilities/quaternion.rb
|
1155
1158
|
- lib/openc3/utilities/redis_secrets.rb
|
1156
1159
|
- lib/openc3/utilities/ruby_lex_utils.rb
|
1160
|
+
- lib/openc3/utilities/running_script.rb
|
1157
1161
|
- lib/openc3/utilities/s3_autoload.rb
|
1158
1162
|
- lib/openc3/utilities/secrets.rb
|
1159
1163
|
- lib/openc3/utilities/simulated_target.rb
|
@@ -1183,6 +1187,8 @@ files:
|
|
1183
1187
|
- templates/plugin/Rakefile
|
1184
1188
|
- templates/plugin/plugin.gemspec
|
1185
1189
|
- templates/plugin/plugin.txt
|
1190
|
+
- templates/processor/processor.py
|
1191
|
+
- templates/processor/processor.rb
|
1186
1192
|
- templates/target/targets/TARGET/cmd_tlm/cmd.txt
|
1187
1193
|
- templates/target/targets/TARGET/cmd_tlm/tlm.txt
|
1188
1194
|
- templates/target/targets/TARGET/lib/target.py
|