cosmos 3.9.2 → 4.0.0
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/.rubocop.yml +23 -0
- data/.travis.yml +1 -0
- data/.yardopts +3 -0
- data/Gemfile +1 -1
- data/Manifest.txt +137 -52
- data/Rakefile +50 -44
- data/autohotkey/config/system/system.txt +0 -5
- data/autohotkey/config/targets/INST/cmd_tlm/inst_cmds.txt +6 -1
- data/autohotkey/config/targets/INST/screens/extra.txt +19 -0
- data/autohotkey/config/targets/INST/sequences/run_sequence.txt +1 -0
- data/autohotkey/config/targets/META/screens/data.txt +12 -0
- data/autohotkey/config/targets/SYSTEM/cmd_tlm/meta_cmd_tlm.txt +16 -0
- data/autohotkey/config/targets/{COSMOS/cmd_tlm/cosmos_server_cmds.txt → SYSTEM/cmd_tlm/system_cmds.txt} +8 -8
- data/autohotkey/config/targets/SYSTEM/cmd_tlm/system_tlm.txt +7 -0
- data/autohotkey/config/targets/SYSTEM/screens/limits_change.txt +14 -0
- data/autohotkey/config/targets/SYSTEM/screens/meta.txt +14 -0
- data/autohotkey/config/targets/SYSTEM/target.txt +12 -0
- data/autohotkey/config/tools/cmd_tlm_server/cmd_tlm_server.txt +2 -2
- data/autohotkey/config/tools/test_runner/test_runner2.txt +1 -1
- data/autohotkey/tools/CmdSequence +14 -0
- data/autohotkey/tools/CmdSequenceAHK +23 -0
- data/autohotkey/tools/CmdSequenceAHK2 +16 -0
- data/autohotkey/tools/cmd_extractor.ahk +2 -2
- data/autohotkey/tools/cmd_sender.ahk +4 -6
- data/autohotkey/tools/cmd_sequence.ahk +215 -0
- data/autohotkey/tools/cmd_sequence2.ahk +23 -0
- data/autohotkey/tools/data_viewer.ahk +2 -3
- data/autohotkey/tools/limits_monitor.ahk +9 -11
- data/autohotkey/tools/open_gl_builder.ahk +1 -2
- data/autohotkey/tools/packet_viewer.ahk +51 -35
- data/autohotkey/tools/replay.ahk +1 -2
- data/autohotkey/tools/script_runner.ahk +1 -2
- data/autohotkey/tools/script_runner2.ahk +1 -2
- data/autohotkey/tools/test_runner2.ahk +1 -5
- data/autohotkey/tools/test_runner3.ahk +1 -3
- data/autohotkey/tools/tlm_grapher.ahk +1 -3
- data/autohotkey/tools/tlm_grapher3.ahk +1 -2
- data/autohotkey/tools/tlm_viewer.ahk +8 -3
- data/autohotkey/tools/tlm_viewer2.ahk +2 -3
- data/autohotkey/tools/tlm_viewer5.ahk +1 -2
- data/cosmos.gemspec +26 -20
- data/data/cmd_sequence.png +0 -0
- data/data/config/_array_params.yaml +23 -0
- data/data/config/_id_items.yaml +24 -0
- data/data/config/_id_params.yaml +58 -0
- data/data/config/_interfaces.yaml +206 -0
- data/data/config/_items.yaml +20 -0
- data/data/config/_params.yaml +58 -0
- data/data/config/cmd_tlm_server.yaml +110 -0
- data/data/config/command.yaml +38 -0
- data/data/config/command_modifiers.yaml +127 -0
- data/data/config/command_telemetry.yaml +3 -0
- data/data/config/data_viewer.yaml +43 -0
- data/data/config/handbook_creator.yaml +23 -0
- data/data/config/housekeeping_params.yaml +71 -0
- data/data/config/interface_modifiers.yaml +44 -0
- data/data/config/item_modifiers.yaml +172 -0
- data/data/config/launcher.yaml +117 -0
- data/data/config/limits_monitor.yaml +53 -0
- data/data/config/linegraph_params.yaml +30 -0
- data/data/config/linegraph_plot.yaml +106 -0
- data/data/config/page_modifiers.yaml +128 -0
- data/data/config/param_item_modifiers.yaml +41 -0
- data/data/config/parameter_modifiers.yaml +144 -0
- data/data/config/protocols.yaml +257 -0
- data/data/config/screen.yaml +151 -0
- data/data/config/script_runner.yaml +15 -0
- data/data/config/system.yaml +153 -0
- data/data/config/table_manager.yaml +76 -0
- data/data/config/table_parameter_modifiers.yaml +9 -0
- data/data/config/target.yaml +71 -0
- data/data/config/telemetry.yaml +73 -0
- data/data/config/telemetry_modifiers.yaml +129 -0
- data/data/config/test_runner.yaml +118 -0
- data/data/config/tlm_extractor.yaml +109 -0
- data/data/config/tlm_grapher.yaml +78 -0
- data/data/config/tlm_viewer.yaml +107 -0
- data/data/config/unknown.yaml +3 -0
- data/data/config/widgets.yaml +1339 -0
- data/data/config/xy_params.yaml +50 -0
- data/data/config/xy_plot.yaml +12 -0
- data/data/config_editor.png +0 -0
- data/data/crc.txt +172 -161
- data/data/delete.png +0 -0
- data/demo/config/data/crc.txt +56 -36
- data/demo/config/data/meta_init.txt +1 -4
- data/demo/config/system/system.txt +15 -3
- data/demo/config/system/system2.txt +13 -3
- data/demo/config/targets/EXAMPLE/lib/example_interface.rb +2 -6
- data/demo/config/targets/EXAMPLE/target.txt +3 -1
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -0
- data/demo/config/targets/INST/lib/inst_dump_component.rb +34 -0
- data/demo/config/targets/INST/screens/adcs.txt +39 -15
- data/demo/config/targets/INST/screens/commanding.txt +26 -19
- data/demo/config/targets/INST/screens/spacing_box.txt +44 -0
- data/demo/config/targets/INST/screens/spacing_grid.txt +78 -0
- data/demo/config/targets/INST/screens/tabs.txt +0 -2
- data/demo/config/targets/INST/sequences/sequence.tsv +3 -0
- data/demo/config/targets/INST/tables/EventAction.csv +9 -0
- data/demo/config/targets/INST/tables/EventAction.dat +0 -0
- data/demo/config/targets/INST/tables/McConfigTable.csv +20 -0
- data/demo/config/targets/INST/tables/McConfigTable.dat +0 -0
- data/demo/config/targets/INST/target.txt +4 -0
- data/demo/config/targets/INST/tools/data_viewer/data_viewer.txt +2 -0
- data/demo/config/targets/INST/tools/data_viewer/data_viewer2.txt +2 -0
- data/demo/config/targets/INST/tools/table_manager/EventAction_def.txt +6 -0
- data/demo/config/targets/INST/tools/table_manager/McConfigTable_def.txt +38 -0
- data/demo/config/targets/SYSTEM/cmd_tlm/limits_groups.txt +7 -3
- data/demo/config/targets/SYSTEM/cmd_tlm/meta_cmd_tlm.txt +16 -0
- data/demo/config/targets/{COSMOS/cmd_tlm/cosmos_server_cmds.txt → SYSTEM/cmd_tlm/system_cmds.txt} +8 -8
- data/demo/config/targets/SYSTEM/cmd_tlm/system_tlm.txt +7 -0
- data/demo/config/targets/{COSMOS → SYSTEM}/cmd_tlm_server.txt +2 -2
- data/demo/config/targets/SYSTEM/lib/limits_groups.rb +39 -0
- data/demo/config/targets/SYSTEM/screens/status.txt +1 -1
- data/demo/config/targets/SYSTEM/target.txt +12 -0
- data/demo/config/targets/TEMPLATED/cmd_tlm_server.txt +1 -1
- data/demo/config/targets/TEMPLATED/lib/templated_interface.rb +8 -5
- data/demo/config/targets/TEMPLATED/target.txt +2 -0
- data/demo/config/tools/cmd_tlm_server/cmd_tlm_server.txt +15 -6
- data/demo/config/tools/cmd_tlm_server/cmd_tlm_server2.txt +13 -5
- data/demo/config/tools/data_viewer/data_viewer.txt +9 -0
- data/demo/config/tools/launcher/launcher.txt +9 -6
- data/demo/config/tools/launcher/launcher2.txt +16 -13
- data/demo/config/tools/launcher/launcher_mini.txt +45 -0
- data/demo/config/tools/table_manager/MCConfigurationTable_fsw1_def.txt +12 -11
- data/demo/config/tools/table_manager/MCConfigurationTable_fsw2_def.txt +12 -11
- data/demo/config/tools/test_runner/test_runner.txt +1 -1
- data/demo/config/tools/tlm_viewer/tlm_viewer.txt +5 -5
- data/demo/lib/example_background_task.rb +9 -5
- data/demo/lib/example_target.rb +5 -15
- data/demo/lib/scpi_target.rb +4 -10
- data/demo/procedures/cosmos_api_test.rb +17 -0
- data/demo/tools/CmdSequence +16 -0
- data/demo/tools/CmdSequence.bat +9 -0
- data/demo/tools/ConfigEditor +16 -0
- data/demo/tools/ConfigEditor.bat +9 -0
- data/demo/tools/mac/CmdSequence.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/CmdSequence.app/Contents/MacOS/CmdSequence.rb +16 -0
- data/demo/tools/mac/CmdSequence.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/CmdSequence.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/CmdSequence.app/Contents/Resources/appIcon.icns +0 -0
- data/ext/cosmos/ext/packet/packet.c +5 -5
- data/install/config/data/crc.txt +12 -8
- data/install/config/system/system.txt +13 -3
- data/install/config/targets/SYSTEM/cmd_tlm/meta_cmd_tlm.txt +14 -0
- data/install/config/targets/SYSTEM/target.txt +12 -0
- data/install/tools/CmdSequence +16 -0
- data/install/tools/CmdSequence.bat +9 -0
- data/install/tools/ConfigEditor +16 -0
- data/install/tools/ConfigEditor.bat +9 -0
- data/install/tools/mac/CmdSequence.app/Contents/Info.plist +38 -0
- data/install/tools/mac/CmdSequence.app/Contents/MacOS/CmdSequence.rb +16 -0
- data/install/tools/mac/CmdSequence.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/CmdSequence.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/CmdSequence.app/Contents/Resources/appIcon.icns +0 -0
- data/lib/cosmos.rb +1 -1
- data/lib/cosmos/config/config_parser.rb +147 -59
- data/lib/cosmos/config/meta_config_parser.rb +57 -0
- data/lib/cosmos/conversions/polynomial_conversion.rb +20 -4
- data/lib/cosmos/conversions/unix_time_conversion.rb +4 -4
- data/lib/cosmos/core_ext/array.rb +45 -5
- data/lib/cosmos/core_ext/cosmos_io.rb +31 -15
- data/lib/cosmos/core_ext/file.rb +2 -2
- data/lib/cosmos/core_ext/kernel.rb +1 -6
- data/lib/cosmos/core_ext/objectspace.rb +0 -2
- data/lib/cosmos/core_ext/string.rb +27 -4
- data/lib/cosmos/core_ext/time.rb +39 -10
- data/lib/cosmos/gui/choosers/combobox_chooser.rb +37 -26
- data/lib/cosmos/gui/choosers/file_chooser.rb +23 -6
- data/lib/cosmos/gui/choosers/float_chooser.rb +13 -11
- data/lib/cosmos/gui/choosers/integer_chooser.rb +13 -11
- data/lib/cosmos/gui/choosers/string_chooser.rb +18 -36
- data/lib/cosmos/gui/choosers/telemetry_chooser.rb +64 -64
- data/lib/cosmos/gui/choosers/value_chooser.rb +15 -15
- data/lib/cosmos/gui/dialogs/about_dialog.rb +18 -13
- data/lib/cosmos/gui/dialogs/calendar_dialog.rb +11 -3
- data/lib/cosmos/gui/dialogs/cmd_tlm_raw_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/details_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/exception_dialog.rb +7 -7
- data/lib/cosmos/gui/dialogs/find_replace_dialog.rb +20 -15
- data/lib/cosmos/gui/dialogs/interface_raw_dialog.rb +143 -0
- data/lib/cosmos/gui/dialogs/legal_dialog.rb +6 -5
- data/lib/cosmos/gui/dialogs/packet_log_dialog.rb +5 -2
- data/lib/cosmos/gui/dialogs/progress_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/pry_dialog.rb +4 -4
- data/lib/cosmos/gui/dialogs/scroll_text_dialog.rb +3 -0
- data/lib/cosmos/gui/dialogs/set_tlm_dialog.rb +7 -6
- data/lib/cosmos/gui/dialogs/splash.rb +1 -1
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/tlm_graph_dialog.rb +114 -0
- data/lib/cosmos/gui/line_graph/line_graph.rb +9 -10
- data/lib/cosmos/gui/line_graph/line_graph_dialog.rb +7 -5
- data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +3 -7
- data/lib/cosmos/gui/line_graph/line_graph_popups.rb +3 -8
- data/lib/cosmos/gui/line_graph/line_graph_scaling.rb +2 -7
- data/lib/cosmos/gui/line_graph/overview_graph.rb +6 -1
- data/lib/cosmos/gui/opengl/earth_model.rb +6 -3
- data/lib/cosmos/gui/opengl/gl_bounds.rb +11 -23
- data/lib/cosmos/gui/opengl/gl_light.rb +3 -4
- data/lib/cosmos/gui/opengl/gl_material.rb +3 -4
- data/lib/cosmos/gui/opengl/gl_scene.rb +10 -4
- data/lib/cosmos/gui/opengl/gl_shape.rb +6 -2
- data/lib/cosmos/gui/opengl/gl_viewer.rb +5 -5
- data/lib/cosmos/gui/opengl/gl_viewport.rb +11 -12
- data/lib/cosmos/gui/opengl/moon_model.rb +6 -3
- data/lib/cosmos/gui/opengl/stl_reader.rb +8 -9
- data/lib/cosmos/gui/opengl/stl_shape.rb +4 -5
- data/lib/cosmos/gui/opengl/texture_mapped_sphere.rb +7 -7
- data/lib/cosmos/gui/qt.rb +1 -1
- data/lib/cosmos/gui/qt_tool.rb +21 -10
- data/lib/cosmos/gui/text/completion.rb +23 -2
- data/lib/cosmos/gui/text/completion_text_edit.rb +38 -23
- data/lib/cosmos/gui/utilities/analyze_log.rb +1 -1
- data/lib/cosmos/gui/utilities/screenshot.rb +2 -2
- data/lib/cosmos/gui/widgets/full_text_search_line_edit.rb +11 -1
- data/lib/cosmos/gui/widgets/packet_log_frame.rb +19 -6
- data/lib/cosmos/interfaces.rb +10 -0
- data/lib/cosmos/interfaces/cmd_tlm_server_interface.rb +28 -47
- data/lib/cosmos/interfaces/interface.rb +240 -22
- data/lib/cosmos/interfaces/linc_interface.rb +3 -5
- data/lib/cosmos/interfaces/protocols/burst_protocol.rb +173 -0
- data/lib/cosmos/interfaces/protocols/crc_protocol.rb +141 -0
- data/lib/cosmos/{streams/fixed_stream_protocol.rb → interfaces/protocols/fixed_protocol.rb} +40 -37
- data/lib/cosmos/{streams/length_stream_protocol.rb → interfaces/protocols/length_protocol.rb} +55 -48
- data/lib/cosmos/interfaces/protocols/override_protocol.rb +52 -0
- data/lib/cosmos/interfaces/protocols/preidentified_protocol.rb +141 -0
- data/lib/cosmos/interfaces/protocols/protocol.rb +60 -0
- data/lib/cosmos/interfaces/protocols/template_protocol.rb +209 -0
- data/lib/cosmos/interfaces/protocols/terminated_protocol.rb +81 -0
- data/lib/cosmos/interfaces/serial_interface.rb +28 -23
- data/lib/cosmos/interfaces/simulated_target_interface.rb +27 -16
- data/lib/cosmos/interfaces/stream_interface.rb +36 -108
- data/lib/cosmos/interfaces/tcpip_client_interface.rb +21 -21
- data/lib/cosmos/interfaces/tcpip_server_interface.rb +555 -94
- data/lib/cosmos/interfaces/udp_interface.rb +51 -83
- data/lib/cosmos/io/buffered_file.rb +92 -2
- data/lib/cosmos/io/json_drb.rb +2 -2
- data/lib/cosmos/io/posix_serial_driver.rb +3 -1
- data/lib/cosmos/io/raw_logger.rb +3 -3
- data/lib/cosmos/io/serial_driver.rb +14 -5
- data/lib/cosmos/io/win32_serial_driver.rb +16 -4
- data/lib/cosmos/packet_logs.rb +0 -1
- data/lib/cosmos/packet_logs/packet_log_reader.rb +11 -1
- data/lib/cosmos/packet_logs/packet_log_writer.rb +31 -13
- data/lib/cosmos/packets/binary_accessor.rb +599 -32
- data/lib/cosmos/packets/commands.rb +48 -24
- data/lib/cosmos/packets/packet.rb +140 -54
- data/lib/cosmos/packets/packet_config.rb +0 -2
- data/lib/cosmos/packets/parsers/packet_item_parser.rb +10 -2
- data/lib/cosmos/packets/structure.rb +81 -33
- data/lib/cosmos/packets/structure_item.rb +45 -5
- data/lib/cosmos/packets/telemetry.rb +149 -55
- data/lib/cosmos/script/api_shared.rb +1000 -0
- data/lib/cosmos/script/commands.rb +2 -2
- data/lib/cosmos/script/extract.rb +19 -4
- data/lib/cosmos/script/limits.rb +2 -0
- data/lib/cosmos/script/script.rb +1 -1
- data/lib/cosmos/script/scripting.rb +4 -784
- data/lib/cosmos/script/telemetry.rb +44 -23
- data/lib/cosmos/script/tools.rb +15 -69
- data/lib/cosmos/streams/serial_stream.rb +12 -19
- data/lib/cosmos/streams/stream.rb +2 -11
- data/lib/cosmos/streams/tcpip_socket_stream.rb +3 -13
- data/lib/cosmos/system/system.rb +187 -31
- data/lib/cosmos/system/target.rb +11 -2
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +12 -11
- data/lib/cosmos/tools/cmd_sender/{cmd_sender_item_delegate.rb → cmd_param_table_item_delegate.rb} +11 -10
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +209 -164
- data/lib/cosmos/tools/cmd_sequence/cmd_sequence.rb +652 -0
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +510 -0
- data/lib/cosmos/tools/cmd_sequence/sequence_list.rb +194 -0
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +179 -5
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +31 -14
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +23 -16
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +92 -20
- data/lib/cosmos/tools/cmd_tlm_server/commanding.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +17 -4
- data/lib/cosmos/tools/cmd_tlm_server/gui/targets_tab.rb +0 -5
- data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +1 -2
- data/lib/cosmos/tools/cmd_tlm_server/interfaces.rb +4 -4
- data/lib/cosmos/tools/cmd_tlm_server/limits_groups_background_task.rb +121 -0
- data/lib/cosmos/tools/cmd_tlm_server/routers.rb +8 -4
- data/lib/cosmos/tools/config_editor/config_editor.rb +720 -0
- data/lib/cosmos/tools/config_editor/config_editor_frame.rb +675 -0
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +44 -27
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +8 -22
- data/lib/cosmos/tools/launcher/launcher.rb +29 -12
- data/lib/cosmos/tools/launcher/launcher_config.rb +1 -1
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +153 -42
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +44 -6
- data/lib/cosmos/tools/replay/replay.rb +36 -20
- data/lib/cosmos/tools/replay/replay_server.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner_config.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +31 -21
- data/lib/cosmos/tools/table_manager/table_config.rb +9 -3
- data/lib/cosmos/tools/table_manager/table_manager.rb +27 -7
- data/lib/cosmos/tools/test_runner/results_writer.rb +6 -6
- data/lib/cosmos/tools/test_runner/test_runner.rb +4 -6
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +4 -5
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +1 -1
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +1 -1
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/housekeeping_data_object_adder.rb +23 -6
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +44 -3
- data/lib/cosmos/tools/tlm_grapher/data_objects/housekeeping_data_object.rb +20 -7
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +1 -1
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_config.rb +11 -4
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_plot_editor.rb +2 -2
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_realtime_thread.rb +1 -1
- data/lib/cosmos/tools/tlm_grapher/tlm_grapher.rb +16 -0
- data/lib/cosmos/tools/tlm_viewer/screen.rb +36 -32
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +59 -50
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb +2 -2
- data/lib/cosmos/tools/tlm_viewer/widgets.rb +1 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasvalue_widget.rb +1 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvalue_widget.rb +22 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/matrixbycolumns_widget.rb +9 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/spacer_widget.rb +55 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/vertical_widget.rb +3 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/verticalbox_widget.rb +3 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/widget.rb +12 -12
- data/lib/cosmos/top_level.rb +34 -24
- data/lib/cosmos/utilities/crc.rb +108 -6
- data/lib/cosmos/utilities/csv.rb +68 -14
- data/lib/cosmos/utilities/logger.rb +2 -2
- data/lib/cosmos/utilities/low_fragmentation_array.rb +9 -1
- data/lib/cosmos/version.rb +6 -6
- data/lib/cosmos/win32/win32_main.rb +50 -46
- data/run_gui_tests.bat +3 -1
- data/spec/conversions/unix_time_formatted_conversion_spec.rb +2 -2
- data/spec/conversions/unix_time_seconds_conversion_spec.rb +2 -2
- data/spec/core_ext/file_spec.rb +1 -1
- data/spec/core_ext/objectspace_spec.rb +12 -9
- data/spec/core_ext/string_spec.rb +6 -0
- data/spec/core_ext/time_spec.rb +10 -0
- data/spec/gui/line_graph/line_clip_spec.rb +226 -224
- data/spec/gui/qt_spec.rb +81 -79
- data/spec/install/config/system/system.txt +0 -6
- data/spec/install/config/targets/INST/cmd_tlm/inst_cmd_linc.txt +5 -5
- data/spec/install/config/targets/INST/cmd_tlm/inst_tlm_linc.txt +8 -8
- data/spec/install/config/targets/SYSTEM/cmd_tlm/meta_cmd_tlm.txt +16 -0
- data/{install/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt → spec/install/config/targets/SYSTEM/cmd_tlm/system_cmds.txt} +8 -8
- data/spec/install/config/targets/SYSTEM/cmd_tlm/system_tlm.txt +7 -0
- data/spec/install/config/targets/{COSMOS → SYSTEM}/cmd_tlm_server.txt +2 -2
- data/spec/install/config/targets/SYSTEM/screens/status.txt +12 -0
- data/spec/install/config/targets/SYSTEM/target.txt +12 -0
- data/spec/interfaces/cmd_tlm_server_interface_spec.rb +9 -13
- data/spec/interfaces/interface_spec.rb +402 -18
- data/spec/interfaces/linc_interface_spec.rb +37 -39
- data/spec/interfaces/protocols/burst_protocol_spec.rb +300 -0
- data/spec/interfaces/protocols/crc_protocol_spec.rb +709 -0
- data/spec/interfaces/protocols/fixed_protocol_spec.rb +119 -0
- data/spec/interfaces/protocols/length_protocol_spec.rb +499 -0
- data/spec/interfaces/protocols/override_protocol_spec.rb +158 -0
- data/spec/interfaces/protocols/preidentified_protocol_spec.rb +149 -0
- data/spec/interfaces/protocols/template_protocol_spec.rb +218 -0
- data/spec/interfaces/protocols/terminated_protocol_spec.rb +174 -0
- data/spec/interfaces/serial_interface_spec.rb +35 -34
- data/spec/interfaces/simulated_target_interface_spec.rb +13 -13
- data/spec/interfaces/tcpip_client_interface_spec.rb +21 -16
- data/spec/interfaces/tcpip_server_interface_spec.rb +66 -69
- data/spec/interfaces/udp_interface_spec.rb +120 -55
- data/spec/io/serial_driver_spec.rb +41 -39
- data/spec/io/udp_sockets_spec.rb +13 -8
- data/spec/io/win32_serial_driver_spec.rb +62 -59
- data/spec/packet_logs/packet_log_reader_spec.rb +68 -47
- data/spec/packet_logs/packet_log_writer_spec.rb +7 -5
- data/spec/packets/commands_spec.rb +5 -5
- data/spec/packets/packet_spec.rb +2 -14
- data/spec/script/extract_spec.rb +21 -7
- data/spec/script/scripting_spec.rb +261 -6
- data/spec/script/telemetry_spec.rb +17 -9
- data/spec/spec_helper.rb +26 -10
- data/spec/streams/serial_stream_spec.rb +87 -82
- data/spec/streams/tcpip_client_stream_spec.rb +12 -4
- data/spec/streams/tcpip_socket_stream_spec.rb +5 -0
- data/spec/system/system_spec.rb +66 -50
- data/spec/system/target_spec.rb +33 -11
- data/spec/tools/cmd_tlm_server/api_spec.rb +5 -5
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +75 -15
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +125 -5
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_spec.rb +244 -232
- data/spec/tools/cmd_tlm_server/commanding_spec.rb +18 -18
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +124 -29
- data/spec/tools/cmd_tlm_server/interfaces_spec.rb +2 -2
- data/spec/tools/cmd_tlm_server/limits_groups_background_task_spec.rb +145 -0
- data/spec/tools/cmd_tlm_server/router_thread_spec.rb +50 -10
- data/spec/tools/table_manager/tablemanager_core_spec.rb +0 -1
- data/spec/top_level/top_level_spec.rb +39 -11
- data/spec/utilities/csv_spec.rb +62 -20
- data/tasks/gemfile_stats.rake +6 -3
- data/test/performance/config/system/system_packets.txt +0 -1
- data/test/performance/config/system/system_threads.txt +0 -1
- metadata +177 -92
- data/autohotkey/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +0 -15
- data/autohotkey/config/targets/COSMOS/cmd_tlm_server.txt +0 -6
- data/autohotkey/config/targets/COSMOS/target.txt +0 -5
- data/autohotkey/userpath.txt +0 -1
- data/demo/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +0 -15
- data/demo/config/targets/COSMOS/screens/limits_change.txt +0 -20
- data/demo/config/targets/COSMOS/screens/version.txt +0 -19
- data/demo/config/targets/COSMOS/target.txt +0 -11
- data/demo/config/targets/META/cmd_tlm/meta_cmd.txt +0 -10
- data/demo/config/targets/META/cmd_tlm/meta_tlm.txt +0 -13
- data/demo/userpath.txt +0 -1
- data/install/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +0 -15
- data/install/config/targets/COSMOS/cmd_tlm_server.txt +0 -6
- data/install/config/targets/COSMOS/screens/limits_change.txt +0 -20
- data/install/config/targets/COSMOS/screens/version.txt +0 -19
- data/install/config/targets/COSMOS/target.txt +0 -9
- data/install/config/targets/SYSTEM/README.txt +0 -1
- data/install/userpath.txt +0 -1
- data/lib/cosmos/io/tcpip_server.rb +0 -571
- data/lib/cosmos/packet_logs/meta_packet_log_writer.rb +0 -107
- data/lib/cosmos/streams/burst_stream_protocol.rb +0 -25
- data/lib/cosmos/streams/preidentified_stream_protocol.rb +0 -118
- data/lib/cosmos/streams/stream_protocol.rb +0 -373
- data/lib/cosmos/streams/template_stream_protocol.rb +0 -140
- data/lib/cosmos/streams/terminated_stream_protocol.rb +0 -85
- data/spec/install/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +0 -41
- data/spec/install/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +0 -15
- data/spec/install/config/targets/COSMOS/screens/limits_change.txt +0 -20
- data/spec/install/config/targets/COSMOS/screens/version.txt +0 -19
- data/spec/install/config/targets/COSMOS/target.txt +0 -5
- data/spec/install/config/targets/META/cmd_tlm/meta_cmd.txt +0 -4
- data/spec/install/config/targets/META/cmd_tlm/meta_tlm.txt +0 -4
- data/spec/install/userpath.txt +0 -1
- data/spec/interfaces/stream_interface_spec.rb +0 -157
- data/spec/io/tcpip_server_spec.rb +0 -338
- data/spec/packet_logs/meta_packet_log_writer_spec.rb +0 -170
- data/spec/streams/burst_stream_protocol_spec.rb +0 -32
- data/spec/streams/fixed_stream_protocol_spec.rb +0 -113
- data/spec/streams/length_stream_protocol_spec.rb +0 -300
- data/spec/streams/preidentified_stream_protocol_spec.rb +0 -121
- data/spec/streams/stream_protocol_spec.rb +0 -346
- data/spec/streams/template_stream_protocol_spec.rb +0 -156
- data/spec/streams/terminated_stream_protocol_spec.rb +0 -127
- data/test/performance/userpath.txt +0 -1
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
TITLE 'COSMOS Command and Telemetry Server - Demo Configuration'
|
|
2
2
|
|
|
3
|
-
PACKET_LOG_WRITER
|
|
4
|
-
|
|
3
|
+
# PACKET_LOG_WRITER Parameter Notes
|
|
4
|
+
# nil:use default log names
|
|
5
|
+
# true: logging enabled
|
|
6
|
+
# nil: Don't cycle logs based on time
|
|
7
|
+
# 2000000000: Create new log after 2 Billion bytes
|
|
8
|
+
# nil: Use the default log directory
|
|
9
|
+
# false: Log synchronously - more efficient
|
|
10
|
+
# config/data/meta_init.txt: Initialize SYSTEM META data from this file
|
|
11
|
+
PACKET_LOG_WRITER DEFAULT packet_log_writer.rb nil true nil 2000000000 nil false
|
|
12
|
+
# PACKET_LOG_WRITER SYSTEMLOG packet_log_writer.rb system
|
|
5
13
|
|
|
6
14
|
# AUTO_INTERFACE_TARGETS # Use cmd_tlm_server.txt from all targets declared in system.txt
|
|
7
15
|
|
|
@@ -15,10 +23,10 @@ INTERFACE_TARGET EXAMPLE cmd_tlm_server.txt # Use cmd_tlm_server.txt in target p
|
|
|
15
23
|
|
|
16
24
|
INTERFACE_TARGET TEMPLATED cmd_tlm_server.txt # Use cmd_tlm_server.txt in target package
|
|
17
25
|
|
|
18
|
-
INTERFACE
|
|
19
|
-
TARGET
|
|
26
|
+
INTERFACE SYSTEM_INT cmd_tlm_server_interface.rb
|
|
27
|
+
TARGET SYSTEM
|
|
20
28
|
DISABLE_DISCONNECT
|
|
21
|
-
LOG
|
|
29
|
+
# LOG SYSTEMLOG
|
|
22
30
|
# DONT_LOG
|
|
23
31
|
# DONT_CONNECT
|
|
24
32
|
# DONT_RECONNECT
|
|
@@ -36,5 +44,6 @@ ROUTER INST_ROUTER tcpip_server_interface.rb 2055 2055 10.0 nil LENGTH 32 16 7
|
|
|
36
44
|
|
|
37
45
|
BACKGROUND_TASK example_background_task.rb
|
|
38
46
|
STOPPED
|
|
47
|
+
BACKGROUND_TASK limits_groups.rb 5 # Initial delay to allow interfaces to connect
|
|
39
48
|
|
|
40
|
-
#COLLECT_METADATA
|
|
49
|
+
#COLLECT_METADATA
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
TITLE 'COSMOS Command and Telemetry Server - Demo Configuration 2'
|
|
2
2
|
|
|
3
|
-
PACKET_LOG_WRITER
|
|
4
|
-
|
|
3
|
+
# PACKET_LOG_WRITER Parameter Notes
|
|
4
|
+
# nil:use default log names
|
|
5
|
+
# true: logging enabled
|
|
6
|
+
# nil: Don't cycle logs based on time
|
|
7
|
+
# 2000000000: Create new log after 2 Billion bytes
|
|
8
|
+
# nil: Use the default log directory
|
|
9
|
+
# false: Log synchronously - more efficient
|
|
10
|
+
# config/data/meta_init.txt: Initialize SYSTEM META data from this file
|
|
11
|
+
PACKET_LOG_WRITER DEFAULT packet_log_writer.rb nil true nil 2000000000 nil false
|
|
12
|
+
# PACKET_LOG_WRITER SYSTEMLOG packet_log_writer.rb system
|
|
5
13
|
|
|
6
14
|
# AUTO_INTERFACE_TARGETS # Use cmd_tlm_server.txt from all targets declared in system.txt
|
|
7
15
|
|
|
@@ -13,10 +21,10 @@ INTERFACE INST2_INT simulated_target_interface.rb sim_inst.rb
|
|
|
13
21
|
|
|
14
22
|
INTERFACE_TARGET EXAMPLE cmd_tlm_server.txt # Use cmd_tlm_server.txt in target package
|
|
15
23
|
|
|
16
|
-
INTERFACE
|
|
17
|
-
TARGET
|
|
24
|
+
INTERFACE SYSTEM_INT cmd_tlm_server_interface.rb
|
|
25
|
+
TARGET SYSTEM
|
|
18
26
|
DISABLE_DISCONNECT
|
|
19
|
-
LOG
|
|
27
|
+
# LOG SYSTEMLOG
|
|
20
28
|
# DONT_LOG
|
|
21
29
|
# DONT_CONNECT
|
|
22
30
|
# DONT_RECONNECT
|
|
@@ -9,3 +9,12 @@ COMPONENT "ADCS" data_viewer_component.rb
|
|
|
9
9
|
COMPONENT "Other Packets" data_viewer_component.rb
|
|
10
10
|
PACKET INST PARAMS
|
|
11
11
|
PACKET INST IMAGE
|
|
12
|
+
|
|
13
|
+
# Allow DataViewer to automatically detect a config/data_viewer/data_viewer.txt
|
|
14
|
+
# file in each of the target directories and load the configuration
|
|
15
|
+
# AUTO_TARGET_COMPONENTS
|
|
16
|
+
|
|
17
|
+
# Explicitly load the INST/config/data_viewer/data_viewer.txt file
|
|
18
|
+
TARGET_COMPONENT INST
|
|
19
|
+
# Explicitly load the INST/config/data_viewer/data_viewer2.txt file
|
|
20
|
+
TARGET_COMPONENT INST data_viewer2.txt
|
|
@@ -6,6 +6,13 @@ NUM_COLUMNS 5 # This is the default
|
|
|
6
6
|
TOOL "Command and Telemetry Server" "LAUNCH CmdTlmServer" "cts.png" --config cmd_tlm_server.txt
|
|
7
7
|
TOOL "Replay" "LAUNCH Replay" "replay.png"
|
|
8
8
|
TOOL "Limits Monitor" "LAUNCH LimitsMonitor" "limits_monitor.png"
|
|
9
|
+
MULTITOOL_START "Simulated Targets" NULL
|
|
10
|
+
TOOL "LAUNCH_TERMINAL ExampleTarget"
|
|
11
|
+
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
12
|
+
TOOL "LAUNCH_TERMINAL ScpiTarget"
|
|
13
|
+
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
14
|
+
MULTITOOL_END
|
|
15
|
+
# Example of another multitool button
|
|
9
16
|
MULTITOOL_START "COSMOS"
|
|
10
17
|
TOOL "LAUNCH CmdTlmServer -x 827 -y 2 -w 756 -t 475 -c cmd_tlm_server.txt"
|
|
11
18
|
DELAY 5
|
|
@@ -19,14 +26,9 @@ DIVIDER
|
|
|
19
26
|
LABEL "Commanding and Scripting"
|
|
20
27
|
|
|
21
28
|
TOOL "Command Sender" "LAUNCH CmdSender" "cmd_sender.png"
|
|
29
|
+
TOOL "Command Sequence" "LAUNCH CmdSequence" "cmd_sequence.png"
|
|
22
30
|
TOOL "Script Runner" "LAUNCH ScriptRunner" "script_runner.png"
|
|
23
31
|
TOOL "Test Runner" "LAUNCH TestRunner" "test_runner.png"
|
|
24
|
-
MULTITOOL_START "Simulated Targets" NULL
|
|
25
|
-
TOOL "LAUNCH_TERMINAL ExampleTarget"
|
|
26
|
-
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
27
|
-
TOOL "LAUNCH_TERMINAL ScpiTarget"
|
|
28
|
-
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
29
|
-
MULTITOOL_END
|
|
30
32
|
|
|
31
33
|
DIVIDER
|
|
32
34
|
LABEL Telemetry
|
|
@@ -39,6 +41,7 @@ TOOL "Data Viewer" "LAUNCH DataViewer" "data_viewer.png"
|
|
|
39
41
|
DIVIDER
|
|
40
42
|
LABEL Utilities
|
|
41
43
|
|
|
44
|
+
TOOL "Config Editor" "LAUNCH ConfigEditor" "config_editor.png"
|
|
42
45
|
TOOL "Telemetry Extractor" "LAUNCH TlmExtractor" "tlm_extractor.png"
|
|
43
46
|
TOOL "Command Extractor" "LAUNCH CmdExtractor" "cmd_extractor.png"
|
|
44
47
|
TOOL "Handbook Creator" "LAUNCH HandbookCreator" "handbook_creator.png"
|
|
@@ -6,27 +6,30 @@ LABEL_FONT tahoma 16
|
|
|
6
6
|
TOOL "Command and Telemetry Server" "LAUNCH CmdTlmServer --system system2.txt" "cts.png" --config cmd_tlm_server2.txt
|
|
7
7
|
TOOL "Replay" "LAUNCH Replay --system system2.txt" "replay.png"
|
|
8
8
|
TOOL "Limits Monitor" "LAUNCH LimitsMonitor --system system2.txt" "limits_monitor.png"
|
|
9
|
-
MULTITOOL_START "
|
|
10
|
-
TOOL "
|
|
11
|
-
|
|
12
|
-
TOOL "
|
|
13
|
-
|
|
14
|
-
TOOL "LAUNCH ScriptRunner -x 4 -y 2 -w 805 -t 545 --system system2.txt"
|
|
15
|
-
TOOL "LAUNCH CmdSender -x 4 -y 586 -w 805 -t 533 --system system2.txt"
|
|
9
|
+
MULTITOOL_START "Simulated Targets" NULL
|
|
10
|
+
TOOL "tools\ExampleTarget.bat"
|
|
11
|
+
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
12
|
+
TOOL "tools\ScpiTarget.bat"
|
|
13
|
+
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
16
14
|
MULTITOOL_END
|
|
17
15
|
|
|
16
|
+
# Example of using a multitool button
|
|
17
|
+
#MULTITOOL_START "COSMOS" NULL
|
|
18
|
+
# TOOL "LAUNCH CmdTlmServer -x 827 -y 2 -w 756 -t 475 -c cmd_tlm_server2.txt --system system2.txt"
|
|
19
|
+
# DELAY 5
|
|
20
|
+
# TOOL "LAUNCH TlmViewer -x 827 -y 517 -w 424 -t 111 --system system2.txt"
|
|
21
|
+
# TOOL "LAUNCH PacketViewer -x 827 -y 669 -w 422 -t 450 --system system2.txt"
|
|
22
|
+
# TOOL "LAUNCH ScriptRunner -x 4 -y 2 -w 805 -t 545 --system system2.txt"
|
|
23
|
+
# TOOL "LAUNCH CmdSender -x 4 -y 586 -w 805 -t 533 --system system2.txt"
|
|
24
|
+
#MULTITOOL_END
|
|
25
|
+
|
|
18
26
|
DIVIDER
|
|
19
27
|
LABEL "Commanding and Scripting"
|
|
20
28
|
|
|
21
29
|
TOOL "Command Sender" "LAUNCH CmdSender --system system2.txt" "cmd_sender.png"
|
|
30
|
+
TOOL "Command Sequence" "LAUNCH CmdSequence --system system2.txt" "cmd_sequence.png"
|
|
22
31
|
TOOL "Script Runner" "LAUNCH ScriptRunner --system system2.txt" "script_runner.png"
|
|
23
32
|
TOOL "Test Runner" "LAUNCH TestRunner --system system2.txt" "test_runner.png"
|
|
24
|
-
MULTITOOL_START "Simulated Targets" NULL
|
|
25
|
-
TOOL "tools\ExampleTarget.bat"
|
|
26
|
-
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
27
|
-
TOOL "tools\ScpiTarget.bat"
|
|
28
|
-
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
29
|
-
MULTITOOL_END
|
|
30
33
|
|
|
31
34
|
DIVIDER
|
|
32
35
|
LABEL Telemetry
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
TITLE "Launcher"
|
|
2
|
+
TOOL_FONT tahoma 12
|
|
3
|
+
LABEL_FONT tahoma 16
|
|
4
|
+
NUM_COLUMNS 2
|
|
5
|
+
|
|
6
|
+
TOOL "Server" "LAUNCH CmdTlmServer" "cts.png" --config cmd_tlm_server.txt
|
|
7
|
+
TOOL "Replay" "LAUNCH Replay" "replay.png"
|
|
8
|
+
TOOL "Limits" "LAUNCH LimitsMonitor" "limits_monitor.png"
|
|
9
|
+
MULTITOOL_START "Targets" NULL
|
|
10
|
+
TOOL "LAUNCH_TERMINAL ExampleTarget"
|
|
11
|
+
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
12
|
+
TOOL "LAUNCH_TERMINAL ScpiTarget"
|
|
13
|
+
DONT_CAPTURE_IO # Without this you get an "Unexpected Output" dialog
|
|
14
|
+
MULTITOOL_END
|
|
15
|
+
# Example of a multitool button
|
|
16
|
+
#MULTITOOL_START "COSMOS"
|
|
17
|
+
# TOOL "LAUNCH CmdTlmServer -x 827 -y 2 -w 756 -t 475 -c cmd_tlm_server.txt"
|
|
18
|
+
# DELAY 5
|
|
19
|
+
# TOOL "LAUNCH TlmViewer -x 827 -y 517 -w 424 -t 111"
|
|
20
|
+
# TOOL "LAUNCH PacketViewer -x 827 -y 669 -w 422 -t 450"
|
|
21
|
+
# TOOL "LAUNCH ScriptRunner -x 4 -y 2 -w 805 -t 545"
|
|
22
|
+
# TOOL "LAUNCH CmdSender -x 4 -y 586 -w 805 -t 533"
|
|
23
|
+
#MULTITOOL_END
|
|
24
|
+
|
|
25
|
+
DIVIDER
|
|
26
|
+
|
|
27
|
+
TOOL "CmdSender" "LAUNCH CmdSender" "cmd_sender.png"
|
|
28
|
+
TOOL "CmdSequence" "LAUNCH CmdSequence" "cmd_sequence.png"
|
|
29
|
+
TOOL "ScriptRunner" "LAUNCH ScriptRunner" "script_runner.png"
|
|
30
|
+
TOOL "TestRunner" "LAUNCH TestRunner" "test_runner.png"
|
|
31
|
+
|
|
32
|
+
DIVIDER
|
|
33
|
+
|
|
34
|
+
TOOL "PktViewer" "LAUNCH PacketViewer" "packet_viewer.png"
|
|
35
|
+
TOOL "TlmViewer" "LAUNCH TlmViewer" "tlm_viewer.png"
|
|
36
|
+
TOOL "TlmGrapher" "LAUNCH TlmGrapher" "tlm_grapher.png"
|
|
37
|
+
TOOL "DataViewer" "LAUNCH DataViewer" "data_viewer.png"
|
|
38
|
+
|
|
39
|
+
DIVIDER
|
|
40
|
+
|
|
41
|
+
TOOL "ConfigEditor" "LAUNCH ConfigEditor" "config_editor.png"
|
|
42
|
+
TOOL "TlmExtractor" "LAUNCH TlmExtractor" "tlm_extractor.png"
|
|
43
|
+
TOOL "Handbooks" "LAUNCH HandbookCreator" "handbook_creator.png"
|
|
44
|
+
TOOL "CmdExtractor" "LAUNCH CmdExtractor" "cmd_extractor.png"
|
|
45
|
+
TOOL "TblManager" "LAUNCH TableManager" "table_manager.png"
|
|
@@ -19,18 +19,19 @@ TABLE "MC Configuration" BIG_ENDIAN ONE_DIMENSIONAL "Memory Control Configuratio
|
|
|
19
19
|
APPEND_PARAMETER "Scrub Region 2 Throttle Ticks" 32 UINT 0 0x0FFFFFFFF 2
|
|
20
20
|
APPEND_PARAMETER "Dump Packet Throttle (sec)" 32 UINT 0 0x0FFFFFFFF 2 "Number of seconds to wait between dumping large packets"
|
|
21
21
|
APPEND_PARAMETER "Memory Scrubbing" 8 UINT 0 1 1
|
|
22
|
-
STATE DISABLE 0
|
|
23
|
-
STATE ENABLE 1
|
|
22
|
+
STATE DISABLE 0
|
|
23
|
+
STATE ENABLE 1
|
|
24
24
|
APPEND_PARAMETER "SIOC Memory Config" 8 UINT 1 3 3
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
GENERIC_WRITE_CONVERSION_START
|
|
26
|
+
if packet.read("Memory Scrubbing") == 'DISABLE'
|
|
27
|
+
packet.get_item("SIOC Memory Config").range = (10..20)
|
|
28
|
+
else
|
|
29
|
+
packet.get_item("SIOC Memory Config").range = (1..3)
|
|
30
|
+
end
|
|
31
|
+
value
|
|
32
|
+
GENERIC_WRITE_CONVERSION_END
|
|
33
|
+
APPEND_PARAMETER "Binary" 32 STRING 0xDEADBEEF "Binary string"
|
|
34
|
+
APPEND_PARAMETER "Pad" 16 UINT 0 0 0
|
|
33
35
|
HIDDEN
|
|
34
36
|
APPEND_PARAMETER "Pad1" 32 UINT MIN MAX 0xFFFFFFFF
|
|
35
37
|
HIDDEN
|
|
36
|
-
|
|
@@ -19,15 +19,16 @@ TABLE "MC Configuration" BIG_ENDIAN ONE_DIMENSIONAL "Memory Control Configuratio
|
|
|
19
19
|
APPEND_PARAMETER "Scrub Region 2 Throttle Ticks" 32 UINT 0 0x0FFFFFFFF 2
|
|
20
20
|
APPEND_PARAMETER "Dump Packet Throttle (sec)" 32 UINT 0 0x0FFFFFFFF 2 "Number of seconds to wait between dumping large packets"
|
|
21
21
|
APPEND_PARAMETER "Memory Scrubbing" 8 UINT 0 1 1
|
|
22
|
-
STATE DISABLE 0
|
|
23
|
-
STATE ENABLE 1
|
|
22
|
+
STATE DISABLE 0
|
|
23
|
+
STATE ENABLE 1
|
|
24
24
|
APPEND_PARAMETER "SIOC Memory Config" 8 UINT 1 3 3
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
GENERIC_WRITE_CONVERSION_START
|
|
26
|
+
if packet.read("Memory Scrubbing") == 'DISABLE'
|
|
27
|
+
packet.get_item("SIOC Memory Config").range = (10..20)
|
|
28
|
+
else
|
|
29
|
+
packet.get_item("SIOC Memory Config").range = (1..3)
|
|
30
|
+
end
|
|
31
|
+
value
|
|
32
|
+
GENERIC_WRITE_CONVERSION_END
|
|
33
|
+
APPEND_PARAMETER "Binary" 32 STRING 0xDEADBEEF "Binary string"
|
|
34
|
+
APPEND_PARAMETER "Pad" 16 UINT 0 0 0
|
|
@@ -3,15 +3,15 @@ AUTO_TARGETS
|
|
|
3
3
|
|
|
4
4
|
# Create a new dropdown with a few specific sceens
|
|
5
5
|
GROUP "My group"
|
|
6
|
-
GROUP_SCREEN
|
|
7
|
-
GROUP_SCREEN
|
|
8
|
-
GROUP_SCREEN
|
|
6
|
+
GROUP_SCREEN SYSTEM "status.txt"
|
|
7
|
+
GROUP_SCREEN INST "hs.txt"
|
|
8
|
+
GROUP_SCREEN INST2 "hs.txt"
|
|
9
9
|
|
|
10
10
|
# NEW_COLUMN
|
|
11
11
|
|
|
12
12
|
# AUTO_TARGET INST
|
|
13
13
|
|
|
14
|
-
# TARGET
|
|
14
|
+
# TARGET INST
|
|
15
15
|
# SCREEN "adcs.txt"
|
|
16
16
|
# SCREEN "array.txt"
|
|
17
17
|
# SCREEN "block.txt"
|
|
@@ -24,7 +24,7 @@ GROUP "My group"
|
|
|
24
24
|
# SCREEN "other.txt"
|
|
25
25
|
# SCREEN "tabs.txt"
|
|
26
26
|
|
|
27
|
-
#TARGET
|
|
27
|
+
#TARGET INST2
|
|
28
28
|
# SCREEN "adcs.txt"
|
|
29
29
|
# SCREEN "array.txt"
|
|
30
30
|
# SCREEN "block.txt"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: ascii-8bit
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2017 Ball Aerospace & Technologies Corp.
|
|
4
4
|
# All Rights Reserved.
|
|
5
5
|
#
|
|
6
6
|
# This program is free software; you can modify and/or redistribute it
|
|
@@ -25,13 +25,17 @@ module Cosmos
|
|
|
25
25
|
@sleeper = Sleeper.new
|
|
26
26
|
@status = "Sleeping for 5 seconds"
|
|
27
27
|
return if @sleeper.sleep(5) # allow interfaces time to start
|
|
28
|
+
initial_count = tlm('INST', 'HEALTH_STATUS', 'COLLECTS')
|
|
28
29
|
loop do
|
|
29
30
|
# Start up with at least 3 collects
|
|
30
|
-
|
|
31
|
+
count = tlm('INST', 'HEALTH_STATUS', 'COLLECTS')
|
|
32
|
+
if (count < (initial_count + 3))
|
|
31
33
|
begin
|
|
32
34
|
cmd('INST', 'COLLECT', 'TYPE' => 'NORMAL', 'DURATION' => 1)
|
|
33
35
|
sent_count += 1
|
|
34
|
-
@status = "Sent COLLECT ##{sent_count} at #{Time.now.formatted}"
|
|
36
|
+
@status = "Sent COLLECT ##{sent_count} at #{Time.now.sys.formatted}"
|
|
37
|
+
wait("INST HEALTH_STATUS COLLECTS > #{count}", 5)
|
|
38
|
+
@status = "Tlm Updated at #{Time.now.sys.formatted}"
|
|
35
39
|
rescue
|
|
36
40
|
# Oh well - probably disconnected
|
|
37
41
|
end
|
|
@@ -40,12 +44,12 @@ module Cosmos
|
|
|
40
44
|
end
|
|
41
45
|
return if @sleeper.sleep(1)
|
|
42
46
|
end
|
|
43
|
-
@status = "Finished at #{Time.now.formatted}"
|
|
47
|
+
@status = "Finished at #{Time.now.sys.formatted}"
|
|
44
48
|
end
|
|
45
49
|
|
|
46
50
|
def stop
|
|
47
51
|
@sleeper.cancel
|
|
48
|
-
@status = "Stopped at #{Time.now.formatted}"
|
|
52
|
+
@status = "Stopped at #{Time.now.sys.formatted}"
|
|
49
53
|
end
|
|
50
54
|
end
|
|
51
55
|
end
|
data/demo/lib/example_target.rb
CHANGED
|
@@ -13,25 +13,17 @@ require 'cosmos/interfaces'
|
|
|
13
13
|
require 'cosmos/tools/cmd_tlm_server/interface_thread'
|
|
14
14
|
|
|
15
15
|
module Cosmos
|
|
16
|
-
|
|
17
16
|
class ExampleTarget
|
|
18
|
-
|
|
19
17
|
class ExampleServerInterface < TcpipServerInterface
|
|
20
18
|
PORT = 9999
|
|
21
19
|
|
|
22
20
|
def initialize
|
|
23
|
-
super(PORT, PORT, 5.0, nil, 'LENGTH', 0, 32, 4, 1, 'BIG_ENDIAN', 4)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def pre_write_packet(packet)
|
|
27
|
-
[packet.length].pack('N') << packet.buffer(false)
|
|
21
|
+
super(PORT, PORT, 5.0, nil, 'LENGTH', 0, 32, 4, 1, 'BIG_ENDIAN', 4, nil, nil, true)
|
|
28
22
|
end
|
|
29
23
|
end
|
|
30
24
|
|
|
31
25
|
class ExampleInterfaceThread < InterfaceThread
|
|
32
|
-
|
|
33
26
|
protected
|
|
34
|
-
|
|
35
27
|
def handle_packet(packet)
|
|
36
28
|
identified_packet = System.commands.identify(packet.buffer, ['EXAMPLE'])
|
|
37
29
|
if identified_packet
|
|
@@ -55,9 +47,9 @@ module Cosmos
|
|
|
55
47
|
@thread = Thread.new do
|
|
56
48
|
@stop_thread = false
|
|
57
49
|
begin
|
|
58
|
-
|
|
50
|
+
loop do
|
|
59
51
|
packet.write('PACKET_ID', 1)
|
|
60
|
-
packet.write('STRING', "The time is now: #{Time.now.formatted}")
|
|
52
|
+
packet.write('STRING', "The time is now: #{Time.now.sys.formatted}")
|
|
61
53
|
@interface.write(packet)
|
|
62
54
|
break if @sleeper.sleep(1)
|
|
63
55
|
end
|
|
@@ -107,7 +99,5 @@ module Cosmos
|
|
|
107
99
|
target.stop
|
|
108
100
|
end
|
|
109
101
|
end
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
end # module Cosmos
|
|
102
|
+
end
|
|
103
|
+
end
|
data/demo/lib/scpi_target.rb
CHANGED
|
@@ -13,9 +13,7 @@ require 'cosmos/interfaces'
|
|
|
13
13
|
require 'cosmos/tools/cmd_tlm_server/interface_thread'
|
|
14
14
|
|
|
15
15
|
module Cosmos
|
|
16
|
-
|
|
17
16
|
class ScpiTarget
|
|
18
|
-
|
|
19
17
|
class ScpiServerInterface < TcpipServerInterface
|
|
20
18
|
PORT = 5025
|
|
21
19
|
|
|
@@ -35,7 +33,7 @@ module Cosmos
|
|
|
35
33
|
def handle_packet(packet)
|
|
36
34
|
Logger.info "Received command: #{packet.buffer}"
|
|
37
35
|
if packet.buffer.include?('?')
|
|
38
|
-
@interface.write_raw(@index.to_s)
|
|
36
|
+
@interface.write_raw(@index.to_s + "\x0A")
|
|
39
37
|
end
|
|
40
38
|
@index += 1
|
|
41
39
|
end
|
|
@@ -61,14 +59,10 @@ module Cosmos
|
|
|
61
59
|
target = self.new
|
|
62
60
|
begin
|
|
63
61
|
target.start
|
|
64
|
-
|
|
65
|
-
sleep 1
|
|
66
|
-
end
|
|
62
|
+
loop { sleep 1 }
|
|
67
63
|
rescue SystemExit, Interrupt
|
|
68
64
|
target.stop
|
|
69
65
|
end
|
|
70
66
|
end
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
end # module Cosmos
|
|
67
|
+
end
|
|
68
|
+
end
|