cosmos 4.3.0-java → 4.4.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +1 -0
- data/.travis.yml +5 -5
- data/Manifest.txt +81 -44
- data/Rakefile +9 -0
- data/appveyor.yml +2 -1
- 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/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/tools/limits_monitor.ahk +1 -1
- data/autohotkey/tools/packet_viewer.ahk +1 -1
- data/autohotkey/tools/script_runner.ahk +16 -4
- data/bin/cosmos +1 -1
- data/bin/xtce_converter +1 -1
- data/cosmos.gemspec +5 -7
- data/data/config/_interfaces.yaml +4 -0
- data/data/config/cmd_sequence.yaml +14 -0
- data/data/config/housekeeping_params.yaml +14 -0
- data/data/config/interface_modifiers.yaml +11 -0
- data/data/config/item_modifiers.yaml +2 -1
- data/data/config/launcher.yaml +12 -2
- data/data/config/param_item_modifiers.yaml +2 -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 +47 -10
- data/data/config/table_manager.yaml +7 -0
- data/data/config/target.yaml +12 -0
- data/data/config/telemetry_modifiers.yaml +3 -1
- data/data/config/test_runner.yaml +10 -9
- data/data/config/widgets.yaml +174 -11
- data/data/crc.txt +128 -125
- 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/config/data/crc.txt +40 -20
- data/demo/config/system/system.txt +1 -1
- data/demo/config/system/system_alt_ports.txt +1 -1
- data/demo/config/targets/EXAMPLE/cmd_tlm_server.txt +1 -0
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +2 -1
- data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +7 -7
- 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/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/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 +1 -1
- data/demo/procedures/interactive.rb +22 -0
- data/ext/cosmos/ext/packet/packet.c +0 -77
- data/install/Gemfile +1 -1
- data/install/Launcher.bat +1 -9
- data/install/config/data/crc.txt +17 -1
- data/install/config/system/system.txt +1 -1
- 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/lib/cosmos/config/config_parser.rb +4 -5
- data/lib/cosmos/dart/lib/dart_common.rb +1 -1
- data/lib/cosmos/gui/dialogs/details_dialog.rb +16 -1
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +1 -0
- 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 +3 -1
- data/lib/cosmos/gui/qt_tool.rb +46 -23
- data/lib/cosmos/gui/text/ruby_editor.rb +44 -41
- data/lib/cosmos/gui/utilities/screenshot.rb +1 -1
- data/lib/cosmos/gui/utilities/script_module_gui.rb +92 -92
- data/lib/cosmos/interfaces.rb +1 -0
- data/lib/cosmos/interfaces/interface.rb +5 -1
- data/lib/cosmos/interfaces/protocols/fixed_protocol.rb +40 -18
- data/lib/cosmos/interfaces/protocols/template_protocol.rb +6 -1
- data/lib/cosmos/interfaces/simulated_target_interface.rb +14 -5
- data/lib/cosmos/io/json_drb.rb +11 -7
- data/lib/cosmos/packets/commands.rb +28 -11
- data/lib/cosmos/packets/packet.rb +69 -32
- data/lib/cosmos/packets/packet_config.rb +34 -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 +4 -3
- data/lib/cosmos/packets/structure.rb +4 -2
- data/lib/cosmos/packets/telemetry.rb +19 -3
- data/lib/cosmos/script/api_shared.rb +12 -9
- data/lib/cosmos/script/scripting.rb +16 -14
- data/lib/cosmos/system/system.rb +39 -20
- data/lib/cosmos/system/target.rb +39 -9
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +94 -35
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +3 -0
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/background_tasks.rb +2 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +30 -4
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +1 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +9 -12
- data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +5 -2
- data/lib/cosmos/tools/cmd_tlm_server/routers.rb +2 -0
- data/lib/cosmos/tools/config_editor/config_editor.rb +80 -24
- data/lib/cosmos/tools/config_editor/config_editor_frame.rb +2 -0
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +15 -9
- data/lib/cosmos/tools/data_viewer/dump_component.rb +2 -9
- data/lib/cosmos/tools/data_viewer/text_component.rb +77 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +64 -38
- data/lib/cosmos/tools/launcher/launcher.rb +1 -0
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +31 -17
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +8 -6
- data/lib/cosmos/tools/script_runner/script_runner.rb +87 -29
- data/lib/cosmos/tools/script_runner/script_runner_config.rb +14 -0
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +41 -7
- data/lib/cosmos/tools/table_manager/table_config.rb +5 -3
- data/lib/cosmos/tools/table_manager/table_manager.rb +6 -3
- data/lib/cosmos/tools/test_runner/test_runner.rb +14 -9
- data/lib/cosmos/tools/test_runner/test_runner_chooser.rb +21 -9
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +3 -3
- 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 +11 -8
- data/lib/cosmos/tools/tlm_grapher/tlm_grapher.rb +9 -15
- data/lib/cosmos/tools/tlm_viewer/screen.rb +3 -1
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +19 -13
- data/lib/cosmos/tools/tlm_viewer/widgets.rb +2 -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 +1 -1
- 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 +2 -7
- 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 +54 -46
- data/lib/cosmos/top_level.rb +23 -12
- data/lib/cosmos/version.rb +4 -4
- 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 +112 -0
- data/spec/interfaces/protocols/fixed_protocol_spec.rb +20 -9
- data/spec/interfaces/protocols/template_protocol_spec.rb +78 -25
- data/spec/packets/commands_spec.rb +22 -0
- data/spec/packets/packet_config_spec.rb +24 -0
- data/spec/packets/packet_item_spec.rb +2 -2
- data/spec/packets/packet_spec.rb +39 -6
- data/spec/packets/parsers/state_parser_spec.rb +33 -11
- data/spec/packets/structure_spec.rb +41 -0
- data/spec/packets/telemetry_spec.rb +23 -0
- data/spec/streams/tcpip_socket_stream_spec.rb +32 -27
- data/spec/system/system_spec.rb +77 -2
- data/spec/system/target_spec.rb +62 -1
- data/spec/tools/cmd_tlm_server/api_spec.rb +1 -1
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +15 -7
- data/spec/top_level/top_level_spec.rb +29 -5
- data/tasks/gemfile_stats.rake +28 -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 +92 -55
@@ -12,7 +12,10 @@ require 'cosmos'
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
13
13
|
|
14
14
|
module Cosmos
|
15
|
-
|
15
|
+
# Create a checkbox. Typically used as a NAMED_WIDGET which is then
|
16
|
+
# referenced by a BUTTON to perform an action. For example:
|
17
|
+
# NAMED_WIDGET CHECK CHECKBUTTON 'Ignore Hazardous Checks'
|
18
|
+
# BUTTON 'Send' 'if get_named_widget("CHECK").checked? then cmd_no_hazardous_check("INST CLEAR") else cmd("INST CLEAR") end'
|
16
19
|
class CheckbuttonWidget < Qt::CheckBox
|
17
20
|
include Widget
|
18
21
|
|
@@ -34,5 +37,4 @@ module Cosmos
|
|
34
37
|
self.isChecked()
|
35
38
|
end
|
36
39
|
end
|
37
|
-
|
38
|
-
end # module Cosmos
|
40
|
+
end
|
@@ -11,7 +11,10 @@
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
12
12
|
|
13
13
|
module Cosmos
|
14
|
-
|
14
|
+
# Create a combobox. Typically used as a NAMED_WIDGET which is then
|
15
|
+
# referenced by a BUTTON to perform an action. For example:
|
16
|
+
# NAMED_WIDGET COLLECT_TYPE COMBOBOX NORMAL SPECIAL
|
17
|
+
# BUTTON 'Start Collect' 'cmd("INST COLLECT with TYPE #{get_named_widget("COLLECT_TYPE").text}")'
|
15
18
|
class ComboboxWidget < Qt::ComboBox
|
16
19
|
include Widget
|
17
20
|
|
@@ -26,5 +29,4 @@ module Cosmos
|
|
26
29
|
self.currentText
|
27
30
|
end
|
28
31
|
end
|
29
|
-
|
30
|
-
end # module Cosmos
|
32
|
+
end
|
@@ -12,7 +12,7 @@ require 'cosmos'
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/formatvalue_widget'
|
13
13
|
|
14
14
|
module Cosmos
|
15
|
-
# This class implements a value with configurable font values.
|
15
|
+
# This class implements a value with configurable font values. The font
|
16
16
|
# can also be updated after it is created.
|
17
17
|
# It inherits from the FormatvalueWidget class.
|
18
18
|
class FormatfontvalueWidget < FormatvalueWidget
|
@@ -17,19 +17,16 @@ require 'cosmos'
|
|
17
17
|
require 'cosmos/tools/tlm_viewer/widgets/value_widget'
|
18
18
|
|
19
19
|
module Cosmos
|
20
|
-
|
20
|
+
# Displays a formatted telemetry item done by sprintf using the format_string
|
21
21
|
class FormatvalueWidget < ValueWidget
|
22
|
-
|
23
|
-
def initialize (parent_layout, target_name, packet_name, item_name, format_string, value_type = :CONVERTED, characters = 12)
|
22
|
+
def initialize(parent_layout, target_name, packet_name, item_name, format_string, value_type = :CONVERTED, characters = 12)
|
24
23
|
super(parent_layout, target_name, packet_name, item_name, value_type, characters)
|
25
24
|
@format_string = format_string
|
26
25
|
end
|
27
26
|
|
28
|
-
def value=
|
27
|
+
def value=(data)
|
29
28
|
formatted_data = sprintf(@format_string, data)
|
30
29
|
super(formatted_data)
|
31
30
|
end
|
32
|
-
|
33
31
|
end
|
34
|
-
|
35
|
-
end # module Cosmos
|
32
|
+
end
|
@@ -12,16 +12,16 @@ require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/layout_widget'
|
13
13
|
|
14
14
|
module Cosmos
|
15
|
-
|
15
|
+
# Layout widget which layouts the enclosed widgets horizontally.
|
16
|
+
# Default spacing is 0 pixels.
|
16
17
|
class HorizontalWidget < Qt::HBoxLayout
|
17
18
|
include Widget
|
18
19
|
include LayoutWidget
|
19
20
|
|
20
|
-
def initialize(parent_layout = nil,
|
21
|
+
def initialize(parent_layout = nil, spacing = 0)
|
21
22
|
super()
|
22
|
-
setSpacing(
|
23
|
+
setSpacing(spacing.to_i)
|
23
24
|
parent_layout.addLayout(self) if parent_layout
|
24
25
|
end
|
25
26
|
end
|
26
|
-
|
27
|
-
end #module Cosmos
|
27
|
+
end
|
@@ -12,20 +12,19 @@ require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/layout_widget'
|
13
13
|
|
14
14
|
module Cosmos
|
15
|
-
|
16
|
-
#
|
17
|
-
#
|
15
|
+
# Layout widget which layouts the enclosed widgets horizontally
|
16
|
+
# in a visual box with header text.
|
17
|
+
# Default spacing is 0 pixels
|
18
18
|
class HorizontalboxWidget < Qt::HBoxLayout
|
19
19
|
include Widget
|
20
20
|
include LayoutWidget
|
21
21
|
|
22
|
-
def initialize(parent_layout, title = "",
|
22
|
+
def initialize(parent_layout, title = "", spacing = 0)
|
23
23
|
super()
|
24
24
|
box = Qt::GroupBox.new(title.to_s)
|
25
|
-
setSpacing(
|
25
|
+
setSpacing(spacing.to_i)
|
26
26
|
box.setLayout(self)
|
27
27
|
parent_layout.addWidget(box) if parent_layout
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
31
|
-
end # module Cosmos
|
30
|
+
end
|
@@ -11,7 +11,7 @@
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
12
12
|
|
13
13
|
module Cosmos
|
14
|
-
|
14
|
+
# Displays a sunken horizontal line
|
15
15
|
class HorizontallineWidget < Qt::Frame
|
16
16
|
include Widget
|
17
17
|
|
@@ -20,7 +20,5 @@ module Cosmos
|
|
20
20
|
setFrameStyle(Qt::Frame::HLine | Qt::Frame::Sunken)
|
21
21
|
parent_layout.addWidget(self) if parent_layout
|
22
22
|
end
|
23
|
-
|
24
23
|
end
|
25
|
-
|
26
|
-
end # module Cosmos
|
24
|
+
end
|
@@ -12,18 +12,20 @@ require 'cosmos'
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
13
13
|
|
14
14
|
module Cosmos
|
15
|
-
|
16
|
-
# LabelWidget class
|
17
|
-
#
|
15
|
+
# Displays a text label
|
18
16
|
class LabelWidget < Qt::Label
|
19
17
|
include Widget
|
20
18
|
|
21
|
-
def initialize(parent_layout, text)
|
19
|
+
def initialize(parent_layout, text, font_family = nil, point_size = nil, bold = nil, italic = false)
|
22
20
|
super()
|
23
|
-
|
21
|
+
font = self.font
|
22
|
+
font.setFamily(font_family) unless ConfigParser.handle_nil(font_family).nil?
|
23
|
+
font.setPointSize(point_size.to_i) unless ConfigParser.handle_nil(point_size).nil?
|
24
|
+
font.setBold(true) if bold == 'BOLD'
|
25
|
+
font.setItalic(true) if ConfigParser::handle_true_false(italic) == true
|
26
|
+
setFont(font)
|
27
|
+
self.text = text.to_s.remove_quotes
|
24
28
|
parent_layout.addWidget(self) if parent_layout
|
25
29
|
end
|
26
|
-
|
27
30
|
end
|
28
|
-
|
29
|
-
end # module Cosmos
|
31
|
+
end
|
@@ -15,7 +15,7 @@ require 'cosmos/tools/tlm_viewer/widgets/label_widget'
|
|
15
15
|
require 'cosmos/tools/tlm_viewer/widgets/formatvalue_widget'
|
16
16
|
|
17
17
|
module Cosmos
|
18
|
-
|
18
|
+
# Displays a LabelWidget followed by a FormatvalueWidget
|
19
19
|
class LabelformatvalueWidget < Qt::Widget
|
20
20
|
include Widget
|
21
21
|
include MultiWidget
|
@@ -35,5 +35,4 @@ module Cosmos
|
|
35
35
|
return true
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
39
|
-
end # module Cosmos
|
38
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
|
3
|
+
# Copyright 2014 Ball Aerospace & Technologies Corp.
|
4
|
+
# All Rights Reserved.
|
5
|
+
#
|
6
|
+
# This program is free software; you can modify and/or redistribute it
|
7
|
+
# under the terms of the GNU General Public License
|
8
|
+
# as published by the Free Software Foundation; version 3 with
|
9
|
+
# attribution addendums as found in the LICENSE.txt
|
10
|
+
|
11
|
+
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
12
|
+
require 'cosmos/tools/tlm_viewer/widgets/multi_widget'
|
13
|
+
require 'cosmos/tools/tlm_viewer/widgets/horizontal_widget'
|
14
|
+
require 'cosmos/tools/tlm_viewer/widgets/label_widget'
|
15
|
+
require 'cosmos/tools/tlm_viewer/widgets/led_widget'
|
16
|
+
|
17
|
+
module Cosmos
|
18
|
+
# Displays a LabelWidget followed by a LedWidget. The layout of the label with
|
19
|
+
# respect to the LED widget can be controlled by the align parameter.
|
20
|
+
class LabelledWidget < Qt::Widget
|
21
|
+
include Widget
|
22
|
+
include MultiWidget
|
23
|
+
|
24
|
+
def initialize(parent_layout, target_name, packet_name, item_name, value_type = :WITH_UNITS, width = 15, height = 15, align = 'split')
|
25
|
+
super(target_name, packet_name, item_name, value_type)
|
26
|
+
setLayout(Qt::HBoxLayout.new)
|
27
|
+
layout.setSpacing(5)
|
28
|
+
layout.setContentsMargins(0,0,0,0)
|
29
|
+
layout.addStretch(1) if align.downcase == 'right' || align.downcase == 'center'
|
30
|
+
@widgets << LabelWidget.new(layout, item_name.to_s + ':')
|
31
|
+
layout.addStretch(1) if align.downcase == 'split'
|
32
|
+
@widgets << LedWidget.new(layout, target_name, packet_name, item_name, value_type, width, height)
|
33
|
+
layout.addStretch(1) if align.downcase == 'left' || align.downcase == 'center'
|
34
|
+
parent_layout.addWidget(self) if parent_layout
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.takes_value?
|
38
|
+
return true
|
39
|
+
end
|
40
|
+
|
41
|
+
# Normally the user would have to use SUBSETTING to set the label and
|
42
|
+
# led parts of this widget but override set_setting so it's easier
|
43
|
+
def set_setting(setting_name, setting_values)
|
44
|
+
case setting_name.upcase
|
45
|
+
# Only apply TEXTALIGN to the value widget by default. It makes the label
|
46
|
+
# look weird when doing LEFT align which is the most common.
|
47
|
+
when 'TEXTALIGN'
|
48
|
+
@widgets[1].set_setting(setting_name, setting_values)
|
49
|
+
when 'TEXTCOLOR' # Apply this to both widgets automatically
|
50
|
+
@widgets[0].set_setting(setting_name, setting_values)
|
51
|
+
when /_COLOR/
|
52
|
+
@widgets[1].set_setting(setting_name, setting_values)
|
53
|
+
else
|
54
|
+
super(setting_name, setting_values)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -15,7 +15,7 @@ require 'cosmos/tools/tlm_viewer/widgets/label_widget'
|
|
15
15
|
require 'cosmos/tools/tlm_viewer/widgets/progressbar_widget'
|
16
16
|
|
17
17
|
module Cosmos
|
18
|
-
|
18
|
+
# Displays a LabelWidget followed by a ProgressbarWidget
|
19
19
|
class LabelprogressbarWidget < Qt::Widget
|
20
20
|
include Widget
|
21
21
|
include MultiWidget
|
@@ -26,7 +26,7 @@ module Cosmos
|
|
26
26
|
layout.setSpacing(0)
|
27
27
|
layout.setContentsMargins(0,0,0,0)
|
28
28
|
@widgets << LabelWidget.new(layout, item_name.to_s + ':')
|
29
|
-
@widgets << ProgressbarWidget.new(layout, target_name, packet_name, item_name, scale_factor, width)
|
29
|
+
@widgets << ProgressbarWidget.new(layout, target_name, packet_name, item_name, scale_factor, width, value_type)
|
30
30
|
parent_layout.addWidget(self) if parent_layout
|
31
31
|
end
|
32
32
|
|
@@ -34,5 +34,4 @@ module Cosmos
|
|
34
34
|
return true
|
35
35
|
end
|
36
36
|
end
|
37
|
-
|
38
|
-
end # module Cosmos
|
37
|
+
end
|
@@ -14,7 +14,7 @@ require 'cosmos/tools/tlm_viewer/widgets/label_widget'
|
|
14
14
|
require 'cosmos/tools/tlm_viewer/widgets/trendlimitsbar_widget'
|
15
15
|
|
16
16
|
module Cosmos
|
17
|
-
|
17
|
+
# Displays a LabelWidget indicating the telemetry item followed by a TrendlimitsbarWidget.
|
18
18
|
class LabeltrendlimitsbarWidget < Qt::Widget
|
19
19
|
include Widget
|
20
20
|
include MultiWidget
|
@@ -33,6 +33,4 @@ module Cosmos
|
|
33
33
|
return true
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
37
|
-
end # module Cosmos
|
38
|
-
|
36
|
+
end
|
@@ -15,7 +15,8 @@ require 'cosmos/tools/tlm_viewer/widgets/label_widget'
|
|
15
15
|
require 'cosmos/tools/tlm_viewer/widgets/value_widget'
|
16
16
|
|
17
17
|
module Cosmos
|
18
|
-
|
18
|
+
# Displays a LabelWidget followed by a ValueWidget. The layout of the label with
|
19
|
+
# respect to the value widget can be controlled by the align parameter.
|
19
20
|
class LabelvalueWidget < Qt::Widget
|
20
21
|
include Widget
|
21
22
|
include MultiWidget
|
@@ -14,9 +14,8 @@ require 'cosmos/tools/tlm_viewer/widgets/label_widget'
|
|
14
14
|
require 'cosmos/tools/tlm_viewer/widgets/value_widget'
|
15
15
|
|
16
16
|
module Cosmos
|
17
|
-
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# Displays a LabelWidget which contains the item's description (instead of its name)
|
18
|
+
# followed by a ValueWidget
|
20
19
|
class LabelvaluedescWidget < Qt::Widget
|
21
20
|
include Widget
|
22
21
|
include MultiWidget
|
@@ -38,5 +37,4 @@ module Cosmos
|
|
38
37
|
return true
|
39
38
|
end
|
40
39
|
end
|
41
|
-
|
42
|
-
end # module Cosmos
|
40
|
+
end
|
@@ -14,7 +14,7 @@ require 'cosmos/tools/tlm_viewer/widgets/labelvalue_widget'
|
|
14
14
|
require 'cosmos/tools/tlm_viewer/widgets/limitsbar_widget'
|
15
15
|
|
16
16
|
module Cosmos
|
17
|
-
|
17
|
+
# Displays a LabelvalueWidget followed by a LimitsbarWidget
|
18
18
|
class LabelvaluelimitsbarWidget < Qt::Widget
|
19
19
|
include Widget
|
20
20
|
include MultiWidget
|
@@ -33,5 +33,4 @@ module Cosmos
|
|
33
33
|
return true
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
37
|
-
end # module Cosmos
|
36
|
+
end
|
@@ -14,7 +14,7 @@ require 'cosmos/tools/tlm_viewer/widgets/labelvalue_widget'
|
|
14
14
|
require 'cosmos/tools/tlm_viewer/widgets/limitsbar_widget'
|
15
15
|
|
16
16
|
module Cosmos
|
17
|
-
|
17
|
+
# Vertically stacks a LabelWidget, LimitscolumnWidget, and ValueWidget
|
18
18
|
class LabelvaluelimitscolumnWidget < Qt::Widget
|
19
19
|
include Widget
|
20
20
|
include MultiWidget
|
@@ -34,5 +34,4 @@ module Cosmos
|
|
34
34
|
return true
|
35
35
|
end
|
36
36
|
end
|
37
|
-
|
38
|
-
end # module Cosmos
|
37
|
+
end
|
@@ -14,7 +14,7 @@ require 'cosmos/tools/tlm_viewer/widgets/labelvalue_widget'
|
|
14
14
|
require 'cosmos/tools/tlm_viewer/widgets/rangebar_widget'
|
15
15
|
|
16
16
|
module Cosmos
|
17
|
-
|
17
|
+
# Displays a LabelvalueWidget followed by a RangebarWidget
|
18
18
|
class LabelvaluerangebarWidget < Qt::Widget
|
19
19
|
include Widget
|
20
20
|
include MultiWidget
|
@@ -33,5 +33,4 @@ module Cosmos
|
|
33
33
|
return true
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
37
|
-
end # module Cosmos
|
36
|
+
end
|
@@ -15,7 +15,7 @@ require 'cosmos/tools/tlm_viewer/widgets/value_widget'
|
|
15
15
|
require 'cosmos/tools/tlm_viewer/widgets/rangecolumn_widget'
|
16
16
|
|
17
17
|
module Cosmos
|
18
|
-
|
18
|
+
# Vertically stacks a LabelWidget, RangecolumnWidgetk and ValueWidget
|
19
19
|
class LabelvaluerangecolumnWidget < Qt::Widget
|
20
20
|
include Widget
|
21
21
|
include MultiWidget
|
@@ -35,5 +35,4 @@ module Cosmos
|
|
35
35
|
return true
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
39
|
-
end # module Cosmos
|
38
|
+
end
|
@@ -9,9 +9,9 @@
|
|
9
9
|
# attribution addendums as found in the LICENSE.txt
|
10
10
|
|
11
11
|
module Cosmos
|
12
|
-
|
12
|
+
# Module to be included by all layout widgets which will add a class
|
13
|
+
# method named layout_manager? that returns true
|
13
14
|
module LayoutWidget
|
14
|
-
|
15
15
|
module ClassMethods
|
16
16
|
def layout_manager?
|
17
17
|
return true
|
@@ -28,7 +28,5 @@ module Cosmos
|
|
28
28
|
def complete
|
29
29
|
# Normally do nothing
|
30
30
|
end
|
31
|
-
|
32
31
|
end
|
33
|
-
|
34
|
-
end # module Cosmos
|
32
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
|
3
|
+
# Copyright 2014 Ball Aerospace & Technologies Corp.
|
4
|
+
# All Rights Reserved.
|
5
|
+
#
|
6
|
+
# This program is free software; you can modify and/or redistribute it
|
7
|
+
# under the terms of the GNU General Public License
|
8
|
+
# as published by the Free Software Foundation; version 3 with
|
9
|
+
# attribution addendums as found in the LICENSE.txt
|
10
|
+
|
11
|
+
require 'ostruct'
|
12
|
+
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
13
|
+
|
14
|
+
module Cosmos
|
15
|
+
# This class implements a LED which changes color based on telemetry values.
|
16
|
+
# By default TRUE is green and FALSE is red and all other values are black.
|
17
|
+
# Additional values can be added by using the LED_COLOR setting. For example:
|
18
|
+
# LED INST PARAMS VALUE3 RAW
|
19
|
+
# SETTING LED_COLOR 0 GREEN
|
20
|
+
# SETTING LED_COLOR 1 RED
|
21
|
+
# SETTING LED_COLOR ANY ORANGE # All other values are ORANGE
|
22
|
+
class LedWidget < Qt::Label
|
23
|
+
include Widget
|
24
|
+
|
25
|
+
def self.takes_value?
|
26
|
+
return true
|
27
|
+
end
|
28
|
+
|
29
|
+
@@brushes = {}
|
30
|
+
|
31
|
+
def initialize(parent_layout, target_name, packet_name, item_name, value_type = :CONVERTED, width = 15, height = 15)
|
32
|
+
super(target_name, packet_name, item_name, value_type)
|
33
|
+
@width = width.to_i
|
34
|
+
@height = height.to_i
|
35
|
+
# Add some sensible defaults, all others must be added using settings
|
36
|
+
@colors = {"TRUE" => "green", "FALSE" => "red"}
|
37
|
+
@painter = nil
|
38
|
+
@color = nil
|
39
|
+
@brush = nil
|
40
|
+
setFixedSize(width.to_i + 3, height.to_i + 3)
|
41
|
+
parent_layout.addWidget(self) if parent_layout
|
42
|
+
end
|
43
|
+
|
44
|
+
# Override set_setting so we can deconflict the LED_COLOR settings
|
45
|
+
# and allow the user to use it multiple times. By default each time
|
46
|
+
# a SETTING name is used it overrides the previous setting.
|
47
|
+
def set_setting(setting_name, setting_values)
|
48
|
+
if setting_name.upcase == 'LED_COLOR'
|
49
|
+
@settings["#{setting_name.upcase}_#{setting_values.join('_')}"] = setting_values
|
50
|
+
else
|
51
|
+
super(setting_name, setting_values)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def process_settings
|
56
|
+
super
|
57
|
+
@settings.each do |setting_name, setting_values|
|
58
|
+
begin
|
59
|
+
if setting_name =~ /^LED_COLOR/
|
60
|
+
@colors[setting_values[0]] = setting_values[1]
|
61
|
+
end
|
62
|
+
rescue => err
|
63
|
+
puts "Error Processing Settings!: #{err}"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def value=(data)
|
69
|
+
super(data)
|
70
|
+
@color = @colors[data.to_s] # Returns nil if not found
|
71
|
+
@color = @colors['ANY'] unless @color # Check for ANY value
|
72
|
+
@color = @color ? Cosmos::getColor(@color) : Cosmos::BLACK # default to black
|
73
|
+
@brush = @@brushes[@color]
|
74
|
+
unless @brush
|
75
|
+
gradient = Qt::RadialGradient.new(5, 5, 50, 5, 5)
|
76
|
+
gradient.setColorAt(0, @color)
|
77
|
+
gradient.setColorAt(1, Cosmos::BLACK)
|
78
|
+
@brush = Qt::Brush.new(gradient)
|
79
|
+
@@brushes[@color] = @brush
|
80
|
+
end
|
81
|
+
update() # Fire the paintEvent handler
|
82
|
+
end
|
83
|
+
|
84
|
+
def paintEvent(event)
|
85
|
+
begin
|
86
|
+
return if @painter
|
87
|
+
@painter = Qt::Painter.new(self)
|
88
|
+
@painter.setRenderHint(Qt::Painter::Antialiasing, true)
|
89
|
+
# Seems like on initialization sometimes we get some weird bad conditions so check for them
|
90
|
+
if @painter.isActive and @painter.paintEngine
|
91
|
+
paint_implementation(@painter)
|
92
|
+
end
|
93
|
+
@painter.dispose
|
94
|
+
@painter = nil
|
95
|
+
rescue Exception => err
|
96
|
+
Cosmos.handle_fatal_exception(err)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
protected
|
101
|
+
|
102
|
+
def paint_implementation(painter)
|
103
|
+
painter.setPen(Qt::NoPen)
|
104
|
+
painter.setBrush(@brush)
|
105
|
+
painter.drawEllipse(1, 1, @width, @height)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|