cosmos 4.2.4-java → 4.3.0-java
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/.travis.yml +1 -1
- data/Gemfile +1 -1
- data/Manifest.txt +12 -0
- data/autohotkey/tools/cmd_sequence.ahk +21 -20
- data/autohotkey/tools/cmd_sequence2.ahk +1 -1
- data/autohotkey/tools/config_editor.ahk +1 -1
- data/autohotkey/tools/launcher.ahk +1 -0
- data/autohotkey/tools/packet_viewer.ahk +6 -5
- data/autohotkey/tools/test_runner.ahk +8 -8
- data/bin/cosmos +37 -0
- data/bin/dart_util +0 -0
- data/data/config/item_modifiers.yaml +9 -0
- data/data/crc.txt +91 -86
- data/demo/Rakefile +2 -0
- data/demo/config/dart/Gemfile +1 -1
- data/demo/config/data/crc.txt +8 -5
- data/demo/config/system/system.txt +28 -0
- data/demo/config/system/system2.txt +21 -3
- data/demo/config/system/system_alt_ports.txt +69 -0
- data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +1 -0
- data/demo/config/tools/cmd_tlm_server/cmd_tlm_server_chain.txt +18 -0
- data/demo/procedures/cosmos_api_test.rb +18 -14
- data/demo/procedures/local_screen_example.rb +51 -0
- data/ext/cosmos/ext/cosmos_io/cosmos_io.c +32 -4
- data/ext/cosmos/ext/packet/packet.c +6 -0
- data/ext/mkrf_conf.rb +2 -2
- data/install/config/dart/Gemfile +1 -1
- data/install/config/data/crc.txt +2 -2
- data/install/config/system/system.txt +23 -1
- data/lib/cosmos/conversions.rb +2 -0
- data/lib/cosmos/conversions/packet_time_formatted_conversion.rb +38 -0
- data/lib/cosmos/conversions/packet_time_seconds_conversion.rb +38 -0
- data/lib/cosmos/core_ext/cosmos_io.rb +2 -1
- data/lib/cosmos/dart/Gemfile +1 -1
- data/lib/cosmos/dart/examples/dart_stream_client.rb +6 -2
- data/lib/cosmos/dart/lib/dart_common.rb +1 -1
- data/lib/cosmos/dart/lib/dart_database_cleaner.rb +2 -2
- data/lib/cosmos/dart/lib/dart_decommutator.rb +4 -4
- data/lib/cosmos/dart/lib/dart_importer.rb +3 -3
- data/lib/cosmos/dart/lib/dart_packet_log_writer.rb +2 -2
- data/lib/cosmos/dart/processes/dart_ingester.rb +2 -0
- data/lib/cosmos/dart/processes/dart_util.rb +4 -4
- data/lib/cosmos/dart/spec/dart/dart_reducer_manager_spec.rb +3 -3
- data/lib/cosmos/gui/dialogs/cmd_tlm_raw_dialog.rb +9 -5
- data/lib/cosmos/gui/dialogs/details_dialog.rb +29 -29
- data/lib/cosmos/gui/dialogs/exception_list_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/find_replace_dialog.rb +3 -3
- data/lib/cosmos/gui/dialogs/interface_raw_dialog.rb +2 -2
- data/lib/cosmos/gui/dialogs/set_tlm_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +10 -10
- data/lib/cosmos/gui/qt.rb +10 -1
- data/lib/cosmos/gui/qt_tool.rb +17 -10
- data/lib/cosmos/gui/text/ruby_editor.rb +47 -8
- data/lib/cosmos/gui/utilities/classification_banner.rb +60 -0
- data/lib/cosmos/gui/utilities/script_module_gui.rb +26 -0
- data/lib/cosmos/interfaces.rb +1 -0
- data/lib/cosmos/interfaces/interface.rb +4 -0
- data/lib/cosmos/interfaces/protocols/ignore_packet_protocol.rb +46 -0
- data/lib/cosmos/interfaces/protocols/preidentified_protocol.rb +68 -23
- data/lib/cosmos/packet_logs/packet_log_reader.rb +69 -26
- data/lib/cosmos/packet_logs/packet_log_writer.rb +13 -1
- data/lib/cosmos/packets/commands.rb +5 -1
- data/lib/cosmos/packets/packet.rb +36 -2
- data/lib/cosmos/packets/packet_config.rb +0 -1
- data/lib/cosmos/packets/parsers/format_string_parser.rb +0 -1
- data/lib/cosmos/packets/parsers/xtce_parser.rb +1 -1
- data/lib/cosmos/packets/telemetry.rb +4 -0
- data/lib/cosmos/script/api_shared.rb +2 -0
- data/lib/cosmos/script/limits.rb +4 -0
- data/lib/cosmos/script/script.rb +27 -11
- data/lib/cosmos/script/telemetry.rb +3 -1
- data/lib/cosmos/script/tools.rb +18 -8
- data/lib/cosmos/system/system.rb +21 -0
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +26 -24
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +29 -29
- data/lib/cosmos/tools/cmd_sequence/cmd_sequence.rb +65 -40
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +6 -6
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +13 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +12 -9
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +7 -1
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +8 -8
- data/lib/cosmos/tools/cmd_tlm_server/commanding.rb +13 -2
- data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +2 -2
- data/lib/cosmos/tools/cmd_tlm_server/gui/logging_tab.rb +13 -13
- data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +4 -4
- data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +8 -8
- data/lib/cosmos/tools/cmd_tlm_server/gui/targets_tab.rb +5 -5
- data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +35 -20
- data/lib/cosmos/tools/cmd_tlm_server/replay_backend.rb +15 -11
- data/lib/cosmos/tools/config_editor/config_editor.rb +69 -69
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +42 -38
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +1 -0
- data/lib/cosmos/tools/data_viewer/dump_component.rb +1 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +4 -4
- data/lib/cosmos/tools/launcher/launcher.rb +1 -1
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +28 -24
- data/lib/cosmos/tools/opengl_builder/opengl_builder.rb +42 -42
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +56 -53
- data/lib/cosmos/tools/script_runner/script_runner.rb +112 -95
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +48 -30
- data/lib/cosmos/tools/table_manager/table_manager.rb +42 -42
- data/lib/cosmos/tools/test_runner/test_runner.rb +45 -27
- data/lib/cosmos/tools/test_runner/test_runner_chooser.rb +3 -3
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +45 -45
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +4 -4
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +3 -3
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +7 -7
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/xy_data_object_editor.rb +10 -10
- data/lib/cosmos/tools/tlm_grapher/data_objects/housekeeping_data_object.rb +10 -3
- data/lib/cosmos/tools/tlm_grapher/data_objects/xy_data_object.rb +6 -6
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +14 -14
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tool.rb +83 -83
- data/lib/cosmos/tools/tlm_viewer/screen.rb +73 -13
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +15 -15
- data/lib/cosmos/tools/tlm_viewer/widgets.rb +1 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasellipse_widget.rb +40 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/timegraph_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/widget.rb +6 -1
- data/lib/cosmos/top_level.rb +14 -1
- data/lib/cosmos/version.rb +5 -5
- data/lib/cosmos/win32/excel.rb +63 -12
- data/make_gems.sh +10 -0
- data/spec/conversions/packet_time_formatted_conversion_spec.rb +58 -0
- data/spec/conversions/packet_time_seconds_conversion_spec.rb +60 -0
- data/spec/interfaces/protocols/ignore_packet_protocol_spec.rb +243 -0
- data/spec/interfaces/protocols/preidentified_protocol_spec.rb +227 -4
- data/spec/io/serial_driver_spec.rb +15 -13
- data/spec/packet_logs/packet_log_reader_spec.rb +72 -17
- data/spec/packets/packet_config_spec.rb +5 -16
- data/spec/packets/parsers/format_string_parser_spec.rb +0 -11
- data/spec/packets/parsers/macro_parser_spec.rb +36 -36
- data/spec/packets/parsers/state_parser_spec.rb +36 -0
- data/spec/packets/telemetry_spec.rb +11 -9
- data/spec/script/script_spec.rb +2 -3
- data/spec/script/scripting_spec.rb +2 -1
- data/spec/script/tools_spec.rb +0 -1
- data/spec/tools/cmd_tlm_server/api_spec.rb +28 -20
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +33 -0
- data/spec/tools/cmd_tlm_server/commanding_spec.rb +25 -1
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +15 -0
- data/tasks/gemfile_stats.rake +3 -2
- metadata +14 -2
|
@@ -118,9 +118,9 @@ module Cosmos
|
|
|
118
118
|
@end_time = ''
|
|
119
119
|
else
|
|
120
120
|
packet = read_at_index(@packet_offsets.length - 1, :FORWARD)
|
|
121
|
-
@end_time = packet.
|
|
121
|
+
@end_time = packet.packet_time.formatted(true, 3, true) if packet and packet.packet_time
|
|
122
122
|
packet = read_at_index(0, :FORWARD)
|
|
123
|
-
@start_time = packet.
|
|
123
|
+
@start_time = packet.packet_time.formatted(true, 3, true) if packet and packet.packet_time
|
|
124
124
|
end
|
|
125
125
|
rescue Exception => error
|
|
126
126
|
Logger.error "Error in Analysis Thread\n#{error.formatted}"
|
|
@@ -261,7 +261,7 @@ module Cosmos
|
|
|
261
261
|
@current_time_object = @start_time_object.dup
|
|
262
262
|
else
|
|
263
263
|
packet = read_at_index(0, :FORWARD)
|
|
264
|
-
@start_time = packet.
|
|
264
|
+
@start_time = packet.packet_time.formatted(true, 3, true) if packet and packet.packet_time
|
|
265
265
|
end
|
|
266
266
|
else
|
|
267
267
|
stop()
|
|
@@ -277,7 +277,7 @@ module Cosmos
|
|
|
277
277
|
@current_time_object = @end_time_object.dup
|
|
278
278
|
else
|
|
279
279
|
packet = read_at_index(@packet_offsets.length - 1, :FORWARD)
|
|
280
|
-
@end_time = packet.
|
|
280
|
+
@end_time = packet.packet_time.formatted(true, 3, true) if packet and packet.packet_time
|
|
281
281
|
end
|
|
282
282
|
else
|
|
283
283
|
stop()
|
|
@@ -337,12 +337,12 @@ module Cosmos
|
|
|
337
337
|
if @playback_delay
|
|
338
338
|
# Fixed Time Delay
|
|
339
339
|
delay_time = @playback_delay - (Time.now.sys - packet_start)
|
|
340
|
-
elsif previous_packet and packet.
|
|
340
|
+
elsif previous_packet and packet.packet_time and previous_packet.packet_time
|
|
341
341
|
# Realtime
|
|
342
342
|
if direction == :FORWARD
|
|
343
|
-
delay_time = packet.
|
|
343
|
+
delay_time = packet.packet_time - previous_packet.packet_time - (Time.now.sys - packet_start)
|
|
344
344
|
else
|
|
345
|
-
delay_time = previous_packet.
|
|
345
|
+
delay_time = previous_packet.packet_time - packet.packet_time - (Time.now.sys - packet_start)
|
|
346
346
|
end
|
|
347
347
|
end
|
|
348
348
|
if delay_time > 0.0
|
|
@@ -386,8 +386,8 @@ module Cosmos
|
|
|
386
386
|
else
|
|
387
387
|
@playback_index = index - 1
|
|
388
388
|
end
|
|
389
|
-
@current_time_object = packet.
|
|
390
|
-
@current_time = packet.
|
|
389
|
+
@current_time_object = packet.packet_time
|
|
390
|
+
@current_time = packet.packet_time.formatted(true, 3, true) if packet and packet.packet_time
|
|
391
391
|
|
|
392
392
|
return packet
|
|
393
393
|
else
|
|
@@ -431,8 +431,8 @@ module Cosmos
|
|
|
431
431
|
end
|
|
432
432
|
handle_packet(packet)
|
|
433
433
|
|
|
434
|
-
@current_time_object = packet.
|
|
435
|
-
@current_time = packet.
|
|
434
|
+
@current_time_object = packet.packet_time
|
|
435
|
+
@current_time = packet.packet_time.formatted(true, 3, true)
|
|
436
436
|
if @first
|
|
437
437
|
@first = false
|
|
438
438
|
@start_time_object = @current_time_object.dup
|
|
@@ -462,12 +462,16 @@ module Cosmos
|
|
|
462
462
|
|
|
463
463
|
if identified_packet and packet.target_name != 'UNKNOWN'
|
|
464
464
|
identified_packet.received_time = packet.received_time
|
|
465
|
+
identified_packet.stored = packet.stored
|
|
466
|
+
identified_packet.extra = packet.extra
|
|
465
467
|
packet = identified_packet
|
|
466
468
|
target = System.targets[packet.target_name.upcase]
|
|
467
469
|
interface = target.interface if target
|
|
468
470
|
else
|
|
469
471
|
unknown_packet = System.telemetry.update!('UNKNOWN', 'UNKNOWN', packet.buffer)
|
|
470
472
|
unknown_packet.received_time = packet.received_time
|
|
473
|
+
unknown_packet.stored = packet.stored
|
|
474
|
+
unknown_packet.extra = packet.extra
|
|
471
475
|
packet = unknown_packet
|
|
472
476
|
data_length = packet.length
|
|
473
477
|
string = "Unknown #{data_length} byte packet starting: "
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
require 'cosmos'
|
|
12
12
|
Cosmos.catch_fatal_exception do
|
|
13
13
|
require 'cosmos/gui/qt_tool'
|
|
14
|
-
require 'cosmos/tools/config_editor/config_editor_frame'
|
|
15
14
|
require 'cosmos/gui/dialogs/progress_dialog'
|
|
16
15
|
require 'cosmos/gui/dialogs/scroll_text_dialog'
|
|
16
|
+
require 'cosmos/tools/config_editor/config_editor_frame'
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
module Cosmos
|
|
@@ -94,106 +94,106 @@ module Cosmos
|
|
|
94
94
|
super()
|
|
95
95
|
|
|
96
96
|
# File actions
|
|
97
|
-
@file_new = Qt::Action.new(Cosmos.get_icon('file.png'),
|
|
98
|
-
@file_new_keyseq = Qt::KeySequence.new(
|
|
97
|
+
@file_new = Qt::Action.new(Cosmos.get_icon('file.png'), '&New', self)
|
|
98
|
+
@file_new_keyseq = Qt::KeySequence.new('Ctrl+N')
|
|
99
99
|
@file_new.shortcut = @file_new_keyseq
|
|
100
|
-
@file_new.statusTip =
|
|
100
|
+
@file_new.statusTip = 'Start a new file'
|
|
101
101
|
@file_new.connect(SIGNAL('triggered()')) { file_new() }
|
|
102
102
|
|
|
103
|
-
@file_close = Qt::Action.new(
|
|
104
|
-
@file_close_keyseq = Qt::KeySequence.new(
|
|
103
|
+
@file_close = Qt::Action.new('&Close', self)
|
|
104
|
+
@file_close_keyseq = Qt::KeySequence.new('Ctrl+W')
|
|
105
105
|
@file_close.shortcut = @file_close_keyseq
|
|
106
|
-
@file_close.statusTip =
|
|
106
|
+
@file_close.statusTip = 'Close the file'
|
|
107
107
|
@file_close.connect(SIGNAL('triggered()')) { file_close() }
|
|
108
108
|
|
|
109
|
-
@file_reload = Qt::Action.new(
|
|
110
|
-
@file_reload_keyseq = Qt::KeySequence.new(
|
|
109
|
+
@file_reload = Qt::Action.new('&Reload', self)
|
|
110
|
+
@file_reload_keyseq = Qt::KeySequence.new('Ctrl+R')
|
|
111
111
|
@file_reload.shortcut = @file_reload_keyseq
|
|
112
|
-
@file_reload.statusTip =
|
|
112
|
+
@file_reload.statusTip = 'Reload a file'
|
|
113
113
|
@file_reload.connect(SIGNAL('triggered()')) { file_reload() }
|
|
114
114
|
|
|
115
|
-
@file_save = Qt::Action.new(Cosmos.get_icon('save.png'),
|
|
116
|
-
@file_save_keyseq = Qt::KeySequence.new(
|
|
115
|
+
@file_save = Qt::Action.new(Cosmos.get_icon('save.png'), '&Save', self)
|
|
116
|
+
@file_save_keyseq = Qt::KeySequence.new('Ctrl+S')
|
|
117
117
|
@file_save.shortcut = @file_save_keyseq
|
|
118
|
-
@file_save.statusTip =
|
|
118
|
+
@file_save.statusTip = 'Save the file'
|
|
119
119
|
@file_save.connect(SIGNAL('triggered()')) { file_save(false) }
|
|
120
120
|
|
|
121
|
-
@file_save_as = Qt::Action.new(Cosmos.get_icon('save_as.png'),
|
|
122
|
-
@file_save_as.statusTip =
|
|
121
|
+
@file_save_as = Qt::Action.new(Cosmos.get_icon('save_as.png'), 'Save &As', self)
|
|
122
|
+
@file_save_as.statusTip = 'Save the file'
|
|
123
123
|
@file_save_as.connect(SIGNAL('triggered()')) { file_save(true) }
|
|
124
124
|
|
|
125
125
|
# Edit actions
|
|
126
|
-
@edit_undo = Qt::Action.new(Cosmos.get_icon('undo.png'),
|
|
127
|
-
@edit_undo_keyseq = Qt::KeySequence.new(
|
|
126
|
+
@edit_undo = Qt::Action.new(Cosmos.get_icon('undo.png'), '&Undo', self)
|
|
127
|
+
@edit_undo_keyseq = Qt::KeySequence.new('Ctrl+Z')
|
|
128
128
|
@edit_undo.shortcut = @edit_undo_keyseq
|
|
129
|
-
@edit_undo.statusTip =
|
|
129
|
+
@edit_undo.statusTip = 'Undo'
|
|
130
130
|
@edit_undo.connect(SIGNAL('triggered()')) { active_config_editor_frame().undo }
|
|
131
131
|
|
|
132
|
-
@edit_redo = Qt::Action.new(Cosmos.get_icon('redo.png'),
|
|
133
|
-
@edit_redo_keyseq = Qt::KeySequence.new(
|
|
132
|
+
@edit_redo = Qt::Action.new(Cosmos.get_icon('redo.png'), '&Redo', self)
|
|
133
|
+
@edit_redo_keyseq = Qt::KeySequence.new('Ctrl+Y')
|
|
134
134
|
@edit_redo.shortcut = @edit_redo_keyseq
|
|
135
|
-
@edit_redo.statusTip =
|
|
135
|
+
@edit_redo.statusTip = 'Redo'
|
|
136
136
|
@edit_redo.connect(SIGNAL('triggered()')) { active_config_editor_frame().redo }
|
|
137
137
|
|
|
138
|
-
@edit_cut = Qt::Action.new(Cosmos.get_icon('cut.png'),
|
|
139
|
-
@edit_cut_keyseq = Qt::KeySequence.new(
|
|
138
|
+
@edit_cut = Qt::Action.new(Cosmos.get_icon('cut.png'), 'Cu&t', self)
|
|
139
|
+
@edit_cut_keyseq = Qt::KeySequence.new('Ctrl+X')
|
|
140
140
|
@edit_cut.shortcut = @edit_cut_keyseq
|
|
141
|
-
@edit_cut.statusTip =
|
|
141
|
+
@edit_cut.statusTip = 'Cut'
|
|
142
142
|
@edit_cut.connect(SIGNAL('triggered()')) { active_config_editor_frame().cut }
|
|
143
143
|
|
|
144
|
-
@edit_copy = Qt::Action.new(Cosmos.get_icon('copy.png'),
|
|
145
|
-
@edit_copy_keyseq = Qt::KeySequence.new(
|
|
144
|
+
@edit_copy = Qt::Action.new(Cosmos.get_icon('copy.png'), '&Copy', self)
|
|
145
|
+
@edit_copy_keyseq = Qt::KeySequence.new('Ctrl+C')
|
|
146
146
|
@edit_copy.shortcut = @edit_copy_keyseq
|
|
147
|
-
@edit_copy.statusTip =
|
|
147
|
+
@edit_copy.statusTip = 'Copy'
|
|
148
148
|
@edit_copy.connect(SIGNAL('triggered()')) { active_config_editor_frame().copy }
|
|
149
149
|
|
|
150
|
-
@edit_paste = Qt::Action.new(
|
|
151
|
-
@edit_paste_keyseq = Qt::KeySequence.new(
|
|
150
|
+
@edit_paste = Qt::Action.new('&Paste', self)
|
|
151
|
+
@edit_paste_keyseq = Qt::KeySequence.new('Ctrl+V')
|
|
152
152
|
@edit_paste.shortcut = @edit_paste_keyseq
|
|
153
|
-
@edit_paste.statusTip =
|
|
153
|
+
@edit_paste.statusTip = 'Paste'
|
|
154
154
|
@edit_paste.connect(SIGNAL('triggered()')) { active_config_editor_frame().paste }
|
|
155
155
|
|
|
156
|
-
@edit_select_all = Qt::Action.new(
|
|
157
|
-
@edit_select_all_keyseq = Qt::KeySequence.new(
|
|
156
|
+
@edit_select_all = Qt::Action.new('Select &All', self)
|
|
157
|
+
@edit_select_all_keyseq = Qt::KeySequence.new('Ctrl+A')
|
|
158
158
|
@edit_select_all.shortcut = @edit_select_all_keyseq
|
|
159
|
-
@edit_select_all.statusTip =
|
|
159
|
+
@edit_select_all.statusTip = 'Select All'
|
|
160
160
|
@edit_select_all.connect(SIGNAL('triggered()')) { active_config_editor_frame().select_all }
|
|
161
161
|
|
|
162
|
-
@edit_comment = Qt::Action.new(
|
|
163
|
-
@edit_comment_keyseq = Qt::KeySequence.new(
|
|
162
|
+
@edit_comment = Qt::Action.new('Comment/Uncomment &Lines', self)
|
|
163
|
+
@edit_comment_keyseq = Qt::KeySequence.new('Ctrl+K')
|
|
164
164
|
@edit_comment.shortcut = @edit_comment_keyseq
|
|
165
|
-
@edit_comment.statusTip =
|
|
165
|
+
@edit_comment.statusTip = 'Comment/Uncomment Lines'
|
|
166
166
|
@edit_comment.connect(SIGNAL('triggered()')) { active_config_editor_frame().comment_or_uncomment_lines }
|
|
167
167
|
|
|
168
168
|
# Search Actions
|
|
169
|
-
@search_find = Qt::Action.new(Cosmos.get_icon('search.png'),
|
|
170
|
-
@search_find_keyseq = Qt::KeySequence.new(
|
|
169
|
+
@search_find = Qt::Action.new(Cosmos.get_icon('search.png'), '&Find', self)
|
|
170
|
+
@search_find_keyseq = Qt::KeySequence.new('Ctrl+F')
|
|
171
171
|
@search_find.shortcut = @search_find_keyseq
|
|
172
|
-
@search_find.statusTip =
|
|
172
|
+
@search_find.statusTip = 'Find text'
|
|
173
173
|
@search_find.connect(SIGNAL('triggered()')) do
|
|
174
174
|
FindReplaceDialog.show_find(self)
|
|
175
175
|
end
|
|
176
176
|
|
|
177
|
-
@search_find_next = Qt::Action.new(
|
|
178
|
-
@search_find_next_keyseq = Qt::KeySequence.new(
|
|
177
|
+
@search_find_next = Qt::Action.new('Find &Next', self)
|
|
178
|
+
@search_find_next_keyseq = Qt::KeySequence.new('F3')
|
|
179
179
|
@search_find_next.shortcut = @search_find_next_keyseq
|
|
180
|
-
@search_find_next.statusTip =
|
|
180
|
+
@search_find_next.statusTip = 'Find next instance'
|
|
181
181
|
@search_find_next.connect(SIGNAL('triggered()')) do
|
|
182
182
|
FindReplaceDialog.find_next(self)
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
-
@search_find_previous = Qt::Action.new(
|
|
186
|
-
@search_find_previous_keyseq = Qt::KeySequence.new(
|
|
185
|
+
@search_find_previous = Qt::Action.new('Find &Previous', self)
|
|
186
|
+
@search_find_previous_keyseq = Qt::KeySequence.new('Shift+F3')
|
|
187
187
|
@search_find_previous.shortcut = @search_find_previous_keyseq
|
|
188
|
-
@search_find_previous.statusTip =
|
|
188
|
+
@search_find_previous.statusTip = 'Find previous instance'
|
|
189
189
|
@search_find_previous.connect(SIGNAL('triggered()')) do
|
|
190
190
|
FindReplaceDialog.find_previous(self)
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
-
@search_replace = Qt::Action.new(
|
|
194
|
-
@search_replace_keyseq = Qt::KeySequence.new(
|
|
193
|
+
@search_replace = Qt::Action.new('&Replace', self)
|
|
194
|
+
@search_replace_keyseq = Qt::KeySequence.new('Ctrl+H')
|
|
195
195
|
@search_replace.shortcut = @search_replace_keyseq
|
|
196
|
-
@search_replace.statusTip =
|
|
196
|
+
@search_replace.statusTip = 'Replace'
|
|
197
197
|
@search_replace.connect(SIGNAL('triggered()')) do
|
|
198
198
|
FindReplaceDialog.show_replace(self)
|
|
199
199
|
end
|
|
@@ -220,22 +220,22 @@ module Cosmos
|
|
|
220
220
|
update_cursor()
|
|
221
221
|
end
|
|
222
222
|
|
|
223
|
-
@create_target = Qt::Action.new(
|
|
224
|
-
@create_target.statusTip =
|
|
223
|
+
@create_target = Qt::Action.new('&Create Target', self)
|
|
224
|
+
@create_target.statusTip = 'Create a new COSMOS target'
|
|
225
225
|
@create_target.connect(SIGNAL('triggered()')) { create_target() }
|
|
226
226
|
end
|
|
227
227
|
|
|
228
228
|
def initialize_menus
|
|
229
229
|
# File Menu
|
|
230
|
-
@file_menu = menuBar.addMenu(
|
|
230
|
+
@file_menu = menuBar.addMenu('&File')
|
|
231
231
|
@file_menu.addAction(@file_new)
|
|
232
232
|
|
|
233
233
|
open_action = Qt::Action.new(self)
|
|
234
|
-
open_action.shortcut = Qt::KeySequence.new(
|
|
234
|
+
open_action.shortcut = Qt::KeySequence.new('Ctrl+O')
|
|
235
235
|
open_action.connect(SIGNAL('triggered()')) { file_open(@procedure_dir) }
|
|
236
236
|
self.addAction(open_action)
|
|
237
237
|
|
|
238
|
-
@file_open = @file_menu.addMenu(
|
|
238
|
+
@file_open = @file_menu.addMenu('&Open')
|
|
239
239
|
@file_open.setIcon(Cosmos.get_icon('open.png'))
|
|
240
240
|
target_dirs_action(@file_open, File.join(Cosmos::USERPATH,'config'), '', method(:file_open))
|
|
241
241
|
|
|
@@ -248,7 +248,7 @@ module Cosmos
|
|
|
248
248
|
@file_menu.addAction(@exit_action)
|
|
249
249
|
|
|
250
250
|
# Edit Menu
|
|
251
|
-
mode_menu = menuBar.addMenu(
|
|
251
|
+
mode_menu = menuBar.addMenu('&Edit')
|
|
252
252
|
mode_menu.addAction(@edit_undo)
|
|
253
253
|
mode_menu.addAction(@edit_redo)
|
|
254
254
|
mode_menu.addSeparator()
|
|
@@ -261,18 +261,18 @@ module Cosmos
|
|
|
261
261
|
mode_menu.addAction(@edit_comment)
|
|
262
262
|
|
|
263
263
|
# Search Menu
|
|
264
|
-
view_menu = menuBar.addMenu(
|
|
264
|
+
view_menu = menuBar.addMenu('&Search')
|
|
265
265
|
view_menu.addAction(@search_find)
|
|
266
266
|
view_menu.addAction(@search_find_next)
|
|
267
267
|
view_menu.addAction(@search_find_previous)
|
|
268
268
|
view_menu.addAction(@search_replace)
|
|
269
269
|
|
|
270
270
|
# File Type Menu
|
|
271
|
-
type_menu = menuBar.addMenu(
|
|
271
|
+
type_menu = menuBar.addMenu('File &Type')
|
|
272
272
|
type_menu.addActions(@type_group.actions)
|
|
273
273
|
|
|
274
274
|
# Actions Menu
|
|
275
|
-
actions_menu = menuBar.addMenu(
|
|
275
|
+
actions_menu = menuBar.addMenu('&Actions')
|
|
276
276
|
actions_menu.addAction(@create_target)
|
|
277
277
|
|
|
278
278
|
# Help Menu
|
|
@@ -376,8 +376,8 @@ module Cosmos
|
|
|
376
376
|
def tree_context_menu(point)
|
|
377
377
|
menu = Qt::Menu.new()
|
|
378
378
|
|
|
379
|
-
delete_action = Qt::Action.new(
|
|
380
|
-
delete_action.statusTip =
|
|
379
|
+
delete_action = Qt::Action.new("Delete", self)
|
|
380
|
+
delete_action.statusTip = "Delete file"
|
|
381
381
|
delete_action.connect(SIGNAL('triggered()')) do
|
|
382
382
|
delete_path(@fs_model.filePath(@tree_view.indexAt(point)))
|
|
383
383
|
end
|
|
@@ -490,11 +490,11 @@ module Cosmos
|
|
|
490
490
|
saved = true
|
|
491
491
|
update_title()
|
|
492
492
|
update_tree()
|
|
493
|
-
statusBar.showMessage(
|
|
493
|
+
statusBar.showMessage("#{filename} saved")
|
|
494
494
|
@procedure_dir = File.dirname(filename)
|
|
495
495
|
@procedure_dir << '/' if @procedure_dir[-1..-1] != '/' and @procedure_dir[-1..-1] != '\\'
|
|
496
496
|
rescue => error
|
|
497
|
-
statusBar.showMessage(
|
|
497
|
+
statusBar.showMessage("Error Saving File : #{error.class} : #{error.message}")
|
|
498
498
|
end
|
|
499
499
|
end
|
|
500
500
|
|
|
@@ -656,23 +656,23 @@ module Cosmos
|
|
|
656
656
|
|
|
657
657
|
menu = Qt::Menu.new()
|
|
658
658
|
|
|
659
|
-
new_action = Qt::Action.new(
|
|
660
|
-
new_action.statusTip =
|
|
659
|
+
new_action = Qt::Action.new("&New", self)
|
|
660
|
+
new_action.statusTip = "Create a new file"
|
|
661
661
|
new_action.connect(SIGNAL('triggered()')) { file_new() }
|
|
662
662
|
menu.addAction(new_action)
|
|
663
663
|
|
|
664
|
-
close_action = Qt::Action.new(
|
|
665
|
-
close_action.statusTip =
|
|
664
|
+
close_action = Qt::Action.new("&Close", self)
|
|
665
|
+
close_action.statusTip = "Close the file"
|
|
666
666
|
close_action.connect(SIGNAL('triggered()')) { file_close() }
|
|
667
667
|
menu.addAction(close_action)
|
|
668
668
|
|
|
669
|
-
save_action = Qt::Action.new(
|
|
670
|
-
save_action.statusTip =
|
|
669
|
+
save_action = Qt::Action.new("&Save", self)
|
|
670
|
+
save_action.statusTip = "Save the file"
|
|
671
671
|
save_action.connect(SIGNAL('triggered()')) { file_save(false) }
|
|
672
672
|
menu.addAction(save_action)
|
|
673
673
|
|
|
674
|
-
save_action = Qt::Action.new(
|
|
675
|
-
save_action.statusTip =
|
|
674
|
+
save_action = Qt::Action.new("Save &As", self)
|
|
675
|
+
save_action.statusTip = "Save the file as"
|
|
676
676
|
save_action.connect(SIGNAL('triggered()')) { file_save(true) }
|
|
677
677
|
menu.addAction(save_action)
|
|
678
678
|
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
require 'cosmos'
|
|
12
12
|
Cosmos.catch_fatal_exception do
|
|
13
|
-
require 'cosmos/script'
|
|
14
|
-
require 'cosmos/config/config_parser'
|
|
15
13
|
require 'cosmos/gui/qt_tool'
|
|
16
14
|
require 'cosmos/gui/dialogs/splash'
|
|
17
15
|
require 'cosmos/gui/dialogs/progress_dialog'
|
|
@@ -22,6 +20,8 @@ Cosmos.catch_fatal_exception do
|
|
|
22
20
|
require 'cosmos/gui/widgets/realtime_button_bar'
|
|
23
21
|
require 'cosmos/tools/data_viewer/data_viewer_component'
|
|
24
22
|
require 'cosmos/tools/data_viewer/dump_component'
|
|
23
|
+
require 'cosmos/config/config_parser'
|
|
24
|
+
require 'cosmos/script'
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
module Cosmos
|
|
@@ -97,62 +97,62 @@ module Cosmos
|
|
|
97
97
|
super()
|
|
98
98
|
|
|
99
99
|
# File Menu Actions
|
|
100
|
-
@open_log = Qt::Action.new(
|
|
101
|
-
@open_log_keyseq = Qt::KeySequence.new(
|
|
100
|
+
@open_log = Qt::Action.new('&Open Log File', self)
|
|
101
|
+
@open_log_keyseq = Qt::KeySequence.new('Ctrl+O')
|
|
102
102
|
@open_log.shortcut = @open_log_keyseq
|
|
103
|
-
@open_log.statusTip =
|
|
103
|
+
@open_log.statusTip = 'Open telemetry log file for processing'
|
|
104
104
|
@open_log.connect(SIGNAL('triggered()')) { handle_open_log_file() }
|
|
105
105
|
|
|
106
|
-
@query_dart = Qt::Action.new(
|
|
107
|
-
@query_dart_keyseq = Qt::KeySequence.new(
|
|
106
|
+
@query_dart = Qt::Action.new('&Query DART Database', self)
|
|
107
|
+
@query_dart_keyseq = Qt::KeySequence.new('Ctrl+D')
|
|
108
108
|
@query_dart.shortcut = @query_dart_keyseq
|
|
109
|
-
@query_dart.statusTip =
|
|
109
|
+
@query_dart.statusTip = 'Query DART Database'
|
|
110
110
|
@query_dart.connect(SIGNAL('triggered()')) { handle_query_dart() }
|
|
111
111
|
|
|
112
|
-
@handle_reset = Qt::Action.new(
|
|
113
|
-
@handle_reset_keyseq = Qt::KeySequence.new(
|
|
112
|
+
@handle_reset = Qt::Action.new('&Reset', self)
|
|
113
|
+
@handle_reset_keyseq = Qt::KeySequence.new('Ctrl+R')
|
|
114
114
|
@handle_reset.shortcut = @handle_reset_keyseq
|
|
115
|
-
@handle_reset.statusTip =
|
|
115
|
+
@handle_reset.statusTip = 'Reset Components'
|
|
116
116
|
@handle_reset.connect(SIGNAL('triggered()')) { handle_reset() }
|
|
117
117
|
|
|
118
|
-
@replay_action = Qt::Action.new(
|
|
119
|
-
@replay_action.statusTip =
|
|
118
|
+
@replay_action = Qt::Action.new('Toggle Replay Mode', self)
|
|
119
|
+
@replay_action.statusTip = 'Toggle Replay Mode'
|
|
120
120
|
@replay_action.connect(SIGNAL('triggered()')) { toggle_replay_mode() }
|
|
121
121
|
|
|
122
122
|
# Search Actions
|
|
123
|
-
@search_find = Qt::Action.new(Cosmos.get_icon('search.png'),
|
|
124
|
-
@search_find_keyseq = Qt::KeySequence.new(
|
|
123
|
+
@search_find = Qt::Action.new(Cosmos.get_icon('search.png'), '&Find', self)
|
|
124
|
+
@search_find_keyseq = Qt::KeySequence.new('Ctrl+F')
|
|
125
125
|
@search_find.shortcut = @search_find_keyseq
|
|
126
|
-
@search_find.statusTip =
|
|
126
|
+
@search_find.statusTip = 'Find text'
|
|
127
127
|
@search_find.connect(SIGNAL('triggered()')) do
|
|
128
128
|
FindReplaceDialog.show_find(self)
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
-
@search_find_next = Qt::Action.new(
|
|
132
|
-
@search_find_next_keyseq = Qt::KeySequence.new(
|
|
131
|
+
@search_find_next = Qt::Action.new('Find &Next', self)
|
|
132
|
+
@search_find_next_keyseq = Qt::KeySequence.new('F3')
|
|
133
133
|
@search_find_next.shortcut = @search_find_next_keyseq
|
|
134
|
-
@search_find_next.statusTip =
|
|
134
|
+
@search_find_next.statusTip = 'Find next instance'
|
|
135
135
|
@search_find_next.connect(SIGNAL('triggered()')) do
|
|
136
136
|
FindReplaceDialog.find_next(self)
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
@search_find_previous = Qt::Action.new(
|
|
140
|
-
@search_find_previous_keyseq = Qt::KeySequence.new(
|
|
139
|
+
@search_find_previous = Qt::Action.new('Find &Previous', self)
|
|
140
|
+
@search_find_previous_keyseq = Qt::KeySequence.new('Shift+F3')
|
|
141
141
|
@search_find_previous.shortcut = @search_find_previous_keyseq
|
|
142
|
-
@search_find_previous.statusTip =
|
|
142
|
+
@search_find_previous.statusTip = 'Find previous instance'
|
|
143
143
|
@search_find_previous.connect(SIGNAL('triggered()')) do
|
|
144
144
|
FindReplaceDialog.find_previous(self)
|
|
145
145
|
end
|
|
146
146
|
|
|
147
147
|
# Tab Menu Actions
|
|
148
|
-
@delete_tab = Qt::Action.new(Cosmos.get_icon('delete_tab.png'),
|
|
149
|
-
@delete_tab.statusTip =
|
|
148
|
+
@delete_tab = Qt::Action.new(Cosmos.get_icon('delete_tab.png'), '&Delete Tab', self)
|
|
149
|
+
@delete_tab.statusTip = 'Delete active tab'
|
|
150
150
|
@delete_tab.connect(SIGNAL('triggered()')) { on_tab_delete() }
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
def initialize_menus
|
|
154
154
|
# File Menu
|
|
155
|
-
file_menu = menuBar.addMenu(
|
|
155
|
+
file_menu = menuBar.addMenu('&File')
|
|
156
156
|
file_menu.addAction(@open_log)
|
|
157
157
|
file_menu.addAction(@query_dart)
|
|
158
158
|
file_menu.addAction(@handle_reset)
|
|
@@ -161,13 +161,13 @@ module Cosmos
|
|
|
161
161
|
file_menu.addAction(@exit_action)
|
|
162
162
|
|
|
163
163
|
# Tab Menu
|
|
164
|
-
@tab_menu = menuBar.addMenu(
|
|
164
|
+
@tab_menu = menuBar.addMenu('&Tab')
|
|
165
165
|
@tab_menu.addAction(@delete_tab)
|
|
166
166
|
@tab_menu.addSeparator()
|
|
167
167
|
@tab_menu_actions = []
|
|
168
168
|
|
|
169
169
|
# Search Menu
|
|
170
|
-
view_menu = menuBar.addMenu(
|
|
170
|
+
view_menu = menuBar.addMenu('&Search')
|
|
171
171
|
view_menu.addAction(@search_find)
|
|
172
172
|
view_menu.addAction(@search_find_next)
|
|
173
173
|
view_menu.addAction(@search_find_previous)
|
|
@@ -307,7 +307,7 @@ module Cosmos
|
|
|
307
307
|
break if @cancel_thread
|
|
308
308
|
Qt.execute_in_main_thread(true) do
|
|
309
309
|
@realtime_button_bar.state = 'Connecting'
|
|
310
|
-
statusBar.showMessage(
|
|
310
|
+
statusBar.showMessage("Error Connecting to Command and Telemetry Server")
|
|
311
311
|
end
|
|
312
312
|
break if @sleeper.sleep(1)
|
|
313
313
|
break if @cancel_thread
|
|
@@ -318,7 +318,7 @@ module Cosmos
|
|
|
318
318
|
break if @cancel_thread
|
|
319
319
|
begin
|
|
320
320
|
# Get a subscribed to packet
|
|
321
|
-
packet_data, target_name, packet_name, received_time, received_count = get_packet_data(@subscription_id)
|
|
321
|
+
packet_data, target_name, packet_name, received_time, received_count, stored, extra = get_packet_data(@subscription_id)
|
|
322
322
|
break unless packet_data
|
|
323
323
|
|
|
324
324
|
# Put packet data into its packet
|
|
@@ -326,6 +326,8 @@ module Cosmos
|
|
|
326
326
|
packet.buffer = packet_data
|
|
327
327
|
packet.received_time = received_time
|
|
328
328
|
packet.received_count = received_count
|
|
329
|
+
packet.stored = stored
|
|
330
|
+
packet.extra = extra
|
|
329
331
|
|
|
330
332
|
# Make sure we are on the right configuration
|
|
331
333
|
if target_name == 'SYSTEM' and packet_name == 'META'
|
|
@@ -344,12 +346,12 @@ module Cosmos
|
|
|
344
346
|
end
|
|
345
347
|
rescue DRb::DRbConnError
|
|
346
348
|
break if @cancel_thread
|
|
347
|
-
Qt.execute_in_main_thread(true) { statusBar.showMessage(
|
|
349
|
+
Qt.execute_in_main_thread(true) { statusBar.showMessage("Error Connecting to Command and Telemetry Server") }
|
|
348
350
|
break # Let outer loop resubscribe
|
|
349
351
|
rescue RuntimeError => error
|
|
350
352
|
raise error unless error.message =~ /queue/
|
|
351
353
|
break if @cancel_thread
|
|
352
|
-
Qt.execute_in_main_thread(true) { statusBar.showMessage(
|
|
354
|
+
Qt.execute_in_main_thread(true) { statusBar.showMessage("Connection Dropped by Command and Telemetry Server: #{Time.now.sys.formatted}") }
|
|
353
355
|
break # Let outer loop resubscribe
|
|
354
356
|
end
|
|
355
357
|
end
|
|
@@ -537,7 +539,7 @@ module Cosmos
|
|
|
537
539
|
@interface.disconnect
|
|
538
540
|
request_packet = Cosmos::Packet.new('DART', 'DART')
|
|
539
541
|
request_packet.define_item('REQUEST', 0, 0, :BLOCK)
|
|
540
|
-
|
|
542
|
+
|
|
541
543
|
@time_start ||= Time.utc(1970, 1, 1)
|
|
542
544
|
@time_end ||= Time.now
|
|
543
545
|
@time_delta = @time_end - @time_start
|
|
@@ -550,7 +552,7 @@ module Cosmos
|
|
|
550
552
|
request['packets'] = @packets
|
|
551
553
|
request['meta_filters'] = @meta_filters unless @meta_filters.empty?
|
|
552
554
|
request_packet.write('REQUEST', JSON.dump(request))
|
|
553
|
-
|
|
555
|
+
|
|
554
556
|
progress_dialog.append_text("Connecting to DART Database...")
|
|
555
557
|
@interface.connect
|
|
556
558
|
progress_dialog.append_text("Sending DART Database Query...")
|
|
@@ -570,16 +572,18 @@ module Cosmos
|
|
|
570
572
|
|
|
571
573
|
# Switch to correct configuration from SYSTEM META when needed
|
|
572
574
|
if packet.target_name == 'SYSTEM'.freeze and packet.packet_name == 'META'.freeze
|
|
573
|
-
meta_packet = System.telemetry.update!('SYSTEM', 'META', packet.buffer)
|
|
575
|
+
meta_packet = System.telemetry.update!('SYSTEM', 'META', packet.buffer)
|
|
574
576
|
Cosmos::System.load_configuration(meta_packet.read('CONFIG'))
|
|
575
577
|
elsif first
|
|
576
578
|
first = false
|
|
577
|
-
@time_start = packet.
|
|
579
|
+
@time_start = packet.packet_time
|
|
578
580
|
@time_delta = @time_end - @time_start
|
|
579
581
|
end
|
|
580
582
|
|
|
581
583
|
defined_packet = System.telemetry.update!(packet.target_name, packet.packet_name, packet.buffer)
|
|
582
584
|
defined_packet.received_time = packet.received_time
|
|
585
|
+
defined_packet.stored = packet.stored
|
|
586
|
+
defined_packet.extra = packet.extra
|
|
583
587
|
|
|
584
588
|
break if @cancel_progress
|
|
585
589
|
# Route packet to its component(s)
|
|
@@ -593,14 +597,14 @@ module Cosmos
|
|
|
593
597
|
end
|
|
594
598
|
end
|
|
595
599
|
|
|
596
|
-
progress = ((@time_delta - (@time_end - defined_packet.
|
|
600
|
+
progress = ((@time_delta - (@time_end - defined_packet.packet_time)).to_f / @time_delta.to_f)
|
|
597
601
|
progress_dialog.set_overall_progress(progress) if !@cancel_progress
|
|
598
602
|
end
|
|
599
603
|
ensure
|
|
600
604
|
progress_dialog.append_text("Canceled!") if @cancel_progress
|
|
601
605
|
progress_dialog.complete
|
|
602
606
|
end
|
|
603
|
-
end
|
|
607
|
+
end
|
|
604
608
|
rescue => error
|
|
605
609
|
Qt::MessageBox.critical(self, 'Error!', "Error Querying DART Database\n#{error.formatted}")
|
|
606
610
|
ensure
|
|
@@ -745,7 +749,7 @@ module Cosmos
|
|
|
745
749
|
delete_component(tab_index)
|
|
746
750
|
@tab_book.removeTab(tab_index)
|
|
747
751
|
|
|
748
|
-
statusBar.showMessage(
|
|
752
|
+
statusBar.showMessage("Tab Deleted")
|
|
749
753
|
end
|
|
750
754
|
else
|
|
751
755
|
Qt::MessageBox.information(self, 'Info', "No tabs exist")
|