cosmos 4.2.4-java → 4.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -102,6 +102,7 @@ module Cosmos
|
|
102
102
|
processed_text = ''
|
103
103
|
processed_text << '*' * 80 << "\n"
|
104
104
|
processed_text << "* #{packet.target_name} #{packet.packet_name}\n"
|
105
|
+
processed_text << "* Packet Time: #{packet.packet_time.formatted}\n" if packet.packet_time
|
105
106
|
processed_text << "* Received Time: #{packet.received_time.formatted}\n" if packet.received_time
|
106
107
|
processed_text << "* Received Count: #{packet.received_count}\n"
|
107
108
|
processed_text << '*' * 80 << "\n"
|
@@ -25,6 +25,7 @@ module Cosmos
|
|
25
25
|
processed_text = ''
|
26
26
|
processed_text << '*' * 80 << "\n"
|
27
27
|
processed_text << "* #{packet.target_name} #{packet.packet_name}\n"
|
28
|
+
processed_text << "* Packet Time: #{packet.packet_time.formatted}\n" if packet.packet_time
|
28
29
|
processed_text << "* Received Time: #{packet.received_time.formatted}\n" if packet.received_time
|
29
30
|
processed_text << "* Received Count: #{packet.received_count}\n"
|
30
31
|
processed_text << '*' * 80 << "\n"
|
@@ -42,17 +42,17 @@ module Cosmos
|
|
42
42
|
|
43
43
|
def initialize_actions
|
44
44
|
super()
|
45
|
-
@hide_ignored_action = Qt::Action.new(
|
46
|
-
@hide_ignored_keyseq = Qt::KeySequence.new(
|
45
|
+
@hide_ignored_action = Qt::Action.new('&Hide Ignored Items', self)
|
46
|
+
@hide_ignored_keyseq = Qt::KeySequence.new('Ctrl+H')
|
47
47
|
@hide_ignored_action.shortcut = @hide_ignored_keyseq
|
48
|
-
@hide_ignored_action.statusTip =
|
48
|
+
@hide_ignored_action.statusTip = 'Do not include ignored items in command and telemetry handbooks'
|
49
49
|
@hide_ignored_action.setCheckable(true)
|
50
50
|
@hide_ignored_action.setChecked(false)
|
51
51
|
end
|
52
52
|
|
53
53
|
def initialize_menus
|
54
54
|
# File Menu
|
55
|
-
@file_menu = menuBar.addMenu(
|
55
|
+
@file_menu = menuBar.addMenu('&File')
|
56
56
|
@file_menu.addAction(@hide_ignored_action)
|
57
57
|
@file_menu.addAction(@exit_action)
|
58
58
|
|
@@ -219,8 +219,8 @@ module Cosmos
|
|
219
219
|
|
220
220
|
case type
|
221
221
|
when :LIMITS_CHANGE
|
222
|
-
# The most common event: target, packet, item, state
|
223
|
-
result = limits_change(data[0], data[1], data[2], data[4])
|
222
|
+
# The most common event: target, packet, item, state, packet_time
|
223
|
+
result = limits_change(data[0], data[1], data[2], data[4], data[5])
|
224
224
|
|
225
225
|
when :LIMITS_SET
|
226
226
|
# Check if the overall limits set changed. If so we need to reset
|
@@ -368,7 +368,7 @@ module Cosmos
|
|
368
368
|
|
369
369
|
# Process a limits_change event by recoloring out of limits events
|
370
370
|
# and creating a log message.
|
371
|
-
def limits_change(target_name, packet_name, item_name, state)
|
371
|
+
def limits_change(target_name, packet_name, item_name, state, packet_time = nil)
|
372
372
|
message = ''
|
373
373
|
color = :BLACK
|
374
374
|
item = [target_name, packet_name, item_name]
|
@@ -392,9 +392,13 @@ module Cosmos
|
|
392
392
|
when :BLUE
|
393
393
|
message << "INFO: "
|
394
394
|
color = :BLUE
|
395
|
+
when nil
|
396
|
+
return nil
|
395
397
|
end
|
396
398
|
value = tlm(target_name, packet_name, item_name)
|
397
|
-
|
399
|
+
packet_time_str = ""
|
400
|
+
packet_time_str = " (#{packet_time.sys.formatted})" if packet_time
|
401
|
+
message << "#{target_name} #{packet_name} #{item_name} = #{value} is #{state}#{packet_time_str}\n"
|
398
402
|
[message, color]
|
399
403
|
end
|
400
404
|
|
@@ -535,7 +539,7 @@ module Cosmos
|
|
535
539
|
if options.config_file
|
536
540
|
begin
|
537
541
|
result = @limits_items.open_config(options.config_file)
|
538
|
-
statusBar.showMessage(
|
542
|
+
statusBar.showMessage(result)
|
539
543
|
rescue => error
|
540
544
|
ExceptionDialog.new(self, error, "Error parsing #{@options.config_file}")
|
541
545
|
end
|
@@ -549,44 +553,44 @@ module Cosmos
|
|
549
553
|
def initialize_actions
|
550
554
|
super
|
551
555
|
|
552
|
-
@options_action = Qt::Action.new(
|
553
|
-
@options_action.statusTip =
|
556
|
+
@options_action = Qt::Action.new('O&ptions', self)
|
557
|
+
@options_action.statusTip = 'Open the options dialog'
|
554
558
|
@options_action.connect(SIGNAL('triggered()')) { show_options_dialog() }
|
555
559
|
|
556
|
-
@reset_action = Qt::Action.new(
|
557
|
-
@reset_action_keyseq = Qt::KeySequence.new(
|
560
|
+
@reset_action = Qt::Action.new('&Reset', self)
|
561
|
+
@reset_action_keyseq = Qt::KeySequence.new('Ctrl+R')
|
558
562
|
@reset_action.shortcut = @reset_action_keyseq
|
559
|
-
@reset_action.statusTip =
|
563
|
+
@reset_action.statusTip = 'Reset connection and clear all items. This does not modify the ignored items.'
|
560
564
|
@reset_action.connect(SIGNAL('triggered()')) { @limits_items.request_reset() }
|
561
565
|
|
562
|
-
@replay_action = Qt::Action.new(
|
563
|
-
@replay_action.statusTip =
|
566
|
+
@replay_action = Qt::Action.new('Toggle Replay Mode', self)
|
567
|
+
@replay_action.statusTip = 'Toggle Replay Mode'
|
564
568
|
@replay_action.connect(SIGNAL('triggered()')) { toggle_replay_mode() }
|
565
569
|
|
566
570
|
@open_ignored_action = Qt::Action.new(Cosmos.get_icon('open.png'),
|
567
|
-
|
568
|
-
@open_ignored_action_keyseq = Qt::KeySequence.new(
|
571
|
+
'&Open Config', self)
|
572
|
+
@open_ignored_action_keyseq = Qt::KeySequence.new('Ctrl+O')
|
569
573
|
@open_ignored_action.shortcut = @open_ignored_action_keyseq
|
570
|
-
@open_ignored_action.statusTip =
|
574
|
+
@open_ignored_action.statusTip = 'Open ignored telemetry items configuration file'
|
571
575
|
@open_ignored_action.connect(SIGNAL('triggered()')) { open_config_file() }
|
572
576
|
|
573
577
|
@save_ignored_action = Qt::Action.new(Cosmos.get_icon('save.png'),
|
574
|
-
|
575
|
-
@save_ignored_action_keyseq = Qt::KeySequence.new(
|
578
|
+
'&Save Config', self)
|
579
|
+
@save_ignored_action_keyseq = Qt::KeySequence.new('Ctrl+S')
|
576
580
|
@save_ignored_action.shortcut = @save_ignored_action_keyseq
|
577
|
-
@save_ignored_action.statusTip =
|
581
|
+
@save_ignored_action.statusTip = 'Save all ignored telemetry items in a configuration file'
|
578
582
|
@save_ignored_action.connect(SIGNAL('triggered()')) { save_config_file() }
|
579
583
|
|
580
|
-
@edit_ignored_action = Qt::Action.new(
|
581
|
-
@edit_ignored_action_keyseq = Qt::KeySequence.new(
|
584
|
+
@edit_ignored_action = Qt::Action.new('&Edit Ignored', self)
|
585
|
+
@edit_ignored_action_keyseq = Qt::KeySequence.new('Ctrl+E')
|
582
586
|
@edit_ignored_action.shortcut = @edit_ignored_action_keyseq
|
583
|
-
@edit_ignored_action.statusTip =
|
587
|
+
@edit_ignored_action.statusTip = 'Edit the ignored telemetry items list'
|
584
588
|
@edit_ignored_action.connect(SIGNAL('triggered()')) { edit_ignored_items() }
|
585
589
|
end
|
586
590
|
|
587
591
|
# Initialize the application menu bar options
|
588
592
|
def initialize_menus
|
589
|
-
@file_menu = menuBar.addMenu(
|
593
|
+
@file_menu = menuBar.addMenu('&File')
|
590
594
|
@file_menu.addAction(@open_ignored_action)
|
591
595
|
@file_menu.addAction(@save_ignored_action)
|
592
596
|
@file_menu.addAction(@edit_ignored_action)
|
@@ -720,7 +724,7 @@ module Cosmos
|
|
720
724
|
"Open Configuration File", default_config_path())
|
721
725
|
unless filename.nil? || filename.empty?
|
722
726
|
result = @limits_items.open_config(filename)
|
723
|
-
statusBar.showMessage(
|
727
|
+
statusBar.showMessage(result)
|
724
728
|
end
|
725
729
|
end
|
726
730
|
|
@@ -730,7 +734,7 @@ module Cosmos
|
|
730
734
|
'Save As...', default_config_path(), 'Configuration Files (*.txt)')
|
731
735
|
unless filename.nil? || filename.empty?
|
732
736
|
result = @limits_items.save_config(filename)
|
733
|
-
statusBar.showMessage(
|
737
|
+
statusBar.showMessage(result)
|
734
738
|
@filename = filename
|
735
739
|
end
|
736
740
|
end
|
@@ -57,90 +57,90 @@ module Cosmos
|
|
57
57
|
super()
|
58
58
|
|
59
59
|
# File Menu
|
60
|
-
@file_open = Qt::Action.new(
|
61
|
-
@file_open_key_seq = Qt::KeySequence.new(
|
60
|
+
@file_open = Qt::Action.new('&Open Scene', self)
|
61
|
+
@file_open_key_seq = Qt::KeySequence.new('Ctrl+O')
|
62
62
|
@file_open.shortcut = @file_open_key_seq
|
63
|
-
@file_open.statusTip =
|
63
|
+
@file_open.statusTip = 'Open Scene File'
|
64
64
|
@file_open.connect(SIGNAL('triggered()')) { file_open() }
|
65
65
|
|
66
|
-
@file_add_shape = Qt::Action.new(
|
67
|
-
@file_add_shape_key_seq = Qt::KeySequence.new(
|
66
|
+
@file_add_shape = Qt::Action.new('&Add Shape', self)
|
67
|
+
@file_add_shape_key_seq = Qt::KeySequence.new('Ctrl+A')
|
68
68
|
@file_add_shape.shortcut = @file_add_shape_key_seq
|
69
|
-
@file_add_shape.statusTip =
|
69
|
+
@file_add_shape.statusTip = 'Add a Shape to the Scene'
|
70
70
|
@file_add_shape.connect(SIGNAL('triggered()')) { file_add_shape() }
|
71
71
|
|
72
|
-
@file_export = Qt::Action.new(
|
73
|
-
@file_export_key_seq = Qt::KeySequence.new(
|
72
|
+
@file_export = Qt::Action.new('&Export Scene', self)
|
73
|
+
@file_export_key_seq = Qt::KeySequence.new('Ctrl+X')
|
74
74
|
@file_export.shortcut = @file_export_key_seq
|
75
|
-
@file_export.statusTip =
|
75
|
+
@file_export.statusTip = 'Export Scene to File'
|
76
76
|
@file_export.connect(SIGNAL('triggered()')) { file_export() }
|
77
77
|
|
78
78
|
# View Menu
|
79
|
-
@view_perspective = Qt::Action.new(
|
80
|
-
@view_perspective_key_seq = Qt::KeySequence.new(
|
79
|
+
@view_perspective = Qt::Action.new('&Perspective', self)
|
80
|
+
@view_perspective_key_seq = Qt::KeySequence.new('Ctrl+P')
|
81
81
|
@view_perspective.shortcut = @view_perspective_key_seq
|
82
|
-
@view_perspective.statusTip =
|
82
|
+
@view_perspective.statusTip = 'Perspective View'
|
83
83
|
@view_perspective.connect(SIGNAL('triggered()')) { view_perspective() }
|
84
84
|
|
85
|
-
@view_top = Qt::Action.new(
|
86
|
-
@view_top_key_seq = Qt::KeySequence.new(
|
85
|
+
@view_top = Qt::Action.new('&Top', self)
|
86
|
+
@view_top_key_seq = Qt::KeySequence.new('Ctrl+T')
|
87
87
|
@view_top.shortcut = @view_top_key_seq
|
88
|
-
@view_top.statusTip =
|
88
|
+
@view_top.statusTip = 'View From Above'
|
89
89
|
@view_top.connect(SIGNAL('triggered()')) { view_top() }
|
90
90
|
|
91
|
-
@view_bottom = Qt::Action.new(
|
92
|
-
@view_bottom_key_seq = Qt::KeySequence.new(
|
91
|
+
@view_bottom = Qt::Action.new('&Bottom', self)
|
92
|
+
@view_bottom_key_seq = Qt::KeySequence.new('Ctrl+B')
|
93
93
|
@view_bottom.shortcut = @view_bottom_key_seq
|
94
|
-
@view_bottom.statusTip =
|
94
|
+
@view_bottom.statusTip = 'View From Below'
|
95
95
|
@view_bottom.connect(SIGNAL('triggered()')) { view_bottom() }
|
96
96
|
|
97
|
-
@view_front = Qt::Action.new(
|
98
|
-
@view_front_key_seq = Qt::KeySequence.new(
|
97
|
+
@view_front = Qt::Action.new('&Front', self)
|
98
|
+
@view_front_key_seq = Qt::KeySequence.new('Ctrl+F')
|
99
99
|
@view_front.shortcut = @view_front_key_seq
|
100
|
-
@view_front.statusTip =
|
100
|
+
@view_front.statusTip = 'View From Front'
|
101
101
|
@view_front.connect(SIGNAL('triggered()')) { view_front() }
|
102
102
|
|
103
|
-
@view_back = Qt::Action.new(
|
104
|
-
@view_back_key_seq = Qt::KeySequence.new(
|
103
|
+
@view_back = Qt::Action.new('Bac&k', self)
|
104
|
+
@view_back_key_seq = Qt::KeySequence.new('Ctrl+W')
|
105
105
|
@view_back.shortcut = @view_back_key_seq
|
106
|
-
@view_back.statusTip =
|
106
|
+
@view_back.statusTip = 'View From Back'
|
107
107
|
@view_back.connect(SIGNAL('triggered()')) { view_back() }
|
108
108
|
|
109
|
-
@view_left = Qt::Action.new(
|
110
|
-
@view_left_key_seq = Qt::KeySequence.new(
|
109
|
+
@view_left = Qt::Action.new('&Left', self)
|
110
|
+
@view_left_key_seq = Qt::KeySequence.new('Ctrl+L')
|
111
111
|
@view_left.shortcut = @view_left_key_seq
|
112
|
-
@view_left.statusTip =
|
112
|
+
@view_left.statusTip = 'View From Left'
|
113
113
|
@view_left.connect(SIGNAL('triggered()')) { view_left() }
|
114
114
|
|
115
|
-
@view_right = Qt::Action.new(
|
116
|
-
@view_right_key_seq = Qt::KeySequence.new(
|
115
|
+
@view_right = Qt::Action.new('&Right', self)
|
116
|
+
@view_right_key_seq = Qt::KeySequence.new('Ctrl+R')
|
117
117
|
@view_right.shortcut = @view_right_key_seq
|
118
|
-
@view_right.statusTip =
|
118
|
+
@view_right.statusTip = 'View From Right'
|
119
119
|
@view_right.connect(SIGNAL('triggered()')) { view_right() }
|
120
120
|
|
121
121
|
# Show Menu
|
122
|
-
@show_scene = Qt::Action.new(
|
123
|
-
@show_scene_key_seq = Qt::KeySequence.new(
|
122
|
+
@show_scene = Qt::Action.new('Show &Scene', self)
|
123
|
+
@show_scene_key_seq = Qt::KeySequence.new('Ctrl+S')
|
124
124
|
@show_scene.shortcut = @show_scene_key_seq
|
125
|
-
@show_scene.statusTip =
|
125
|
+
@show_scene.statusTip = 'Show the Normal Scene'
|
126
126
|
@show_scene.connect(SIGNAL('triggered()')) { show_scene() }
|
127
127
|
|
128
|
-
@show_earth = Qt::Action.new(
|
129
|
-
@show_earth_key_seq = Qt::KeySequence.new(
|
128
|
+
@show_earth = Qt::Action.new('Show &Earth', self)
|
129
|
+
@show_earth_key_seq = Qt::KeySequence.new('Ctrl+E')
|
130
130
|
@show_earth.shortcut = @show_earth_key_seq
|
131
|
-
@show_earth.statusTip =
|
131
|
+
@show_earth.statusTip = 'Show the Earth'
|
132
132
|
@show_earth.connect(SIGNAL('triggered()')) { show_earth() }
|
133
133
|
|
134
|
-
@show_moon = Qt::Action.new(
|
135
|
-
@show_moon_key_seq = Qt::KeySequence.new(
|
134
|
+
@show_moon = Qt::Action.new('Show &Moon', self)
|
135
|
+
@show_moon_key_seq = Qt::KeySequence.new('Ctrl+M')
|
136
136
|
@show_moon.shortcut = @show_moon_key_seq
|
137
|
-
@show_moon.statusTip =
|
137
|
+
@show_moon.statusTip = 'Show the Moon'
|
138
138
|
@show_moon.connect(SIGNAL('triggered()')) { show_moon() }
|
139
139
|
end
|
140
140
|
|
141
141
|
def initialize_menus
|
142
142
|
# File Menu
|
143
|
-
@file_menu = menuBar.addMenu(
|
143
|
+
@file_menu = menuBar.addMenu('&File')
|
144
144
|
@file_menu.addAction(@file_open)
|
145
145
|
@file_menu.addAction(@file_add_shape)
|
146
146
|
@file_menu.addAction(@file_export)
|
@@ -148,7 +148,7 @@ module Cosmos
|
|
148
148
|
@file_menu.addAction(@exit_action)
|
149
149
|
|
150
150
|
# View Menu
|
151
|
-
@view_menu = menuBar.addMenu(
|
151
|
+
@view_menu = menuBar.addMenu('&View')
|
152
152
|
@view_menu.addAction(@view_perspective)
|
153
153
|
@view_menu.addAction(@view_top)
|
154
154
|
@view_menu.addAction(@view_bottom)
|
@@ -158,7 +158,7 @@ module Cosmos
|
|
158
158
|
@view_menu.addAction(@view_right)
|
159
159
|
|
160
160
|
# Show Menu
|
161
|
-
@show_menu = menuBar.addMenu(
|
161
|
+
@show_menu = menuBar.addMenu('&Show')
|
162
162
|
@show_menu.addAction(@show_scene)
|
163
163
|
@show_menu.addAction(@show_earth)
|
164
164
|
@show_menu.addAction(@show_moon)
|
@@ -10,7 +10,6 @@
|
|
10
10
|
|
11
11
|
require 'cosmos'
|
12
12
|
Cosmos.catch_fatal_exception do
|
13
|
-
require 'cosmos/script'
|
14
13
|
require 'cosmos/gui/qt_tool'
|
15
14
|
require 'cosmos/gui/dialogs/tlm_details_dialog'
|
16
15
|
require 'cosmos/gui/dialogs/tlm_edit_dialog'
|
@@ -18,6 +17,7 @@ Cosmos.catch_fatal_exception do
|
|
18
17
|
require 'cosmos/gui/dialogs/exception_dialog'
|
19
18
|
require 'cosmos/gui/dialogs/splash'
|
20
19
|
require 'cosmos/gui/widgets/full_text_search_line_edit'
|
20
|
+
require 'cosmos/script'
|
21
21
|
end
|
22
22
|
|
23
23
|
module Cosmos
|
@@ -85,60 +85,54 @@ module Cosmos
|
|
85
85
|
super()
|
86
86
|
|
87
87
|
@edit_action = Qt::Action.new(Cosmos.get_icon('edit.png'),
|
88
|
-
|
88
|
+
'&Edit Definition',
|
89
89
|
self)
|
90
|
-
@edit_keyseq = Qt::KeySequence.new(
|
90
|
+
@edit_keyseq = Qt::KeySequence.new('Ctrl+E')
|
91
91
|
@edit_action.shortcut = @edit_keyseq
|
92
|
-
@edit_action.statusTip =
|
92
|
+
@edit_action.statusTip = 'Open packet definition in a editor'
|
93
93
|
@edit_action.connect(SIGNAL('triggered()')) { edit_definition }
|
94
94
|
|
95
|
-
@reset_action = Qt::Action.new(
|
96
|
-
@reset_keyseq = Qt::KeySequence.new(
|
95
|
+
@reset_action = Qt::Action.new('&Reset', self)
|
96
|
+
@reset_keyseq = Qt::KeySequence.new('Ctrl+R')
|
97
97
|
@reset_action.shortcut = @reset_keyseq
|
98
|
-
@reset_action.statusTip =
|
98
|
+
@reset_action.statusTip = 'Reset Connection'
|
99
99
|
connect(@reset_action, SIGNAL('triggered()'), self, SLOT('update_all()'))
|
100
100
|
|
101
|
-
@option_action = Qt::Action.new(
|
102
|
-
@option_action.statusTip =
|
101
|
+
@option_action = Qt::Action.new('O&ptions', self)
|
102
|
+
@option_action.statusTip = 'Application Options'
|
103
103
|
connect(@option_action, SIGNAL('triggered()'), self, SLOT('file_options()'))
|
104
104
|
|
105
|
-
@replay_action = Qt::Action.new(
|
106
|
-
@replay_action.statusTip =
|
105
|
+
@replay_action = Qt::Action.new('Toggle Replay Mode', self)
|
106
|
+
@replay_action.statusTip = 'Toggle Replay Mode'
|
107
107
|
@replay_action.connect(SIGNAL('triggered()')) { toggle_replay_mode() }
|
108
108
|
|
109
|
-
@color_blind_action = Qt::Action.new(
|
110
|
-
@color_blind_keyseq = Qt::KeySequence.new(
|
109
|
+
@color_blind_action = Qt::Action.new('Color&blind Mode', self)
|
110
|
+
@color_blind_keyseq = Qt::KeySequence.new('Ctrl+B')
|
111
111
|
@color_blind_action.shortcut = @color_blind_keyseq
|
112
|
-
@color_blind_action.statusTip =
|
112
|
+
@color_blind_action.statusTip = 'Enable text representation of colors in the values'
|
113
113
|
@color_blind_action.setCheckable(true)
|
114
114
|
@color_blind_action.connect(SIGNAL('triggered()')) do
|
115
115
|
@colorblind = @color_blind_action.isChecked
|
116
116
|
end
|
117
117
|
|
118
|
-
@hide_ignored_action = Qt::Action.new(
|
119
|
-
@hide_ignored_keyseq = Qt::KeySequence.new(
|
118
|
+
@hide_ignored_action = Qt::Action.new('&Hide Ignored Items', self)
|
119
|
+
@hide_ignored_keyseq = Qt::KeySequence.new('Ctrl+H')
|
120
120
|
@hide_ignored_action.shortcut = @hide_ignored_keyseq
|
121
|
-
@hide_ignored_action.statusTip =
|
121
|
+
@hide_ignored_action.statusTip = 'Toggle showing and hiding ignored items'
|
122
122
|
@hide_ignored_action.setCheckable(true)
|
123
123
|
@hide_ignored_action.setChecked(false)
|
124
|
-
@hide_ignored_action.connect(SIGNAL('triggered()'))
|
125
|
-
if @hide_ignored_action.isChecked
|
126
|
-
@ignored_rows.each {|row| @table.setRowHidden(row, true) }
|
127
|
-
else
|
128
|
-
@ignored_rows.each {|row| @table.setRowHidden(row, false) }
|
129
|
-
end
|
130
|
-
end
|
124
|
+
@hide_ignored_action.connect(SIGNAL('triggered()')) { hide_ignored() }
|
131
125
|
|
132
|
-
@derived_last_action = Qt::Action.new(
|
133
|
-
@derived_last_keyseq = Qt::KeySequence.new(
|
126
|
+
@derived_last_action = Qt::Action.new('&Display Derived Last', self)
|
127
|
+
@derived_last_keyseq = Qt::KeySequence.new('Ctrl+D')
|
134
128
|
@derived_last_action.shortcut = @derived_last_keyseq
|
135
|
-
@derived_last_action.statusTip =
|
129
|
+
@derived_last_action.statusTip = 'Display derived telemetry items last'
|
136
130
|
@derived_last_action.setCheckable(true)
|
137
131
|
@derived_last_action.setChecked(false)
|
138
132
|
@derived_last_action.connect(SIGNAL('triggered()')) { update_tlm_items() }
|
139
133
|
|
140
|
-
@formatted_tlm_units_action = Qt::Action.new(
|
141
|
-
@formatted_tlm_units_action.statusTip =
|
134
|
+
@formatted_tlm_units_action = Qt::Action.new('Formatted Telemetry With &Units', self)
|
135
|
+
@formatted_tlm_units_action.statusTip = 'Formatted Telemetry with Units'
|
142
136
|
@formatted_tlm_units_action.setCheckable(true)
|
143
137
|
@formatted_tlm_units_action.setChecked(true)
|
144
138
|
@formatted_tlm_units_action.connect(SIGNAL('triggered()')) do
|
@@ -146,24 +140,24 @@ module Cosmos
|
|
146
140
|
self.window_title = "COSMOS Packet Viewer : Formatted Telemetry with Units"
|
147
141
|
end
|
148
142
|
|
149
|
-
@formatted_tlm_action = Qt::Action.new(
|
150
|
-
@formatted_tlm_action.statusTip =
|
143
|
+
@formatted_tlm_action = Qt::Action.new('&Formatted Telemetry', self)
|
144
|
+
@formatted_tlm_action.statusTip = 'Formatted Telemetry'
|
151
145
|
@formatted_tlm_action.setCheckable(true)
|
152
146
|
@formatted_tlm_action.connect(SIGNAL('triggered()')) do
|
153
147
|
@mode = :FORMATTED
|
154
148
|
self.window_title = "COSMOS Packet Viewer : Formatted Telemetry"
|
155
149
|
end
|
156
150
|
|
157
|
-
@normal_tlm_action = Qt::Action.new(
|
158
|
-
@normal_tlm_action.statusTip =
|
151
|
+
@normal_tlm_action = Qt::Action.new('Normal &Converted Telemetry', self)
|
152
|
+
@normal_tlm_action.statusTip = 'Normal Converted Telemetry'
|
159
153
|
@normal_tlm_action.setCheckable(true)
|
160
154
|
@normal_tlm_action.connect(SIGNAL('triggered()')) do
|
161
155
|
@mode = :CONVERTED
|
162
156
|
self.window_title = "COSMOS Packet Viewer : Coverted Telemetry"
|
163
157
|
end
|
164
158
|
|
165
|
-
@raw_tlm_action = Qt::Action.new(
|
166
|
-
@raw_tlm_action.statusTip =
|
159
|
+
@raw_tlm_action = Qt::Action.new('&Raw Telemetry', self)
|
160
|
+
@raw_tlm_action.statusTip = 'Raw Unprocessed Telemetry'
|
167
161
|
@raw_tlm_action.setCheckable(true)
|
168
162
|
@raw_tlm_action.connect(SIGNAL('triggered()')) do
|
169
163
|
@mode = :RAW
|
@@ -180,7 +174,7 @@ module Cosmos
|
|
180
174
|
|
181
175
|
def initialize_menus
|
182
176
|
# File Menu
|
183
|
-
file_menu = menuBar.addMenu(
|
177
|
+
file_menu = menuBar.addMenu('&File')
|
184
178
|
file_menu.addAction(@edit_action)
|
185
179
|
file_menu.addAction(@reset_action)
|
186
180
|
file_menu.addAction(@option_action)
|
@@ -189,11 +183,11 @@ module Cosmos
|
|
189
183
|
file_menu.addAction(@exit_action)
|
190
184
|
|
191
185
|
# View Menu
|
192
|
-
view_menu = menuBar.addMenu(
|
186
|
+
view_menu = menuBar.addMenu('&View')
|
193
187
|
view_menu.addAction(@color_blind_action)
|
194
188
|
view_menu.addAction(@hide_ignored_action)
|
195
189
|
view_menu.addAction(@derived_last_action)
|
196
|
-
view_menu.addSeparator.setText(
|
190
|
+
view_menu.addSeparator.setText('Formatting')
|
197
191
|
view_menu.addAction(@formatted_tlm_units_action)
|
198
192
|
view_menu.addAction(@formatted_tlm_action)
|
199
193
|
view_menu.addAction(@normal_tlm_action)
|
@@ -224,7 +218,7 @@ module Cosmos
|
|
224
218
|
update_packets()
|
225
219
|
update_tlm_items()
|
226
220
|
end
|
227
|
-
target_label = Qt::Label.new(
|
221
|
+
target_label = Qt::Label.new("&Target:")
|
228
222
|
target_label.setBuddy(@target_select)
|
229
223
|
|
230
224
|
# Set the command combobox selection
|
@@ -233,7 +227,7 @@ module Cosmos
|
|
233
227
|
@packet_select.connect(SIGNAL('activated(const QString&)')) do
|
234
228
|
update_tlm_items()
|
235
229
|
end
|
236
|
-
cmd_label = Qt::Label.new(
|
230
|
+
cmd_label = Qt::Label.new("&Packet:")
|
237
231
|
cmd_label.setBuddy(@packet_select)
|
238
232
|
|
239
233
|
# Mnemonic Search Box
|
@@ -254,7 +248,7 @@ module Cosmos
|
|
254
248
|
top_layout.addWidget(sep1)
|
255
249
|
|
256
250
|
# Telemetry Description Label
|
257
|
-
dec_label = Qt::Label.new(
|
251
|
+
dec_label = Qt::Label.new("Description:")
|
258
252
|
@description = Qt::Label.new('')
|
259
253
|
desc_layout = Qt::HBoxLayout.new
|
260
254
|
desc_layout.addWidget(dec_label)
|
@@ -271,7 +265,7 @@ module Cosmos
|
|
271
265
|
end
|
272
266
|
|
273
267
|
def file_options
|
274
|
-
@polling_rate = Qt::InputDialog.getDouble(self,
|
268
|
+
@polling_rate = Qt::InputDialog.getDouble(self, "Options", "Polling Rate (sec):",
|
275
269
|
@polling_rate, 0, 1000, 1, nil)
|
276
270
|
end
|
277
271
|
|
@@ -284,6 +278,14 @@ module Cosmos
|
|
284
278
|
end
|
285
279
|
end
|
286
280
|
|
281
|
+
def hide_ignored
|
282
|
+
if @hide_ignored_action.isChecked
|
283
|
+
@ignored_rows.each {|row| @table.setRowHidden(row, true) }
|
284
|
+
else
|
285
|
+
@ignored_rows.each {|row| @table.setRowHidden(row, false) }
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
287
289
|
def edit_definition
|
288
290
|
# Grab all the cmd_tlm_files and processes them in reverse sort order
|
289
291
|
# because typically we'll have cmd.txt and tlm.txt and we want to process
|
@@ -417,11 +419,11 @@ module Cosmos
|
|
417
419
|
featured_row = row if featured_item_name == tlm_name
|
418
420
|
@ignored_rows << row if System.targets[target_name].ignored_items.include?(tlm_name)
|
419
421
|
tlm_name = "*#{tlm_name}" if derived
|
420
|
-
item = Qt::TableWidgetItem.new(
|
422
|
+
item = Qt::TableWidgetItem.new("#{tlm_name}:")
|
421
423
|
item.setTextAlignment(Qt::AlignRight)
|
422
424
|
item.setFlags(Qt::NoItemFlags | Qt::ItemIsSelectable)
|
423
425
|
@table.setItem(row, 0, item)
|
424
|
-
item = Qt::TableWidgetItem.new(
|
426
|
+
item = Qt::TableWidgetItem.new("0.0")
|
425
427
|
item.setTextAlignment(Qt::AlignRight)
|
426
428
|
item.setFlags(Qt::NoItemFlags | Qt::ItemIsSelectable | Qt::ItemIsEnabled)
|
427
429
|
@table.setItem(row, 1, item)
|
@@ -430,6 +432,7 @@ module Cosmos
|
|
430
432
|
@descriptions[row][1] = description
|
431
433
|
row += 1
|
432
434
|
end
|
435
|
+
hide_ignored()
|
433
436
|
|
434
437
|
@table.resizeColumnsToContents()
|
435
438
|
@table.resizeRowsToContents()
|
@@ -465,14 +468,14 @@ module Cosmos
|
|
465
468
|
tlm_items = get_tlm_packet(target_name || '', packet_name || '', @mode)
|
466
469
|
rescue DRb::DRbConnError => error
|
467
470
|
Qt.execute_in_main_thread(true) do
|
468
|
-
statusBar.showMessage(
|
471
|
+
statusBar.showMessage("Error Connecting to Command and Telemetry Server")
|
469
472
|
end
|
470
473
|
tlm_items = nil
|
471
474
|
update_needed = false
|
472
475
|
rescue RuntimeError => error
|
473
476
|
Qt.execute_in_main_thread(true) do
|
474
477
|
Cosmos.handle_critical_exception(error)
|
475
|
-
statusBar.showMessage(
|
478
|
+
statusBar.showMessage("Packet #{target_name} #{packet_name} Error: #{error}")
|
476
479
|
end
|
477
480
|
tlm_items = nil
|
478
481
|
update_needed = true
|
@@ -551,7 +554,7 @@ module Cosmos
|
|
551
554
|
end
|
552
555
|
|
553
556
|
def mouse_over(row, col)
|
554
|
-
statusBar.showMessage(
|
557
|
+
statusBar.showMessage(@descriptions[row][col])
|
555
558
|
end
|
556
559
|
|
557
560
|
def context_menu(point)
|
@@ -564,24 +567,24 @@ module Cosmos
|
|
564
567
|
if target_name.length > 0 and packet_name.length > 0 and item_name.length > 0
|
565
568
|
menu = Qt::Menu.new()
|
566
569
|
|
567
|
-
details_action = Qt::Action.new(
|
568
|
-
details_action.statusTip =
|
570
|
+
details_action = Qt::Action.new("Details #{target_name} #{packet_name} #{item_name}", self)
|
571
|
+
details_action.statusTip = "Popup details about #{target_name} #{packet_name} #{item_name}"
|
569
572
|
details_action.connect(SIGNAL('triggered()')) do
|
570
573
|
TlmDetailsDialog.new(nil, target_name, packet_name, item_name)
|
571
574
|
@table.clearSelection
|
572
575
|
end
|
573
576
|
menu.addAction(details_action)
|
574
577
|
|
575
|
-
edit_action = Qt::Action.new(
|
576
|
-
edit_action.statusTip =
|
578
|
+
edit_action = Qt::Action.new("Edit #{target_name} #{packet_name} #{item_name}", self)
|
579
|
+
edit_action.statusTip = "Edit Settings for #{target_name} #{packet_name} #{item_name}"
|
577
580
|
edit_action.connect(SIGNAL('triggered()')) do
|
578
581
|
TlmEditDialog.new(self, target_name, packet_name, item_name)
|
579
582
|
@table.clearSelection
|
580
583
|
end
|
581
584
|
menu.addAction(edit_action)
|
582
585
|
|
583
|
-
graph_action = Qt::Action.new(
|
584
|
-
graph_action.statusTip =
|
586
|
+
graph_action = Qt::Action.new("Graph #{target_name} #{packet_name} #{item_name}", self)
|
587
|
+
graph_action.statusTip = "Create a new COSMOS graph of #{target_name} #{packet_name} #{item_name}"
|
585
588
|
graph_action.connect(SIGNAL('triggered()')) do
|
586
589
|
@table.clearSelection
|
587
590
|
TlmGraphDialog.new(self, target_name, packet_name, item_name)
|