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
@@ -33,6 +33,7 @@ module Cosmos
|
|
33
33
|
|
34
34
|
UNTITLED = 'Untitled'
|
35
35
|
UNTITLED_TAB_TEXT = " #{UNTITLED} "
|
36
|
+
MAX_RECENT_FILES = 20
|
36
37
|
# Mapping of the human readable configuration name to an array containing the
|
37
38
|
# yaml file name and typical location of the configuration file
|
38
39
|
CONFIGURATION_FILES = {
|
@@ -47,6 +48,8 @@ module Cosmos
|
|
47
48
|
"Screen Definition" =>
|
48
49
|
["screen", "/config/targets/TARGET/screens/*.txt"],
|
49
50
|
"Separator" => [nil, nil],
|
51
|
+
"Command Sequence Configuration" =>
|
52
|
+
["cmd_sequence", "/config/tools/cmd_sequence/cmd_sequence.txt"],
|
50
53
|
"Data Viewer Configuration" =>
|
51
54
|
["data_viewer", "/config/tools/data_viewer/data_viewer.txt"],
|
52
55
|
"Handbook Creator Configuration" =>
|
@@ -100,13 +103,17 @@ module Cosmos
|
|
100
103
|
@file_new.statusTip = 'Start a new file'
|
101
104
|
@file_new.connect(SIGNAL('triggered()')) { file_new() }
|
102
105
|
|
106
|
+
@clear_file_open_recent = Qt::Action.new('&Clear Recent', self)
|
107
|
+
@clear_file_open_recent.statusTip = 'Clear the recently opened file list'
|
108
|
+
@clear_file_open_recent.connect(SIGNAL('triggered()')) { clear_file_open_recent() }
|
109
|
+
|
103
110
|
@file_close = Qt::Action.new('&Close', self)
|
104
111
|
@file_close_keyseq = Qt::KeySequence.new('Ctrl+W')
|
105
112
|
@file_close.shortcut = @file_close_keyseq
|
106
113
|
@file_close.statusTip = 'Close the file'
|
107
114
|
@file_close.connect(SIGNAL('triggered()')) { file_close() }
|
108
115
|
|
109
|
-
@file_reload = Qt::Action.new('&
|
116
|
+
@file_reload = Qt::Action.new('Re&load', self)
|
110
117
|
@file_reload_keyseq = Qt::KeySequence.new('Ctrl+R')
|
111
118
|
@file_reload.shortcut = @file_reload_keyseq
|
112
119
|
@file_reload.statusTip = 'Reload a file'
|
@@ -239,6 +246,20 @@ module Cosmos
|
|
239
246
|
@file_open.setIcon(Cosmos.get_icon('open.png'))
|
240
247
|
target_dirs_action(@file_open, File.join(Cosmos::USERPATH,'config'), '', method(:file_open))
|
241
248
|
|
249
|
+
@file_open_recent = @file_menu.addMenu('Open &Recent')
|
250
|
+
@file_open_recent.setIcon(Cosmos.get_icon('open.png'))
|
251
|
+
settings = Qt::Settings.new('Ball Aerospace', self.class.to_s)
|
252
|
+
if settings.contains('recent_files')
|
253
|
+
recent = settings.value('recent_files').toStringList()
|
254
|
+
recent.each do |filename|
|
255
|
+
action = Qt::Action.new(filename, self)
|
256
|
+
action.connect(SIGNAL('triggered()')) { open_filename(filename) }
|
257
|
+
@file_open_recent.addAction(action)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
@file_open_recent.addSeparator()
|
261
|
+
@file_open_recent.addAction(@clear_file_open_recent)
|
262
|
+
|
242
263
|
@file_menu.addAction(@file_close)
|
243
264
|
@file_menu.addAction(@file_reload)
|
244
265
|
@file_menu.addSeparator()
|
@@ -408,36 +429,67 @@ module Cosmos
|
|
408
429
|
# File->Open
|
409
430
|
def file_open(filename = nil)
|
410
431
|
if File.directory?(filename)
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
432
|
+
filenames = Qt::FileDialog.getOpenFileNames(self, "Select File(s)", filename, "COSMOS (*.rb *.txt);;All Files(*.*)")
|
433
|
+
else
|
434
|
+
filenames = [filename]
|
435
|
+
end
|
436
|
+
# Remove nils and convert filenames to UNIX path structure
|
437
|
+
filenames = filenames.compact.map {|filename| filename.gsub("\\","/") }
|
438
|
+
return if filenames.nil? || filenames.empty?
|
439
|
+
Qt::Application.setOverrideCursor(Qt::Cursor.new(Qt::WaitCursor))
|
440
|
+
filenames.each do |filename|
|
441
|
+
open_filename(filename)
|
442
|
+
|
443
|
+
found = false
|
444
|
+
@file_open_recent.actions.each do |action|
|
445
|
+
found = true if action.text == filename
|
423
446
|
end
|
447
|
+
next if found
|
448
|
+
action = Qt::Action.new(filename, self)
|
449
|
+
action.connect(SIGNAL('triggered()')) { open_filename(filename) }
|
450
|
+
@file_open_recent.insertAction(@file_open_recent.actions[0], action)
|
451
|
+
# Add 2 for the separator and Clear Recent action
|
452
|
+
if @file_open_recent.actions.length > (MAX_RECENT_FILES + 2)
|
453
|
+
@file_open_recent.removeAction(@file_open_recent.actions[-3]) # ignore last 2
|
454
|
+
end
|
455
|
+
end
|
456
|
+
update_tree()
|
457
|
+
Qt::Application.restoreOverrideCursor()
|
458
|
+
end
|
424
459
|
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
460
|
+
def clear_file_open_recent
|
461
|
+
# Subtract 2 for the separator and Clear Recent action
|
462
|
+
(@file_open_recent.actions.length - 2).times do
|
463
|
+
@file_open_recent.removeAction(@file_open_recent.actions[0])
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
def open_filename(filename)
|
468
|
+
# If the user opens a file we already have open
|
469
|
+
# just set the current tab to that file and return
|
470
|
+
@tab_book.tabs.each_with_index do |tab, index|
|
471
|
+
if tab.filename == filename
|
472
|
+
@tab_book.setCurrentIndex(index)
|
429
473
|
@tab_book.currentTab.set_text_from_file(filename)
|
430
474
|
@tab_book.currentTab.filename = filename
|
431
|
-
|
432
|
-
else
|
433
|
-
create_tab(filename)
|
475
|
+
return
|
434
476
|
end
|
477
|
+
end
|
435
478
|
|
436
|
-
|
437
|
-
|
438
|
-
|
479
|
+
if ((@tab_book.count == 1) &&
|
480
|
+
@tab_book.currentTab.filename.empty? &&
|
481
|
+
!@tab_book.currentTab.modified)
|
482
|
+
# Active Tab is an unmodified Untitled so just open the file in it
|
483
|
+
@tab_book.currentTab.set_text_from_file(filename)
|
484
|
+
@tab_book.currentTab.filename = filename
|
485
|
+
@tab_book.setTabText(@tab_book.currentIndex, File.basename(filename))
|
486
|
+
else
|
487
|
+
create_tab(filename)
|
439
488
|
end
|
440
|
-
|
489
|
+
|
490
|
+
update_title()
|
491
|
+
@procedure_dir = File.dirname(filename)
|
492
|
+
@procedure_dir << '/' if @procedure_dir[-1..-1] != '/' and @procedure_dir[-1..-1] != '\\'
|
441
493
|
end
|
442
494
|
|
443
495
|
# File->Reload
|
@@ -615,6 +667,10 @@ module Cosmos
|
|
615
667
|
|
616
668
|
def closeEvent(event)
|
617
669
|
if prompt_for_save_if_needed_on_close()
|
670
|
+
settings = Qt::Settings.new('Ball Aerospace', self.class.to_s)
|
671
|
+
recent_files = @file_open_recent.actions.collect {|action| action.text }
|
672
|
+
# Ignore the last 2 because of the separator and Clear Recent action
|
673
|
+
settings.setValue('recent_files', Qt::Variant.new(recent_files[0..-3]))
|
618
674
|
super(event)
|
619
675
|
else
|
620
676
|
event.ignore()
|
@@ -249,6 +249,8 @@ module Cosmos
|
|
249
249
|
elsif @filename.include?('/config/tools/')
|
250
250
|
if @filename.include?('cmd_tlm_server')
|
251
251
|
@file_type = "Server Configuration"
|
252
|
+
elsif @filename.include?('cmd_sequence')
|
253
|
+
@file_type = "Command Sequence Configuration"
|
252
254
|
elsif @filename.include?('data_viewer')
|
253
255
|
@file_type = "Data Viewer Configuration"
|
254
256
|
elsif @filename.include?('handbook_creator')
|
@@ -20,12 +20,14 @@ Cosmos.catch_fatal_exception do
|
|
20
20
|
require 'cosmos/gui/widgets/realtime_button_bar'
|
21
21
|
require 'cosmos/tools/data_viewer/data_viewer_component'
|
22
22
|
require 'cosmos/tools/data_viewer/dump_component'
|
23
|
+
require 'cosmos/tools/data_viewer/text_component'
|
23
24
|
require 'cosmos/config/config_parser'
|
24
25
|
require 'cosmos/script'
|
25
26
|
end
|
26
27
|
|
27
28
|
module Cosmos
|
28
|
-
|
29
|
+
# Displays data in text format. Useful for telemetry that doesn't work well with
|
30
|
+
# telemetry screens such as memory dumps or large amounts of text.
|
29
31
|
class DataViewer < QtTool
|
30
32
|
slots 'context_menu(const QPoint&)'
|
31
33
|
slots 'handle_tab_change(int)'
|
@@ -80,7 +82,8 @@ module Cosmos
|
|
80
82
|
component.initialize_gui
|
81
83
|
@tab_book.addTab(component, component.tab_name)
|
82
84
|
end
|
83
|
-
if
|
85
|
+
toggle_replay_mode() if options.replay
|
86
|
+
if @auto_start || options.start
|
84
87
|
handle_start()
|
85
88
|
end
|
86
89
|
ConfigParser.splash = nil
|
@@ -767,17 +770,20 @@ module Cosmos
|
|
767
770
|
options.width = 550
|
768
771
|
options.height = 500
|
769
772
|
options.title = "Data Viewer"
|
770
|
-
options.
|
773
|
+
options.start = false
|
774
|
+
options.replay = false
|
775
|
+
options.config_file = true # config_file is required
|
771
776
|
option_parser.separator "Data Viewer Specific Options:"
|
772
|
-
option_parser.on("-
|
773
|
-
options.
|
777
|
+
option_parser.on("-s", "--start", "Start processing immediately") do |arg|
|
778
|
+
options.start = true
|
779
|
+
end
|
780
|
+
option_parser.on("--replay", "Start Data Viewer in Replay mode") do
|
781
|
+
options.replay = true
|
774
782
|
end
|
775
783
|
end
|
776
784
|
|
777
785
|
super(option_parser, options)
|
778
786
|
end
|
779
787
|
end
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
end # module Cosmos
|
788
|
+
end
|
789
|
+
end
|
@@ -12,13 +12,8 @@ require 'cosmos'
|
|
12
12
|
require 'cosmos/tools/data_viewer/data_viewer_component'
|
13
13
|
|
14
14
|
module Cosmos
|
15
|
-
|
16
|
-
# DumpComponent class
|
17
|
-
#
|
18
|
-
# This class displays packets as raw hex values
|
19
|
-
#
|
15
|
+
# Displays packets as raw hex values
|
20
16
|
class DumpComponent < DataViewerComponent
|
21
|
-
|
22
17
|
# Processes the given packet. No gui interaction should be done in this
|
23
18
|
# method. Override this method for other components.
|
24
19
|
def process_packet (packet)
|
@@ -35,7 +30,5 @@ module Cosmos
|
|
35
30
|
@processed_queue << processed_text
|
36
31
|
end
|
37
32
|
end
|
38
|
-
|
39
33
|
end
|
40
|
-
|
41
|
-
end # module Cosmos
|
34
|
+
end
|
@@ -0,0 +1,77 @@
|
|
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'
|
12
|
+
require 'cosmos/tools/data_viewer/data_viewer_component'
|
13
|
+
|
14
|
+
module Cosmos
|
15
|
+
# Displays strings from a telemetry item. To use this in a script
|
16
|
+
# you can call with inject_tlm("TGT", "PKT", "ITEM": "<R>Error text")
|
17
|
+
# or pass a color with inject_tlm("TGT", "PKT", "ITEM": "<grey>Error text")
|
18
|
+
# The color is in brackets and can be B, G, Y, R for COSMOS blue, green
|
19
|
+
# yellow and red or simply a color name recognized by Qt.
|
20
|
+
class TextComponent < DataViewerComponent
|
21
|
+
# @param parent [Qt::Widget] Parent widget
|
22
|
+
# @param tab_name [String] Name of the tab which displays this widget
|
23
|
+
# @param item_name [String] Name of the item to read from the packet
|
24
|
+
def initialize(parent, tab_name, item_name)
|
25
|
+
super(parent, tab_name)
|
26
|
+
@item_name = item_name
|
27
|
+
end
|
28
|
+
|
29
|
+
# Override the update_gui to display the text
|
30
|
+
def update_gui
|
31
|
+
begin
|
32
|
+
loop do
|
33
|
+
latest = @processed_queue.pop(true)
|
34
|
+
# Check for optional formatted date followed by COSMOS color <G>,<Y>,<R>,<B>
|
35
|
+
# Regex notes:
|
36
|
+
# ?: makes the optional date a non-matching group
|
37
|
+
# The \d+ after the dot matches subseconds which is followed by a space.
|
38
|
+
# The whole date match is optional if there is no packet.received_time.
|
39
|
+
# The matching group surrounds the GYRB single character set.
|
40
|
+
if match = latest.match(/^(?:\d{4}\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+ )?<([GYRB])>/)
|
41
|
+
case match.captures[0]
|
42
|
+
when 'G'
|
43
|
+
color = Cosmos::GREEN
|
44
|
+
when 'Y'
|
45
|
+
color = Cosmos::YELLOW
|
46
|
+
when 'R'
|
47
|
+
color = Cosmos::RED
|
48
|
+
when 'B'
|
49
|
+
color = Cosmos::BLUE
|
50
|
+
end
|
51
|
+
@text.appendText(latest.sub(/<.*?>/,''), color)
|
52
|
+
# Check for optional formatted date followed by color name
|
53
|
+
# See Regex notes above for more information. Note that the .*? makes the match
|
54
|
+
# inside the parens non greedy so it matches the first close bracket '>'
|
55
|
+
elsif match = latest.match(/^(?:\d{4}\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+ )?<(.*?)>/)
|
56
|
+
@text.appendText(latest.sub(/<.*?>/,''), Cosmos.getColor(match.captures[0]))
|
57
|
+
else # add black text
|
58
|
+
@text.appendText(latest)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
rescue ThreadError
|
62
|
+
# Nothing to do
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Add the time and the item to the queue
|
67
|
+
def process_packet(packet)
|
68
|
+
processed_text = ''
|
69
|
+
processed_text << "#{packet.received_time.formatted} " if packet.received_time
|
70
|
+
processed_text << packet.read(@item_name)
|
71
|
+
# Ensure that queue does not grow infinitely while paused
|
72
|
+
if @processed_queue.length < 1000
|
73
|
+
@processed_queue << processed_text
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -17,12 +17,10 @@ Cosmos.catch_fatal_exception do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
module Cosmos
|
20
|
-
|
21
20
|
# Creates command and telemetry handbooks from the COSMOS definitions in
|
22
21
|
# both HTML and PDF format.
|
23
22
|
class HandbookCreator < QtTool
|
24
|
-
|
25
|
-
def initialize (options)
|
23
|
+
def initialize(options)
|
26
24
|
super(options) # MUST BE FIRST - All code before super is executed twice in RubyQt Based classes
|
27
25
|
Cosmos.load_cosmos_icon("handbook_creator.png")
|
28
26
|
|
@@ -40,6 +38,7 @@ module Cosmos
|
|
40
38
|
end
|
41
39
|
end
|
42
40
|
|
41
|
+
# Create the application menu actions
|
43
42
|
def initialize_actions
|
44
43
|
super()
|
45
44
|
@hide_ignored_action = Qt::Action.new('&Hide Ignored Items', self)
|
@@ -48,44 +47,26 @@ module Cosmos
|
|
48
47
|
@hide_ignored_action.statusTip = 'Do not include ignored items in command and telemetry handbooks'
|
49
48
|
@hide_ignored_action.setCheckable(true)
|
50
49
|
@hide_ignored_action.setChecked(false)
|
50
|
+
|
51
|
+
@copy_assets_action = Qt::Action.new('&Copy Assets to Output', self)
|
52
|
+
@copy_assets_action.statusTip = 'Copy the default assets to the output directory'
|
53
|
+
@copy_assets_action.connect(SIGNAL('triggered()')) { copy_assets(true) }
|
51
54
|
end
|
52
55
|
|
56
|
+
# Create the application menus and add the actions to the menu
|
53
57
|
def initialize_menus
|
54
|
-
# File Menu
|
55
58
|
@file_menu = menuBar.addMenu('&File')
|
56
59
|
@file_menu.addAction(@hide_ignored_action)
|
60
|
+
@file_menu.addAction(@copy_assets_action)
|
57
61
|
@file_menu.addAction(@exit_action)
|
58
62
|
|
59
|
-
# Help Menu
|
60
63
|
@about_string = "Handbook Creator creates Command and Telemetry Handbooks"
|
61
64
|
initialize_help_menu()
|
62
65
|
end
|
63
66
|
|
64
|
-
|
65
|
-
|
66
|
-
ProgressDialog.execute(self, 'PDF Creation Progress', 700, 600, true, false, true, true, false) do |progress_dialog|
|
67
|
-
begin
|
68
|
-
success = @config.create_pdf(hide_ignored, progress_dialog)
|
69
|
-
if success
|
70
|
-
msg = "\n\n"
|
71
|
-
msg << "HTML and " if both
|
72
|
-
msg << "PDF Handbooks created successfully"
|
73
|
-
progress_dialog.append_text(msg)
|
74
|
-
else
|
75
|
-
progress_dialog.append_text("\nPDF Handbooks could not be created.\n\nIs wkhtmltopdf in your PATH and are all existing pdfs closed?\n\nUsing version 0.11.0_rc1 of wkhtmltox is recommended which can be found at: http://download.gna.org/wkhtmltopdf/obsolete/\n\nVersion 0.12.x has shown issues with Handbook Creator's default templates.")
|
76
|
-
end
|
77
|
-
rescue => error
|
78
|
-
progress_dialog.append_text("\n\nError processing:\n#{error.formatted}")
|
79
|
-
ensure
|
80
|
-
progress_dialog.complete
|
81
|
-
end
|
82
|
-
end
|
83
|
-
rescue Exception => err
|
84
|
-
Cosmos.handle_critical_exception(err)
|
85
|
-
end
|
86
|
-
|
67
|
+
# Create the application with several buttons to create handbooks (HTML & PDF)
|
68
|
+
# and open the generated HTML output in a browser.
|
87
69
|
def initialize_central_widget
|
88
|
-
# Create the central widget
|
89
70
|
@central_widget = Qt::Widget.new
|
90
71
|
setCentralWidget(@central_widget)
|
91
72
|
|
@@ -95,6 +76,7 @@ module Cosmos
|
|
95
76
|
@html_button.setStyleSheet("text-align:left")
|
96
77
|
@html_button.connect(SIGNAL('clicked()')) do
|
97
78
|
begin
|
79
|
+
copy_assets()
|
98
80
|
@config.create_html(@hide_ignored_action.isChecked)
|
99
81
|
Qt::MessageBox.information(self, 'Done', 'HTML Handbooks created successfully')
|
100
82
|
rescue Exception => err
|
@@ -106,6 +88,7 @@ module Cosmos
|
|
106
88
|
@pdf_button = Qt::PushButton.new(Cosmos.get_icon('pdf-32.png'), 'Create PDF Handbooks')
|
107
89
|
@pdf_button.setStyleSheet("text-align:left")
|
108
90
|
@pdf_button.connect(SIGNAL('clicked()')) do
|
91
|
+
copy_assets()
|
109
92
|
create_pdfs(false, @hide_ignored_action.isChecked)
|
110
93
|
end
|
111
94
|
@top_layout.addWidget(@pdf_button)
|
@@ -114,6 +97,7 @@ module Cosmos
|
|
114
97
|
@html_pdf_button.setStyleSheet("text-align:left")
|
115
98
|
@html_pdf_button.connect(SIGNAL('clicked()')) do
|
116
99
|
begin
|
100
|
+
copy_assets()
|
117
101
|
@config.create_html(@hide_ignored_action.isChecked)
|
118
102
|
create_pdfs(true, @hide_ignored_action.isChecked)
|
119
103
|
rescue Exception => err
|
@@ -136,21 +120,63 @@ module Cosmos
|
|
136
120
|
@central_widget.setLayout(@top_layout)
|
137
121
|
end
|
138
122
|
|
139
|
-
#
|
123
|
+
# Copy the assets (css, fonts, images, javascript) from the project config directory
|
124
|
+
# into the outputs/handbooks directory. When called as a part of generating the output
|
125
|
+
# files this copy will not occur if the assets directory already exists in case it has
|
126
|
+
# been modified by the user. This is also called from a menu option which can copy over
|
127
|
+
# existing output assets if permitted by the user.
|
128
|
+
def copy_assets(menu_request = false)
|
129
|
+
source_path = File.join(::Cosmos::USERPATH,'config','tools','handbook_creator','assets')
|
130
|
+
output_path = File.join(System.paths['HANDBOOKS'], 'assets')
|
131
|
+
if menu_request
|
132
|
+
if File.exist?(output_path)
|
133
|
+
if Qt::MessageBox.warning(self, "Warning!", "#{output_path} already exists. Overwrite?",
|
134
|
+
Qt::MessageBox::Yes | Qt::MessageBox::No) == Qt::MessageBox::No
|
135
|
+
return
|
136
|
+
else
|
137
|
+
FileUtils.cp_r(source_path, System.paths['HANDBOOKS'])
|
138
|
+
end
|
139
|
+
else
|
140
|
+
FileUtils.cp_r(source_path, System.paths['HANDBOOKS'])
|
141
|
+
end
|
142
|
+
else
|
143
|
+
FileUtils.cp_r(source_path, System.paths['HANDBOOKS']) unless File.exist?(output_path)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Create the PDFs inside a progress dialog as this action takes a significant amount of time
|
148
|
+
def create_pdfs(both, hide_ignored)
|
149
|
+
success = false
|
150
|
+
ProgressDialog.execute(self, 'PDF Creation Progress', 700, 600, true, false, true, true, false) do |progress_dialog|
|
151
|
+
begin
|
152
|
+
success = @config.create_pdf(hide_ignored, progress_dialog)
|
153
|
+
if success
|
154
|
+
msg = "\n\n"
|
155
|
+
msg << "HTML and " if both
|
156
|
+
msg << "PDF Handbooks created successfully"
|
157
|
+
progress_dialog.append_text(msg)
|
158
|
+
else
|
159
|
+
progress_dialog.append_text("\nPDF Handbooks could not be created.\n\nIs wkhtmltopdf in your PATH and are all existing pdfs closed?\n\nUsing version 0.11.0_rc1 of wkhtmltox is recommended which can be found at: http://download.gna.org/wkhtmltopdf/obsolete/\n\nVersion 0.12.x has shown issues with Handbook Creator's default templates.")
|
160
|
+
end
|
161
|
+
rescue => error
|
162
|
+
progress_dialog.append_text("\n\nError processing:\n#{error.formatted}")
|
163
|
+
ensure
|
164
|
+
progress_dialog.complete
|
165
|
+
end
|
166
|
+
end
|
167
|
+
rescue Exception => err
|
168
|
+
Cosmos.handle_critical_exception(err)
|
169
|
+
end
|
170
|
+
|
140
171
|
def self.run(option_parser = nil, options = nil)
|
141
172
|
Cosmos.catch_fatal_exception do
|
142
173
|
unless option_parser and options
|
143
174
|
option_parser, options = create_default_options()
|
144
175
|
options.title = "Handbook Creator"
|
145
|
-
options.config_file =
|
146
|
-
option_parser.on("-c", "--config FILE", "Use the specified configuration file") do |arg|
|
147
|
-
options.config_file = File.join(Cosmos::USERPATH, 'config', 'tools', 'handbook_creator', arg)
|
148
|
-
end
|
176
|
+
options.config_file = true # config_file is required
|
149
177
|
end
|
150
178
|
super(option_parser, options)
|
151
179
|
end
|
152
180
|
end
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
end # module Cosmos
|
181
|
+
end
|
182
|
+
end
|