cosmos 3.9.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,144 @@
|
|
1
|
+
---
|
2
|
+
<%= MetaConfigParser.load('param_item_modifiers.yaml').to_meta_config_yaml(0) %>
|
3
|
+
REQUIRED:
|
4
|
+
summary: Parameter is required to be populated in scripts
|
5
|
+
description: When sending the command via Script Runner a value must always be
|
6
|
+
given for the current command parameter. This prevents the user from relying
|
7
|
+
on a default value. Note that this does not affect Command Sender which will
|
8
|
+
still populate the field with the default value provided in the PARAMETER definition.
|
9
|
+
MINIMUM_VALUE:
|
10
|
+
summary: Override the defined minimum value
|
11
|
+
parameters:
|
12
|
+
- name: Value
|
13
|
+
required: true
|
14
|
+
description: The new minimum value for the parameter
|
15
|
+
values: .*
|
16
|
+
MAXIMUM_VALUE:
|
17
|
+
summary: Override the defined maximum value
|
18
|
+
parameters:
|
19
|
+
- name: Value
|
20
|
+
required: true
|
21
|
+
description: The new maximum value for the parameter
|
22
|
+
values: .*
|
23
|
+
DEFAULT_VALUE:
|
24
|
+
summary: Override the defined default value
|
25
|
+
parameters:
|
26
|
+
- name: Value
|
27
|
+
required: true
|
28
|
+
description: The new default value for the parameter
|
29
|
+
values: .*
|
30
|
+
STATE:
|
31
|
+
summary: Defines a key/value pair for the current command parameter
|
32
|
+
description: Key value pairs allow for user friendly strings. For example,
|
33
|
+
you might define states for ON = 1 and OFF = 0. This allows the word ON to be
|
34
|
+
used rather than the number 1 when sending the command parameter and allows
|
35
|
+
for much greater clarity and less chance for user error.
|
36
|
+
parameters:
|
37
|
+
- name: Key
|
38
|
+
required: true
|
39
|
+
description: The string state name
|
40
|
+
values: .*
|
41
|
+
- name: Value
|
42
|
+
required: true
|
43
|
+
description: The numerical state value
|
44
|
+
values: .*
|
45
|
+
- name: Hazardous
|
46
|
+
required: false
|
47
|
+
description: Indicates the state is hazardous. This will cause a popup
|
48
|
+
to ask for user confirmation when sending this command.
|
49
|
+
values: ['HAZARDOUS']
|
50
|
+
- name: Hazardous Description
|
51
|
+
required: false
|
52
|
+
description: String describing why this state is hazardous
|
53
|
+
values: "['\"].*['\"]"
|
54
|
+
WRITE_CONVERSION:
|
55
|
+
summary: Applies a conversion when writing the current command parameter
|
56
|
+
description: Conversions are implemented in a custom Ruby file which should be
|
57
|
+
located in the target's lib folder and required by the target's target.txt
|
58
|
+
file (see REQUIRE). The class must require 'cosmos/conversions/conversion'
|
59
|
+
and inherit from Conversion. It must implement the initialize method if it
|
60
|
+
takes extra parameters and must always implement the call method. The conversion
|
61
|
+
factor is applied to the value entered by the user before it is written into
|
62
|
+
the binary command packet and sent.
|
63
|
+
parameters:
|
64
|
+
- name: Class File Name
|
65
|
+
required: true
|
66
|
+
description: The file name which contains the Ruby class. The file name must
|
67
|
+
be named after the class such that the class is a CamelCase version of the
|
68
|
+
underscored file name. For example, 'the_great_conversion.rb' should contain
|
69
|
+
'class TheGreatConversion'.
|
70
|
+
values: .*\.rb
|
71
|
+
- name: Parameter
|
72
|
+
required: false
|
73
|
+
description: Additional parameter values for the conversion which are passed
|
74
|
+
to the class constructor.
|
75
|
+
values: .*
|
76
|
+
POLY_WRITE_CONVERSION:
|
77
|
+
summary: Adds a polynomial conversion factor to the current command parameter
|
78
|
+
description: The conversion factor is applied to the value entered by the user
|
79
|
+
before it is written into the binary command packet and sent.
|
80
|
+
parameters:
|
81
|
+
- name: C0
|
82
|
+
required: true
|
83
|
+
description: Coefficient
|
84
|
+
values: .*
|
85
|
+
- name: Cx
|
86
|
+
required: false
|
87
|
+
description: Additional coefficient values for the conversion. Any order
|
88
|
+
polynomial conversion may be used so the value of 'x' will vary with the
|
89
|
+
order of the polynomial. Note that larger order polynomials take longer
|
90
|
+
to process than shorter order polynomials, but are sometimes more accurate.
|
91
|
+
values: .*
|
92
|
+
SEG_POLY_WRITE_CONVERSION:
|
93
|
+
summary: Adds a segmented polynomial conversion factor to the current command parameter
|
94
|
+
description: This conversion factor is applied to the value entered by the user
|
95
|
+
before it is written into the binary command packet and sent.
|
96
|
+
parameters:
|
97
|
+
- name: Lower Bound
|
98
|
+
required: true
|
99
|
+
description: Defines the lower bound of the range of values that this segmented
|
100
|
+
polynomial applies to. Is ignored for the segment with the smallest lower bound.
|
101
|
+
values: .*
|
102
|
+
- name: C0
|
103
|
+
required: true
|
104
|
+
description: Coefficient
|
105
|
+
values: .*
|
106
|
+
- name: Cx
|
107
|
+
required: false
|
108
|
+
description: Additional coefficient values for the conversion. Any order
|
109
|
+
polynomial conversion may be used so the value of 'x' will vary with the
|
110
|
+
order of the polynomial. Note that larger order polynomials take longer
|
111
|
+
to process than shorter order polynomials, but are sometimes more accurate.
|
112
|
+
values: .*
|
113
|
+
GENERIC_WRITE_CONVERSION_START:
|
114
|
+
summary: Start a generic write conversion
|
115
|
+
description: Adds a generic conversion function to the current command parameter.
|
116
|
+
This conversion factor is applied to the value entered by the user before it
|
117
|
+
is written into the binary command packet and sent. The conversion is specified
|
118
|
+
as ruby code that receives two implied parameters. 'value' which is the raw
|
119
|
+
value being written and 'packet' which is a reference to the command packet
|
120
|
+
class (Note, referencing the packet as 'myself' is still supported for backwards
|
121
|
+
compatibility). The last line of ruby code given should return the converted
|
122
|
+
value. The GENERIC_WRITE_CONVERSION_END keyword specifies that all lines of
|
123
|
+
ruby code for the conversion have been given.
|
124
|
+
warning: Generic conversions are not a good long term solution. Consider creating
|
125
|
+
a conversion class and using WRITE_CONVERSION instead. WRITE_CONVERSION is easier
|
126
|
+
to debug and higher performance.
|
127
|
+
GENERIC_WRITE_CONVERSION_END:
|
128
|
+
summary: Complete a generic write conversion
|
129
|
+
OVERFLOW:
|
130
|
+
summary: Set the behavior when writing a value overflows the type
|
131
|
+
description: By default COSMOS throws an error if you try to write a value
|
132
|
+
which overflows its specified type, e.g. writing 255 to a 8 bit signed value.
|
133
|
+
Setting the overflow behavior also allows for COSMOS to 'TRUNCATE'
|
134
|
+
the value by eliminating any high order bits. You can also set 'SATURATE' which
|
135
|
+
causes COSMOS to replace the value with the maximum or minimum allowable value
|
136
|
+
for that type. Finally you can specify 'ERROR_ALLOW_HEX' which will allow for
|
137
|
+
a maximum hex value to be writen, e.g. you can successfully write 255 to a 8
|
138
|
+
bit signed value.
|
139
|
+
parameters:
|
140
|
+
- name: Behavior
|
141
|
+
required: true
|
142
|
+
description: How COSMOS treats an overflow value. Only applies to signed and
|
143
|
+
unsigned integer data types.
|
144
|
+
values: <%= %w(ERROR ERROR_ALLOW_HEX TRUNCATE SATURATE) %>
|
@@ -0,0 +1,257 @@
|
|
1
|
+
---
|
2
|
+
BURST:
|
3
|
+
description: The Burst Stream Protocol simply reads as much data as it can from
|
4
|
+
the stream before returning the data as a COSMOS Packet. This Protocol relies
|
5
|
+
on regular bursts of data delimited by time and thus is not very robust.
|
6
|
+
However it can utilize a sync pattern which does allow it to re-sync from the
|
7
|
+
stream if necessary.
|
8
|
+
parameters:
|
9
|
+
- name: Discard Leading Bytes
|
10
|
+
required: false
|
11
|
+
description: The number of bytes to discard from the binary data after reading
|
12
|
+
from the stream. Note that this applies to bytes starting with the sync
|
13
|
+
pattern if the sync pattern is being used. Default is 0 (don't discard bytes).
|
14
|
+
values: \d+
|
15
|
+
- name: Sync Pattern
|
16
|
+
required: false
|
17
|
+
description: Hex string representing a byte pattern that will be searched
|
18
|
+
for in the raw stream. This pattern represents a packet delimiter and all
|
19
|
+
data found including the sync pattern will be returned. Default is 'nil'
|
20
|
+
(no sync pattern).
|
21
|
+
values: .+
|
22
|
+
- name: Fill Sync Pattern
|
23
|
+
required: false
|
24
|
+
description: Whether or not to fill in the sync pattern on outgoing packets
|
25
|
+
Default is false.
|
26
|
+
values: ['true', 'false']
|
27
|
+
FIXED:
|
28
|
+
description: The Fixed Stream Protocol reads a preset minimum amount of data
|
29
|
+
from the stream which is necessary to properly identify all the defined packets
|
30
|
+
using the interface. It then identifies the packet and proceeds to read as much
|
31
|
+
data from the stream as necessary to create the packet which it then returns.
|
32
|
+
This stream relies on all the packets on the interface being fixed in length.
|
33
|
+
For example, all the packets using the interface are a fixed size and contain
|
34
|
+
a simple header with a 32 bit sync pattern followed by a 16 bit ID. The Fixed
|
35
|
+
Stream Protocol would elegantly handle this case with a minimum read size of
|
36
|
+
6 bytes.
|
37
|
+
parameters:
|
38
|
+
- name: Minimum ID Size
|
39
|
+
required: true
|
40
|
+
description: The minimum amount of bytes needed to identify a packet.
|
41
|
+
All the packet definitions must declare their ID_ITEM(s) within this given
|
42
|
+
amount of bytes.
|
43
|
+
values: \d+
|
44
|
+
- name: Discard Leading Bytes
|
45
|
+
required: false
|
46
|
+
description: The number of bytes to discard from the binary data after reading
|
47
|
+
from the stream. Note that this applies to bytes starting with the sync
|
48
|
+
pattern if the sync pattern is being used. Default is 0 (do not discard bytes).
|
49
|
+
values: \d+
|
50
|
+
- name: Sync Pattern
|
51
|
+
required: false
|
52
|
+
description: Hex string representing a byte pattern that will be searched
|
53
|
+
for in the raw stream. This pattern represents a packet delimiter and all
|
54
|
+
data found including the sync pattern will be returned. Default is 'nil'
|
55
|
+
(no sync pattern).
|
56
|
+
values: .+
|
57
|
+
- name: Telemetry Stream
|
58
|
+
required: false
|
59
|
+
description: Whether the stream is returning telemetry. Default is true.
|
60
|
+
values: ['true','false']
|
61
|
+
- name: Fill Sync Pattern
|
62
|
+
required: false
|
63
|
+
description: Whether or not to fill in the sync pattern on outgoing packets.
|
64
|
+
Default is false.
|
65
|
+
values: ['false','true']
|
66
|
+
LENGTH:
|
67
|
+
description: The Length Stream Protocol depends on a length field at a fixed
|
68
|
+
location in the defined packets using the interface. It then reads enough data
|
69
|
+
to grab the length field, decodes it, and reads the remaining length of the
|
70
|
+
packet. For example, all the packets using the interface contain a CCSDS
|
71
|
+
header with a length field. The Length Stream Protocol can be set up to handle
|
72
|
+
the length field and even the "length - 1" offset the CCSDS header uses.
|
73
|
+
parameters:
|
74
|
+
- name: Length Bit Offset
|
75
|
+
required: false
|
76
|
+
description: The bit offset of the length field. Every packet using this
|
77
|
+
interface must have the same structure such that the length field is the
|
78
|
+
same size at the same location. Be sure to account for the length of the
|
79
|
+
Sync Pattern in this value (if present). Default is 0.
|
80
|
+
values: \d+
|
81
|
+
- name: Length Bit Size
|
82
|
+
required: false
|
83
|
+
description: The size in bits of the length field. Default is 16.
|
84
|
+
values: \d+
|
85
|
+
- name: Length Value Offset
|
86
|
+
required: false
|
87
|
+
description: The offset to apply to the length field value. For example if
|
88
|
+
the length field indicates packet length minus one, this value should be
|
89
|
+
one. Be sure to account for the length of the Sync Pattern in this value
|
90
|
+
(if present). Default is 0.
|
91
|
+
values: \d+
|
92
|
+
- name: Bytes per Count
|
93
|
+
required: false
|
94
|
+
description: The number of bytes per each length field 'count'. This is used
|
95
|
+
if the units of the length field is something other than bytes,
|
96
|
+
for example if the length field count is in words. Default is 1.
|
97
|
+
values: \d+
|
98
|
+
- name: Length Endianness
|
99
|
+
required: false
|
100
|
+
description: The endianness of the length field.
|
101
|
+
values: ['BIG_ENDIAN','LITTLE_ENDIAN']
|
102
|
+
- name: Discard Leading Bytes
|
103
|
+
required: false
|
104
|
+
description: The number of bytes to discard from the binary data after
|
105
|
+
reading from the stream. Note that this applies to bytes including the
|
106
|
+
sync pattern if the sync pattern is being used. Discarding is one of the
|
107
|
+
very last steps so any size and offsets above need to account for all the
|
108
|
+
data before discarding. Default is 0 (do not discard bytes).
|
109
|
+
values: \d+
|
110
|
+
- name: Sync Pattern
|
111
|
+
required: false
|
112
|
+
description: Hex string representing a byte pattern that will be searched
|
113
|
+
for in the raw stream. This pattern represents a packet delimiter and all
|
114
|
+
data found including the sync pattern will be returned.
|
115
|
+
Default is nil (no sync pattern)
|
116
|
+
values: .+
|
117
|
+
- name: Max Length
|
118
|
+
required: false
|
119
|
+
description: The maximum allowed value in the length field.
|
120
|
+
Default is nil (no maximum length)
|
121
|
+
values: .+
|
122
|
+
- name: Fill Length and Sync Pattern
|
123
|
+
required: false
|
124
|
+
description: Setting this flag to true causes the length field and sync
|
125
|
+
pattern (if present) to be filled automatically on outgoing packets.
|
126
|
+
Default is false
|
127
|
+
values: ['false','true']
|
128
|
+
TERMINATED:
|
129
|
+
description: The Terminated Stream Protocol delineates packets using termination
|
130
|
+
characters found at the end of every packet. It continuously reads data from
|
131
|
+
the stream until the termination characters are found at which point it returns
|
132
|
+
the packet data. For example, all the packets using the interface are followed
|
133
|
+
by 0xABCD. This data can either be a part of each packet that is kept or
|
134
|
+
something which is known only by the Terminated Stream Protocol and simply
|
135
|
+
thrown away.
|
136
|
+
parameters:
|
137
|
+
- name: Write Termination Characters
|
138
|
+
required: true
|
139
|
+
description: The data to write to the stream after writing a command packet.
|
140
|
+
Given as a hex string such as 0xABCD.
|
141
|
+
values: .+
|
142
|
+
- name: Read Termination Characters
|
143
|
+
required: true
|
144
|
+
description: The characters at the end of the stream which delineate the end
|
145
|
+
of a telemetry packet. Given as a hex string such as 0xABCD.
|
146
|
+
values: .+
|
147
|
+
- name: Strip Read Termination
|
148
|
+
required: false
|
149
|
+
description: Whether to remove the read termination characters from the
|
150
|
+
stream before returning the telemetry packet. Default is true.
|
151
|
+
values: ['true','false']
|
152
|
+
- name: Discard Leading Bytes
|
153
|
+
required: false
|
154
|
+
description: The number of bytes to discard from the binary data after
|
155
|
+
reading from the stream. Note that this applies to bytes including the
|
156
|
+
sync pattern if the sync pattern is being used.
|
157
|
+
Default is 0 (do not discard bytes)
|
158
|
+
values: \d+
|
159
|
+
- name: Sync Pattern
|
160
|
+
required: false
|
161
|
+
description: Hex string representing a byte pattern that will be searched
|
162
|
+
for in the raw stream. This pattern represents a packet delimiter and all
|
163
|
+
data found including the sync pattern will be returned.
|
164
|
+
Default is nil (no sync pattern)
|
165
|
+
values: .+
|
166
|
+
- name: Fill Sync Pattern
|
167
|
+
required: false
|
168
|
+
description: Whether or not to fill in the sync pattern on outgoing packets
|
169
|
+
Default is false
|
170
|
+
values: ['false','true']
|
171
|
+
PREIDENTIFIED:
|
172
|
+
description: The Preidentified Stream Protocol is used internally by the COSMOS
|
173
|
+
Command and Telemetry Server only and delineates packets using a custom COSMOS
|
174
|
+
header. This stream Protocol is configured by default on port 7779 and is
|
175
|
+
created by the Command and Telemetry Server to allow tools to connect and
|
176
|
+
receive the entire packet stream. The Telemetry Grapher uses this port to
|
177
|
+
receive all the packets following through the Command and Telemetry Server
|
178
|
+
in case any need to be graphed.
|
179
|
+
parameters:
|
180
|
+
- name: Sync Pattern
|
181
|
+
required: false
|
182
|
+
description: Hex string representing a byte pattern that will be searched
|
183
|
+
for in the raw stream. This pattern represents a packet delimiter and all
|
184
|
+
data found AFTER the sync pattern will be returned. The sync pattern itself
|
185
|
+
is discarded. Default is nil (no sync pattern)
|
186
|
+
values: .+
|
187
|
+
- name: Max Length
|
188
|
+
required: false
|
189
|
+
description: The maximum allowed value in the length field.
|
190
|
+
Default is nil (no maximum length)
|
191
|
+
values: .+
|
192
|
+
TEMPLATE:
|
193
|
+
description: The Template Stream Protocol works much like the Terminated Stream
|
194
|
+
Protocol except it designed for text-based command and response type interfaces
|
195
|
+
such as SCPI (Standard Commands for Programmable Instruments). It delineates
|
196
|
+
packets in the same way as the terminated stream protocol except each packet
|
197
|
+
is referred to as a line (because each usually contains a line of text).
|
198
|
+
For outgoing packets a CMD_TEMPLATE field is expected to exist in the packet.
|
199
|
+
This field contains a template string with items to be filled in deliniated
|
200
|
+
within HTML tag style brackets “". The Template Stream Protocol will read the
|
201
|
+
named items from within the packet fill in the CMD_TEMPLATE. This filled in
|
202
|
+
string is then sent out rather than the originally passed in packet.
|
203
|
+
Correspondingly, if a response is expected the outgoing packet should include
|
204
|
+
a RSP_TEMPLATE and RSP_PACKET field. The RSP_TEMPLATE is used to extract data
|
205
|
+
from the response string and build a corresponding RSP_PACKET. See the TEMPLATE
|
206
|
+
target within the COSMOS Demo configuration for an example of usage.
|
207
|
+
parameters:
|
208
|
+
- name: Write Termination Characters
|
209
|
+
required: true
|
210
|
+
description: The data to write to the stream after writing a command packet.
|
211
|
+
Given as a hex string such as 0xABCD.
|
212
|
+
values: .+
|
213
|
+
- name: Read Termination Characters
|
214
|
+
required: true
|
215
|
+
description: The characters at the end of the stream which delineate the end
|
216
|
+
of a telemetry packet. Given as a hex string such as 0xABCD.
|
217
|
+
values: .+
|
218
|
+
- name: Ignore Lines
|
219
|
+
required: false
|
220
|
+
description: Number of response lines to ignore (completely drop).
|
221
|
+
Default is 0.
|
222
|
+
values: \d+
|
223
|
+
- name: Initial Read Delay
|
224
|
+
required: false
|
225
|
+
description: An initial delay after connecting after which the stream will
|
226
|
+
be read till empty and data dropped. Useful for discarding connect headers
|
227
|
+
and initial prompts. Default is nil (no initial read)
|
228
|
+
values: \d+
|
229
|
+
- name: Response Lines
|
230
|
+
required: false
|
231
|
+
description: The number of lines that make up expected responses.
|
232
|
+
Default is 1.
|
233
|
+
values: \d+
|
234
|
+
- name: Strip Read Termination
|
235
|
+
required: false
|
236
|
+
description: Whether to remove the read termination characters from the
|
237
|
+
stream before returning the telemetry packet. Default is true.
|
238
|
+
values: ['true','false']
|
239
|
+
- name: Discard Leading Bytes
|
240
|
+
required: false
|
241
|
+
description: The number of bytes to discard from the binary data after
|
242
|
+
reading from the stream. Note that this applies to bytes including the
|
243
|
+
sync pattern if the sync pattern is being used.
|
244
|
+
Default is 0 (do not discard bytes)
|
245
|
+
values: \d+
|
246
|
+
- name: Sync Pattern
|
247
|
+
required: false
|
248
|
+
description: Hex string representing a byte pattern that will be searched
|
249
|
+
for in the raw stream. This pattern represents a packet delimiter and all
|
250
|
+
data found including the sync pattern will be returned.
|
251
|
+
Default is nil (no sync pattern)
|
252
|
+
values: .+
|
253
|
+
- name: Fill Sync Pattern
|
254
|
+
required: false
|
255
|
+
description: Whether or not to fill in the sync pattern on outgoing packets
|
256
|
+
Default is false
|
257
|
+
values: ['false','true']
|
@@ -0,0 +1,151 @@
|
|
1
|
+
---
|
2
|
+
SCREEN:
|
3
|
+
summary: Define a telemetry viewer screen
|
4
|
+
parameters:
|
5
|
+
- name: Width
|
6
|
+
required: true
|
7
|
+
description: Width in pixels or AUTO to let Telemetry Viewer automatically
|
8
|
+
layout the screen
|
9
|
+
values: \d+
|
10
|
+
- name: Height
|
11
|
+
required: true
|
12
|
+
description: Height in pixels or AUTO to let Telemetry Viewer automatically
|
13
|
+
layout the screen
|
14
|
+
values: \d+
|
15
|
+
- name: Polling Period
|
16
|
+
required: true
|
17
|
+
description: Number of seconds between screen updates
|
18
|
+
values: '[0-9]*\.?[0-9]+'
|
19
|
+
END:
|
20
|
+
summary: Indicates the close of a layout widget
|
21
|
+
description: All layout widgets must be closed to properly identify where they
|
22
|
+
stop. For example, a VERTICALBOX keyword must be matched with an END keyword
|
23
|
+
to indicate where the VERTICALBOX ends.
|
24
|
+
GLOBAL_SETTING:
|
25
|
+
summary: Applies a widget setting to all widgets of a certain type
|
26
|
+
parameters:
|
27
|
+
- name: Widget Class Name
|
28
|
+
required: true
|
29
|
+
description: The name of the class of widgets that this setting will be
|
30
|
+
applied to. For example, LABEL or BUTTON.
|
31
|
+
values: .+
|
32
|
+
- name: Setting Name
|
33
|
+
required: true
|
34
|
+
description: Widget specific setting name. COSMOS defines several settings
|
35
|
+
which apply across many different widget types. However, you can also use
|
36
|
+
the 'RAW' setting which allows any stylesheet values that QT supports.
|
37
|
+
See the QT Stylesheet documentation for more information.
|
38
|
+
values: <%= %w(TEXTALIGN PADDING MARGIN BACKCOLOR TEXTCOLOR BORDERCOLOR WIDTH HEIGHT RAW) %>
|
39
|
+
- name: Setting Value(s)
|
40
|
+
required: false
|
41
|
+
description: >
|
42
|
+
The setting value which varies by setting. Note that color
|
43
|
+
settings can be given as a common string, e.g. 'red', or by RGB values,
|
44
|
+
e.g. 255 0 0. If the setting is RAW the value should be the raw stylesheet
|
45
|
+
string, e.g. "font-size: 10px"
|
46
|
+
values: .*
|
47
|
+
GLOBAL_SUBSETTING:
|
48
|
+
summary: Applies a widget subsetting to all widgets of a certain type
|
49
|
+
description: Subsettings are only valid for widgets that are
|
50
|
+
made up of more than one subwidget. For example, LABELVALUE is made up of a LABEL
|
51
|
+
at subwidget index 0 and a VALUE at subwidget index 1. This allows for passing
|
52
|
+
settings to specific subwidgets. Some widgets are made up of multiple subwidgets,
|
53
|
+
e.g. LABELVALUELIMITSBAR. To set the label text color, pass '0:0' as the Subwidget
|
54
|
+
Index to first index the LABELVALUE and then the LABEL.
|
55
|
+
parameters:
|
56
|
+
- name: Widget Class Name
|
57
|
+
required: true
|
58
|
+
description: The name of the class of widgets that this setting will be
|
59
|
+
applied to. For example, LABELVALUE.
|
60
|
+
values: .+
|
61
|
+
- name: Subwidget Index
|
62
|
+
required: true
|
63
|
+
description: Index to the desired subwidget or 'ALL' to apply the setting
|
64
|
+
to all the subwidgets of this composite widget.
|
65
|
+
values: .+
|
66
|
+
- name: Setting Name
|
67
|
+
required: true
|
68
|
+
description: Widget specific setting name. COSMOS defines several settings
|
69
|
+
which apply across many different widget types. However, you can also use
|
70
|
+
the 'RAW' setting which allows any stylesheet values that QT supports.
|
71
|
+
See the QT Stylesheet documentation for more information.
|
72
|
+
values: <%= %w(TEXTALIGN PADDING MARGIN BACKCOLOR TEXTCOLOR BORDERCOLOR WIDTH HEIGHT RAW) %>
|
73
|
+
- name: Setting Value(s)
|
74
|
+
required: false
|
75
|
+
description: >
|
76
|
+
The setting value which varies by setting. Note that color
|
77
|
+
settings can be given as a common string, e.g. 'red', or by RGB values,
|
78
|
+
e.g. 255 0 0. If the setting is RAW the value should be the raw stylesheet
|
79
|
+
string, e.g. "font-size: 10px"
|
80
|
+
values: .*
|
81
|
+
SETTING:
|
82
|
+
summary: Applies a widget setting to the previously defined widget
|
83
|
+
parameters:
|
84
|
+
- name: Setting Name
|
85
|
+
required: true
|
86
|
+
description: Widget specific setting name. COSMOS defines several settings
|
87
|
+
which apply across many different widget types. However, you can also use
|
88
|
+
the 'RAW' setting which allows any stylesheet values that QT supports.
|
89
|
+
See the QT Stylesheet documentation for more information.
|
90
|
+
values: <%= %w(TEXTALIGN PADDING MARGIN BACKCOLOR TEXTCOLOR BORDERCOLOR WIDTH HEIGHT RAW) %>
|
91
|
+
- name: Setting Value(s)
|
92
|
+
required: false
|
93
|
+
description: >
|
94
|
+
The setting value which varies by setting. Note that color
|
95
|
+
settings can be given as a common string, e.g. 'red', or by RGB values,
|
96
|
+
e.g. 255 0 0. If the setting is RAW the value should be the raw stylesheet
|
97
|
+
string, e.g. "font-size: 10px"
|
98
|
+
values: .*
|
99
|
+
SUBSETTING:
|
100
|
+
summary: Applies a widget subsetting to the previously defined widget
|
101
|
+
description: Subsettings are only valid for widgets that are
|
102
|
+
made up of more than one subwidget. For example, LABELVALUE is made up of a LABEL
|
103
|
+
at subwidget index 0 and a VALUE at subwidget index 1. This allows for passing
|
104
|
+
settings to specific subwidgets. Some widgets are made up of multiple subwidgets,
|
105
|
+
e.g. LABELVALUELIMITSBAR. To set the label text color, pass '0:0' as the Subwidget
|
106
|
+
Index to first index the LABELVALUE and then the LABEL.
|
107
|
+
parameters:
|
108
|
+
- name: Subwidget Index
|
109
|
+
required: true
|
110
|
+
description: Index to the desired subwidget or 'ALL' to apply the setting
|
111
|
+
to all the subwidgets of this composite widget.
|
112
|
+
values: .+
|
113
|
+
- name: Setting Name
|
114
|
+
required: true
|
115
|
+
description: Widget specific setting name. COSMOS defines several settings
|
116
|
+
which apply across many different widget types. However, you can also use
|
117
|
+
the 'RAW' setting which allows any stylesheet values that QT supports.
|
118
|
+
See the QT Stylesheet documentation for more information.
|
119
|
+
values: <%= %w(TEXTALIGN PADDING MARGIN BACKCOLOR TEXTCOLOR BORDERCOLOR WIDTH HEIGHT RAW) %>
|
120
|
+
- name: Setting Value(s)
|
121
|
+
required: false
|
122
|
+
description: >
|
123
|
+
The setting value which varies by setting. Note that color
|
124
|
+
settings can be given as a common string, e.g. 'red', or by RGB values,
|
125
|
+
e.g. 255 0 0. If the setting is RAW the value should be the raw stylesheet
|
126
|
+
string, e.g. "font-size: 10px"
|
127
|
+
values: .*
|
128
|
+
NAMED_WIDGET:
|
129
|
+
summary: Name a widget to allow access to it via the get_named_widget method
|
130
|
+
description: To programatically accesss parts of a telemetry screen you need
|
131
|
+
to name the widget. This is useful when creating screens with buttons that
|
132
|
+
read values from other widgets.
|
133
|
+
warning: get_named_widget returns the widget itself and thus must be operated
|
134
|
+
on using methods native to that widget
|
135
|
+
parameters:
|
136
|
+
- name: Widget Name
|
137
|
+
required: true
|
138
|
+
description: The unique name applied to the following widget instance.
|
139
|
+
Names must be unique per screen.
|
140
|
+
values: .+
|
141
|
+
- name: Widget Type
|
142
|
+
required: true
|
143
|
+
description: One of the widget types listed in Widget Descriptions
|
144
|
+
values: .+
|
145
|
+
- name: Widget Parameters
|
146
|
+
required: true
|
147
|
+
description: The unique parameters for the given widget type
|
148
|
+
values: .+
|
149
|
+
# Even though these are technically SCREEN modifiers we load them at the top_frame
|
150
|
+
# level so they appear as available keywords
|
151
|
+
<%= MetaConfigParser.load('widgets.yaml').to_meta_config_yaml(0) %>
|