openc3 5.0.11 → 5.1.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/Guardfile +3 -0
- data/LICENSE.txt +7 -5
- data/README.md +11 -9
- data/Rakefile +3 -0
- data/bin/cstol_converter +3 -0
- data/bin/openc3cli +29 -18
- data/bin/rubysloc +3 -0
- data/data/config/screen.yaml +10 -2
- data/data/config/target.yaml +1 -1
- data/data/config/widgets.yaml +6 -6
- data/ext/mkrf_conf.rb +3 -0
- data/ext/openc3/ext/array/array.c +3 -0
- data/ext/openc3/ext/buffered_file/buffered_file.c +3 -0
- data/ext/openc3/ext/config_parser/config_parser.c +3 -0
- data/ext/openc3/ext/crc/crc.c +3 -0
- data/ext/openc3/ext/openc3_io/openc3_io.c +3 -0
- data/ext/openc3/ext/packet/packet.c +3 -0
- data/ext/openc3/ext/platform/platform.c +3 -0
- data/ext/openc3/ext/polynomial_conversion/polynomial_conversion.c +3 -0
- data/ext/openc3/ext/string/string.c +3 -0
- data/ext/openc3/ext/structure/structure.c +3 -0
- data/ext/openc3/ext/tabbed_plots_config/tabbed_plots_config.c +3 -0
- data/ext/openc3/ext/telemetry/telemetry.c +3 -0
- data/lib/cosmos.rb +3 -0
- data/lib/cosmosc2.rb +3 -0
- data/lib/openc3/accessors/accessor.rb +3 -0
- data/lib/openc3/accessors/binary_accessor.rb +3 -0
- data/lib/openc3/accessors/cbor_accessor.rb +3 -0
- data/lib/openc3/accessors/html_accessor.rb +3 -0
- data/lib/openc3/accessors/json_accessor.rb +4 -1
- data/lib/openc3/accessors/xml_accessor.rb +3 -0
- data/lib/openc3/accessors.rb +3 -0
- data/lib/openc3/api/api.rb +3 -0
- data/lib/openc3/api/authorized_api.rb +3 -0
- data/lib/openc3/api/cmd_api.rb +6 -3
- data/lib/openc3/api/config_api.rb +3 -0
- data/lib/openc3/api/interface_api.rb +6 -2
- data/lib/openc3/api/limits_api.rb +54 -61
- data/lib/openc3/api/router_api.rb +6 -3
- data/lib/openc3/api/settings_api.rb +3 -0
- data/lib/openc3/api/target_api.rb +3 -0
- data/lib/openc3/api/tlm_api.rb +27 -32
- data/lib/openc3/bridge/bridge.rb +3 -0
- data/lib/openc3/bridge/bridge_config.rb +3 -0
- data/lib/openc3/bridge/bridge_interface_thread.rb +3 -0
- data/lib/openc3/bridge/bridge_router_thread.rb +3 -0
- data/lib/openc3/ccsds/ccsds_packet.rb +3 -0
- data/lib/openc3/ccsds/ccsds_parser.rb +3 -0
- data/lib/openc3/config/config_parser.rb +3 -0
- data/lib/openc3/config/meta_config_parser.rb +3 -0
- data/lib/openc3/conversions/conversion.rb +3 -0
- data/lib/openc3/conversions/generic_conversion.rb +3 -0
- data/lib/openc3/conversions/packet_time_formatted_conversion.rb +3 -0
- data/lib/openc3/conversions/packet_time_seconds_conversion.rb +3 -0
- data/lib/openc3/conversions/polynomial_conversion.rb +3 -0
- data/lib/openc3/conversions/processor_conversion.rb +3 -0
- data/lib/openc3/conversions/received_count_conversion.rb +3 -0
- data/lib/openc3/conversions/received_time_formatted_conversion.rb +3 -0
- data/lib/openc3/conversions/received_time_seconds_conversion.rb +3 -0
- data/lib/openc3/conversions/segmented_polynomial_conversion.rb +3 -0
- data/lib/openc3/conversions/unix_time_conversion.rb +3 -0
- data/lib/openc3/conversions/unix_time_formatted_conversion.rb +3 -0
- data/lib/openc3/conversions/unix_time_seconds_conversion.rb +3 -0
- data/lib/openc3/conversions.rb +3 -0
- data/lib/openc3/core_ext/array.rb +3 -0
- data/lib/openc3/core_ext/binding.rb +3 -0
- data/lib/openc3/core_ext/class.rb +3 -0
- data/lib/openc3/core_ext/exception.rb +3 -0
- data/lib/openc3/core_ext/file.rb +3 -0
- data/lib/openc3/core_ext/hash.rb +3 -0
- data/lib/openc3/core_ext/io.rb +3 -0
- data/lib/openc3/core_ext/kernel.rb +3 -0
- data/lib/openc3/core_ext/math.rb +3 -0
- data/lib/openc3/core_ext/matrix.rb +3 -0
- data/lib/openc3/core_ext/objectspace.rb +3 -0
- data/lib/openc3/core_ext/openc3_io.rb +3 -0
- data/lib/openc3/core_ext/range.rb +3 -0
- data/lib/openc3/core_ext/socket.rb +3 -0
- data/lib/openc3/core_ext/string.rb +3 -0
- data/lib/openc3/core_ext/stringio.rb +3 -0
- data/lib/openc3/core_ext/tempfile.rb +3 -0
- data/lib/openc3/core_ext/time.rb +3 -0
- data/lib/openc3/core_ext.rb +3 -0
- data/lib/openc3/interfaces/interface.rb +3 -0
- data/lib/openc3/interfaces/linc_interface.rb +3 -0
- data/lib/openc3/interfaces/protocols/burst_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/crc_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/fixed_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/ignore_packet_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/length_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/override_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/preidentified_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/template_protocol.rb +3 -0
- data/lib/openc3/interfaces/protocols/terminated_protocol.rb +3 -0
- data/lib/openc3/interfaces/serial_interface.rb +3 -0
- data/lib/openc3/interfaces/simulated_target_interface.rb +3 -0
- data/lib/openc3/interfaces/stream_interface.rb +3 -0
- data/lib/openc3/interfaces/tcpip_client_interface.rb +3 -0
- data/lib/openc3/interfaces/tcpip_server_interface.rb +3 -0
- data/lib/openc3/interfaces/udp_interface.rb +3 -0
- data/lib/openc3/interfaces.rb +3 -0
- data/lib/openc3/io/buffered_file.rb +3 -0
- data/lib/openc3/io/io_multiplexer.rb +8 -0
- data/lib/openc3/io/json_api_object.rb +5 -2
- data/lib/openc3/io/json_drb.rb +3 -0
- data/lib/openc3/io/json_drb_object.rb +5 -2
- data/lib/openc3/io/json_drb_rack.rb +3 -0
- data/lib/openc3/io/json_rpc.rb +3 -0
- data/lib/openc3/io/openc3_snmp.rb +3 -0
- data/lib/openc3/io/posix_serial_driver.rb +3 -0
- data/lib/openc3/io/raw_logger.rb +3 -0
- data/lib/openc3/io/raw_logger_pair.rb +3 -0
- data/lib/openc3/io/serial_driver.rb +3 -0
- data/lib/openc3/io/stderr.rb +3 -0
- data/lib/openc3/io/stdout.rb +3 -0
- data/lib/openc3/io/udp_sockets.rb +3 -0
- data/lib/openc3/io/win32_serial_driver.rb +3 -0
- data/lib/openc3/logs/buffered_packet_log_reader.rb +65 -0
- data/lib/openc3/logs/buffered_packet_log_writer.rb +118 -0
- data/lib/openc3/logs/log_writer.rb +94 -41
- data/lib/openc3/logs/packet_log_constants.rb +9 -0
- data/lib/openc3/logs/packet_log_reader.rb +34 -3
- data/lib/openc3/logs/packet_log_writer.rb +85 -20
- data/lib/openc3/logs/text_log_writer.rb +9 -5
- data/lib/openc3/logs.rb +8 -2
- data/lib/openc3/microservices/cleanup_microservice.rb +18 -18
- data/lib/openc3/microservices/decom_microservice.rb +30 -24
- data/lib/openc3/microservices/interface_microservice.rb +136 -91
- data/lib/openc3/microservices/log_microservice.rb +35 -13
- data/lib/openc3/microservices/microservice.rb +16 -14
- data/lib/openc3/microservices/plugin_microservice.rb +3 -1
- data/lib/openc3/microservices/reaction_microservice.rb +4 -1
- data/lib/openc3/microservices/reducer_microservice.rb +332 -149
- data/lib/openc3/microservices/router_microservice.rb +3 -0
- data/lib/openc3/microservices/text_log_microservice.rb +5 -2
- data/lib/openc3/microservices/timeline_microservice.rb +4 -1
- data/lib/openc3/microservices/trigger_group_microservice.rb +3 -0
- data/lib/openc3/models/activity_model.rb +3 -0
- data/lib/openc3/models/auth_model.rb +3 -0
- data/lib/openc3/models/cvt_model.rb +14 -5
- data/lib/openc3/models/environment_model.rb +3 -0
- data/lib/openc3/models/gem_model.rb +30 -51
- data/lib/openc3/models/info_model.rb +3 -0
- data/lib/openc3/models/interface_model.rb +3 -0
- data/lib/openc3/models/interface_status_model.rb +4 -1
- data/lib/openc3/models/metadata_model.rb +3 -0
- data/lib/openc3/models/metric_model.rb +3 -0
- data/lib/openc3/models/microservice_model.rb +9 -6
- data/lib/openc3/models/microservice_status_model.rb +4 -1
- data/lib/openc3/models/model.rb +3 -0
- data/lib/openc3/models/note_model.rb +3 -0
- data/lib/openc3/models/notification_model.rb +3 -0
- data/lib/openc3/models/ping_model.rb +3 -0
- data/lib/openc3/models/plugin_model.rb +20 -14
- data/lib/openc3/models/process_status_model.rb +4 -1
- data/lib/openc3/models/reaction_model.rb +3 -0
- data/lib/openc3/models/reducer_model.rb +31 -24
- data/lib/openc3/models/router_model.rb +3 -0
- data/lib/openc3/models/router_status_model.rb +3 -0
- data/lib/openc3/models/scope_model.rb +3 -4
- data/lib/openc3/models/settings_model.rb +3 -0
- data/lib/openc3/models/sorted_model.rb +3 -0
- data/lib/openc3/models/target_model.rb +61 -94
- data/lib/openc3/models/timeline_model.rb +4 -1
- data/lib/openc3/models/tool_config_model.rb +3 -0
- data/lib/openc3/models/tool_model.rb +11 -9
- data/lib/openc3/models/trigger_group_model.rb +3 -0
- data/lib/openc3/models/trigger_model.rb +3 -0
- data/lib/openc3/models/widget_model.rb +18 -11
- data/lib/openc3/operators/microservice_operator.rb +3 -0
- data/lib/openc3/operators/operator.rb +105 -34
- data/lib/openc3/packets/commands.rb +3 -0
- data/lib/openc3/packets/json_packet.rb +87 -14
- data/lib/openc3/packets/limits.rb +4 -1
- data/lib/openc3/packets/limits_response.rb +3 -0
- data/lib/openc3/packets/packet.rb +5 -1
- data/lib/openc3/packets/packet_config.rb +3 -0
- data/lib/openc3/packets/packet_item.rb +9 -3
- data/lib/openc3/packets/packet_item_limits.rb +3 -0
- data/lib/openc3/packets/parsers/format_string_parser.rb +3 -0
- data/lib/openc3/packets/parsers/limits_parser.rb +3 -0
- data/lib/openc3/packets/parsers/limits_response_parser.rb +3 -0
- data/lib/openc3/packets/parsers/packet_item_parser.rb +3 -0
- data/lib/openc3/packets/parsers/packet_parser.rb +3 -0
- data/lib/openc3/packets/parsers/processor_parser.rb +3 -0
- data/lib/openc3/packets/parsers/state_parser.rb +3 -0
- data/lib/openc3/packets/parsers/xtce_converter.rb +3 -0
- data/lib/openc3/packets/parsers/xtce_parser.rb +3 -0
- data/lib/openc3/packets/structure.rb +3 -0
- data/lib/openc3/packets/structure_item.rb +3 -0
- data/lib/openc3/packets/telemetry.rb +3 -0
- data/lib/openc3/processors/processor.rb +3 -0
- data/lib/openc3/processors/statistics_processor.rb +3 -0
- data/lib/openc3/processors/watermark_processor.rb +3 -0
- data/lib/openc3/processors.rb +3 -0
- data/lib/openc3/script/api_shared.rb +35 -6
- data/lib/openc3/script/calendar.rb +3 -0
- data/lib/openc3/script/commands.rb +3 -0
- data/lib/openc3/script/exceptions.rb +3 -0
- data/lib/openc3/script/extract.rb +3 -0
- data/lib/openc3/script/limits.rb +3 -24
- data/lib/openc3/script/script.rb +11 -7
- data/lib/openc3/script/script_runner.rb +3 -0
- data/lib/openc3/script/storage.rb +33 -16
- data/lib/openc3/script/suite.rb +3 -0
- data/lib/openc3/script/suite_results.rb +3 -0
- data/lib/openc3/script/suite_runner.rb +3 -0
- data/lib/openc3/script/telemetry.rb +43 -0
- data/lib/openc3/script.rb +3 -0
- data/lib/openc3/streams/serial_stream.rb +3 -0
- data/lib/openc3/streams/stream.rb +3 -0
- data/lib/openc3/streams/tcpip_client_stream.rb +3 -0
- data/lib/openc3/streams/tcpip_socket_stream.rb +3 -0
- data/lib/openc3/system/system.rb +23 -10
- data/lib/openc3/system/system_config.rb +3 -0
- data/lib/openc3/system/target.rb +3 -0
- data/lib/openc3/system.rb +3 -0
- data/lib/openc3/tools/cmd_tlm_server/api.rb +3 -0
- data/lib/openc3/tools/cmd_tlm_server/cmd_tlm_server_config.rb +3 -0
- data/lib/openc3/tools/cmd_tlm_server/interface_thread.rb +3 -0
- data/lib/openc3/tools/table_manager/table.rb +3 -0
- data/lib/openc3/tools/table_manager/table_config.rb +3 -0
- data/lib/openc3/tools/table_manager/table_item.rb +3 -0
- data/lib/openc3/tools/table_manager/table_item_parser.rb +3 -0
- data/lib/openc3/tools/table_manager/table_manager_core.rb +3 -0
- data/lib/openc3/tools/table_manager/table_parser.rb +3 -0
- data/lib/openc3/tools/test_runner/test.rb +3 -0
- data/lib/openc3/top_level.rb +3 -0
- data/lib/openc3/topics/autonomic_topic.rb +3 -0
- data/lib/openc3/topics/calendar_topic.rb +3 -0
- data/lib/openc3/topics/command_decom_topic.rb +4 -1
- data/lib/openc3/topics/command_topic.rb +6 -1
- data/lib/openc3/topics/config_topic.rb +3 -0
- data/lib/openc3/topics/interface_topic.rb +9 -2
- data/lib/openc3/topics/limits_event_topic.rb +144 -10
- data/lib/openc3/topics/notifications_topic.rb +3 -0
- data/lib/openc3/topics/router_topic.rb +10 -3
- data/lib/openc3/topics/telemetry_decom_topic.rb +26 -20
- data/lib/openc3/topics/telemetry_reduced_topics.rb +92 -0
- data/lib/openc3/topics/telemetry_topic.rb +5 -2
- data/lib/openc3/topics/timeline_topic.rb +3 -0
- data/lib/openc3/topics/topic.rb +3 -0
- data/lib/openc3/utilities/authentication.rb +3 -0
- data/lib/openc3/utilities/authorization.rb +3 -0
- data/lib/openc3/utilities/aws_bucket.rb +199 -0
- data/lib/openc3/utilities/bucket.rb +82 -0
- data/lib/openc3/utilities/bucket_file_cache.rb +264 -0
- data/lib/openc3/utilities/bucket_utilities.rb +109 -0
- data/lib/openc3/utilities/crc.rb +3 -0
- data/lib/openc3/utilities/csv.rb +3 -0
- data/lib/openc3/utilities/local_bucket.rb +28 -0
- data/lib/openc3/utilities/local_mode.rb +47 -61
- data/lib/openc3/utilities/logger.rb +7 -1
- data/lib/openc3/utilities/message_log.rb +7 -4
- data/lib/openc3/utilities/metric.rb +4 -1
- data/lib/openc3/utilities/open_telemetry.rb +96 -0
- data/lib/openc3/utilities/process_manager.rb +3 -0
- data/lib/openc3/utilities/quaternion.rb +3 -0
- data/lib/openc3/utilities/ruby_lex_utils.rb +3 -0
- data/lib/openc3/utilities/s3_autoload.rb +3 -3
- data/lib/openc3/utilities/simulated_target.rb +3 -0
- data/lib/openc3/utilities/sleeper.rb +3 -0
- data/lib/openc3/utilities/store.rb +3 -0
- data/lib/openc3/utilities/store_autoload.rb +30 -23
- data/lib/openc3/utilities/target_file.rb +70 -83
- data/lib/openc3/utilities/zip.rb +3 -0
- data/lib/openc3/utilities.rb +3 -0
- data/lib/openc3/version.rb +6 -6
- data/lib/openc3/win32/excel.rb +3 -0
- data/lib/openc3/win32/win32.rb +3 -0
- data/lib/openc3/win32/win32_main.rb +3 -0
- data/lib/openc3.rb +3 -0
- data/tasks/gemfile_stats.rake +3 -0
- data/tasks/spec.rake +3 -0
- data/templates/plugin-template/plugin.gemspec +1 -1
- metadata +112 -6
- data/lib/openc3/utilities/s3.rb +0 -220
- data/lib/openc3/utilities/s3_file_cache.rb +0 -274
@@ -12,16 +12,17 @@
|
|
12
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
13
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
14
|
# GNU Affero General Public License for more details.
|
15
|
+
#
|
16
|
+
# This file may also be used under the terms of a commercial license
|
17
|
+
# if purchased from OpenC3, Inc.
|
15
18
|
|
16
19
|
require 'fileutils'
|
17
20
|
require 'json'
|
18
21
|
require 'openc3/utilities/local_mode'
|
19
|
-
require 'openc3/utilities/
|
22
|
+
require 'openc3/utilities/bucket'
|
20
23
|
|
21
24
|
module OpenC3
|
22
25
|
class TargetFile
|
23
|
-
|
24
|
-
DEFAULT_BUCKET_NAME = 'config'
|
25
26
|
# Matches ScriptRunner.vue const TEMP_FOLDER
|
26
27
|
TEMP_FOLDER = '__TEMP__'
|
27
28
|
|
@@ -30,41 +31,33 @@ module OpenC3
|
|
30
31
|
modified = []
|
31
32
|
temp = []
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
# DEFAULT/targets_modified/__TEMP__/YYYY_MM_DD_HH_MM_SS_mmm_temp.rb
|
46
|
-
if split_key[2] == TEMP_FOLDER
|
47
|
-
temp << split_key[2..-1].join('/') if include_temp
|
48
|
-
next
|
49
|
-
end
|
34
|
+
bucket = Bucket.getClient()
|
35
|
+
resp = bucket.list_objects(
|
36
|
+
bucket: ENV['OPENC3_CONFIG_BUCKET'],
|
37
|
+
prefix: "#{scope}/targets",
|
38
|
+
)
|
39
|
+
resp.each do |object|
|
40
|
+
split_key = object.key.split('/')
|
41
|
+
# DEFAULT/targets_modified/__TEMP__/YYYY_MM_DD_HH_MM_SS_mmm_temp.rb
|
42
|
+
if split_key[2] == TEMP_FOLDER
|
43
|
+
temp << split_key[2..-1].join('/') if include_temp
|
44
|
+
next
|
45
|
+
end
|
50
46
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
end
|
57
|
-
end
|
58
|
-
next unless found
|
59
|
-
result_no_scope_or_target_folder = split_key[2..-1].join('/')
|
60
|
-
if object.key.include?("#{scope}/targets_modified")
|
61
|
-
modified << result_no_scope_or_target_folder
|
62
|
-
else
|
63
|
-
result << result_no_scope_or_target_folder
|
47
|
+
found = false
|
48
|
+
path_matchers.each do |path|
|
49
|
+
if split_key.include?(path)
|
50
|
+
found = true
|
51
|
+
break
|
64
52
|
end
|
65
53
|
end
|
66
|
-
|
67
|
-
|
54
|
+
next unless found
|
55
|
+
result_no_scope_or_target_folder = split_key[2..-1].join('/')
|
56
|
+
if object.key.include?("#{scope}/targets_modified")
|
57
|
+
modified << result_no_scope_or_target_folder
|
58
|
+
else
|
59
|
+
result << result_no_scope_or_target_folder
|
60
|
+
end
|
68
61
|
end
|
69
62
|
|
70
63
|
# Add in local targets_modified if present
|
@@ -97,58 +90,45 @@ module OpenC3
|
|
97
90
|
end
|
98
91
|
|
99
92
|
def self.delete_temp(scope)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
bucket: DEFAULT_BUCKET_NAME,
|
113
|
-
key: object.key,
|
114
|
-
)
|
115
|
-
if ENV['OPENC3_LOCAL_MODE']
|
116
|
-
OpenC3::LocalMode.delete_local(object.key)
|
117
|
-
end
|
93
|
+
bucket = Bucket.getClient()
|
94
|
+
resp = bucket.list_objects(
|
95
|
+
bucket: ENV['OPENC3_CONFIG_BUCKET'],
|
96
|
+
prefix: "#{scope}/targets_modified/#{TEMP_FOLDER}",
|
97
|
+
)
|
98
|
+
resp.each do |object|
|
99
|
+
bucket.delete_object(
|
100
|
+
bucket: ENV['OPENC3_CONFIG_BUCKET'],
|
101
|
+
key: object.key,
|
102
|
+
)
|
103
|
+
if ENV['OPENC3_LOCAL_MODE']
|
104
|
+
OpenC3::LocalMode.delete_local(object.key)
|
118
105
|
end
|
119
|
-
break unless resp.is_truncated
|
120
|
-
token = resp.next_continuation_token
|
121
106
|
end
|
122
107
|
true
|
123
108
|
end
|
124
109
|
|
125
110
|
def self.body(scope, name)
|
126
111
|
name = name.split('*')[0] # Split '*' that indicates modified
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
if
|
131
|
-
|
132
|
-
return local_file.read if local_file
|
133
|
-
end
|
112
|
+
# First try opening a potentially modified version by looking for the modified target
|
113
|
+
if ENV['OPENC3_LOCAL_MODE']
|
114
|
+
local_file = OpenC3::LocalMode.open_local_file(name, scope: scope)
|
115
|
+
return local_file.read if local_file
|
116
|
+
end
|
134
117
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
key: "#{scope}/targets_modified/#{name}",
|
139
|
-
)
|
140
|
-
rescue Aws::S3::Errors::NoSuchKey
|
118
|
+
bucket = Bucket.getClient()
|
119
|
+
resp = bucket.get_object(bucket: ENV['OPENC3_CONFIG_BUCKET'], key: "#{scope}/targets_modified/#{name}")
|
120
|
+
unless resp
|
141
121
|
# Now try the original
|
142
|
-
resp =
|
143
|
-
rubys3_client.get_object(
|
144
|
-
bucket: DEFAULT_BUCKET_NAME,
|
145
|
-
key: "#{scope}/targets/#{name}",
|
146
|
-
)
|
122
|
+
resp = bucket.get_object(bucket: ENV['OPENC3_CONFIG_BUCKET'], key: "#{scope}/targets/#{name}")
|
147
123
|
end
|
148
|
-
if
|
149
|
-
|
124
|
+
if resp && resp.body
|
125
|
+
if File.extname(name) == ".bin"
|
126
|
+
resp.body.binmode
|
127
|
+
end
|
128
|
+
resp.body.read
|
129
|
+
else
|
130
|
+
nil
|
150
131
|
end
|
151
|
-
resp.body.read
|
152
132
|
end
|
153
133
|
|
154
134
|
def self.create(scope, name, text, content_type: 'text/plain')
|
@@ -156,28 +136,35 @@ module OpenC3
|
|
156
136
|
if ENV['OPENC3_LOCAL_MODE']
|
157
137
|
OpenC3::LocalMode.put_target_file("#{scope}/targets_modified/#{name}", text, scope: scope)
|
158
138
|
end
|
159
|
-
|
139
|
+
client = Bucket.getClient()
|
140
|
+
client.put_object(
|
160
141
|
# Use targets_modified to save modifications
|
161
142
|
# This keeps the original target clean (read-only)
|
143
|
+
bucket: ENV['OPENC3_CONFIG_BUCKET'],
|
162
144
|
key: "#{scope}/targets_modified/#{name}",
|
163
145
|
body: text,
|
164
|
-
bucket: DEFAULT_BUCKET_NAME,
|
165
146
|
content_type: content_type,
|
166
147
|
)
|
167
|
-
|
148
|
+
# Wait for the object to exist
|
149
|
+
if client.check_object(
|
150
|
+
bucket: ENV['OPENC3_CONFIG_BUCKET'],
|
151
|
+
key: "#{scope}/targets_modified/#{name}",
|
152
|
+
)
|
153
|
+
true
|
154
|
+
else
|
155
|
+
false
|
156
|
+
end
|
168
157
|
end
|
169
158
|
|
170
159
|
def self.destroy(scope, name)
|
171
|
-
rubys3_client = Aws::S3::Client.new
|
172
|
-
|
173
160
|
if ENV['OPENC3_LOCAL_MODE']
|
174
161
|
OpenC3::LocalMode.delete_local("#{scope}/targets_modified/#{name}")
|
175
162
|
end
|
176
163
|
|
177
164
|
# Only delete file from the modified target directory
|
178
|
-
|
165
|
+
Bucket.getClient.delete_object(
|
166
|
+
bucket: ENV['OPENC3_CONFIG_BUCKET'],
|
179
167
|
key: "#{scope}/targets_modified/#{name}",
|
180
|
-
bucket: DEFAULT_BUCKET_NAME,
|
181
168
|
)
|
182
169
|
true
|
183
170
|
end
|
data/lib/openc3/utilities/zip.rb
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
require 'zip'
|
21
24
|
require 'zip/filesystem'
|
data/lib/openc3/utilities.rb
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
module OpenC3
|
21
24
|
autoload(:Logger, 'openc3/utilities/logger.rb')
|
data/lib/openc3/version.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
OPENC3_VERSION = '5.0
|
3
|
+
OPENC3_VERSION = '5.1.0'
|
4
4
|
module OpenC3
|
5
5
|
module Version
|
6
6
|
MAJOR = '5'
|
7
|
-
MINOR = '
|
8
|
-
PATCH = '
|
7
|
+
MINOR = '1'
|
8
|
+
PATCH = '0'
|
9
9
|
OTHER = ''
|
10
|
-
BUILD = '
|
10
|
+
BUILD = '7bd7fb9fdfa75abefb1b6ef01a55931c7b1d98dd'
|
11
11
|
end
|
12
|
-
VERSION = '5.0
|
13
|
-
GEM_VERSION = '5.0
|
12
|
+
VERSION = '5.1.0'
|
13
|
+
GEM_VERSION = '5.1.0'
|
14
14
|
end
|
data/lib/openc3/win32/excel.rb
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
require 'win32ole'
|
21
24
|
require 'fileutils'
|
data/lib/openc3/win32/win32.rb
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
require 'openc3/win32/win32_main'
|
21
24
|
require 'openc3/packets/structure'
|
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
module OpenC3
|
21
24
|
if RUBY_ENGINE == 'ruby'
|
data/lib/openc3.rb
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
# This file sets up using the OpenC3 framework
|
21
24
|
|
data/tasks/gemfile_stats.rake
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
desc 'Create a picture of gemfile downloads'
|
21
24
|
task :gemfile_stats do
|
data/tasks/spec.rake
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
|
+
#
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
|
+
# if purchased from OpenC3, Inc.
|
19
22
|
|
20
23
|
begin
|
21
24
|
require 'rspec/core/rake_task'
|
@@ -19,5 +19,5 @@ spec = Gem::Specification.new do |s|
|
|
19
19
|
else
|
20
20
|
s.version = '0.0.0' + ".#{time}"
|
21
21
|
end
|
22
|
-
s.files = Dir.glob("{targets,lib,
|
22
|
+
s.files = Dir.glob("{targets,lib,tools,microservices}/**/*") + %w(Rakefile README.md plugin.txt)
|
23
23
|
end
|
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.0
|
4
|
+
version: 5.1.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: 2022-
|
12
|
+
date: 2022-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -171,14 +171,14 @@ dependencies:
|
|
171
171
|
requirements:
|
172
172
|
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version: '
|
174
|
+
version: '5.0'
|
175
175
|
type: :runtime
|
176
176
|
prerelease: false
|
177
177
|
version_requirements: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
179
|
- - "~>"
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version: '
|
181
|
+
version: '5.0'
|
182
182
|
- !ruby/object:Gem::Dependency
|
183
183
|
name: psych
|
184
184
|
requirement: !ruby/object:Gem::Requirement
|
@@ -333,6 +333,104 @@ dependencies:
|
|
333
333
|
- - "~>"
|
334
334
|
- !ruby/object:Gem::Version
|
335
335
|
version: '1.1'
|
336
|
+
- !ruby/object:Gem::Dependency
|
337
|
+
name: opentelemetry-sdk
|
338
|
+
requirement: !ruby/object:Gem::Requirement
|
339
|
+
requirements:
|
340
|
+
- - "~>"
|
341
|
+
- !ruby/object:Gem::Version
|
342
|
+
version: '1.2'
|
343
|
+
type: :runtime
|
344
|
+
prerelease: false
|
345
|
+
version_requirements: !ruby/object:Gem::Requirement
|
346
|
+
requirements:
|
347
|
+
- - "~>"
|
348
|
+
- !ruby/object:Gem::Version
|
349
|
+
version: '1.2'
|
350
|
+
- !ruby/object:Gem::Dependency
|
351
|
+
name: opentelemetry-exporter-otlp
|
352
|
+
requirement: !ruby/object:Gem::Requirement
|
353
|
+
requirements:
|
354
|
+
- - "~>"
|
355
|
+
- !ruby/object:Gem::Version
|
356
|
+
version: '0.24'
|
357
|
+
type: :runtime
|
358
|
+
prerelease: false
|
359
|
+
version_requirements: !ruby/object:Gem::Requirement
|
360
|
+
requirements:
|
361
|
+
- - "~>"
|
362
|
+
- !ruby/object:Gem::Version
|
363
|
+
version: '0.24'
|
364
|
+
- !ruby/object:Gem::Dependency
|
365
|
+
name: opentelemetry-instrumentation-rack
|
366
|
+
requirement: !ruby/object:Gem::Requirement
|
367
|
+
requirements:
|
368
|
+
- - "~>"
|
369
|
+
- !ruby/object:Gem::Version
|
370
|
+
version: '0.21'
|
371
|
+
type: :runtime
|
372
|
+
prerelease: false
|
373
|
+
version_requirements: !ruby/object:Gem::Requirement
|
374
|
+
requirements:
|
375
|
+
- - "~>"
|
376
|
+
- !ruby/object:Gem::Version
|
377
|
+
version: '0.21'
|
378
|
+
- !ruby/object:Gem::Dependency
|
379
|
+
name: opentelemetry-instrumentation-redis
|
380
|
+
requirement: !ruby/object:Gem::Requirement
|
381
|
+
requirements:
|
382
|
+
- - "~>"
|
383
|
+
- !ruby/object:Gem::Version
|
384
|
+
version: '0.24'
|
385
|
+
type: :runtime
|
386
|
+
prerelease: false
|
387
|
+
version_requirements: !ruby/object:Gem::Requirement
|
388
|
+
requirements:
|
389
|
+
- - "~>"
|
390
|
+
- !ruby/object:Gem::Version
|
391
|
+
version: '0.24'
|
392
|
+
- !ruby/object:Gem::Dependency
|
393
|
+
name: opentelemetry-instrumentation-action_pack
|
394
|
+
requirement: !ruby/object:Gem::Requirement
|
395
|
+
requirements:
|
396
|
+
- - "~>"
|
397
|
+
- !ruby/object:Gem::Version
|
398
|
+
version: '0.2'
|
399
|
+
type: :runtime
|
400
|
+
prerelease: false
|
401
|
+
version_requirements: !ruby/object:Gem::Requirement
|
402
|
+
requirements:
|
403
|
+
- - "~>"
|
404
|
+
- !ruby/object:Gem::Version
|
405
|
+
version: '0.2'
|
406
|
+
- !ruby/object:Gem::Dependency
|
407
|
+
name: opentelemetry-instrumentation-http_client
|
408
|
+
requirement: !ruby/object:Gem::Requirement
|
409
|
+
requirements:
|
410
|
+
- - "~>"
|
411
|
+
- !ruby/object:Gem::Version
|
412
|
+
version: '0.20'
|
413
|
+
type: :runtime
|
414
|
+
prerelease: false
|
415
|
+
version_requirements: !ruby/object:Gem::Requirement
|
416
|
+
requirements:
|
417
|
+
- - "~>"
|
418
|
+
- !ruby/object:Gem::Version
|
419
|
+
version: '0.20'
|
420
|
+
- !ruby/object:Gem::Dependency
|
421
|
+
name: opentelemetry-instrumentation-aws_sdk
|
422
|
+
requirement: !ruby/object:Gem::Requirement
|
423
|
+
requirements:
|
424
|
+
- - "~>"
|
425
|
+
- !ruby/object:Gem::Version
|
426
|
+
version: '0.3'
|
427
|
+
type: :runtime
|
428
|
+
prerelease: false
|
429
|
+
version_requirements: !ruby/object:Gem::Requirement
|
430
|
+
requirements:
|
431
|
+
- - "~>"
|
432
|
+
- !ruby/object:Gem::Version
|
433
|
+
version: '0.3'
|
336
434
|
- !ruby/object:Gem::Dependency
|
337
435
|
name: dead_end
|
338
436
|
requirement: !ruby/object:Gem::Requirement
|
@@ -700,6 +798,8 @@ files:
|
|
700
798
|
- lib/openc3/io/udp_sockets.rb
|
701
799
|
- lib/openc3/io/win32_serial_driver.rb
|
702
800
|
- lib/openc3/logs.rb
|
801
|
+
- lib/openc3/logs/buffered_packet_log_reader.rb
|
802
|
+
- lib/openc3/logs/buffered_packet_log_writer.rb
|
703
803
|
- lib/openc3/logs/log_writer.rb
|
704
804
|
- lib/openc3/logs/packet_log_constants.rb
|
705
805
|
- lib/openc3/logs/packet_log_reader.rb
|
@@ -789,6 +889,7 @@ files:
|
|
789
889
|
- lib/openc3/script/suite.rb
|
790
890
|
- lib/openc3/script/suite_results.rb
|
791
891
|
- lib/openc3/script/suite_runner.rb
|
892
|
+
- lib/openc3/script/telemetry.rb
|
792
893
|
- lib/openc3/streams/serial_stream.rb
|
793
894
|
- lib/openc3/streams/stream.rb
|
794
895
|
- lib/openc3/streams/tcpip_client_stream.rb
|
@@ -818,24 +919,29 @@ files:
|
|
818
919
|
- lib/openc3/topics/notifications_topic.rb
|
819
920
|
- lib/openc3/topics/router_topic.rb
|
820
921
|
- lib/openc3/topics/telemetry_decom_topic.rb
|
922
|
+
- lib/openc3/topics/telemetry_reduced_topics.rb
|
821
923
|
- lib/openc3/topics/telemetry_topic.rb
|
822
924
|
- lib/openc3/topics/timeline_topic.rb
|
823
925
|
- lib/openc3/topics/topic.rb
|
824
926
|
- lib/openc3/utilities.rb
|
825
927
|
- lib/openc3/utilities/authentication.rb
|
826
928
|
- lib/openc3/utilities/authorization.rb
|
929
|
+
- lib/openc3/utilities/aws_bucket.rb
|
930
|
+
- lib/openc3/utilities/bucket.rb
|
931
|
+
- lib/openc3/utilities/bucket_file_cache.rb
|
932
|
+
- lib/openc3/utilities/bucket_utilities.rb
|
827
933
|
- lib/openc3/utilities/crc.rb
|
828
934
|
- lib/openc3/utilities/csv.rb
|
935
|
+
- lib/openc3/utilities/local_bucket.rb
|
829
936
|
- lib/openc3/utilities/local_mode.rb
|
830
937
|
- lib/openc3/utilities/logger.rb
|
831
938
|
- lib/openc3/utilities/message_log.rb
|
832
939
|
- lib/openc3/utilities/metric.rb
|
940
|
+
- lib/openc3/utilities/open_telemetry.rb
|
833
941
|
- lib/openc3/utilities/process_manager.rb
|
834
942
|
- lib/openc3/utilities/quaternion.rb
|
835
943
|
- lib/openc3/utilities/ruby_lex_utils.rb
|
836
|
-
- lib/openc3/utilities/s3.rb
|
837
944
|
- lib/openc3/utilities/s3_autoload.rb
|
838
|
-
- lib/openc3/utilities/s3_file_cache.rb
|
839
945
|
- lib/openc3/utilities/simulated_target.rb
|
840
946
|
- lib/openc3/utilities/sleeper.rb
|
841
947
|
- lib/openc3/utilities/store.rb
|