openc3 5.16.1 → 5.17.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.
- checksums.yaml +4 -4
- data/bin/openc3cli +1 -1
- data/data/config/command_modifiers.yaml +0 -1
- data/data/config/widgets.yaml +26 -0
- data/lib/openc3/config/config_parser.rb +21 -12
- data/lib/openc3/models/activity_model.rb +5 -3
- data/lib/openc3/models/plugin_model.rb +26 -20
- data/lib/openc3/models/target_model.rb +4 -3
- data/lib/openc3/packets/packet.rb +2 -2
- data/lib/openc3/packets/packet_config.rb +2 -2
- data/lib/openc3/packets/parsers/limits_response_parser.rb +0 -2
- data/lib/openc3/packets/parsers/packet_item_parser.rb +6 -9
- data/lib/openc3/packets/parsers/processor_parser.rb +0 -2
- data/lib/openc3/script/calendar.rb +2 -2
- data/lib/openc3/script/suite_runner.rb +1 -0
- data/lib/openc3/system/system.rb +1 -1
- data/lib/openc3/system/target.rb +3 -3
- data/lib/openc3/tools/table_manager/table_item_parser.rb +1 -3
- data/lib/openc3/topics/limits_event_topic.rb +6 -4
- data/lib/openc3/utilities/local_mode.rb +8 -7
- data/lib/openc3/version.rb +6 -6
- data/templates/conversion/conversion.py +3 -0
- data/templates/limits_response/response.py +1 -1
- data/templates/tool_angular/package.json +4 -4
- data/templates/tool_react/package.json +0 -1
- data/templates/tool_svelte/package.json +3 -3
- data/templates/tool_vue/package.json +9 -9
- data/templates/widget/package.json +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38d414a88623d811f51dc74da1f49169ca0b0c3ca3ba740e5f70b854e9524824
|
4
|
+
data.tar.gz: ad24c61fe6f733ae07777f3fa4dbe7b2cfd013adf8e22bc8cec63d4c1a3b1684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8faed944b2e064ecf2a4d55f434dfeb91bf09f5a383aa30bc370f550fc7bc5dccfa9c1d8cf7efdda601887359dc6a44bad84e1eef27dc811341208062b038f23
|
7
|
+
data.tar.gz: 7c50c7428cac1a2c35a5b62121fc5791f90a3d1a6d3c2f00c61b24b2e7ebfa24990bd08c74b0af47a41979b55c41e1cd582d76cf8392260947e7578f47a9eeb2
|
data/bin/openc3cli
CHANGED
@@ -316,7 +316,7 @@ def validate_plugin(plugin_file_path, scope:, variables_file: nil)
|
|
316
316
|
puts "Successfully validated #{File.basename(plugin_file_path)}"
|
317
317
|
result = 0 # bash and Windows consider 0 success
|
318
318
|
rescue => e
|
319
|
-
puts
|
319
|
+
puts e.message
|
320
320
|
result = ERROR_CODE
|
321
321
|
ensure
|
322
322
|
exit(result)
|
@@ -51,7 +51,6 @@ ID_PARAMETER:
|
|
51
51
|
required: true
|
52
52
|
description: Bit offset into the command packet of the Most Significant Bit of this parameter.
|
53
53
|
May be negative to indicate on offset from the end of the packet.
|
54
|
-
Always use a bit offset of 0 for derived parameters.
|
55
54
|
values: '[-]?\d+'
|
56
55
|
<%= MetaConfigParser.load('_id_params.yaml').to_meta_config_yaml(4) %>
|
57
56
|
example: ID_PARAMETER OPCODE 32 32 UINT 2 2 2 "Opcode identifier"
|
data/data/config/widgets.yaml
CHANGED
@@ -1154,6 +1154,32 @@ Telemetry Widgets:
|
|
1154
1154
|
# example: |
|
1155
1155
|
# RANGECOLUMN INST HEALTH_STATUS TEMP1 0 100000 RAW 200 50
|
1156
1156
|
# RANGECOLUMN INST HEALTH_STATUS TEMP1 -100 100
|
1157
|
+
ROLLUP:
|
1158
|
+
summary: Displays a notification icon which changes color based on a rollup telemetry
|
1159
|
+
parameters:
|
1160
|
+
- name: Icon name
|
1161
|
+
required: true
|
1162
|
+
description: |
|
1163
|
+
The astro UX icon to display. Valid choices are 'astro' icons taken from
|
1164
|
+
https://github.com/RocketCommunicationsInc/astro-components/blob/master/static/json/rux-icons.json
|
1165
|
+
values: .+
|
1166
|
+
- name: Icon label
|
1167
|
+
required: false
|
1168
|
+
description: Text to apply to the icon label
|
1169
|
+
values: .+
|
1170
|
+
- name: Icon sublabel
|
1171
|
+
required: false
|
1172
|
+
description: Text to apply to the icon sublabel
|
1173
|
+
values: .+
|
1174
|
+
example: |
|
1175
|
+
ROLLUP satellite-transmit "SAT 1" "Details"
|
1176
|
+
SETTING SCREEN INST HS
|
1177
|
+
SETTING TLM INST HEALTH_STATUS TEMP1
|
1178
|
+
SETTING TLM INST HEALTH_STATUS TEMP2
|
1179
|
+
ROLLUP antenna "GND 2" "Location"
|
1180
|
+
SETTING SCREEN INST HS
|
1181
|
+
SETTING TLM INST HEALTH_STATUS TEMP3
|
1182
|
+
SETTING TLM INST HEALTH_STATUS TEMP4
|
1157
1183
|
TEXTBOX:
|
1158
1184
|
summary: Provides a large box for multiline text
|
1159
1185
|
parameters:
|
@@ -125,10 +125,10 @@ module OpenC3
|
|
125
125
|
# default this gets constructed to point to the generic configuration
|
126
126
|
# Guide on the OpenC3 Wiki.
|
127
127
|
def initialize(config_parser, message = "Configuration Error", usage = "", url = "")
|
128
|
-
if Error
|
128
|
+
if Error === message
|
129
129
|
super(message.message)
|
130
|
-
elsif Exception
|
131
|
-
super("#{message.class}
|
130
|
+
elsif Exception === message
|
131
|
+
super("#{message.class}: #{message.message}")
|
132
132
|
else
|
133
133
|
super(message)
|
134
134
|
end
|
@@ -247,8 +247,8 @@ module OpenC3
|
|
247
247
|
end
|
248
248
|
|
249
249
|
# Verifies the indicated parameter in the config doesn't start or end
|
250
|
-
# with an underscore, doesn't contain a double underscore
|
251
|
-
# spaces and doesn't start with a close bracket.
|
250
|
+
# with an underscore, doesn't contain a double underscore or double bracket,
|
251
|
+
# doesn't contain spaces and doesn't start with a close bracket.
|
252
252
|
#
|
253
253
|
# @param [Integer] index The index of the parameter to check
|
254
254
|
def verify_parameter_naming(index, usage = "")
|
@@ -259,6 +259,9 @@ module OpenC3
|
|
259
259
|
if param.include? '__'
|
260
260
|
raise Error.new(self, "Parameter #{index} (#{param}) for #{@keyword} cannot contain a double underscore ('__').", usage, @url)
|
261
261
|
end
|
262
|
+
if param.include? '[[' or param.include? ']]'
|
263
|
+
raise Error.new(self, "Parameter #{index} (#{param}) for #{@keyword} cannot contain double brackets ('[[' or ']]').", usage, @url)
|
264
|
+
end
|
262
265
|
if param.include? ' '
|
263
266
|
raise Error.new(self, "Parameter #{index} (#{param}) for #{@keyword} cannot contain a space (' ').", usage, @url)
|
264
267
|
end
|
@@ -449,18 +452,24 @@ module OpenC3
|
|
449
452
|
return if errors.empty?
|
450
453
|
message = ''
|
451
454
|
errors.each do |error|
|
455
|
+
# Once we have a message we want to ignore errors about bad items, packets, and targets
|
456
|
+
# because the real error is probably in a previous definition
|
457
|
+
next if message != '' && error.message.include?('No current item')
|
458
|
+
next if message != '' && error.message.include?('No current packet')
|
459
|
+
next if message != '' && error.message.include?('Unknown keyword and parameters for Target')
|
460
|
+
|
452
461
|
if error.is_a? OpenC3::ConfigParser::Error
|
453
|
-
message += "\n#{File.basename(error.filename)}:#{error.line_number}: #{error.line}"
|
462
|
+
message += "\n#{File.basename(error.filename)}:#{error.line_number}: #{error.line}" if error.filename
|
454
463
|
message += "\nError: #{error.message}"
|
455
464
|
message += "\nUsage: #{error.usage}" unless error.usage.empty?
|
456
|
-
message += "\
|
457
|
-
|
458
|
-
|
459
|
-
|
465
|
+
message += "\n"
|
466
|
+
# Only capture the first non-ConfigParser::Error which is typically
|
467
|
+
# a RuntimeError generated from a raise during parsing
|
468
|
+
elsif message == ''
|
469
|
+
message += "\n#{error.formatted}\n"
|
460
470
|
end
|
461
|
-
message += "\n"
|
462
471
|
end
|
463
|
-
raise message
|
472
|
+
raise Error.new(self, message)
|
464
473
|
end
|
465
474
|
|
466
475
|
if RUBY_ENGINE != 'ruby' or ENV['OPENC3_NO_EXT']
|
@@ -36,6 +36,8 @@ module OpenC3
|
|
36
36
|
class ActivityModel < Model
|
37
37
|
MAX_DURATION = Time::SEC_PER_DAY
|
38
38
|
PRIMARY_KEY = '__openc3_timelines'.freeze # MUST be equal to `TimelineModel::PRIMARY_KEY` minus the leading __
|
39
|
+
# See run_activity(activity) in openc3/lib/openc3/microservices/timeline_microservice.rb
|
40
|
+
VALID_KINDS = %w(COMMAND SCRIPT RESERVE EXPIRE)
|
39
41
|
|
40
42
|
# Called via the microservice this gets the previous 00:00:15 to 01:01:00. This should allow
|
41
43
|
# for a small buffer around the timeline to make sure the schedule doesn't get stale.
|
@@ -201,14 +203,14 @@ module OpenC3
|
|
201
203
|
rescue NoMethodError
|
202
204
|
raise ActivityInputError.new "start and stop must be seconds: #{start}, #{stop}"
|
203
205
|
end
|
204
|
-
if now_i >= start
|
206
|
+
if now_i >= start and kind != 'EXPIRE'
|
205
207
|
raise ActivityInputError.new "activity must be in the future, current_time: #{now_i} vs #{start}"
|
206
208
|
elsif duration >= MAX_DURATION
|
207
209
|
raise ActivityInputError.new "activity can not be longer than #{MAX_DURATION} seconds"
|
208
210
|
elsif duration <= 0
|
209
211
|
raise ActivityInputError.new "start: #{start} must be before stop: #{stop}"
|
210
|
-
elsif
|
211
|
-
raise ActivityInputError.new "kind must
|
212
|
+
elsif !VALID_KINDS.include?(kind)
|
213
|
+
raise ActivityInputError.new "unknown kind: #{kind}, must be one of #{VALID_KINDS.join(', ')}"
|
212
214
|
elsif data.nil?
|
213
215
|
raise ActivityInputError.new "data must not be nil: #{data}"
|
214
216
|
elsif data.is_a?(Hash) == false
|
@@ -245,13 +245,19 @@ module OpenC3
|
|
245
245
|
when 'VARIABLE', 'NEEDS_DEPENDENCIES'
|
246
246
|
# Ignore during phase 2
|
247
247
|
when 'TARGET', 'INTERFACE', 'ROUTER', 'MICROSERVICE', 'TOOL', 'WIDGET'
|
248
|
-
|
249
|
-
current_model
|
250
|
-
|
248
|
+
begin
|
249
|
+
if current_model
|
250
|
+
current_model.create unless validate_only
|
251
|
+
current_model.deploy(gem_path, variables, validate_only: validate_only)
|
252
|
+
end
|
253
|
+
# If something goes wrong in create, or more likely in deploy,
|
254
|
+
# we want to clear the current_model and try to instantiate the next
|
255
|
+
# Otherwise we're stuck constantly iterating on the last model
|
256
|
+
ensure
|
251
257
|
current_model = nil
|
258
|
+
current_model = OpenC3.const_get((keyword.capitalize + 'Model').intern).handle_config(parser,
|
259
|
+
keyword, params, plugin: plugin_model.name, needs_dependencies: needs_dependencies, scope: scope)
|
252
260
|
end
|
253
|
-
current_model = OpenC3.const_get((keyword.capitalize + 'Model').intern).handle_config(parser,
|
254
|
-
keyword, params, plugin: plugin_model.name, needs_dependencies: needs_dependencies, scope: scope)
|
255
261
|
else
|
256
262
|
if current_model
|
257
263
|
current_model.handle_config(parser, keyword, params)
|
@@ -271,10 +277,10 @@ module OpenC3
|
|
271
277
|
$LOAD_PATH.delete(load_dir)
|
272
278
|
end
|
273
279
|
end
|
274
|
-
rescue =>
|
280
|
+
rescue => e
|
275
281
|
# Install failed - need to cleanup
|
276
282
|
plugin_model.destroy unless validate_only
|
277
|
-
raise
|
283
|
+
raise e
|
278
284
|
ensure
|
279
285
|
FileUtils.remove_entry(temp_dir) if temp_dir and File.exist?(temp_dir)
|
280
286
|
tf.unlink if tf
|
@@ -301,7 +307,7 @@ module OpenC3
|
|
301
307
|
super(update: update, force: force, queued: queued)
|
302
308
|
end
|
303
309
|
|
304
|
-
def as_json(*
|
310
|
+
def as_json(*_a)
|
305
311
|
{
|
306
312
|
'name' => @name,
|
307
313
|
'variables' => @variables,
|
@@ -316,11 +322,11 @@ module OpenC3
|
|
316
322
|
errors = []
|
317
323
|
microservice_count = 0
|
318
324
|
microservices = MicroserviceModel.find_all_by_plugin(plugin: @name, scope: @scope)
|
319
|
-
microservices.each do |
|
325
|
+
microservices.each do |_name, model_instance|
|
320
326
|
begin
|
321
327
|
model_instance.destroy
|
322
|
-
rescue Exception =>
|
323
|
-
errors <<
|
328
|
+
rescue Exception => e
|
329
|
+
errors << e
|
324
330
|
end
|
325
331
|
microservice_count += 1
|
326
332
|
end
|
@@ -329,20 +335,20 @@ module OpenC3
|
|
329
335
|
# Remove all the other models now that the processes have stopped
|
330
336
|
# Save TargetModel for last as it has the most to cleanup
|
331
337
|
[InterfaceModel, RouterModel, ToolModel, WidgetModel, TargetModel].each do |model|
|
332
|
-
model.find_all_by_plugin(plugin: @name, scope: @scope).each do |
|
338
|
+
model.find_all_by_plugin(plugin: @name, scope: @scope).each do |_name, model_instance|
|
333
339
|
begin
|
334
340
|
model_instance.destroy
|
335
|
-
rescue Exception =>
|
336
|
-
errors <<
|
341
|
+
rescue Exception => e
|
342
|
+
errors << e
|
337
343
|
end
|
338
344
|
end
|
339
345
|
end
|
340
346
|
# Cleanup Redis stuff that might have been left by microservices
|
341
|
-
microservices.each do |
|
347
|
+
microservices.each do |_name, model_instance|
|
342
348
|
begin
|
343
349
|
model_instance.cleanup
|
344
|
-
rescue Exception =>
|
345
|
-
errors <<
|
350
|
+
rescue Exception => e
|
351
|
+
errors << e
|
346
352
|
end
|
347
353
|
end
|
348
354
|
# Raise all the errors at once
|
@@ -353,13 +359,13 @@ module OpenC3
|
|
353
359
|
end
|
354
360
|
raise message
|
355
361
|
end
|
356
|
-
rescue Exception =>
|
357
|
-
Logger.error("Error undeploying plugin model #{@name} in scope #{@scope} due to: #{
|
362
|
+
rescue Exception => e
|
363
|
+
Logger.error("Error undeploying plugin model #{@name} in scope #{@scope} due to: #{e.formatted}")
|
358
364
|
ensure
|
359
365
|
# Double check everything is gone
|
360
366
|
found = []
|
361
367
|
[MicroserviceModel, InterfaceModel, RouterModel, ToolModel, WidgetModel, TargetModel].each do |model|
|
362
|
-
model.find_all_by_plugin(plugin: @name, scope: @scope).each do |
|
368
|
+
model.find_all_by_plugin(plugin: @name, scope: @scope).each do |_name, model_instance|
|
363
369
|
found << model_instance
|
364
370
|
end
|
365
371
|
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU Affero General Public License for more details.
|
15
15
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
|
-
# All changes Copyright
|
17
|
+
# All changes Copyright 2024, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
20
|
# This file may also be used under the terms of a commercial license
|
@@ -31,6 +31,7 @@ require 'openc3/utilities/local_mode'
|
|
31
31
|
require 'openc3/utilities/bucket'
|
32
32
|
require 'openc3/utilities/zip'
|
33
33
|
require 'fileutils'
|
34
|
+
require 'ostruct'
|
34
35
|
require 'tmpdir'
|
35
36
|
|
36
37
|
module OpenC3
|
@@ -753,7 +754,7 @@ module OpenC3
|
|
753
754
|
packet_hash.each do |target_name, packets|
|
754
755
|
Store.del("#{@scope}__openc3tlm__#{target_name}") if clear_old
|
755
756
|
packets.each do |packet_name, packet|
|
756
|
-
Logger.
|
757
|
+
Logger.debug "Configuring tlm packet: #{target_name} #{packet_name}"
|
757
758
|
begin
|
758
759
|
Store.hset("#{@scope}__openc3tlm__#{target_name}", packet_name, JSON.generate(packet.as_json(:allow_nan => true)))
|
759
760
|
rescue JSON::GeneratorError => e
|
@@ -773,7 +774,7 @@ module OpenC3
|
|
773
774
|
packet_hash.each do |target_name, packets|
|
774
775
|
Store.del("#{@scope}__openc3cmd__#{target_name}") if clear_old
|
775
776
|
packets.each do |packet_name, packet|
|
776
|
-
Logger.
|
777
|
+
Logger.debug "Configuring cmd packet: #{target_name} #{packet_name}"
|
777
778
|
begin
|
778
779
|
Store.hset("#{@scope}__openc3cmd__#{target_name}", packet_name, JSON.generate(packet.as_json(:allow_nan => true)))
|
779
780
|
rescue JSON::GeneratorError => e
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU Affero General Public License for more details.
|
15
15
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
|
-
# All changes Copyright
|
17
|
+
# All changes Copyright 2024, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
20
|
# This file may also be used under the terms of a commercial license
|
@@ -396,7 +396,7 @@ module OpenC3
|
|
396
396
|
# @return [Array<String>] Warning messages for big definition overlaps
|
397
397
|
def check_bit_offsets
|
398
398
|
if @ignore_overlap
|
399
|
-
Logger.instance.
|
399
|
+
Logger.instance.debug("#{@target_name} #{@packet_name} has IGNORE_OVERLAP so bit overlaps ignored")
|
400
400
|
return []
|
401
401
|
end
|
402
402
|
expected_next_offset = nil
|
@@ -488,7 +488,7 @@ module OpenC3
|
|
488
488
|
end
|
489
489
|
end
|
490
490
|
rescue Exception => e
|
491
|
-
raise parser.error(e)
|
491
|
+
raise parser.error(e.formatted)
|
492
492
|
end
|
493
493
|
|
494
494
|
when 'TEMPLATE'
|
@@ -503,7 +503,7 @@ module OpenC3
|
|
503
503
|
begin
|
504
504
|
@current_packet.template = parser.read_file(params[0])
|
505
505
|
rescue Exception => e
|
506
|
-
raise parser.error(e)
|
506
|
+
raise parser.error(e.formatted)
|
507
507
|
end
|
508
508
|
|
509
509
|
when 'RESPONSE'
|
@@ -88,8 +88,6 @@ module OpenC3
|
|
88
88
|
item = packet.define(item)
|
89
89
|
end
|
90
90
|
item
|
91
|
-
rescue => err
|
92
|
-
raise @parser.error(err, @usage)
|
93
91
|
end
|
94
92
|
|
95
93
|
private
|
@@ -105,17 +103,16 @@ module OpenC3
|
|
105
103
|
|
106
104
|
def get_bit_offset
|
107
105
|
return 0 if append?
|
108
|
-
|
109
106
|
Integer(@parser.parameters[1])
|
110
|
-
rescue =>
|
111
|
-
raise @parser.error(
|
107
|
+
rescue => e
|
108
|
+
raise @parser.error(e, @usage)
|
112
109
|
end
|
113
110
|
|
114
111
|
def get_bit_size
|
115
112
|
index = append? ? 1 : 2
|
116
113
|
Integer(@parser.parameters[index])
|
117
|
-
rescue =>
|
118
|
-
raise @parser.error(
|
114
|
+
rescue => e
|
115
|
+
raise @parser.error(e, @usage)
|
119
116
|
end
|
120
117
|
|
121
118
|
def get_array_size
|
@@ -133,8 +130,8 @@ module OpenC3
|
|
133
130
|
@warnings << warning
|
134
131
|
end
|
135
132
|
array_bit_size
|
136
|
-
rescue =>
|
137
|
-
raise @parser.error(
|
133
|
+
rescue => e
|
134
|
+
raise @parser.error(e, @usage)
|
138
135
|
end
|
139
136
|
|
140
137
|
def get_endianness(packet)
|
@@ -67,8 +67,8 @@ module OpenC3
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def create_timeline_activity(name, kind:, start:, stop:, data: {}, scope: $openc3_scope, token: $openc3_token)
|
70
|
-
kind = kind.to_s.
|
71
|
-
kinds = %w(
|
70
|
+
kind = kind.to_s.upcase()
|
71
|
+
kinds = %w(COMMAND SCRIPT RESERVE)
|
72
72
|
unless kinds.include?(kind)
|
73
73
|
raise "Unknown kind: #{kind}. Must be one of #{kinds.join(', ')}."
|
74
74
|
end
|
data/lib/openc3/system/system.rb
CHANGED
data/lib/openc3/system/target.rb
CHANGED
@@ -140,11 +140,11 @@ module OpenC3
|
|
140
140
|
filename = parameters[0]
|
141
141
|
OpenC3.require_file(parameters[0])
|
142
142
|
end
|
143
|
-
rescue Exception =>
|
144
|
-
raise parser.error(
|
143
|
+
rescue Exception => e
|
144
|
+
raise parser.error(e.formatted)
|
145
145
|
end
|
146
146
|
rescue Exception => e
|
147
|
-
raise parser.error(e.
|
147
|
+
raise parser.error(e.formatted)
|
148
148
|
end
|
149
149
|
|
150
150
|
# This code resolves any relative paths to absolute before putting into the @requires array
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
|
-
# This file may also be used under the terms of a commercial license
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
21
|
# if purchased from OpenC3, Inc.
|
22
22
|
|
23
23
|
require 'openc3/packets/packet_config'
|
@@ -62,8 +62,6 @@ module OpenC3
|
|
62
62
|
item = table.define(item)
|
63
63
|
end
|
64
64
|
item
|
65
|
-
rescue => err
|
66
|
-
raise @parser.error(err, @usage)
|
67
65
|
end
|
68
66
|
end
|
69
67
|
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU Affero General Public License for more details.
|
15
15
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
|
-
# All changes Copyright
|
17
|
+
# All changes Copyright 2024, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
20
|
# This file may also be used under the terms of a commercial license
|
@@ -179,7 +179,7 @@ module OpenC3
|
|
179
179
|
enabled = limits_settings['enabled']
|
180
180
|
persistence = limits_settings['persistence_setting']
|
181
181
|
limits_settings.each do |limits_set, settings|
|
182
|
-
next unless Hash ===
|
182
|
+
next unless Hash === settings
|
183
183
|
System.limits.set(target_name, packet_name, item_name, settings['red_low'], settings['yellow_low'], settings['yellow_high'], settings['red_high'], settings['green_low'], settings['green_high'], limits_set.to_s.intern, persistence, enabled)
|
184
184
|
end
|
185
185
|
if not enabled.nil?
|
@@ -198,7 +198,7 @@ module OpenC3
|
|
198
198
|
def self.sync_system_thread_body(scope:, block_ms: nil)
|
199
199
|
telemetry = System.telemetry.all
|
200
200
|
topics = ["#{scope}__openc3_limits_events"]
|
201
|
-
Topic.read_topics(topics, nil, block_ms) do |
|
201
|
+
Topic.read_topics(topics, nil, block_ms) do |_topic, _msg_id, event, _redis|
|
202
202
|
event = JSON.parse(event['event'], :allow_nan => true, :create_additions => true)
|
203
203
|
case event['type']
|
204
204
|
when 'LIMITS_CHANGE'
|
@@ -213,7 +213,9 @@ module OpenC3
|
|
213
213
|
if packet
|
214
214
|
enabled = ConfigParser.handle_true_false_nil(event['enabled'])
|
215
215
|
persistence = event['persistence']
|
216
|
-
System.limits.set(target_name, packet_name, item_name,
|
216
|
+
System.limits.set(target_name, packet_name, item_name,
|
217
|
+
event['red_low'], event['yellow_low'], event['yellow_high'], event['red_high'],
|
218
|
+
event['green_low'], event['green_high'], event['limits_set'], persistence, enabled)
|
217
219
|
end
|
218
220
|
end
|
219
221
|
|
@@ -47,6 +47,7 @@ module OpenC3
|
|
47
47
|
'openc3-enterprise-tool-base',
|
48
48
|
'openc3-cosmos-tool-autonomic',
|
49
49
|
'openc3-cosmos-tool-calendar',
|
50
|
+
'openc3-cosmos-tool-grafana',
|
50
51
|
'openc3-tool-base',
|
51
52
|
]
|
52
53
|
|
@@ -168,7 +169,7 @@ module OpenC3
|
|
168
169
|
json = JSON.parse(data, :allow_nan => true, :create_additions => true)
|
169
170
|
|
170
171
|
found = false
|
171
|
-
found_models.each do |name,
|
172
|
+
found_models.each do |name, _model_details|
|
172
173
|
if json["name"] == name
|
173
174
|
# Matched pair
|
174
175
|
found = true
|
@@ -339,7 +340,7 @@ module OpenC3
|
|
339
340
|
def self.modified_targets(scope:)
|
340
341
|
targets = {}
|
341
342
|
local_catalog = build_local_catalog(scope: scope)
|
342
|
-
local_catalog.each do |key,
|
343
|
+
local_catalog.each do |key, _size|
|
343
344
|
split_key = key.split('/') # scope/targets_modified/target_name/*
|
344
345
|
target_name = split_key[2]
|
345
346
|
if target_name
|
@@ -352,7 +353,7 @@ module OpenC3
|
|
352
353
|
def self.modified_files(target_name, scope:)
|
353
354
|
modified = []
|
354
355
|
local_catalog = build_local_catalog(scope: scope)
|
355
|
-
local_catalog.each do |key,
|
356
|
+
local_catalog.each do |key, _size|
|
356
357
|
split_key = key.split('/') # scope/targets_modified/target_name/*
|
357
358
|
local_target_name = split_key[2]
|
358
359
|
if target_name == local_target_name
|
@@ -399,7 +400,7 @@ module OpenC3
|
|
399
400
|
def self.local_target_files(scope:, path_matchers:, include_temp: false)
|
400
401
|
files = []
|
401
402
|
local_catalog = build_local_catalog(scope: scope)
|
402
|
-
local_catalog.each do |key,
|
403
|
+
local_catalog.each do |key, _size|
|
403
404
|
split_key = key.split('/')
|
404
405
|
# DEFAULT/targets_modified/__TEMP__/YYYY_MM_DD_HH_MM_SS_mmm_temp.rb
|
405
406
|
# See target_file.rb TEMP_FOLDER
|
@@ -434,8 +435,8 @@ module OpenC3
|
|
434
435
|
JSON.parse(data, :allow_nan => true, :create_additions => true)
|
435
436
|
# Only save if the parse was successful
|
436
437
|
ToolConfigModel.save_config(parts[-2], File.basename(config, '.json'), data, scope: scope, local_mode: false)
|
437
|
-
rescue JSON::ParserError =>
|
438
|
-
puts "Unable to initialize tool config due to #{
|
438
|
+
rescue JSON::ParserError => e
|
439
|
+
puts "Unable to initialize tool config due to #{e.message}"
|
439
440
|
end
|
440
441
|
end
|
441
442
|
end
|
@@ -555,7 +556,7 @@ module OpenC3
|
|
555
556
|
end
|
556
557
|
end
|
557
558
|
|
558
|
-
remote_catalog.each do |key,
|
559
|
+
remote_catalog.each do |key, _size|
|
559
560
|
local_size = local_catalog[key]
|
560
561
|
if local_size
|
561
562
|
# Both files exist - Handled earlier
|
data/lib/openc3/version.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
OPENC3_VERSION = '5.
|
3
|
+
OPENC3_VERSION = '5.17.0'
|
4
4
|
module OpenC3
|
5
5
|
module Version
|
6
6
|
MAJOR = '5'
|
7
|
-
MINOR = '
|
8
|
-
PATCH = '
|
7
|
+
MINOR = '17'
|
8
|
+
PATCH = '0'
|
9
9
|
OTHER = ''
|
10
|
-
BUILD = '
|
10
|
+
BUILD = 'da4e65bcbe6c1fad00b5eb3499a026c9f75412a1'
|
11
11
|
end
|
12
|
-
VERSION = '5.
|
13
|
-
GEM_VERSION = '5.
|
12
|
+
VERSION = '5.17.0'
|
13
|
+
GEM_VERSION = '5.17.0'
|
14
14
|
end
|
@@ -1,4 +1,6 @@
|
|
1
1
|
from openc3.conversions.conversion import Conversion
|
2
|
+
# Using tlm() requires the following:
|
3
|
+
# from openc3.api.tlm_api import tlm
|
2
4
|
|
3
5
|
# Custom conversion class
|
4
6
|
# See https://docs.openc3.com/docs/configuration/telemetry#read_conversion
|
@@ -26,3 +28,4 @@ class <%= conversion_class %>(Conversion):
|
|
26
28
|
# Used when conversion is applied to a regular (not DERIVED) item
|
27
29
|
# NOTE: You can also use packet.read("ITEM") to get additional values
|
28
30
|
# return value / 2 * packet.read("OTHER_ITEM")
|
31
|
+
return value
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "<%= tool_name %>",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.17.0",
|
4
4
|
"scripts": {
|
5
5
|
"ng": "ng",
|
6
6
|
"start": "ng serve",
|
@@ -12,7 +12,6 @@
|
|
12
12
|
},
|
13
13
|
"private": true,
|
14
14
|
"dependencies": {
|
15
|
-
"@openc3/tool-common": "5.16.1",
|
16
15
|
"@angular/animations": "^17.0.8",
|
17
16
|
"@angular/cdk": "^17.0.4",
|
18
17
|
"@angular/common": "^17.0.8",
|
@@ -23,7 +22,8 @@
|
|
23
22
|
"@angular/platform-browser": "^17.0.8",
|
24
23
|
"@angular/platform-browser-dynamic": "^17.0.8",
|
25
24
|
"@angular/router": "^17.0.8",
|
26
|
-
"@astrouxds/astro-web-components": "7.22.
|
25
|
+
"@astrouxds/astro-web-components": "7.22.1",
|
26
|
+
"@openc3/tool-common": "5.17.0",
|
27
27
|
"rxjs": "~7.8.0",
|
28
28
|
"single-spa": "5.9.5",
|
29
29
|
"single-spa-angular": "^9.0.1",
|
@@ -43,6 +43,6 @@
|
|
43
43
|
"karma-jasmine": "~5.1.0",
|
44
44
|
"karma-jasmine-html-reporter": "~2.1.0",
|
45
45
|
"style-loader": "^4.0.0",
|
46
|
-
"typescript": "~5.
|
46
|
+
"typescript": "~5.5.2"
|
47
47
|
}
|
48
48
|
}
|
@@ -11,13 +11,13 @@
|
|
11
11
|
"smui-theme": "smui-theme compile build/smui.css -i src/theme"
|
12
12
|
},
|
13
13
|
"dependencies": {
|
14
|
-
"@
|
15
|
-
"@
|
14
|
+
"@astrouxds/astro-web-components": "7.22.1",
|
15
|
+
"@openc3/tool-common": "5.17.0",
|
16
16
|
"@smui/button": "^7.0.0-beta.16",
|
17
17
|
"@smui/card": "^7.0.0-beta.16",
|
18
18
|
"@smui/list": "^7.0.0-beta.16",
|
19
19
|
"@smui/menu": "^7.0.0-beta.16",
|
20
|
-
"axios": "1.
|
20
|
+
"axios": "1.7.2",
|
21
21
|
"single-spa-svelte": "^2.1.1",
|
22
22
|
"sirv-cli": "^2.0.2",
|
23
23
|
"svelte-portal": "^2.2.0"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "<%= tool_name %>",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.17.0",
|
4
4
|
"private": true,
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vue-cli-service serve",
|
@@ -11,9 +11,9 @@
|
|
11
11
|
"test:components": "vue-cli-service test:components"
|
12
12
|
},
|
13
13
|
"dependencies": {
|
14
|
-
"@
|
15
|
-
"@
|
16
|
-
"axios": "1.
|
14
|
+
"@astrouxds/astro-web-components": "7.22.1",
|
15
|
+
"@openc3/tool-common": "5.17.0",
|
16
|
+
"axios": "1.7.2",
|
17
17
|
"date-fns": "3.6.0",
|
18
18
|
"portal-vue": "2.1.7",
|
19
19
|
"single-spa-vue": "2.5.1",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"vuex": "3.6.2"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
|
-
"@babel/eslint-parser": "7.24.
|
28
|
+
"@babel/eslint-parser": "7.24.7",
|
29
29
|
"@vue/babel-preset-app": "5.0.8",
|
30
30
|
"@vue/cli": "5.0.8",
|
31
31
|
"@vue/cli-plugin-babel": "5.0.8",
|
@@ -40,14 +40,14 @@
|
|
40
40
|
"eslint": "8.56.0",
|
41
41
|
"eslint-config-prettier": "9.1.0",
|
42
42
|
"eslint-plugin-prettier": "5.1.3",
|
43
|
-
"eslint-plugin-vue": "9.
|
43
|
+
"eslint-plugin-vue": "9.26.0",
|
44
44
|
"html-webpack-plugin": "^5.6.0",
|
45
|
-
"prettier": "3.2
|
46
|
-
"sass": "1.
|
45
|
+
"prettier": "3.3.2",
|
46
|
+
"sass": "1.77.6",
|
47
47
|
"sass-loader": "14.2.1",
|
48
48
|
"vue-cli-plugin-single-spa": "3.3.0",
|
49
49
|
"vue-cli-plugin-vuetify": "2.5.8",
|
50
50
|
"vue-template-compiler": "2.7.16",
|
51
|
-
"webpack": "5.
|
51
|
+
"webpack": "5.92.1"
|
52
52
|
}
|
53
53
|
}
|
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "widget",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.17.0",
|
4
4
|
"private": true,
|
5
5
|
"scripts": {
|
6
6
|
"build": "vue-cli-service build --target lib --dest tools/widgets/<%= widget_name %> --formats umd-min <%= widget_path %> --name <%= widget_name %>"
|
7
7
|
},
|
8
8
|
"dependencies": {
|
9
|
-
"@
|
10
|
-
"@
|
9
|
+
"@astrouxds/astro-web-components": "7.22.1",
|
10
|
+
"@openc3/tool-common": "5.17.0",
|
11
11
|
"vue": "2.7.16",
|
12
12
|
"vuetify": "2.7.1"
|
13
13
|
},
|
14
14
|
"devDependencies": {
|
15
|
-
"@babel/eslint-parser": "7.24.
|
16
|
-
"@rushstack/eslint-patch": "1.10.
|
15
|
+
"@babel/eslint-parser": "7.24.7",
|
16
|
+
"@rushstack/eslint-patch": "1.10.3",
|
17
17
|
"@vue/babel-preset-app": "5.0.8",
|
18
18
|
"@vue/cli": "5.0.8",
|
19
19
|
"@vue/cli-plugin-babel": "5.0.8",
|
@@ -25,12 +25,12 @@
|
|
25
25
|
"eslint": "8.56.0",
|
26
26
|
"eslint-config-prettier": "9.1.0",
|
27
27
|
"eslint-plugin-prettier": "5.1.3",
|
28
|
-
"eslint-plugin-vue": "9.
|
29
|
-
"prettier": "3.2
|
30
|
-
"sass": "1.
|
28
|
+
"eslint-plugin-vue": "9.26.0",
|
29
|
+
"prettier": "3.3.2",
|
30
|
+
"sass": "1.77.6",
|
31
31
|
"sass-loader": "14.2.1",
|
32
32
|
"vue-cli-plugin-vuetify": "2.5.8",
|
33
33
|
"vue-template-compiler": "2.7.16",
|
34
|
-
"webpack": "5.
|
34
|
+
"webpack": "5.92.1"
|
35
35
|
}
|
36
36
|
}
|
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: 5.
|
4
|
+
version: 5.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|