cosmos 4.2.4-java → 4.5.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/.dockerignore +2 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- data/.github/ISSUE_TEMPLATE/help---usage---general-question.md +12 -0
- data/.gitignore +2 -0
- data/.travis.yml +6 -6
- data/Dockerfile +69 -0
- data/Gemfile +1 -1
- data/Manifest.txt +130 -46
- data/README.md +9 -0
- data/Rakefile +57 -0
- data/appveyor.yml +18 -7
- data/autohotkey/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -1
- data/autohotkey/config/targets/INST/cmd_tlm/inst_tlm.txt +5 -5
- data/autohotkey/config/targets/INST/lib/sim_inst.rb +3 -1
- data/autohotkey/config/tools/cmd_sequence/cmd_sequence.txt +2 -0
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/autohotkey/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/autohotkey/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/autohotkey/config/tools/table_manager/ConfigTables_def.txt +2 -4
- data/autohotkey/config/tools/table_manager/SubTables/OneDimensionalSubTable_def.txt +31 -0
- data/autohotkey/config/tools/table_manager/SubTables/TwoDimensionalSubTable_def.txt +28 -0
- data/autohotkey/config/tools/test_runner/test_runner.txt +1 -1
- data/autohotkey/config/tools/test_runner/test_runner2.txt +1 -1
- data/autohotkey/config/tools/test_runner/test_runner3.txt +1 -1
- data/autohotkey/config/tools/test_runner/test_runner4.txt +1 -1
- data/autohotkey/lib/cmd_sequence_exporter.rb +52 -0
- data/autohotkey/procedures/collect.rb +2 -2
- data/autohotkey/procedures/collect_util.rb +1 -1
- data/autohotkey/procedures/script_test.rb +1 -1
- data/autohotkey/tools/CmdSenderAHK2 +18 -0
- data/autohotkey/tools/cmd_sender.ahk +34 -6
- data/autohotkey/tools/cmd_sender2.ahk +4 -0
- data/autohotkey/tools/cmd_sequence.ahk +36 -22
- data/autohotkey/tools/cmd_sequence2.ahk +1 -1
- data/autohotkey/tools/config_editor.ahk +5 -5
- data/autohotkey/tools/launcher.ahk +1 -0
- data/autohotkey/tools/limits_monitor.ahk +1 -1
- data/autohotkey/tools/packet_viewer.ahk +7 -6
- data/autohotkey/tools/script_runner.ahk +16 -4
- data/autohotkey/tools/test_runner.ahk +8 -8
- data/bin/cosmos +38 -1
- data/bin/cstol_converter +1 -1
- data/bin/dart_util +0 -0
- data/bin/rubysloc +73 -28
- data/bin/xtce_converter +1 -1
- data/cosmos.gemspec +7 -9
- data/data/config/_interfaces.yaml +4 -0
- data/data/config/cmd_sequence.yaml +14 -0
- data/data/config/command_modifiers.yaml +16 -1
- data/data/config/housekeeping_params.yaml +14 -0
- data/data/config/interface_modifiers.yaml +14 -2
- data/data/config/item_modifiers.yaml +11 -1
- data/data/config/launcher.yaml +12 -2
- data/data/config/param_item_modifiers.yaml +7 -2
- data/data/config/parameter_modifiers.yaml +20 -0
- data/data/config/screen.yaml +2 -0
- data/data/config/script_runner.yaml +9 -0
- data/data/config/system.yaml +152 -28
- data/data/config/table_manager.yaml +7 -0
- data/data/config/target.yaml +12 -0
- data/data/config/telemetry_modifiers.yaml +19 -2
- data/data/config/test_runner.yaml +10 -9
- data/data/config/widgets.yaml +174 -11
- data/data/crc.txt +428 -415
- data/demo/Gemfile +1 -1
- data/demo/Launcher.bat +1 -9
- data/demo/Launcher2.bat +1 -0
- data/demo/LauncherMini.bat +1 -0
- data/demo/Rakefile +2 -0
- data/demo/config/dart/Gemfile +2 -7
- data/demo/config/data/crc.txt +243 -219
- data/demo/config/system/system.txt +42 -3
- data/demo/config/system/system2.txt +34 -5
- data/demo/config/system/system_alt_ports.txt +80 -0
- data/demo/config/targets/EXAMPLE/cmd_tlm_server.txt +1 -0
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +5 -4
- data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +12 -7
- data/demo/config/targets/INST/cmd_tlm/inst_tlm_override.txt +12 -0
- data/demo/config/targets/INST/cmd_tlm_server.txt +2 -0
- data/demo/config/targets/INST/lib/sim_inst.rb +15 -3
- data/demo/config/targets/INST/screens/adcs.txt +2 -2
- data/demo/config/targets/INST/screens/block.txt +1 -1
- data/demo/config/targets/INST/screens/commanding.txt +1 -1
- data/demo/config/targets/INST/screens/ground.txt +27 -5
- data/demo/config/targets/INST/screens/ground_error.gif +0 -0
- data/demo/config/{data/groundoff.gif → targets/INST/screens/ground_off.gif} +0 -0
- data/demo/config/{data/groundon.gif → targets/INST/screens/ground_on.gif} +0 -0
- data/demo/config/targets/INST/screens/limits.txt +69 -31
- data/demo/config/targets/INST/screens/other.txt +13 -3
- data/demo/config/targets/INST/screens/params.txt +54 -0
- data/demo/config/targets/INST/screens/satellite.gif +0 -0
- data/demo/config/targets/INST/target.txt +1 -0
- data/demo/config/tools/cmd_tlm_server/cmd_tlm_server_chain.txt +18 -0
- data/demo/config/tools/data_viewer/data_viewer.txt +3 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/demo/config/tools/handbook_creator/assets/img/ball_logo.bmp +0 -0
- data/demo/config/tools/handbook_creator/assets/img/ball_logo.gif +0 -0
- data/demo/config/tools/handbook_creator/assets/img/ball_logo.jpg +0 -0
- data/demo/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/demo/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/demo/config/tools/handbook_creator/assets/js/html5shiv.js +8 -0
- data/demo/config/tools/handbook_creator/assets/js/jquery-1.10.2.min.js +6 -0
- data/demo/config/tools/handbook_creator/assets/js/respond.min.js +6 -0
- data/demo/config/tools/handbook_creator/default_toc.xsl +59 -59
- data/demo/config/tools/script_runner/script_runner.txt +1 -2
- data/demo/config/tools/test_runner/test_runner.txt +3 -1
- data/demo/lib/example_background_task.rb +1 -0
- data/demo/procedures/cosmos_api_test.rb +26 -22
- data/demo/procedures/interactive.rb +22 -0
- 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 -77
- data/ext/mkrf_conf.rb +2 -2
- data/extensions/vscode/.gitignore +4 -0
- data/extensions/vscode/.vscode/launch.json +32 -0
- data/extensions/vscode/.vscode/settings.json +13 -0
- data/extensions/vscode/.vscode/tasks.json +79 -0
- data/extensions/vscode/License.txt +879 -0
- data/extensions/vscode/README.md +9 -0
- data/extensions/vscode/client/License.txt +879 -0
- data/extensions/vscode/client/README.md +39 -0
- data/extensions/vscode/client/cosmos.configuration.json +23 -0
- data/extensions/vscode/client/images/icon.png +0 -0
- data/extensions/vscode/client/package-lock.json +414 -0
- data/extensions/vscode/client/package.json +105 -0
- data/extensions/vscode/client/src/extension.ts +132 -0
- data/extensions/vscode/client/src/screen_preview.rb +25 -0
- data/extensions/vscode/client/syntaxes/cosmos.tmLanguage.json +219 -0
- data/extensions/vscode/client/tsconfig.json +17 -0
- data/extensions/vscode/package-lock.json +26 -0
- data/extensions/vscode/package.json +35 -0
- data/extensions/vscode/server/License.txt +879 -0
- data/extensions/vscode/server/package-lock.json +236 -0
- data/extensions/vscode/server/package.json +29 -0
- data/extensions/vscode/server/src/server.ts +59 -0
- data/extensions/vscode/server/tsconfig.json +16 -0
- data/install/Gemfile +1 -1
- data/install/Launcher.bat +1 -9
- data/install/config/dart/Gemfile +3 -8
- data/install/config/data/crc.txt +148 -132
- data/install/config/system/system.txt +36 -3
- data/install/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/install/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/install/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/install/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/install/config/tools/handbook_creator/assets/img/ball_logo.bmp +0 -0
- data/install/config/tools/handbook_creator/assets/img/ball_logo.gif +0 -0
- data/install/config/tools/handbook_creator/assets/img/ball_logo.jpg +0 -0
- data/install/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/install/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/install/config/tools/handbook_creator/assets/js/html5shiv.js +8 -0
- data/install/config/tools/handbook_creator/assets/js/jquery-1.10.2.min.js +6 -0
- data/install/config/tools/handbook_creator/assets/js/respond.min.js +6 -0
- data/install/config/tools/handbook_creator/default_toc.xsl +59 -59
- data/lib/cosmos/config/config_parser.rb +4 -5
- 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/core_ext/time.rb +3 -1
- data/lib/cosmos/dart/config/boot.rb +1 -1
- data/lib/cosmos/dart/config/database.yml +2 -0
- data/lib/cosmos/dart/examples/dart_decom_client.rb +1 -1
- data/lib/cosmos/dart/examples/dart_stream_client.rb +6 -2
- data/lib/cosmos/dart/lib/dart_common.rb +13 -6
- data/lib/cosmos/dart/lib/dart_constants.rb +15 -0
- data/lib/cosmos/dart/lib/dart_database_cleaner.rb +2 -2
- data/lib/cosmos/dart/lib/dart_decom_query.rb +5 -6
- data/lib/cosmos/dart/lib/dart_decommutator.rb +64 -54
- data/lib/cosmos/dart/lib/dart_importer.rb +3 -3
- data/lib/cosmos/dart/lib/dart_master_query.rb +71 -0
- data/lib/cosmos/dart/lib/dart_packet_log_writer.rb +2 -2
- data/lib/cosmos/dart/lib/dart_reducer_worker_thread.rb +165 -134
- data/lib/cosmos/dart/processes/dart.rb +4 -2
- data/lib/cosmos/dart/processes/dart_decom_server.rb +3 -3
- data/lib/cosmos/dart/processes/dart_ingester.rb +40 -1
- data/lib/cosmos/dart/processes/dart_master.rb +44 -0
- data/lib/cosmos/dart/processes/dart_util.rb +119 -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 +44 -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 +11 -10
- data/lib/cosmos/gui/dialogs/tlm_graph_dialog.rb +4 -2
- data/lib/cosmos/gui/opengl/earth_model.rb +1 -1
- data/lib/cosmos/gui/qt.rb +13 -2
- data/lib/cosmos/gui/qt_tool.rb +71 -43
- data/lib/cosmos/gui/text/ruby_editor.rb +91 -49
- data/lib/cosmos/gui/utilities/classification_banner.rb +60 -0
- data/lib/cosmos/gui/utilities/screenshot.rb +1 -1
- data/lib/cosmos/gui/utilities/script_module_gui.rb +117 -91
- data/lib/cosmos/gui/widgets/dart_meta_frame.rb +22 -3
- data/lib/cosmos/interfaces.rb +2 -0
- data/lib/cosmos/interfaces/dart_status_interface.rb +1 -1
- data/lib/cosmos/interfaces/interface.rb +9 -1
- data/lib/cosmos/interfaces/linc_interface.rb +3 -3
- data/lib/cosmos/interfaces/protocols/burst_protocol.rb +1 -1
- data/lib/cosmos/interfaces/protocols/crc_protocol.rb +1 -1
- data/lib/cosmos/interfaces/protocols/fixed_protocol.rb +40 -18
- data/lib/cosmos/interfaces/protocols/ignore_packet_protocol.rb +46 -0
- data/lib/cosmos/interfaces/protocols/length_protocol.rb +5 -0
- data/lib/cosmos/interfaces/protocols/preidentified_protocol.rb +68 -23
- data/lib/cosmos/interfaces/protocols/template_protocol.rb +9 -4
- data/lib/cosmos/interfaces/serial_interface.rb +7 -1
- data/lib/cosmos/interfaces/simulated_target_interface.rb +14 -5
- data/lib/cosmos/interfaces/stream_interface.rb +1 -1
- data/lib/cosmos/interfaces/tcpip_server_interface.rb +13 -13
- data/lib/cosmos/io/json_drb.rb +16 -12
- data/lib/cosmos/io/json_drb_object.rb +7 -2
- data/lib/cosmos/io/json_drb_rack.rb +25 -5
- data/lib/cosmos/io/json_rpc.rb +1 -1
- data/lib/cosmos/io/posix_serial_driver.rb +60 -22
- data/lib/cosmos/io/serial_driver.rb +11 -8
- data/lib/cosmos/io/win32_serial_driver.rb +31 -3
- data/lib/cosmos/packet_logs/packet_log_reader.rb +71 -28
- data/lib/cosmos/packet_logs/packet_log_writer.rb +13 -1
- data/lib/cosmos/packets/commands.rb +30 -9
- data/lib/cosmos/packets/packet.rb +105 -34
- data/lib/cosmos/packets/packet_config.rb +60 -10
- data/lib/cosmos/packets/parsers/format_string_parser.rb +0 -1
- data/lib/cosmos/packets/parsers/state_parser.rb +0 -1
- data/lib/cosmos/packets/parsers/xtce_converter.rb +2 -0
- data/lib/cosmos/packets/parsers/xtce_parser.rb +5 -4
- data/lib/cosmos/packets/structure.rb +32 -4
- data/lib/cosmos/packets/structure_item.rb +5 -1
- data/lib/cosmos/packets/telemetry.rb +30 -4
- data/lib/cosmos/script/api_shared.rb +22 -10
- data/lib/cosmos/script/extract.rb +1 -1
- data/lib/cosmos/script/limits.rb +4 -0
- data/lib/cosmos/script/script.rb +29 -20
- data/lib/cosmos/script/scripting.rb +16 -14
- data/lib/cosmos/script/telemetry.rb +3 -1
- data/lib/cosmos/script/tools.rb +18 -8
- data/lib/cosmos/streams/serial_stream.rb +11 -6
- data/lib/cosmos/system/system.rb +214 -76
- data/lib/cosmos/system/target.rb +39 -9
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +116 -55
- data/lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb +15 -0
- data/lib/cosmos/tools/cmd_sender/cmd_params.rb +382 -0
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +54 -340
- data/lib/cosmos/tools/cmd_sequence/cmd_sequence.rb +74 -52
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +40 -333
- data/lib/cosmos/tools/cmd_sequence/sequence_list.rb +16 -11
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +13 -0
- data/lib/cosmos/tools/cmd_tlm_server/background_tasks.rb +2 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +44 -15
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +8 -1
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +18 -20
- 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 +9 -6
- 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/cmd_tlm_server/router_thread.rb +5 -0
- data/lib/cosmos/tools/cmd_tlm_server/routers.rb +2 -0
- data/lib/cosmos/tools/config_editor/config_editor.rb +181 -94
- data/lib/cosmos/tools/config_editor/config_editor_frame.rb +10 -9
- data/lib/cosmos/tools/config_editor/system_config_dialog.rb +158 -0
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +57 -47
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +1 -0
- data/lib/cosmos/tools/data_viewer/dump_component.rb +3 -9
- data/lib/cosmos/tools/data_viewer/text_component.rb +77 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +68 -42
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -1
- data/lib/cosmos/tools/launcher/launcher.rb +2 -1
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +59 -41
- data/lib/cosmos/tools/opengl_builder/opengl_builder.rb +42 -42
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +64 -59
- data/lib/cosmos/tools/script_runner/script_runner.rb +198 -123
- data/lib/cosmos/tools/script_runner/script_runner_config.rb +14 -0
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +87 -35
- data/lib/cosmos/tools/table_manager/table_config.rb +5 -3
- data/lib/cosmos/tools/table_manager/table_manager.rb +48 -45
- data/lib/cosmos/tools/test_runner/test.rb +5 -2
- data/lib/cosmos/tools/test_runner/test_runner.rb +61 -38
- data/lib/cosmos/tools/test_runner/test_runner_chooser.rb +24 -12
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +48 -48
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +5 -8
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +20 -16
- 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_dart_thread.rb +21 -17
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_realtime_thread.rb +5 -8
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tool.rb +94 -91
- data/lib/cosmos/tools/tlm_grapher/tlm_grapher.rb +27 -26
- data/lib/cosmos/tools/tlm_viewer/screen.rb +76 -14
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +51 -34
- data/lib/cosmos/tools/tlm_viewer/widgets.rb +3 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/aging_widget.rb +4 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/array_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/block_widget.rb +4 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/canvas_clickable.rb +16 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/canvas_widget.rb +17 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +1 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasellipse_widget.rb +40 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasimage_widget.rb +12 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasimagevalue_widget.rb +79 -29
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslabel_widget.rb +1 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslabelvalue_widget.rb +2 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasline_widget.rb +2 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslinevalue_widget.rb +4 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasvalue_widget.rb +33 -25
- data/lib/cosmos/tools/tlm_viewer/widgets/checkbutton_widget.rb +5 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/combobox_widget.rb +5 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/formatfontvalue_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/formatvalue_widget.rb +4 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontal_widget.rb +5 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontalbox_widget.rb +6 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontalline_widget.rb +2 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/label_widget.rb +10 -8
- data/lib/cosmos/tools/tlm_viewer/widgets/labelformatvalue_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelled_widget.rb +58 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelprogressbar_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/labeltrendlimitsbar_widget.rb +2 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvalue_widget.rb +2 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluedesc_widget.rb +3 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitsbar_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitscolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangebar_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangecolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/layout_widget.rb +3 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/led_widget.rb +108 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/limits_widget.rb +60 -10
- data/lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb +22 -8
- data/lib/cosmos/tools/tlm_viewer/widgets/limitscolor_widget.rb +19 -13
- data/lib/cosmos/tools/tlm_viewer/widgets/limitscolumn_widget.rb +22 -8
- data/lib/cosmos/tools/tlm_viewer/widgets/linegraph_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/matrixbycolumns_widget.rb +4 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/multi_widget.rb +1 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/progressbar_widget.rb +10 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/radiobutton_widget.rb +7 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb +4 -6
- data/lib/cosmos/tools/tlm_viewer/widgets/rangecolumn_widget.rb +3 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/screenshotbutton_widget.rb +4 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/scrollwindow_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/sectionheader_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/spacer_widget.rb +4 -6
- data/lib/cosmos/tools/tlm_viewer/widgets/tabbook_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/tabitem_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/textbox_widget.rb +13 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/timegraph_widget.rb +3 -8
- data/lib/cosmos/tools/tlm_viewer/widgets/title_widget.rb +6 -12
- data/lib/cosmos/tools/tlm_viewer/widgets/trendbar_widget.rb +5 -10
- data/lib/cosmos/tools/tlm_viewer/widgets/trendlimitsbar_widget.rb +5 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/value_widget.rb +4 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/valuelimitsbar_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/valuelimitscolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/valuerangebar_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/valuerangecolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/vertical_widget.rb +8 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/verticalbox_widget.rb +9 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/widget.rb +60 -47
- data/lib/cosmos/top_level.rb +37 -13
- data/lib/cosmos/utilities/ruby_lex_utils.rb +34 -30
- data/lib/cosmos/version.rb +5 -5
- data/lib/cosmos/win32/excel.rb +81 -24
- data/make_gems.sh +10 -0
- data/run_gui_tests.bat +1 -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/core_ext/socket_spec.rb +1 -1
- data/spec/core_ext/time_spec.rb +4 -0
- data/spec/gui/utilities/script_module_gui_spec.rb +44 -63
- data/spec/install/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -1
- data/spec/install/config/targets/INST/cmd_tlm/inst_tlm.txt +5 -5
- data/spec/install/yaml_docs_spec.rb +132 -0
- data/spec/interfaces/linc_interface_spec.rb +1 -1
- data/spec/interfaces/protocols/fixed_protocol_spec.rb +20 -9
- data/spec/interfaces/protocols/ignore_packet_protocol_spec.rb +243 -0
- data/spec/interfaces/protocols/length_protocol_spec.rb +39 -0
- data/spec/interfaces/protocols/preidentified_protocol_spec.rb +227 -4
- data/spec/interfaces/protocols/template_protocol_spec.rb +78 -25
- data/spec/io/json_drb_rack_spec.rb +166 -0
- data/spec/io/json_drb_spec.rb +14 -0
- data/spec/io/json_rpc_spec.rb +4 -5
- data/spec/io/posix_serial_driver_spec.rb +81 -0
- data/spec/io/serial_driver_spec.rb +15 -13
- data/spec/io/win32_serial_driver_spec.rb +33 -3
- data/spec/packet_logs/packet_log_reader_spec.rb +106 -52
- data/spec/packets/commands_spec.rb +22 -0
- data/spec/packets/packet_config_spec.rb +29 -16
- data/spec/packets/packet_item_spec.rb +2 -2
- data/spec/packets/packet_spec.rb +39 -6
- 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 +69 -11
- data/spec/packets/structure_spec.rb +93 -2
- data/spec/packets/telemetry_spec.rb +63 -10
- data/spec/script/extract_spec.rb +4 -1
- 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/streams/tcpip_socket_stream_spec.rb +32 -27
- data/spec/system/system_spec.rb +187 -4
- data/spec/system/target_spec.rb +62 -1
- data/spec/tools/cmd_tlm_server/api_spec.rb +29 -21
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +15 -7
- 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/spec/tools/cmd_tlm_server/router_thread_spec.rb +2 -3
- data/spec/top_level/top_level_spec.rb +29 -5
- data/spec/utilities/message_log_spec.rb +6 -3
- data/tasks/gemfile_stats.rake +38 -14
- data/test/performance/config/system/system.txt +0 -0
- data/test/performance/config/targets/PACKET/cmd_tlm/packet_tlm.txt +5 -5
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/performance/config/tools/handbook_creator/assets/img/ball_logo.bmp +0 -0
- data/test/performance/config/tools/handbook_creator/assets/img/ball_logo.gif +0 -0
- data/test/performance/config/tools/handbook_creator/assets/img/ball_logo.jpg +0 -0
- data/test/performance/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/test/performance/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/test/performance/config/tools/handbook_creator/assets/js/html5shiv.js +8 -0
- data/test/performance/config/tools/handbook_creator/assets/js/jquery-1.10.2.min.js +6 -0
- data/test/performance/config/tools/handbook_creator/assets/js/respond.min.js +6 -0
- data/test/performance/config/tools/test_runner/test_runner.txt +1 -1
- data/test/performance/procedures/cosmos_api_test.rb +1 -1
- data/test/performance/tools/identify_performance.rb +82 -0
- metadata +146 -62
- data/lib/cosmos/dart/Gemfile +0 -69
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
require 'cosmos'
|
|
12
12
|
require 'cosmos/gui/qt'
|
|
13
13
|
require 'cosmos/io/json_drb_object'
|
|
14
|
+
require 'cosmos/dart/lib/dart_constants'
|
|
14
15
|
|
|
15
16
|
module Cosmos
|
|
16
|
-
|
|
17
17
|
# Thread used to gather telemetry from DART and process it using a TabbedPlotsDefinition
|
|
18
18
|
class TabbedPlotsDartThread
|
|
19
19
|
# Array of exceptions that occurred
|
|
@@ -45,7 +45,7 @@ module Cosmos
|
|
|
45
45
|
|
|
46
46
|
# Execute each query
|
|
47
47
|
results = {}
|
|
48
|
-
server = JsonDRbObject.new(System.connect_hosts['DART_DECOM'], System.ports['DART_DECOM'])
|
|
48
|
+
server = JsonDRbObject.new(System.connect_hosts['DART_DECOM'], System.ports['DART_DECOM'], 1.0, Cosmos::System.x_csrf_token)
|
|
49
49
|
time_start = Time.utc(1970, 1, 1) unless time_start
|
|
50
50
|
time_end = Time.now unless time_end
|
|
51
51
|
progress_dialog.set_step_progress(0) if progress_dialog
|
|
@@ -67,23 +67,29 @@ module Cosmos
|
|
|
67
67
|
request['reduction'] = dart_reduction.to_s
|
|
68
68
|
request['cmd_tlm'] = 'TLM'
|
|
69
69
|
request['offset'] = 0
|
|
70
|
-
request['limit'] =
|
|
70
|
+
request['limit'] = DartConstants::MAX_DECOM_RESULTS
|
|
71
71
|
if dart_reduction == :NONE
|
|
72
72
|
request['value_type'] = value_type.to_s
|
|
73
73
|
else
|
|
74
74
|
request['value_type'] = value_type.to_s + "_#{dart_reduced_type}"
|
|
75
75
|
end
|
|
76
76
|
request['meta_filters'] = meta_filters unless meta_filters.empty?
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
result =
|
|
81
|
-
|
|
82
|
-
result
|
|
77
|
+
results[query_string] = []
|
|
78
|
+
while true
|
|
79
|
+
query_result = server.query(request)
|
|
80
|
+
result = query_result
|
|
81
|
+
if array_index
|
|
82
|
+
result = []
|
|
83
|
+
query_result.each do |qr|
|
|
84
|
+
result << [qr[0][array_index], qr[1], qr[2], qr[3], qr[4]]
|
|
85
|
+
end
|
|
83
86
|
end
|
|
87
|
+
results[query_string].concat(result)
|
|
88
|
+
break if query_result.length < DartConstants::MAX_DECOM_RESULTS
|
|
89
|
+
progress_dialog.append_text(" Total results: #{results[query_string].length}") if progress_dialog
|
|
90
|
+
request['offset'] += DartConstants::MAX_DECOM_RESULTS
|
|
84
91
|
end
|
|
85
|
-
results[query_string]
|
|
86
|
-
progress_dialog.append_text(" Received #{result.length} values") if progress_dialog
|
|
92
|
+
progress_dialog.append_text(" Total results: #{results[query_string].length}") if progress_dialog
|
|
87
93
|
progress_dialog.set_step_progress((index + 1).to_f / required_queries.length) if progress_dialog
|
|
88
94
|
rescue Exception => error
|
|
89
95
|
@errors << error
|
|
@@ -134,7 +140,7 @@ module Cosmos
|
|
|
134
140
|
@done = true
|
|
135
141
|
end
|
|
136
142
|
end
|
|
137
|
-
end
|
|
143
|
+
end
|
|
138
144
|
|
|
139
145
|
# Indicates if processing is complete
|
|
140
146
|
def done?
|
|
@@ -149,12 +155,10 @@ module Cosmos
|
|
|
149
155
|
@thread = nil
|
|
150
156
|
@done = true
|
|
151
157
|
return true, false
|
|
152
|
-
end
|
|
158
|
+
end
|
|
153
159
|
|
|
154
160
|
def graceful_kill
|
|
155
161
|
# Just to remove warnings
|
|
156
162
|
end
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
end # module Cosmos
|
|
163
|
+
end
|
|
164
|
+
end
|
|
@@ -16,11 +16,10 @@ module Cosmos
|
|
|
16
16
|
|
|
17
17
|
# Thread used to gather telemetry in realtime and process it using a TabbedPlotsDefinition
|
|
18
18
|
class TabbedPlotsRealtimeThread < InterfaceThread
|
|
19
|
-
|
|
20
19
|
# Create a new TabbedPlotsRealtimeThread
|
|
21
20
|
def initialize(tabbed_plots_config, connection_success_callback = nil, connection_failed_callback = nil, connection_lost_callback = nil, fatal_exception_callback = nil, replay_mode = false)
|
|
22
21
|
if replay_mode
|
|
23
|
-
interface = TcpipClientInterface.new(System.connect_hosts['REPLAY_PREIDENTIFIED'], nil, System.ports['REPLAY_PREIDENTIFIED'], nil,
|
|
22
|
+
interface = TcpipClientInterface.new(System.connect_hosts['REPLAY_PREIDENTIFIED'], nil, System.ports['REPLAY_PREIDENTIFIED'], nil, nil, 'PREIDENTIFIED')
|
|
24
23
|
else
|
|
25
24
|
interface = TcpipClientInterface.new(System.connect_hosts['CTS_PREIDENTIFIED'], nil, System.ports['CTS_PREIDENTIFIED'], nil, tabbed_plots_config.cts_timeout, 'PREIDENTIFIED')
|
|
26
25
|
end
|
|
@@ -52,7 +51,7 @@ module Cosmos
|
|
|
52
51
|
|
|
53
52
|
# Start interface thread
|
|
54
53
|
start()
|
|
55
|
-
end
|
|
54
|
+
end
|
|
56
55
|
|
|
57
56
|
# Callback to the system definition when a packet is received
|
|
58
57
|
def received_packet_callback(packet)
|
|
@@ -65,7 +64,7 @@ module Cosmos
|
|
|
65
64
|
stop()
|
|
66
65
|
Cosmos.kill_thread(self, @process_thread)
|
|
67
66
|
@process_thread = nil
|
|
68
|
-
end
|
|
67
|
+
end
|
|
69
68
|
|
|
70
69
|
def graceful_kill
|
|
71
70
|
# Allow the callbacks a chance to update the GUI so that they can die gracefully
|
|
@@ -76,7 +75,5 @@ module Cosmos
|
|
|
76
75
|
end
|
|
77
76
|
end
|
|
78
77
|
end
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
end # module Cosmos
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -24,19 +24,18 @@ require 'cosmos/gui/dialogs/dart_dialog'
|
|
|
24
24
|
require 'cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots'
|
|
25
25
|
|
|
26
26
|
module Cosmos
|
|
27
|
-
|
|
28
27
|
# Displays multiple plots that perform various analysis on data.
|
|
29
28
|
class TabbedPlotsTool < QtTool
|
|
30
|
-
|
|
31
29
|
MINIMUM_LEFT_PANEL_WIDTH = 200
|
|
32
30
|
DEFAULT_LEFT_PANEL_WIDTH = 250
|
|
33
31
|
|
|
34
32
|
def initialize(options)
|
|
35
33
|
super(options) # MUST BE FIRST - All code before super is executed twice in RubyQt Based classes
|
|
34
|
+
@options = options
|
|
36
35
|
@base_title = self.windowTitle
|
|
37
36
|
Cosmos.load_cosmos_icon("tlm_grapher.png")
|
|
38
37
|
|
|
39
|
-
statusBar.showMessage(
|
|
38
|
+
statusBar.showMessage("") # Show blank message to initialize status bar
|
|
40
39
|
|
|
41
40
|
initialize_actions()
|
|
42
41
|
initialize_menus(options)
|
|
@@ -77,9 +76,10 @@ module Cosmos
|
|
|
77
76
|
System.telemetry
|
|
78
77
|
|
|
79
78
|
# Create tabbed plots definition
|
|
80
|
-
@config_filename =
|
|
79
|
+
@config_filename = options.config_file ? options.config_file : ''
|
|
81
80
|
Qt.execute_in_main_thread(true) do
|
|
82
81
|
load_configuration()
|
|
82
|
+
toggle_replay_mode() if options.replay
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
# Unconfigure CosmosConfig to interact with splash screen
|
|
@@ -91,131 +91,131 @@ module Cosmos
|
|
|
91
91
|
super()
|
|
92
92
|
|
|
93
93
|
# File Menu Actions
|
|
94
|
-
@file_process = Qt::Action.new(
|
|
95
|
-
@file_process_keyseq = Qt::KeySequence.new(
|
|
94
|
+
@file_process = Qt::Action.new('&Open Log', self)
|
|
95
|
+
@file_process_keyseq = Qt::KeySequence.new('Ctrl+O')
|
|
96
96
|
@file_process.shortcut = @file_process_keyseq
|
|
97
|
-
@file_process.statusTip =
|
|
97
|
+
@file_process.statusTip = 'Open Log File'
|
|
98
98
|
@file_process.connect(SIGNAL('triggered()')) { on_file_process_log() }
|
|
99
99
|
|
|
100
|
-
@file_dart = Qt::Action.new(
|
|
101
|
-
@file_dart_keyseq = Qt::KeySequence.new(
|
|
100
|
+
@file_dart = Qt::Action.new('&Query DART Database', self)
|
|
101
|
+
@file_dart_keyseq = Qt::KeySequence.new('Ctrl+D')
|
|
102
102
|
@file_dart.shortcut = @file_dart_keyseq
|
|
103
|
-
@file_dart.statusTip =
|
|
103
|
+
@file_dart.statusTip = 'Query DART Database'
|
|
104
104
|
@file_dart.connect(SIGNAL('triggered()')) { on_file_dart() }
|
|
105
105
|
|
|
106
|
-
@file_load = Qt::Action.new(Cosmos.get_icon('open.png'),
|
|
107
|
-
@file_load.statusTip =
|
|
106
|
+
@file_load = Qt::Action.new(Cosmos.get_icon('open.png'), '&Load Config', self)
|
|
107
|
+
@file_load.statusTip = 'Load Saved Configuration'
|
|
108
108
|
@file_load.connect(SIGNAL('triggered()')) { on_file_load_config() }
|
|
109
109
|
|
|
110
|
-
@file_save = Qt::Action.new(Cosmos.get_icon('save.png'),
|
|
111
|
-
@file_save_keyseq = Qt::KeySequence.new(
|
|
110
|
+
@file_save = Qt::Action.new(Cosmos.get_icon('save.png'), '&Save Config', self)
|
|
111
|
+
@file_save_keyseq = Qt::KeySequence.new('Ctrl+S')
|
|
112
112
|
@file_save.shortcut = @file_save_keyseq
|
|
113
|
-
@file_save.statusTip =
|
|
113
|
+
@file_save.statusTip = 'Save Current Configuration'
|
|
114
114
|
@file_save.connect(SIGNAL('triggered()')) { on_file_save_config() }
|
|
115
115
|
|
|
116
|
-
@file_screenshot = Qt::Action.new(Cosmos.get_icon('screenshot.png'),
|
|
117
|
-
@file_screenshot.statusTip =
|
|
116
|
+
@file_screenshot = Qt::Action.new(Cosmos.get_icon('screenshot.png'), 'Screensho&t', self)
|
|
117
|
+
@file_screenshot.statusTip = 'Screenshot of Application'
|
|
118
118
|
@file_screenshot.connect(SIGNAL('triggered()')) { on_file_screenshot() }
|
|
119
119
|
|
|
120
|
-
@replay_action = Qt::Action.new(
|
|
121
|
-
@replay_action.statusTip =
|
|
120
|
+
@replay_action = Qt::Action.new('Toggle Replay Mode', self)
|
|
121
|
+
@replay_action.statusTip = 'Toggle Replay Mode'
|
|
122
122
|
@replay_action.connect(SIGNAL('triggered()')) { toggle_replay_mode() }
|
|
123
123
|
|
|
124
124
|
# Tab Menu Actions
|
|
125
|
-
@tab_add = Qt::Action.new(Cosmos.get_icon('add_tab.png'),
|
|
126
|
-
@tab_add.statusTip =
|
|
125
|
+
@tab_add = Qt::Action.new(Cosmos.get_icon('add_tab.png'), '&Add Tab', self)
|
|
126
|
+
@tab_add.statusTip = 'Add New Tab'
|
|
127
127
|
@tab_add.connect(SIGNAL('triggered()')) { on_tab_add() }
|
|
128
128
|
|
|
129
|
-
@tab_delete = Qt::Action.new(Cosmos.get_icon('delete_tab.png'),
|
|
130
|
-
@tab_delete.statusTip =
|
|
129
|
+
@tab_delete = Qt::Action.new(Cosmos.get_icon('delete_tab.png'), '&Delete Tab', self)
|
|
130
|
+
@tab_delete.statusTip = 'Delete Active Tab'
|
|
131
131
|
@tab_delete.connect(SIGNAL('triggered()')) { on_tab_delete() }
|
|
132
132
|
|
|
133
|
-
@tab_edit = Qt::Action.new(Cosmos.get_icon('edit_tab.png'),
|
|
134
|
-
@tab_edit.statusTip =
|
|
133
|
+
@tab_edit = Qt::Action.new(Cosmos.get_icon('edit_tab.png'), '&Edit Tab', self)
|
|
134
|
+
@tab_edit.statusTip = 'Edit Active Tab'
|
|
135
135
|
@tab_edit.connect(SIGNAL('triggered()')) { on_tab_edit() }
|
|
136
136
|
|
|
137
|
-
@tab_screenshot = Qt::Action.new(Cosmos.get_icon('screenshot.png'),
|
|
138
|
-
@tab_screenshot.statusTip =
|
|
137
|
+
@tab_screenshot = Qt::Action.new(Cosmos.get_icon('screenshot.png'), '&Screenshot Tab', self)
|
|
138
|
+
@tab_screenshot.statusTip = 'Screenshot of Active Tab'
|
|
139
139
|
@tab_screenshot.connect(SIGNAL('triggered()')) { on_tab_screenshot() }
|
|
140
140
|
|
|
141
|
-
@tab_export = Qt::Action.new(
|
|
142
|
-
@tab_export.statusTip =
|
|
141
|
+
@tab_export = Qt::Action.new('E&xport Tab Data Objects', self)
|
|
142
|
+
@tab_export.statusTip = 'Export Tab Data Object(s)'
|
|
143
143
|
@tab_export.connect(SIGNAL('triggered()')) { on_tab_export() }
|
|
144
144
|
|
|
145
|
-
@tab_reset = Qt::Action.new(
|
|
146
|
-
@tab_reset.statusTip =
|
|
145
|
+
@tab_reset = Qt::Action.new('&Reset Tab Data Objects', self)
|
|
146
|
+
@tab_reset.statusTip = 'Reset Tab Data Object(s)'
|
|
147
147
|
@tab_reset.connect(SIGNAL('triggered()')) { on_tab_reset() }
|
|
148
148
|
|
|
149
149
|
# Plot Menu Actions
|
|
150
|
-
@plot_add = Qt::Action.new(Cosmos.get_icon('add_plot.png'),
|
|
151
|
-
@plot_add.statusTip =
|
|
150
|
+
@plot_add = Qt::Action.new(Cosmos.get_icon('add_plot.png'), '&Add Plot', self)
|
|
151
|
+
@plot_add.statusTip = 'Add New Plot'
|
|
152
152
|
@plot_add.connect(SIGNAL('triggered()')) { on_plot_add() }
|
|
153
153
|
|
|
154
|
-
@plot_delete = Qt::Action.new(Cosmos.get_icon('delete_plot.png'),
|
|
155
|
-
@plot_delete.statusTip =
|
|
154
|
+
@plot_delete = Qt::Action.new(Cosmos.get_icon('delete_plot.png'), '&Delete Plot', self)
|
|
155
|
+
@plot_delete.statusTip = 'Delete Selected Plot'
|
|
156
156
|
@plot_delete.connect(SIGNAL('triggered()')) { on_plot_delete() }
|
|
157
157
|
|
|
158
|
-
@plot_edit = Qt::Action.new(Cosmos.get_icon('edit_plot.png'),
|
|
159
|
-
@plot_edit.statusTip =
|
|
158
|
+
@plot_edit = Qt::Action.new(Cosmos.get_icon('edit_plot.png'), '&Edit Plot', self)
|
|
159
|
+
@plot_edit.statusTip = 'Edit Selected Plot'
|
|
160
160
|
@plot_edit.connect(SIGNAL('triggered()')) { on_plot_edit() }
|
|
161
161
|
|
|
162
|
-
@plot_screenshot = Qt::Action.new(Cosmos.get_icon('screenshot.png'),
|
|
163
|
-
@plot_screenshot.statusTip =
|
|
162
|
+
@plot_screenshot = Qt::Action.new(Cosmos.get_icon('screenshot.png'), '&Screenshot Plot', self)
|
|
163
|
+
@plot_screenshot.statusTip = 'Screenshot Selected Plot'
|
|
164
164
|
@plot_screenshot.connect(SIGNAL('triggered()')) { on_plot_screenshot() }
|
|
165
165
|
|
|
166
|
-
@plot_add_data = Qt::Action.new(Cosmos.get_icon('add_database.png'),
|
|
167
|
-
@plot_add_data.statusTip =
|
|
166
|
+
@plot_add_data = Qt::Action.new(Cosmos.get_icon('add_database.png'), 'Add Data &Object', self)
|
|
167
|
+
@plot_add_data.statusTip = 'Add Data Object'
|
|
168
168
|
@plot_add_data.connect(SIGNAL('triggered()')) { on_data_object_add() }
|
|
169
169
|
|
|
170
|
-
@plot_edit_data = Qt::Action.new(Cosmos.get_icon('edit_database.png'),
|
|
171
|
-
@plot_edit_data.statusTip =
|
|
170
|
+
@plot_edit_data = Qt::Action.new(Cosmos.get_icon('edit_database.png'), 'Edit &Plot Data Objects', self)
|
|
171
|
+
@plot_edit_data.statusTip = 'Edit Plot Data Object(s)'
|
|
172
172
|
@plot_edit_data.connect(SIGNAL('triggered()')) { on_plot_data_object_edit() }
|
|
173
173
|
|
|
174
|
-
@plot_export = Qt::Action.new(
|
|
175
|
-
@plot_export.statusTip =
|
|
174
|
+
@plot_export = Qt::Action.new('E&xport Plot Data Objects', self)
|
|
175
|
+
@plot_export.statusTip = 'Export Plot Data Object(s)'
|
|
176
176
|
@plot_export.connect(SIGNAL('triggered()')) { on_plot_export() }
|
|
177
177
|
|
|
178
|
-
@plot_reset = Qt::Action.new(
|
|
179
|
-
@plot_reset.statusTip =
|
|
178
|
+
@plot_reset = Qt::Action.new('&Reset Plot Data Objects', self)
|
|
179
|
+
@plot_reset.statusTip = 'Reset Plot Data Object(s)'
|
|
180
180
|
@plot_reset.connect(SIGNAL('triggered()')) { on_plot_reset() }
|
|
181
181
|
|
|
182
182
|
# Data Object Menu
|
|
183
|
-
@data_add = Qt::Action.new(Cosmos.get_icon('add_database.png'),
|
|
184
|
-
@data_add.statusTip =
|
|
183
|
+
@data_add = Qt::Action.new(Cosmos.get_icon('add_database.png'), '&Add Data Object', self)
|
|
184
|
+
@data_add.statusTip = 'Add Data Object'
|
|
185
185
|
@data_add.connect(SIGNAL('triggered()')) { on_data_object_add() }
|
|
186
186
|
|
|
187
|
-
@data_delete = Qt::Action.new(Cosmos.get_icon('delete_database.png'),
|
|
188
|
-
@data_delete.statusTip =
|
|
187
|
+
@data_delete = Qt::Action.new(Cosmos.get_icon('delete_database.png'), '&Delete Data Object', self)
|
|
188
|
+
@data_delete.statusTip = 'Delete Selected Data Object(s)'
|
|
189
189
|
@data_delete.connect(SIGNAL('triggered()')) { on_data_object_delete() }
|
|
190
190
|
|
|
191
|
-
@data_edit = Qt::Action.new(Cosmos.get_icon('edit_database.png'),
|
|
192
|
-
@data_edit.statusTip =
|
|
191
|
+
@data_edit = Qt::Action.new(Cosmos.get_icon('edit_database.png'), '&Edit Data Object', self)
|
|
192
|
+
@data_edit.statusTip = 'Edit Selected Data Object(s)'
|
|
193
193
|
@data_edit.connect(SIGNAL('triggered()')) { on_data_object_edit() }
|
|
194
194
|
|
|
195
|
-
@data_duplicate = Qt::Action.new(
|
|
196
|
-
@data_duplicate.statusTip =
|
|
195
|
+
@data_duplicate = Qt::Action.new('Du&plicate Data Object', self)
|
|
196
|
+
@data_duplicate.statusTip = 'Duplicate Selected Data Object(s)'
|
|
197
197
|
@data_duplicate.connect(SIGNAL('triggered()')) { on_data_object_duplicate() }
|
|
198
198
|
|
|
199
|
-
@data_export = Qt::Action.new(
|
|
200
|
-
@data_export.statusTip =
|
|
199
|
+
@data_export = Qt::Action.new('E&xport Data Object', self)
|
|
200
|
+
@data_export.statusTip = 'Export Selected Data Object(s)'
|
|
201
201
|
@data_export.connect(SIGNAL('triggered()')) { on_data_object_export() }
|
|
202
202
|
|
|
203
|
-
@data_export_all = Qt::Action.new(
|
|
204
|
-
@data_export_all.statusTip =
|
|
203
|
+
@data_export_all = Qt::Action.new('Expor&t All Data Objects', self)
|
|
204
|
+
@data_export_all.statusTip = 'Export All Data Objects'
|
|
205
205
|
@data_export_all.connect(SIGNAL('triggered()')) { on_data_object_export_all() }
|
|
206
206
|
|
|
207
|
-
@data_reset = Qt::Action.new(
|
|
208
|
-
@data_reset.statusTip =
|
|
207
|
+
@data_reset = Qt::Action.new('&Reset Data Object', self)
|
|
208
|
+
@data_reset.statusTip = 'Reset Selected Data Object(s)'
|
|
209
209
|
@data_reset.connect(SIGNAL('triggered()')) { on_data_object_reset() }
|
|
210
210
|
|
|
211
|
-
@data_reset_all = Qt::Action.new(
|
|
212
|
-
@data_reset_all.statusTip =
|
|
211
|
+
@data_reset_all = Qt::Action.new('Re&set All Data Objects', self)
|
|
212
|
+
@data_reset_all.statusTip = 'Reset All Data Objects'
|
|
213
213
|
@data_reset_all.connect(SIGNAL('triggered()')) { on_data_object_reset_all() }
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
def initialize_menus(options)
|
|
217
217
|
# File Menu
|
|
218
|
-
@file_menu = menuBar.addMenu(
|
|
218
|
+
@file_menu = menuBar.addMenu('&File')
|
|
219
219
|
@file_menu.addAction(@file_process)
|
|
220
220
|
@file_menu.addAction(@file_dart)
|
|
221
221
|
@file_menu.addSeparator()
|
|
@@ -228,7 +228,7 @@ module Cosmos
|
|
|
228
228
|
@file_menu.addSeparator()
|
|
229
229
|
@file_menu.addAction(@exit_action)
|
|
230
230
|
|
|
231
|
-
@tab_menu = menuBar.addMenu(
|
|
231
|
+
@tab_menu = menuBar.addMenu('&Tab')
|
|
232
232
|
@tab_menu.addAction(@tab_add)
|
|
233
233
|
@tab_menu.addAction(@tab_delete)
|
|
234
234
|
@tab_menu.addAction(@tab_edit)
|
|
@@ -238,7 +238,7 @@ module Cosmos
|
|
|
238
238
|
@tab_menu.addSeparator()
|
|
239
239
|
@tab_menu.addAction(@tab_reset)
|
|
240
240
|
|
|
241
|
-
@plot_menu = menuBar.addMenu(
|
|
241
|
+
@plot_menu = menuBar.addMenu('&Plot')
|
|
242
242
|
@plot_menu.addAction(@plot_add)
|
|
243
243
|
@plot_menu.addAction(@plot_delete)
|
|
244
244
|
@plot_menu.addAction(@plot_edit)
|
|
@@ -251,7 +251,7 @@ module Cosmos
|
|
|
251
251
|
@plot_menu.addSeparator()
|
|
252
252
|
@plot_menu.addAction(@plot_reset)
|
|
253
253
|
|
|
254
|
-
@data_menu = menuBar.addMenu(
|
|
254
|
+
@data_menu = menuBar.addMenu('&Data Object')
|
|
255
255
|
@data_menu.addAction(@data_add)
|
|
256
256
|
@data_menu.addAction(@data_delete)
|
|
257
257
|
@data_menu.addAction(@data_edit)
|
|
@@ -285,7 +285,7 @@ module Cosmos
|
|
|
285
285
|
@replay_flag = Qt::Label.new("Replay Mode")
|
|
286
286
|
@replay_flag.setStyleSheet("background:green;color:white;padding:5px;font-weight:bold;height:30px;")
|
|
287
287
|
@right_frame.addWidget(@replay_flag)
|
|
288
|
-
@replay_flag.hide
|
|
288
|
+
@replay_flag.hide
|
|
289
289
|
@right_widget.setLayout(@right_frame)
|
|
290
290
|
@splitter.addWidget(@right_widget)
|
|
291
291
|
@splitter.setStretchFactor(0,0) # Set the left side stretch factor to 0
|
|
@@ -363,7 +363,7 @@ module Cosmos
|
|
|
363
363
|
|
|
364
364
|
if !File.exist?(@config_filename)
|
|
365
365
|
# Warn if the configuration file did not exist
|
|
366
|
-
statusBar.showMessage(
|
|
366
|
+
statusBar.showMessage("Configuration File does not exist: #{@config_filename}. Using default configuration.")
|
|
367
367
|
end
|
|
368
368
|
update_window_title()
|
|
369
369
|
end # def load_configuration
|
|
@@ -397,9 +397,9 @@ module Cosmos
|
|
|
397
397
|
begin
|
|
398
398
|
yield filename
|
|
399
399
|
@screenshot_dir = File.dirname(filename)
|
|
400
|
-
statusBar.showMessage(
|
|
400
|
+
statusBar.showMessage("Screenshot saved to: #{filename}")
|
|
401
401
|
rescue Exception => error
|
|
402
|
-
statusBar.showMessage(
|
|
402
|
+
statusBar.showMessage("Screenshot creation failed")
|
|
403
403
|
Qt::MessageBox.warning(
|
|
404
404
|
self,
|
|
405
405
|
"Screenshot Creation Error",
|
|
@@ -426,9 +426,9 @@ module Cosmos
|
|
|
426
426
|
dialog.complete
|
|
427
427
|
end
|
|
428
428
|
@export_dir = File.dirname(filename)
|
|
429
|
-
statusBar.showMessage(
|
|
429
|
+
statusBar.showMessage("Exported to #{filename}")
|
|
430
430
|
rescue Exception => error
|
|
431
|
-
statusBar.showMessage(
|
|
431
|
+
statusBar.showMessage("Export Failed")
|
|
432
432
|
Qt::MessageBox.warning(
|
|
433
433
|
self,
|
|
434
434
|
"Export Error",
|
|
@@ -449,9 +449,9 @@ module Cosmos
|
|
|
449
449
|
yield
|
|
450
450
|
@config_modified = true if delete
|
|
451
451
|
update_window_title() if delete
|
|
452
|
-
statusBar.showMessage(
|
|
452
|
+
statusBar.showMessage("#{action.capitalize} #{item} successful")
|
|
453
453
|
else
|
|
454
|
-
statusBar.showMessage(
|
|
454
|
+
statusBar.showMessage("#{action.capitalize} #{item} canceled")
|
|
455
455
|
end
|
|
456
456
|
end
|
|
457
457
|
def reset(item)
|
|
@@ -590,9 +590,14 @@ module Cosmos
|
|
|
590
590
|
@tabbed_plots.pause
|
|
591
591
|
|
|
592
592
|
if prompt_for_save_if_needed()
|
|
593
|
+
if @config_filename.empty?
|
|
594
|
+
load_filename = @options.config_dir
|
|
595
|
+
else
|
|
596
|
+
load_filename = @config_filename
|
|
597
|
+
end
|
|
593
598
|
filename = Qt::FileDialog.getOpenFileName(self,
|
|
594
599
|
"Load Configuration",
|
|
595
|
-
|
|
600
|
+
load_filename,
|
|
596
601
|
"Config File (*.txt);;All Files (*)")
|
|
597
602
|
if filename and not filename.empty?
|
|
598
603
|
@config_filename = filename
|
|
@@ -642,7 +647,7 @@ module Cosmos
|
|
|
642
647
|
running = @realtime_thread ? true : false
|
|
643
648
|
handle_stop()
|
|
644
649
|
System.telemetry.reset
|
|
645
|
-
@tabbed_plots.reset_all_data_objects
|
|
650
|
+
@tabbed_plots.reset_all_data_objects
|
|
646
651
|
@replay_mode = !@replay_mode
|
|
647
652
|
if @replay_mode
|
|
648
653
|
@replay_flag.show
|
|
@@ -673,7 +678,7 @@ module Cosmos
|
|
|
673
678
|
paused = @tabbed_plots.paused?
|
|
674
679
|
@tabbed_plots.pause
|
|
675
680
|
@tabbed_plots.add_tab
|
|
676
|
-
statusBar.showMessage(
|
|
681
|
+
statusBar.showMessage("Tab Added")
|
|
677
682
|
@config_modified = true
|
|
678
683
|
update_window_title()
|
|
679
684
|
@tabbed_plots.resume unless paused
|
|
@@ -693,7 +698,7 @@ module Cosmos
|
|
|
693
698
|
tab_selected? do
|
|
694
699
|
edited = @tabbed_plots.edit_tab
|
|
695
700
|
if edited
|
|
696
|
-
statusBar.showMessage(
|
|
701
|
+
statusBar.showMessage("Tab Edited")
|
|
697
702
|
@config_modified = true
|
|
698
703
|
update_window_title()
|
|
699
704
|
end
|
|
@@ -979,7 +984,7 @@ module Cosmos
|
|
|
979
984
|
if @realtime_thread
|
|
980
985
|
# Resume plotting in case it was paused
|
|
981
986
|
@tabbed_plots.resume
|
|
982
|
-
statusBar.showMessage(
|
|
987
|
+
statusBar.showMessage("Plot Updates Resumed")
|
|
983
988
|
@realtime_button_bar.state = 'Running'
|
|
984
989
|
else
|
|
985
990
|
System.load_configuration
|
|
@@ -992,7 +997,7 @@ module Cosmos
|
|
|
992
997
|
|
|
993
998
|
# Startup realtime thread
|
|
994
999
|
@realtime_button_bar.state = 'Connecting'
|
|
995
|
-
statusBar.showMessage(
|
|
1000
|
+
statusBar.showMessage("Connecting to COSMOS Server")
|
|
996
1001
|
@realtime_thread = TabbedPlotsRealtimeThread.new(@tabbed_plots_config, method(:realtime_thread_connection_success_callback), method(:realtime_thread_connection_failed_callback), method(:realtime_thread_connection_lost_callback), method(:realtime_thread_fatal_exception_callback), @replay_mode)
|
|
997
1002
|
end
|
|
998
1003
|
end # def handle_start
|
|
@@ -1002,7 +1007,7 @@ module Cosmos
|
|
|
1002
1007
|
if @realtime_thread
|
|
1003
1008
|
# Pause plotting
|
|
1004
1009
|
@tabbed_plots.pause
|
|
1005
|
-
statusBar.showMessage(
|
|
1010
|
+
statusBar.showMessage("Plot Updates Paused - Still Collecting Data in the Background")
|
|
1006
1011
|
@realtime_button_bar.state = 'Paused'
|
|
1007
1012
|
else
|
|
1008
1013
|
# Do Nothing
|
|
@@ -1017,7 +1022,7 @@ module Cosmos
|
|
|
1017
1022
|
@realtime_thread.kill
|
|
1018
1023
|
@realtime_thread = nil
|
|
1019
1024
|
@realtime_button_bar.state = 'Stopped'
|
|
1020
|
-
statusBar.showMessage(
|
|
1025
|
+
statusBar.showMessage("Disconnection from COSMOS Server Successful")
|
|
1021
1026
|
else
|
|
1022
1027
|
# Do Nothing
|
|
1023
1028
|
end
|
|
@@ -1032,7 +1037,7 @@ module Cosmos
|
|
|
1032
1037
|
def realtime_thread_connection_success_callback
|
|
1033
1038
|
# Notify user of connection success
|
|
1034
1039
|
Qt.execute_in_main_thread(true) do
|
|
1035
|
-
statusBar.showMessage(
|
|
1040
|
+
statusBar.showMessage("Connection to COSMOS Server Successful")
|
|
1036
1041
|
if @tabbed_plots.paused?
|
|
1037
1042
|
@realtime_button_bar.state = 'Paused'
|
|
1038
1043
|
else
|
|
@@ -1045,7 +1050,7 @@ module Cosmos
|
|
|
1045
1050
|
def realtime_thread_connection_failed_callback(error)
|
|
1046
1051
|
# Notify user connection failed
|
|
1047
1052
|
Qt.execute_in_main_thread(true) do
|
|
1048
|
-
statusBar.showMessage(
|
|
1053
|
+
statusBar.showMessage("Connection to COSMOS Server Failed : #{error.class} : #{error.message}")
|
|
1049
1054
|
@realtime_button_bar.state = 'Connecting'
|
|
1050
1055
|
end
|
|
1051
1056
|
end # def realtime_thread_connection_failed_callback
|
|
@@ -1055,12 +1060,12 @@ module Cosmos
|
|
|
1055
1060
|
# Notify user of connection lost
|
|
1056
1061
|
if error
|
|
1057
1062
|
Qt.execute_in_main_thread(true) do
|
|
1058
|
-
statusBar.showMessage(
|
|
1063
|
+
statusBar.showMessage("Connection to COSMOS Server Lost : #{error.class} : #{error.message}")
|
|
1059
1064
|
@realtime_button_bar.state = 'Connecting'
|
|
1060
1065
|
end
|
|
1061
1066
|
else
|
|
1062
1067
|
Qt.execute_in_main_thread(true) do
|
|
1063
|
-
statusBar.showMessage(
|
|
1068
|
+
statusBar.showMessage("Connection to COSMOS Server Lost")
|
|
1064
1069
|
@realtime_button_bar.state = 'Connecting'
|
|
1065
1070
|
end
|
|
1066
1071
|
end
|
|
@@ -1070,7 +1075,5 @@ module Cosmos
|
|
|
1070
1075
|
def realtime_thread_fatal_exception_callback(error)
|
|
1071
1076
|
Cosmos.handle_fatal_exception(error)
|
|
1072
1077
|
end # def realtime_thread_fatal_exception_callback
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
end # module Cosmos
|
|
1078
|
+
end
|
|
1079
|
+
end
|