openc3 5.20.0 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/bin/openc3cli +12 -120
  3. data/data/config/command_modifiers.yaml +13 -1
  4. data/data/config/interface_modifiers.yaml +21 -4
  5. data/data/config/item_modifiers.yaml +1 -1
  6. data/data/config/microservice.yaml +15 -2
  7. data/data/config/param_item_modifiers.yaml +1 -1
  8. data/data/config/parameter_modifiers.yaml +1 -1
  9. data/data/config/table_manager.yaml +2 -2
  10. data/data/config/target.yaml +11 -0
  11. data/data/config/telemetry_modifiers.yaml +17 -1
  12. data/data/config/tool.yaml +12 -0
  13. data/data/config/widgets.yaml +13 -17
  14. data/lib/openc3/accessors/form_accessor.rb +4 -3
  15. data/lib/openc3/accessors/html_accessor.rb +3 -3
  16. data/lib/openc3/accessors/http_accessor.rb +13 -13
  17. data/lib/openc3/accessors/xml_accessor.rb +16 -4
  18. data/lib/openc3/api/target_api.rb +0 -30
  19. data/lib/openc3/config/config_parser.rb +6 -3
  20. data/lib/openc3/core_ext/array.rb +0 -16
  21. data/lib/openc3/core_ext.rb +0 -1
  22. data/lib/openc3/interfaces/file_interface.rb +198 -0
  23. data/lib/openc3/interfaces/http_client_interface.rb +71 -39
  24. data/lib/openc3/interfaces/http_server_interface.rb +0 -7
  25. data/lib/openc3/interfaces/interface.rb +2 -0
  26. data/lib/openc3/interfaces/mqtt_interface.rb +32 -15
  27. data/lib/openc3/interfaces/mqtt_stream_interface.rb +19 -4
  28. data/lib/openc3/interfaces/protocols/crc_protocol.rb +7 -0
  29. data/lib/openc3/interfaces/serial_interface.rb +1 -0
  30. data/lib/openc3/interfaces.rb +2 -4
  31. data/lib/openc3/microservices/multi_microservice.rb +3 -3
  32. data/lib/openc3/migrations/20241208080000_no_critical_cmd.rb +31 -0
  33. data/lib/openc3/migrations/20241208080001_no_trigger_group.rb +46 -0
  34. data/lib/openc3/models/interface_model.rb +9 -3
  35. data/lib/openc3/models/microservice_model.rb +8 -1
  36. data/lib/openc3/models/plugin_model.rb +6 -1
  37. data/lib/openc3/models/python_package_model.rb +6 -1
  38. data/lib/openc3/models/reaction_model.rb +14 -10
  39. data/lib/openc3/models/scope_model.rb +60 -42
  40. data/lib/openc3/models/target_model.rb +17 -1
  41. data/lib/openc3/models/timeline_model.rb +17 -5
  42. data/lib/openc3/models/tool_model.rb +15 -3
  43. data/lib/openc3/models/trigger_group_model.rb +6 -3
  44. data/lib/openc3/operators/microservice_operator.rb +8 -0
  45. data/lib/openc3/packets/commands.rb +17 -6
  46. data/lib/openc3/packets/limits.rb +0 -12
  47. data/lib/openc3/packets/packet.rb +1 -1
  48. data/lib/openc3/packets/packet_item.rb +30 -36
  49. data/lib/openc3/packets/structure_item.rb +2 -2
  50. data/lib/openc3/script/script.rb +0 -10
  51. data/lib/openc3/script/web_socket_api.rb +2 -2
  52. data/lib/openc3/streams/mqtt_stream.rb +41 -33
  53. data/lib/openc3/streams/serial_stream.rb +27 -27
  54. data/lib/openc3/streams/stream.rb +17 -17
  55. data/lib/openc3/streams/tcpip_client_stream.rb +1 -1
  56. data/lib/openc3/streams/tcpip_socket_stream.rb +19 -19
  57. data/lib/openc3/system/system.rb +1 -1
  58. data/lib/openc3/system.rb +2 -3
  59. data/lib/openc3/tools/table_manager/table.rb +2 -2
  60. data/lib/openc3/tools/table_manager/table_parser.rb +1 -1
  61. data/lib/openc3/top_level.rb +0 -5
  62. data/lib/openc3/topics/command_decom_topic.rb +0 -7
  63. data/lib/openc3/utilities/bucket_utilities.rb +1 -1
  64. data/lib/openc3/utilities/cli_generator.rb +0 -1
  65. data/lib/openc3/version.rb +7 -7
  66. data/templates/plugin/README.md +1 -1
  67. data/templates/target/targets/TARGET/lib/target.rb +1 -1
  68. data/templates/tool_angular/package.json +8 -8
  69. data/templates/tool_angular/src/app/app.component.html +4 -13
  70. data/templates/tool_angular/src/app/app.component.scss +5 -13
  71. data/templates/tool_angular/src/app/app.component.ts +5 -4
  72. data/templates/tool_angular/src/app/custom-overlay-container.ts +2 -2
  73. data/templates/tool_angular/src/app/openc3-api.d.ts +1 -1
  74. data/templates/tool_angular/src/main.single-spa.ts +1 -1
  75. data/templates/tool_react/package.json +1 -0
  76. data/templates/tool_react/src/root.component.js +1 -1
  77. data/templates/tool_svelte/package.json +11 -9
  78. data/templates/tool_svelte/rollup.config.js +2 -0
  79. data/templates/tool_svelte/src/App.svelte +2 -2
  80. data/templates/tool_vue/eslint.config.mjs +68 -0
  81. data/templates/tool_vue/jsconfig.json +1 -1
  82. data/templates/tool_vue/package.json +26 -43
  83. data/templates/tool_vue/src/App.vue +3 -5
  84. data/templates/tool_vue/src/main.js +12 -23
  85. data/templates/tool_vue/src/router.js +19 -18
  86. data/templates/tool_vue/src/tools/tool_name/tool_name.vue +2 -2
  87. data/templates/tool_vue/vite.config.js +52 -0
  88. data/templates/widget/package.json +19 -26
  89. data/templates/widget/src/Widget.vue +13 -15
  90. data/templates/widget/vite.config.js +26 -0
  91. metadata +10 -41
  92. data/lib/openc3/core_ext/hash.rb +0 -40
  93. data/lib/openc3/core_ext/httpclient.rb +0 -11
  94. data/lib/openc3/interfaces/linc_interface.rb +0 -480
  95. data/lib/openc3/interfaces/protocols/override_protocol.rb +0 -4
  96. data/lib/openc3/microservices/critical_cmd_microservice.rb +0 -74
  97. data/lib/openc3/microservices/reaction_microservice.rb +0 -607
  98. data/lib/openc3/microservices/timeline_microservice.rb +0 -398
  99. data/lib/openc3/microservices/trigger_group_microservice.rb +0 -698
  100. data/lib/openc3/migrations/20230615000000_autonomic.rb +0 -86
  101. data/lib/openc3/migrations/20240915000000_activity_uuid.rb +0 -28
  102. data/lib/openc3/migrations/20241016000000_scope_critical_cmd.rb +0 -24
  103. data/lib/openc3/system/system_config.rb +0 -413
  104. data/templates/tool_svelte/src/services/api.js +0 -92
  105. data/templates/tool_svelte/src/services/axios.js +0 -85
  106. data/templates/tool_svelte/src/services/cable.js +0 -65
  107. data/templates/tool_svelte/src/services/config-parser.js +0 -198
  108. data/templates/tool_svelte/src/services/openc3-api.js +0 -606
  109. data/templates/tool_vue/.eslintrc.js +0 -43
  110. data/templates/tool_vue/babel.config.json +0 -11
  111. data/templates/tool_vue/vue.config.js +0 -38
  112. data/templates/widget/.eslintrc.js +0 -43
  113. data/templates/widget/babel.config.json +0 -11
  114. data/templates/widget/vue.config.js +0 -28
  115. /data/templates/tool_vue/{.prettierrc.js → .prettierrc.cjs} +0 -0
  116. /data/templates/widget/{.prettierrc.js → .prettierrc.cjs} +0 -0
@@ -112,8 +112,6 @@ module OpenC3
112
112
  @messages_disabled = nil
113
113
  @state_colors = nil
114
114
  @limits = PacketItemLimits.new
115
- @persistence_setting = 1
116
- @persistence_count = 0
117
115
  @meta = nil
118
116
  end
119
117
 
@@ -426,15 +424,13 @@ module OpenC3
426
424
  config << self.read_conversion.to_config(:READ) if self.read_conversion
427
425
  config << self.write_conversion.to_config(:WRITE) if self.write_conversion
428
426
 
429
- if self.limits
430
- if self.limits.values
431
- self.limits.values.each do |limits_set, limits_values|
432
- config << " LIMITS #{limits_set} #{self.limits.persistence_setting} #{self.limits.enabled ? 'ENABLED' : 'DISABLED'} #{limits_values[0]} #{limits_values[1]} #{limits_values[2]} #{limits_values[3]}"
433
- if limits_values[4] && limits_values[5]
434
- config << " #{limits_values[4]} #{limits_values[5]}\n"
435
- else
436
- config << "\n"
437
- end
427
+ if self.limits.values
428
+ self.limits.values.each do |limits_set, limits_values|
429
+ config << " LIMITS #{limits_set} #{self.limits.persistence_setting} #{self.limits.enabled ? 'ENABLED' : 'DISABLED'} #{limits_values[0]} #{limits_values[1]} #{limits_values[2]} #{limits_values[3]}"
430
+ if limits_values[4] && limits_values[5]
431
+ config << " #{limits_values[4]} #{limits_values[5]}\n"
432
+ else
433
+ config << "\n"
438
434
  end
439
435
  end
440
436
  config << self.limits.response.to_config if self.limits.response
@@ -489,35 +485,33 @@ module OpenC3
489
485
  config['read_conversion'] = self.read_conversion.as_json(*a) if self.read_conversion
490
486
  config['write_conversion'] = self.write_conversion.as_json(*a) if self.write_conversion
491
487
 
492
- if self.limits
493
- config['limits'] ||= {}
494
- if self.limits.enabled
495
- config['limits']['enabled'] = true
496
- else
497
- config['limits']['enabled'] = false
488
+ config['limits'] ||= {}
489
+ if self.limits.enabled
490
+ config['limits']['enabled'] = true
491
+ elsif self.limits.values || (self.state_colors && self.state_colors.length > 0)
492
+ # Only set to false if there are limits or state colors
493
+ # to avoid items without limits acting like they can be enabled
494
+ config['limits']['enabled'] = false
495
+ end
496
+ if self.limits.values
497
+ # Only set these if there are limits.values because persistence_setting has a default
498
+ # and we don't want keys on the 'limits' hash if there aren't any limits
499
+ config['limits']['persistence_setting'] = self.limits.persistence_setting if self.limits.persistence_setting
500
+ config['limits']['response'] = self.limits.response.to_s if self.limits.response
501
+ self.limits.values.each do |limits_set, limits_values|
502
+ limits = {}
503
+ limits['red_low'] = limits_values[0]
504
+ limits['yellow_low'] = limits_values[1]
505
+ limits['yellow_high'] = limits_values[2]
506
+ limits['red_high'] = limits_values[3]
507
+ limits['green_low'] = limits_values[4] if limits_values[4]
508
+ limits['green_high'] = limits_values[5] if limits_values[5]
509
+ config['limits'][limits_set] = limits
498
510
  end
499
- if self.limits.values
500
- config['limits'] ||= {}
501
- config['limits']['persistence_setting'] = self.limits.persistence_setting
502
- config['limits']['response'] = self.limits.response.to_s if self.limits.response
503
- self.limits.values.each do |limits_set, limits_values|
504
- limits = {}
505
- limits['red_low'] = limits_values[0]
506
- limits['yellow_low'] = limits_values[1]
507
- limits['yellow_high'] = limits_values[2]
508
- limits['red_high'] = limits_values[3]
509
- limits['green_low'] = limits_values[4] if limits_values[4]
510
- limits['green_high'] = limits_values[5] if limits_values[5]
511
- config['limits'][limits_set] = limits
512
- end
513
- end
514
- config['limits_response'] = self.limits.response.as_json(*a) if self.limits.response
515
511
  end
516
512
 
517
513
  config['meta'] = @meta if @meta
518
- if @variable_bit_size
519
- config['variable_bit_size'] = @variable_bit_size
520
- end
514
+ config['variable_bit_size'] = @variable_bit_size if @variable_bit_size
521
515
  config
522
516
  end
523
517
 
@@ -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 2022, OpenC3, Inc.
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
@@ -141,7 +141,7 @@ module OpenC3
141
141
  end
142
142
 
143
143
  def key=(key)
144
- raise ArgumentError, "key must be a String but is a #{name.class}" unless String === key
144
+ raise ArgumentError, "key must be a String but is a #{key.class}" unless String === key
145
145
  raise ArgumentError, "key must contain at least one character" if key.empty?
146
146
 
147
147
  @key = key
@@ -133,16 +133,6 @@ module OpenC3
133
133
  $disconnect = true
134
134
  end
135
135
 
136
- # DEPRECATED
137
- def play_wav_file(wav_filename)
138
- # NOOP
139
- end
140
-
141
- # DEPRECATED
142
- def status_bar(message)
143
- # NOOP
144
- end
145
-
146
136
  def ask_string(question, blank_or_default = false, password = false)
147
137
  answer = ''
148
138
  default = ''
@@ -240,7 +240,7 @@ module OpenC3
240
240
  end
241
241
  end
242
242
 
243
- # Autonomic Events WebSocket
243
+ # Autonomic Events WebSocket (Enterprise Only)
244
244
  class AutonomicEventsWebSocketApi < CmdTlmWebSocketApi
245
245
  def initialize(history_count: 0, url: nil, write_timeout: 10.0, read_timeout: 10.0, connect_timeout: 5.0, authentication: nil, scope: $openc3_scope)
246
246
  @identifier = {
@@ -251,7 +251,7 @@ module OpenC3
251
251
  end
252
252
  end
253
253
 
254
- # Calendar Events WebSocket
254
+ # Calendar Events WebSocket (Enterprise Only)
255
255
  class CalendarEventsWebSocketApi < CmdTlmWebSocketApi
256
256
  def initialize(history_count: 0, url: nil, write_timeout: 10.0, read_timeout: 10.0, connect_timeout: 5.0, authentication: nil, scope: $openc3_scope)
257
257
  @identifier = {
@@ -1,6 +1,6 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- # Copyright 2023 OpenC3, Inc.
3
+ # Copyright 2024 OpenC3, Inc.
4
4
  # All Rights Reserved.
5
5
  #
6
6
  # This program is free software; you can modify and/or redistribute it
@@ -33,7 +33,7 @@ module OpenC3
33
33
  attr_accessor :key
34
34
  attr_accessor :ca_file
35
35
 
36
- def initialize(hostname, port = 1883, ssl = false, write_topic = nil, read_topic = nil)
36
+ def initialize(hostname, port = 1883, ssl = false, write_topic = nil, read_topic = nil, ack_timeout = 5)
37
37
  super()
38
38
 
39
39
  @hostname = hostname
@@ -41,7 +41,7 @@ module OpenC3
41
41
  @ssl = ConfigParser.handle_true_false(ssl)
42
42
  @write_topic = ConfigParser.handle_nil(write_topic)
43
43
  @read_topic = ConfigParser.handle_nil(read_topic)
44
- @connected = false
44
+ @ack_timeout = Float(ack_timeout)
45
45
 
46
46
  @username = nil
47
47
  @password = nil
@@ -49,11 +49,47 @@ module OpenC3
49
49
  @key = nil
50
50
  @ca_file = nil
51
51
 
52
- # Mutex on write is needed to protect from commands coming in from more
53
- # than one tool
52
+ # Mutex on write is needed to protect from commands coming in from more than one tool
54
53
  @write_mutex = Mutex.new
55
54
  end
56
55
 
56
+ # Connect the stream
57
+ def connect
58
+ @client = MQTT::Client.new
59
+ @client.ack_timeout = @ack_timeout
60
+ @client.host = @hostname
61
+ @client.port = @port
62
+ @client.ssl = @ssl
63
+ @client.username = @username if @username
64
+ @client.password = @password if @password
65
+ if @cert and @key
66
+ @client.ssl = true
67
+ @client.cert_file = @cert.path
68
+ @client.key_file = @key.path
69
+ end
70
+ if @ca_file
71
+ @client.ssl = true
72
+ @client.ca_file = @ca_file.path
73
+ end
74
+ @client.connect
75
+ @client.subscribe(@read_topic) if @read_topic
76
+ end
77
+
78
+ def connected?
79
+ if @client
80
+ return @client.connected?
81
+ else
82
+ return false
83
+ end
84
+ end
85
+
86
+ def disconnect
87
+ if @client
88
+ @client.disconnect
89
+ @client = nil
90
+ end
91
+ end
92
+
57
93
  # @return [String] Returns a binary string of data from the read_topic
58
94
  def read
59
95
  raise "Attempt to read from write only stream" unless @read_topic
@@ -77,33 +113,5 @@ module OpenC3
77
113
  @client.publish(@write_topic, data)
78
114
  end
79
115
  end
80
-
81
- # Connect the stream
82
- def connect
83
- @client = MQTT::Client.new
84
- @client.host = @hostname
85
- @client.port = @port
86
- @client.ssl = @ssl
87
- @client.username = @username if @username
88
- @client.password = @password if @password
89
- @client.cert = @cert if @cert
90
- @client.key = @key if @key
91
- @client.ca_file = @ca_file.path if @ca_file
92
- @client.connect
93
- @client.subscribe(@read_topic) if @read_topic
94
- @connected = true
95
- end
96
-
97
- def connected?
98
- @connected
99
- end
100
-
101
- def disconnect
102
- if @connected
103
- @client.disconnect
104
- @client = nil
105
- @connected = false
106
- end
107
- end
108
116
  end
109
117
  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 2022, OpenC3, Inc.
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
@@ -115,31 +115,6 @@ module OpenC3
115
115
  @write_mutex = Mutex.new
116
116
  end
117
117
 
118
- # @return [String] Returns a binary string of data from the serial port
119
- def read
120
- raise "Attempt to read from write only stream" unless @read_serial_port
121
-
122
- # No read mutex is needed because reads happen serially
123
- @read_serial_port.read
124
- end
125
-
126
- # @return [String] Returns a binary string of data from the serial port without blocking
127
- def read_nonblock
128
- raise "Attempt to read from write only stream" unless @read_serial_port
129
-
130
- # No read mutex is needed because reads happen serially
131
- @read_serial_port.read_nonblock
132
- end
133
-
134
- # @param data [String] A binary string of data to write to the serial port
135
- def write(data)
136
- raise "Attempt to write to read only stream" unless @write_serial_port
137
-
138
- @write_mutex.synchronize do
139
- @write_serial_port.write(data)
140
- end
141
- end
142
-
143
118
  # Connect the stream
144
119
  def connect
145
120
  # N/A - Serial streams 'connect' on creation
@@ -168,5 +143,30 @@ module OpenC3
168
143
  @connected = false
169
144
  end
170
145
  end
171
- end # class SerialStream
146
+
147
+ # @return [String] Returns a binary string of data from the serial port
148
+ def read
149
+ raise "Attempt to read from write only stream" unless @read_serial_port
150
+
151
+ # No read mutex is needed because reads happen serially
152
+ @read_serial_port.read
153
+ end
154
+
155
+ # @return [String] Returns a binary string of data from the serial port without blocking
156
+ def read_nonblock
157
+ raise "Attempt to read from write only stream" unless @read_serial_port
158
+
159
+ # No read mutex is needed because reads happen serially
160
+ @read_serial_port.read_nonblock
161
+ end
162
+
163
+ # @param data [String] A binary string of data to write to the serial port
164
+ def write(data)
165
+ raise "Attempt to write to read only stream" unless @write_serial_port
166
+
167
+ @write_mutex.synchronize do
168
+ @write_serial_port.write(data)
169
+ end
170
+ end
171
+ end
172
172
  end
@@ -27,6 +27,22 @@ module OpenC3
27
27
  # allows Streams to simply focus on getting and sending raw data while the
28
28
  # higher level processing occurs in {Protocol}.
29
29
  class Stream
30
+ # Connects the stream
31
+ def connect
32
+ raise "connect not defined by Stream"
33
+ end
34
+
35
+ # @return [Boolean] true if connected or false otherwise
36
+ def connected?
37
+ raise "connected? not defined by Stream"
38
+ end
39
+
40
+ # Disconnects the stream
41
+ # Note that streams are not designed to be reconnected and must be recreated
42
+ def disconnect
43
+ raise "disconnect not defined by Stream"
44
+ end
45
+
30
46
  # Expected to return any amount of data on success, or a blank string on
31
47
  # closed/EOF, and may raise Timeout::Error, or other errors
32
48
  def read
@@ -46,21 +62,5 @@ module OpenC3
46
62
  def write(data)
47
63
  raise "write not defined by Stream"
48
64
  end
49
-
50
- # Connects the stream
51
- def connect
52
- raise "connect not defined by Stream"
53
- end
54
-
55
- # @return [Boolean] true if connected or false otherwise
56
- def connected?
57
- raise "connected? not defined by Stream"
58
- end
59
-
60
- # Disconnects the stream
61
- # Note that streams are not designed to be reconnected and must be recreated
62
- def disconnect
63
- raise "disconnect not defined by Stream"
64
- end
65
- end # class Stream
65
+ end
66
66
  end
@@ -118,5 +118,5 @@ module OpenC3
118
118
  rescue IOError, Errno::ENOTSOCK
119
119
  raise "Connect canceled"
120
120
  end
121
- end # class TcpipClientStream
121
+ end
122
122
  end
@@ -58,6 +58,25 @@ module OpenC3
58
58
  @connected = false
59
59
  end
60
60
 
61
+ # Connect the stream
62
+ def connect
63
+ # If called directly this class is acting as a server and does not need to connect the sockets
64
+ @connected = true
65
+ end
66
+
67
+ # @return [Boolean] Whether the sockets are connected
68
+ def connected?
69
+ @connected
70
+ end
71
+
72
+ # Disconnect by closing the sockets
73
+ def disconnect
74
+ OpenC3.close_socket(@write_socket)
75
+ OpenC3.close_socket(@read_socket)
76
+ @pipe_writer.write('.')
77
+ @connected = false
78
+ end
79
+
61
80
  # @return [String] Returns a binary string of data from the socket
62
81
  def read
63
82
  raise "Attempt to read from write only stream" unless @read_socket
@@ -142,25 +161,6 @@ module OpenC3
142
161
  end
143
162
  end
144
163
 
145
- # Connect the stream
146
- def connect
147
- # If called directly this class is acting as a server and does not need to connect the sockets
148
- @connected = true
149
- end
150
-
151
- # @return [Boolean] Whether the sockets are connected
152
- def connected?
153
- @connected
154
- end
155
-
156
- # Disconnect by closing the sockets
157
- def disconnect
158
- OpenC3.close_socket(@write_socket)
159
- OpenC3.close_socket(@read_socket)
160
- @pipe_writer.write('.')
161
- @connected = false
162
- end
163
-
164
164
  def set_option(option_name, option_values)
165
165
  option_name_upcase = option_name.upcase
166
166
 
@@ -89,7 +89,7 @@ module OpenC3
89
89
  FileUtils.mkdir_p("#{base_dir}/targets")
90
90
  bucket = Bucket.getClient()
91
91
  target_names.each do |target_name|
92
- # Retrieve bucket/targets/target_name/target_id.zip
92
+ # Retrieve bucket/targets/target_name/<TARGET>_current.zip
93
93
  zip_path = "#{base_dir}/targets/#{target_name}_current.zip"
94
94
  FileUtils.mkdir_p(File.dirname(zip_path))
95
95
  bucket_key = "#{scope}/target_archives/#{target_name}/#{target_name}_current.zip"
data/lib/openc3/system.rb CHANGED
@@ -14,14 +14,13 @@
14
14
  # GNU Affero General Public License for more details.
15
15
 
16
16
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
17
+ # All changes Copyright 2024, 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
  module OpenC3
24
24
  autoload(:Target, "openc3/system/target.rb")
25
25
  autoload(:System, "openc3/system/system.rb")
26
- autoload(:SystemConfig, "openc3/system/system_config.rb")
27
26
  end
@@ -14,10 +14,10 @@
14
14
  # GNU Affero General Public License for more details.
15
15
 
16
16
  # Modified by OpenC3, Inc.
17
- # All changes Copyright 2022, OpenC3, Inc.
17
+ # All changes Copyright 2024, 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'
@@ -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 2022, OpenC3, Inc.
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
@@ -465,11 +465,6 @@ module OpenC3
465
465
  raise $!, msg, $!.backtrace
466
466
  end
467
467
 
468
- # @param filename [String] Name of the file to open in the web browser
469
- def self.open_in_web_browser(_filename)
470
- puts "open_in_web_browser is DEPRECATED"
471
- end
472
-
473
468
  # Temporarily set the working directory during a block
474
469
  # Working directory is global, so this can make other threads wait
475
470
  # Ruby Dir.chdir with block always throws an error if multiple threads
@@ -47,13 +47,6 @@ module OpenC3
47
47
  def self.get_cmd_item(target_name, packet_name, param_name, type: :WITH_UNITS, scope: $openc3_scope)
48
48
  msg_id, msg_hash = Topic.get_newest_message("#{scope}__DECOMCMD__{#{target_name}}__#{packet_name}")
49
49
  if msg_id
50
- # TODO: We now have these reserved items directly on command packets
51
- # Do we still calculate from msg_hash['time'] or use the times directly?
52
- #
53
- # if param_name == 'RECEIVED_TIMESECONDS' || param_name == 'PACKET_TIMESECONDS'
54
- # Time.from_nsec_from_epoch(msg_hash['time'].to_i).to_f
55
- # elsif param_name == 'RECEIVED_TIMEFORMATTED' || param_name == 'PACKET_TIMEFORMATTED'
56
- # Time.from_nsec_from_epoch(msg_hash['time'].to_i).formatted
57
50
  if param_name == 'RECEIVED_COUNT'
58
51
  msg_hash['received_count'].to_i
59
52
  else
@@ -123,7 +123,7 @@ module OpenC3
123
123
  def self.get_cache_control(filename)
124
124
  # Allow caching for files that have a filename versioning strategy
125
125
  has_version_number = /(-|_|\.)\d+(-|_|\.)\d+(-|_|\.)\d+\./.match(filename)
126
- has_content_hash = /\.[a-f0-9]{20}\./.match(filename)
126
+ has_content_hash = /[\.-][a-f0-9]{20}\./.match(filename)
127
127
  return nil if has_version_number or has_content_hash
128
128
  return 'no-store'
129
129
  end
@@ -281,7 +281,6 @@ module OpenC3
281
281
 
282
282
  # Add this tool to plugin.txt
283
283
  js_file = 'main.js'
284
- js_file = 'js/app.js' if tool_type == 'tool_vue'
285
284
  File.open("plugin.txt", 'a') do |file|
286
285
  file.puts <<~DOC
287
286
 
@@ -1,14 +1,14 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- OPENC3_VERSION = '5.20.0'
3
+ OPENC3_VERSION = '6.0.1'
4
4
  module OpenC3
5
5
  module Version
6
- MAJOR = '5'
7
- MINOR = '20'
8
- PATCH = '0'
6
+ MAJOR = '6'
7
+ MINOR = '0'
8
+ PATCH = '1'
9
9
  OTHER = ''
10
- BUILD = 'a9fc89b5317151fc339e62d33b40ddef19830fdc'
10
+ BUILD = '3467e578f31cd2cf2e0070f0cfc731c970ce1cfe'
11
11
  end
12
- VERSION = '5.20.0'
13
- GEM_VERSION = '5.20.0'
12
+ VERSION = '6.0.1'
13
+ GEM_VERSION = '6.0.1'
14
14
  end
@@ -42,7 +42,7 @@ docker run -it -v %cd%:/openc3/local -w /openc3/local docker.io/openc3inc/openc3
42
42
  ## Installing into OpenC3 COSMOS
43
43
 
44
44
  1. Go to the OpenC3 Admin Tool, Plugins Tab
45
- 1. Click the paperclip icon and choose your plugin.gem file
45
+ 1. Click the install button and choose your plugin.gem file
46
46
  1. Fill out plugin parameters
47
47
  1. Click Install
48
48
 
@@ -1,5 +1,5 @@
1
1
  # This class can be used in your scripts like so:
2
- # require_utility '<%= target_class.upcase %>/lib/<%= target_lib_filename %>'
2
+ # load_utility '<%= target_class.upcase %>/lib/<%= target_lib_filename %>'
3
3
  # <%= target_object %> = <%= target_class %>.new
4
4
  # <%= target_object %>.utility
5
5
  # For more information see the OpenC3 scripting guide
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%= tool_name %>",
3
- "version": "5.20.0",
3
+ "version": "6.0.1",
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "start": "ng serve",
@@ -18,20 +18,20 @@
18
18
  "@angular/compiler": "^18.2.6",
19
19
  "@angular/core": "^18.2.6",
20
20
  "@angular/forms": "^18.2.6",
21
- "@angular/material": "18.2.10",
21
+ "@angular/material": "^18.2.10",
22
22
  "@angular/platform-browser": "^18.2.6",
23
23
  "@angular/platform-browser-dynamic": "^18.2.6",
24
24
  "@angular/router": "^18.2.6",
25
- "@astrouxds/astro-web-components": "7.24.0",
26
- "@openc3/tool-common": "5.20.0",
25
+ "@astrouxds/astro-web-components": "^7.24.0",
26
+ "@openc3/js-common": "6.0.1",
27
27
  "rxjs": "~7.8.0",
28
- "single-spa": "5.9.5",
28
+ "single-spa": "^5.9.5",
29
29
  "single-spa-angular": "^9.2.0",
30
30
  "tslib": "^2.7.0",
31
- "zone.js": "~0.15.0"
31
+ "zone.js": "^0.13.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@angular-builders/custom-webpack": "18.0.0",
34
+ "@angular-builders/custom-webpack": "^18.0.0",
35
35
  "@angular-devkit/build-angular": "^18.2.6",
36
36
  "@angular/cli": "~18.2.6",
37
37
  "@angular/compiler-cli": "^18.2.6",
@@ -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.6.2"
46
+ "typescript": "~5.5.4"
47
47
  }
48
48
  }
@@ -1,13 +1,4 @@
1
- <!-- This menu position hack should only be necessary in the portal -->
2
1
  <style>
3
- ::ng-deep .mat-mdc-menu-panel.myMenu {
4
- background-color:white;
5
- color:black;
6
- position:absolute !important;
7
- top:0px;
8
- left:60px;
9
- }
10
-
11
2
  .mat-mdc-card {
12
3
  background: white;
13
4
  }
@@ -20,11 +11,11 @@
20
11
  </mat-card>
21
12
 
22
13
  <ng-template cdk-portal>
23
- <button mat-raised-button [matMenuTriggerFor]="menu">File</button>
24
- <mat-menu #menu="matMenu" class="myMenu">
25
- <button mat-menu-item (click)="clickHandler()">Send Command</button>
14
+ <div style="display: inline-block; width: 80%; text-align: center; font-size: 32px"><%= tool_name_display %></div>
15
+ <button mat-raised-button [matMenuTriggerFor]="menu" style="background-color: rgb(33, 150, 243)">File</button>
16
+ <mat-menu #menu="matMenu" class="myMenu" style="background-color: white">
17
+ <button mat-menu-item (click)="clickHandler()" style="background-color: rgb(33, 150, 243)">Send Command</button>
26
18
  </mat-menu>
27
- <div style="display: inline-block; width: 80%; text-align: center"><%= tool_name_display %></div>
28
19
  </ng-template>
29
20
  </div>
30
21