cosmos 4.0.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitattributes +3 -0
- data/.gitignore +48 -0
- data/.rubocop.yml +23 -0
- data/.travis.yml +10 -0
- data/.yardopts +3 -0
- data/CONTRIBUTING.txt +50 -0
- data/Gemfile +10 -0
- data/Guardfile +27 -0
- data/LICENSE.txt +879 -0
- data/Manifest.txt +1549 -0
- data/README.md +111 -0
- data/Rakefile +264 -0
- data/autohotkey/config/data/attitude.bin +0 -0
- data/autohotkey/config/data/diamond.STL +58 -0
- data/autohotkey/config/data/groundoff.gif +0 -0
- data/autohotkey/config/data/groundon.gif +0 -0
- data/autohotkey/config/data/position.bin +0 -0
- data/autohotkey/config/data/satellite.gif +0 -0
- data/autohotkey/config/data/tada.wav +0 -0
- data/autohotkey/config/system/system.txt +29 -0
- data/autohotkey/config/targets/INST/cmd_tlm/inst_cmds.txt +126 -0
- data/autohotkey/config/targets/INST/cmd_tlm/inst_tlm.txt +270 -0
- data/autohotkey/config/targets/INST/cmd_tlm_server.txt +5 -0
- data/autohotkey/config/targets/INST/doc/README.txt +1 -0
- data/autohotkey/config/targets/INST/lib/example_limits_response.rb +30 -0
- data/autohotkey/config/targets/INST/lib/sim_inst.rb +305 -0
- data/autohotkey/config/targets/INST/screens/_footer.txt +4 -0
- data/autohotkey/config/targets/INST/screens/adcs.txt +46 -0
- data/autohotkey/config/targets/INST/screens/array.txt +7 -0
- data/autohotkey/config/targets/INST/screens/block.txt +8 -0
- data/autohotkey/config/targets/INST/screens/commanding.txt +30 -0
- data/autohotkey/config/targets/INST/screens/extra.txt +19 -0
- data/autohotkey/config/targets/INST/screens/graphs.txt +14 -0
- data/autohotkey/config/targets/INST/screens/ground.txt +25 -0
- data/autohotkey/config/targets/INST/screens/health_status.txt +33 -0
- data/autohotkey/config/targets/INST/screens/hs.txt +46 -0
- data/autohotkey/config/targets/INST/screens/image.txt +21 -0
- data/autohotkey/config/targets/INST/screens/latest.txt +23 -0
- data/autohotkey/config/targets/INST/screens/mech.txt +25 -0
- data/autohotkey/config/targets/INST/screens/other.txt +25 -0
- data/autohotkey/config/targets/INST/screens/params.txt +25 -0
- data/autohotkey/config/targets/INST/screens/tabs.txt +68 -0
- data/autohotkey/config/targets/INST/sequences/run_sequence.txt +1 -0
- data/autohotkey/config/targets/INST/target.txt +27 -0
- data/autohotkey/config/targets/META/cmd_tlm/meta_cmd.txt +10 -0
- data/autohotkey/config/targets/META/cmd_tlm/meta_tlm.txt +9 -0
- data/autohotkey/config/targets/META/screens/data.txt +12 -0
- data/autohotkey/config/targets/SYSTEM/cmd_tlm/limits_groups.txt +7 -0
- data/autohotkey/config/targets/SYSTEM/cmd_tlm/meta_cmd_tlm.txt +16 -0
- data/autohotkey/config/targets/SYSTEM/cmd_tlm/system_cmds.txt +41 -0
- data/autohotkey/config/targets/SYSTEM/cmd_tlm/system_tlm.txt +7 -0
- data/autohotkey/config/targets/SYSTEM/screens/error.txt +11 -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_sender/cmd_sender.txt +1 -0
- data/autohotkey/config/tools/cmd_tlm_server/cmd_tlm_server.txt +22 -0
- data/autohotkey/config/tools/data_viewer/data_viewer.txt +11 -0
- data/autohotkey/config/tools/handbook_creator/default_toc.xsl +59 -0
- data/autohotkey/config/tools/handbook_creator/handbook_creator.txt +49 -0
- data/autohotkey/config/tools/handbook_creator/templates/command_packets.html.erb +86 -0
- data/autohotkey/config/tools/handbook_creator/templates/command_toc.html.erb +38 -0
- data/autohotkey/config/tools/handbook_creator/templates/footer.html.erb +9 -0
- data/autohotkey/config/tools/handbook_creator/templates/header.html.erb +25 -0
- data/autohotkey/config/tools/handbook_creator/templates/limits_groups.html.erb +13 -0
- data/autohotkey/config/tools/handbook_creator/templates/nav.html.erb +27 -0
- data/autohotkey/config/tools/handbook_creator/templates/overview.html.erb +1 -0
- data/autohotkey/config/tools/handbook_creator/templates/pdf_cover.html.erb +23 -0
- data/autohotkey/config/tools/handbook_creator/templates/pdf_footer.html.erb +33 -0
- data/autohotkey/config/tools/handbook_creator/templates/pdf_header.html.erb +41 -0
- data/autohotkey/config/tools/handbook_creator/templates/telemetry_packets.html.erb +80 -0
- data/autohotkey/config/tools/handbook_creator/templates/telemetry_toc.html.erb +38 -0
- data/autohotkey/config/tools/handbook_creator/templates/title.html.erb +1 -0
- data/autohotkey/config/tools/launcher/launcher.txt +38 -0
- data/autohotkey/config/tools/limits_monitor/README.txt +1 -0
- data/autohotkey/config/tools/opengl_builder/error.txt +1 -0
- data/autohotkey/config/tools/script_runner/script_runner.txt +3 -0
- data/autohotkey/config/tools/table_manager/ConfigTables_def.txt +8 -0
- data/autohotkey/config/tools/table_manager/OldOneDimensionalTable_def.txt +19 -0
- data/autohotkey/config/tools/table_manager/OldTwoDimensionalTable_def.txt +248 -0
- data/autohotkey/config/tools/table_manager/OneDimensionalTable_def.txt +31 -0
- data/autohotkey/config/tools/table_manager/TwoDimensionalTable_def.txt +28 -0
- data/autohotkey/config/tools/test_runner/test_runner.txt +8 -0
- data/autohotkey/config/tools/test_runner/test_runner2.txt +11 -0
- data/autohotkey/config/tools/test_runner/test_runner3.txt +7 -0
- data/autohotkey/config/tools/test_runner/test_runner4.txt +1 -0
- data/autohotkey/config/tools/tlm_extractor/tlm_extractor.txt +14 -0
- data/autohotkey/config/tools/tlm_extractor/tlm_extractor2.txt +9 -0
- data/autohotkey/config/tools/tlm_grapher/README.txt +1 -0
- data/autohotkey/config/tools/tlm_grapher/bad.txt +50 -0
- data/autohotkey/config/tools/tlm_grapher/temp1-4.txt +51 -0
- data/autohotkey/config/tools/tlm_grapher/test2.txt +111 -0
- data/autohotkey/config/tools/tlm_viewer/tlm_viewer.txt +24 -0
- data/autohotkey/config/tools/tlm_viewer/tlm_viewer2.txt +4 -0
- data/autohotkey/config/tools/tlm_viewer/tlm_viewer3.txt +3 -0
- data/autohotkey/lib/example_background_task.rb +42 -0
- data/autohotkey/lib/user_version.rb +3 -0
- data/autohotkey/procedures/clear_util.rb +7 -0
- data/autohotkey/procedures/collect.rb +18 -0
- data/autohotkey/procedures/collect_util.rb +14 -0
- data/autohotkey/procedures/example_test.rb +71 -0
- data/autohotkey/procedures/example_test2.rb +74 -0
- data/autohotkey/procedures/script_test.rb +21 -0
- data/autohotkey/procedures/syntax_error.rb +18 -0
- data/autohotkey/tools/CmdExtractorAHK +16 -0
- data/autohotkey/tools/CmdSender +14 -0
- data/autohotkey/tools/CmdSenderAHK +18 -0
- data/autohotkey/tools/CmdSequence +14 -0
- data/autohotkey/tools/CmdSequenceAHK +23 -0
- data/autohotkey/tools/CmdSequenceAHK2 +16 -0
- data/autohotkey/tools/CmdTlmServer +14 -0
- data/autohotkey/tools/CmdTlmServerAHK +28 -0
- data/autohotkey/tools/CmdTlmServerAHK2 +17 -0
- data/autohotkey/tools/ConfigEditor +16 -0
- data/autohotkey/tools/DataViewer +14 -0
- data/autohotkey/tools/DataViewerAHK +17 -0
- data/autohotkey/tools/HandbookCreatorAHK +20 -0
- data/autohotkey/tools/LauncherAHK +17 -0
- data/autohotkey/tools/LimitsMonitorAHK +20 -0
- data/autohotkey/tools/OpenGLBuilderAHK +24 -0
- data/autohotkey/tools/PacketViewer +14 -0
- data/autohotkey/tools/PacketViewerAHK +18 -0
- data/autohotkey/tools/PacketViewerAHK2 +17 -0
- data/autohotkey/tools/Replay +14 -0
- data/autohotkey/tools/ReplayAHK +17 -0
- data/autohotkey/tools/ScriptRunner +14 -0
- data/autohotkey/tools/ScriptRunnerAHK +20 -0
- data/autohotkey/tools/ScriptRunnerAHK2 +17 -0
- data/autohotkey/tools/TableManager +14 -0
- data/autohotkey/tools/TableManagerAHK +25 -0
- data/autohotkey/tools/TableManagerAHK2 +18 -0
- data/autohotkey/tools/TableManagerAHK3 +18 -0
- data/autohotkey/tools/TableManagerAHK4 +24 -0
- data/autohotkey/tools/TestRunner +15 -0
- data/autohotkey/tools/TestRunnerAHK +17 -0
- data/autohotkey/tools/TestRunnerAHK2 +17 -0
- data/autohotkey/tools/TestRunnerAHK3 +17 -0
- data/autohotkey/tools/TestRunnerAHK4 +17 -0
- data/autohotkey/tools/TestRunnerAHK5 +17 -0
- data/autohotkey/tools/TestRunnerAHK6 +17 -0
- data/autohotkey/tools/TlmExtractor +15 -0
- data/autohotkey/tools/TlmExtractorAHK +19 -0
- data/autohotkey/tools/TlmExtractorAHK2 +16 -0
- data/autohotkey/tools/TlmExtractorAHK3 +16 -0
- data/autohotkey/tools/TlmGrapher +14 -0
- data/autohotkey/tools/TlmGrapherAHK +19 -0
- data/autohotkey/tools/TlmGrapherAHK2 +23 -0
- data/autohotkey/tools/TlmGrapherAHK3 +17 -0
- data/autohotkey/tools/TlmGrapherAHK4 +17 -0
- data/autohotkey/tools/TlmViewer +14 -0
- data/autohotkey/tools/TlmViewerAHK +28 -0
- data/autohotkey/tools/TlmViewerAHK2 +22 -0
- data/autohotkey/tools/TlmViewerAHK3 +23 -0
- data/autohotkey/tools/TlmViewerAHK4 +22 -0
- data/autohotkey/tools/TlmViewerAHK5 +18 -0
- data/autohotkey/tools/autohotkey.rb +38 -0
- data/autohotkey/tools/cmd_extractor.ahk +50 -0
- data/autohotkey/tools/cmd_sender.ahk +180 -0
- data/autohotkey/tools/cmd_sequence.ahk +215 -0
- data/autohotkey/tools/cmd_sequence2.ahk +23 -0
- data/autohotkey/tools/cmd_tlm_server.ahk +90 -0
- data/autohotkey/tools/cmd_tlm_server2.ahk +45 -0
- data/autohotkey/tools/data_viewer.ahk +140 -0
- data/autohotkey/tools/handbook_creator.ahk +32 -0
- data/autohotkey/tools/launcher.ahk +41 -0
- data/autohotkey/tools/limits_monitor.ahk +121 -0
- data/autohotkey/tools/open_gl_builder.ahk +133 -0
- data/autohotkey/tools/packet_viewer.ahk +217 -0
- data/autohotkey/tools/packet_viewer2.ahk +9 -0
- data/autohotkey/tools/replay.ahk +103 -0
- data/autohotkey/tools/script_runner.ahk +588 -0
- data/autohotkey/tools/script_runner2.ahk +50 -0
- data/autohotkey/tools/table_manager.ahk +291 -0
- data/autohotkey/tools/test_runner.ahk +262 -0
- data/autohotkey/tools/test_runner2.ahk +49 -0
- data/autohotkey/tools/test_runner3.ahk +11 -0
- data/autohotkey/tools/test_runner5.ahk +8 -0
- data/autohotkey/tools/test_runner6.ahk +5 -0
- data/autohotkey/tools/tlm_extractor.ahk +357 -0
- data/autohotkey/tools/tlm_grapher.ahk +658 -0
- data/autohotkey/tools/tlm_grapher2.ahk +115 -0
- data/autohotkey/tools/tlm_grapher3.ahk +23 -0
- data/autohotkey/tools/tlm_viewer.ahk +140 -0
- data/autohotkey/tools/tlm_viewer2.ahk +49 -0
- data/autohotkey/tools/tlm_viewer4.ahk +4 -0
- data/autohotkey/tools/tlm_viewer5.ahk +19 -0
- data/autohotkey/tools/tool_launch.rb +38 -0
- data/bin/cosmos +266 -0
- data/bin/cstol_converter +1166 -0
- data/bin/exchndl20-x64.dll +0 -0
- data/bin/exchndl20.dll +0 -0
- data/bin/exchndl21-x64.dll +0 -0
- data/bin/exchndl21.dll +0 -0
- data/bin/exchndl22-x64.dll +0 -0
- data/bin/exchndl22.dll +0 -0
- data/bin/mgwhelp-x64.dll +0 -0
- data/bin/mgwhelp.dll +0 -0
- data/bin/rubysloc +85 -0
- data/bin/xtce_converter +83 -0
- data/cosmos.gemspec +109 -0
- data/data/COSMOS_64x64.bmp +0 -0
- data/data/COSMOS_64x64.ico +0 -0
- data/data/COSMOS_64x64.png +0 -0
- data/data/COSMOS_Architecture.png +0 -0
- data/data/CheckBoxCheck.gif +0 -0
- data/data/CheckBoxEmpty.gif +0 -0
- data/data/Earthmap1024x512.gif +0 -0
- data/data/about.txt +4 -0
- data/data/add_database.png +0 -0
- data/data/add_plot.png +0 -0
- data/data/add_tab.png +0 -0
- data/data/blank.png +0 -0
- data/data/bug.png +0 -0
- data/data/checkmark.png +0 -0
- data/data/close.png +0 -0
- data/data/cmd_extractor.png +0 -0
- data/data/cmd_sender.png +0 -0
- 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 +124 -0
- data/data/config/command.yaml +40 -0
- data/data/config/command_modifiers.yaml +145 -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 +211 -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 +46 -0
- data/data/config/parameter_modifiers.yaml +180 -0
- data/data/config/protocols.yaml +273 -0
- data/data/config/screen.yaml +151 -0
- data/data/config/script_runner.yaml +15 -0
- data/data/config/system.yaml +247 -0
- data/data/config/table_manager.yaml +76 -0
- data/data/config/table_parameter_modifiers.yaml +9 -0
- data/data/config/target.yaml +80 -0
- data/data/config/telemetry.yaml +80 -0
- data/data/config/telemetry_modifiers.yaml +142 -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 +112 -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/copy.png +0 -0
- data/data/cosmos.xcf +0 -0
- data/data/cosmos_word.gif +0 -0
- data/data/crc.txt +351 -0
- data/data/critical.wav +0 -0
- data/data/cts.png +0 -0
- data/data/cut.png +0 -0
- data/data/data_viewer.png +0 -0
- data/data/delete.png +0 -0
- data/data/delete_database.png +0 -0
- data/data/delete_plot.png +0 -0
- data/data/delete_tab.png +0 -0
- data/data/diamond.STL +58 -0
- data/data/disconnected.png +0 -0
- data/data/edit.png +0 -0
- data/data/edit_database.png +0 -0
- data/data/edit_plot.png +0 -0
- data/data/edit_tab.png +0 -0
- data/data/end-26.png +0 -0
- data/data/fast_forward-26.png +0 -0
- data/data/file.png +0 -0
- data/data/handbook_creator.png +0 -0
- data/data/help.png +0 -0
- data/data/html-32.png +0 -0
- data/data/information.wav +0 -0
- data/data/input.wav +0 -0
- data/data/launcher.png +0 -0
- data/data/legal.gif +0 -0
- data/data/legal.txt +8 -0
- data/data/limits_monitor.png +0 -0
- data/data/message.wav +0 -0
- data/data/moonmap1k.gif +0 -0
- data/data/multi.png +0 -0
- data/data/open.png +0 -0
- data/data/open_in_browser-32.png +0 -0
- data/data/opengl_builder.png +0 -0
- data/data/packet_viewer.png +0 -0
- data/data/pdf-32.png +0 -0
- data/data/play-26.png +0 -0
- data/data/question.wav +0 -0
- data/data/redo.png +0 -0
- data/data/replay.png +0 -0
- data/data/reverse-play-26.png +0 -0
- data/data/rewind-26.png +0 -0
- data/data/running.png +0 -0
- data/data/save.png +0 -0
- data/data/save_as.png +0 -0
- data/data/screenshot.png +0 -0
- data/data/script_runner.png +0 -0
- data/data/search-14.png +0 -0
- data/data/search.png +0 -0
- data/data/send_file.png +0 -0
- data/data/skip_to_start-26.png +0 -0
- data/data/spinner.gif +0 -0
- data/data/splash.gif +0 -0
- data/data/stop-26.png +0 -0
- data/data/table_manager.png +0 -0
- data/data/test_runner.png +0 -0
- data/data/tlm_extractor.png +0 -0
- data/data/tlm_grapher.png +0 -0
- data/data/tlm_viewer.png +0 -0
- data/data/undo.png +0 -0
- data/data/warning.wav +0 -0
- data/demo/Gemfile +10 -0
- data/demo/Launcher +16 -0
- data/demo/Launcher.bat +9 -0
- data/demo/Rakefile +77 -0
- data/demo/config/data/attitude.bin +0 -0
- data/demo/config/data/crc.txt +258 -0
- data/demo/config/data/diamond.STL +58 -0
- data/demo/config/data/groundoff.gif +0 -0
- data/demo/config/data/groundon.gif +0 -0
- data/demo/config/data/hselectoff.gif +0 -0
- data/demo/config/data/hselecton.gif +0 -0
- data/demo/config/data/hswitchoff.gif +0 -0
- data/demo/config/data/hswitchon.gif +0 -0
- data/demo/config/data/meta_init.txt +1 -0
- data/demo/config/data/position.bin +0 -0
- data/demo/config/data/poweroff.gif +0 -0
- data/demo/config/data/poweron.gif +0 -0
- data/demo/config/data/satellite.gif +0 -0
- data/demo/config/data/tada.wav +0 -0
- data/demo/config/data/vswitchoff.gif +0 -0
- data/demo/config/data/vswitchon.gif +0 -0
- data/demo/config/system/system.txt +47 -0
- data/demo/config/system/system2.txt +43 -0
- data/demo/config/targets/EXAMPLE/cmd_tlm/example_cmds.txt +2 -0
- data/demo/config/targets/EXAMPLE/cmd_tlm/example_tlm.txt +5 -0
- data/demo/config/targets/EXAMPLE/cmd_tlm_server.txt +6 -0
- data/demo/config/targets/EXAMPLE/lib/example_interface.rb +18 -0
- data/demo/config/targets/EXAMPLE/target.txt +9 -0
- data/demo/config/targets/INST/cmd_tlm/_ccsds_cmd.txt +9 -0
- data/demo/config/targets/INST/cmd_tlm/_ccsds_tlm.txt +19 -0
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +57 -0
- data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +164 -0
- data/demo/config/targets/INST/cmd_tlm_server.txt +5 -0
- data/demo/config/targets/INST/doc/README.txt +1 -0
- data/demo/config/targets/INST/lib/example_limits_response.rb +30 -0
- data/demo/config/targets/INST/lib/inst_dump_component.rb +34 -0
- data/demo/config/targets/INST/lib/sim_inst.rb +321 -0
- data/demo/config/targets/INST/procedures/checks.rb +11 -0
- data/demo/config/targets/INST/procedures/collect.rb +18 -0
- data/demo/config/targets/INST/procedures/disconnect.rb +29 -0
- data/demo/config/targets/INST/procedures/utilities/clear.rb +7 -0
- data/demo/config/targets/INST/procedures/utilities/collect.rb +14 -0
- data/demo/config/targets/INST/screens/_footer.txt +4 -0
- data/demo/config/targets/INST/screens/adcs.txt +70 -0
- data/demo/config/targets/INST/screens/array.txt +15 -0
- data/demo/config/targets/INST/screens/block.txt +8 -0
- data/demo/config/targets/INST/screens/commanding.txt +37 -0
- data/demo/config/targets/INST/screens/graphs.txt +14 -0
- data/demo/config/targets/INST/screens/ground.txt +25 -0
- data/demo/config/targets/INST/screens/hs.txt +42 -0
- data/demo/config/targets/INST/screens/latest.txt +23 -0
- data/demo/config/targets/INST/screens/limits.txt +43 -0
- data/demo/config/targets/INST/screens/other.txt +24 -0
- 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 +68 -0
- 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 +37 -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 +6 -0
- data/demo/config/targets/SYSTEM/cmd_tlm/meta_tlm.txt +10 -0
- data/demo/config/targets/SYSTEM/cmd_tlm/override.txt +29 -0
- data/demo/config/targets/SYSTEM/cmd_tlm/system_cmds.txt +41 -0
- data/demo/config/targets/SYSTEM/cmd_tlm/system_tlm.txt +7 -0
- data/demo/config/targets/SYSTEM/cmd_tlm_server.txt +6 -0
- data/demo/config/targets/SYSTEM/lib/limits_groups.rb +55 -0
- data/demo/config/targets/SYSTEM/screens/status.txt +12 -0
- data/demo/config/targets/SYSTEM/target.txt +12 -0
- data/demo/config/targets/TEMPLATED/cmd_tlm/templated_cmds.txt +13 -0
- data/demo/config/targets/TEMPLATED/cmd_tlm/templated_tlm.txt +3 -0
- data/demo/config/targets/TEMPLATED/cmd_tlm_server.txt +6 -0
- data/demo/config/targets/TEMPLATED/lib/templated_interface.rb +59 -0
- data/demo/config/targets/TEMPLATED/target.txt +8 -0
- data/demo/config/tools/cmd_tlm_server/cmd_tlm_server.txt +49 -0
- data/demo/config/tools/cmd_tlm_server/cmd_tlm_server2.txt +42 -0
- data/demo/config/tools/data_viewer/data_viewer.txt +20 -0
- data/demo/config/tools/example_application.css +58 -0
- data/demo/config/tools/handbook_creator/default_toc.xsl +59 -0
- data/demo/config/tools/handbook_creator/handbook_creator.txt +66 -0
- data/demo/config/tools/handbook_creator/templates/command_packets.html.erb +88 -0
- data/demo/config/tools/handbook_creator/templates/command_toc.html.erb +38 -0
- data/demo/config/tools/handbook_creator/templates/footer.html.erb +9 -0
- data/demo/config/tools/handbook_creator/templates/header.html.erb +25 -0
- data/demo/config/tools/handbook_creator/templates/limits_groups.html.erb +13 -0
- data/demo/config/tools/handbook_creator/templates/nav.html.erb +27 -0
- data/demo/config/tools/handbook_creator/templates/overview.html.erb +1 -0
- data/demo/config/tools/handbook_creator/templates/pdf_cover.html.erb +23 -0
- data/demo/config/tools/handbook_creator/templates/pdf_footer.html.erb +33 -0
- data/demo/config/tools/handbook_creator/templates/pdf_header.html.erb +41 -0
- data/demo/config/tools/handbook_creator/templates/telemetry_packets.html.erb +82 -0
- data/demo/config/tools/handbook_creator/templates/telemetry_toc.html.erb +38 -0
- data/demo/config/tools/handbook_creator/templates/title.html.erb +1 -0
- data/demo/config/tools/launcher/launcher.css +7 -0
- data/demo/config/tools/launcher/launcher.txt +48 -0
- data/demo/config/tools/launcher/launcher2.css +10 -0
- data/demo/config/tools/launcher/launcher2.txt +48 -0
- data/demo/config/tools/launcher/launcher_mini.txt +45 -0
- data/demo/config/tools/limits_monitor/README.txt +1 -0
- data/demo/config/tools/opengl_builder/README.txt +1 -0
- data/demo/config/tools/script_runner/script_runner.txt +3 -0
- data/demo/config/tools/table_manager/ConfigTables_def.txt +8 -0
- data/demo/config/tools/table_manager/ExampleTableDefinition.txt +24 -0
- data/demo/config/tools/table_manager/MCConfigurationTable_fsw1_def.txt +37 -0
- data/demo/config/tools/table_manager/MCConfigurationTable_fsw2_def.txt +34 -0
- data/demo/config/tools/table_manager/PPSSelectionTable_def.txt +9 -0
- data/demo/config/tools/table_manager/TLMMonitoringTable_def.txt +31 -0
- data/demo/config/tools/test_runner/test_runner.css +45 -0
- data/demo/config/tools/test_runner/test_runner.txt +17 -0
- data/demo/config/tools/tlm_extractor/_adcs_time.txt +2 -0
- data/demo/config/tools/tlm_extractor/tlm_extractor.txt +13 -0
- data/demo/config/tools/tlm_extractor/tlm_extractor2.txt +2 -0
- data/demo/config/tools/tlm_extractor/tlm_extractor3.txt +2 -0
- data/demo/config/tools/tlm_extractor/tlm_extractor4.txt +2 -0
- data/demo/config/tools/tlm_grapher/README.txt +1 -0
- data/demo/config/tools/tlm_viewer/tlm_viewer.txt +41 -0
- data/demo/lib/example_background_task.rb +55 -0
- data/demo/lib/example_target.rb +103 -0
- data/demo/lib/scpi_target.rb +68 -0
- data/demo/lib/user_version.rb +3 -0
- data/demo/procedures/cosmos_api_test.rb +310 -0
- data/demo/procedures/example_test.rb +192 -0
- data/demo/procedures/plot_test.rb +8 -0
- data/demo/procedures/run_example_test.rb +3 -0
- data/demo/procedures/test.rb +51 -0
- data/demo/tools/CmdExtractor +16 -0
- data/demo/tools/CmdExtractor.bat +9 -0
- data/demo/tools/CmdSender +16 -0
- data/demo/tools/CmdSender.bat +9 -0
- data/demo/tools/CmdSequence +16 -0
- data/demo/tools/CmdSequence.bat +9 -0
- data/demo/tools/CmdTlmServer +16 -0
- data/demo/tools/CmdTlmServer.bat +9 -0
- data/demo/tools/ConfigEditor +16 -0
- data/demo/tools/ConfigEditor.bat +9 -0
- data/demo/tools/DataViewer +16 -0
- data/demo/tools/DataViewer.bat +9 -0
- data/demo/tools/ExampleTarget +16 -0
- data/demo/tools/ExampleTarget.bat +9 -0
- data/demo/tools/HandbookCreator +16 -0
- data/demo/tools/HandbookCreator.bat +9 -0
- data/demo/tools/Launcher +16 -0
- data/demo/tools/Launcher.bat +9 -0
- data/demo/tools/LimitsMonitor +16 -0
- data/demo/tools/LimitsMonitor.bat +9 -0
- data/demo/tools/OpenGLBuilder +16 -0
- data/demo/tools/OpenGLBuilder.bat +9 -0
- data/demo/tools/PacketViewer +16 -0
- data/demo/tools/PacketViewer.bat +9 -0
- data/demo/tools/Replay +16 -0
- data/demo/tools/Replay.bat +9 -0
- data/demo/tools/ScpiTarget +16 -0
- data/demo/tools/ScpiTarget.bat +9 -0
- data/demo/tools/ScriptRunner +16 -0
- data/demo/tools/ScriptRunner.bat +9 -0
- data/demo/tools/TableManager +16 -0
- data/demo/tools/TableManager.bat +9 -0
- data/demo/tools/TestRunner +16 -0
- data/demo/tools/TestRunner.bat +9 -0
- data/demo/tools/TlmExtractor +16 -0
- data/demo/tools/TlmExtractor.bat +9 -0
- data/demo/tools/TlmGrapher +16 -0
- data/demo/tools/TlmGrapher.bat +9 -0
- data/demo/tools/TlmViewer +16 -0
- data/demo/tools/TlmViewer.bat +9 -0
- data/demo/tools/ToolLaunch.bat +72 -0
- data/demo/tools/mac/CmdExtractor.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +16 -0
- data/demo/tools/mac/CmdExtractor.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/CmdExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/CmdExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/CmdSender.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +16 -0
- data/demo/tools/mac/CmdSender.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/CmdSender.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/CmdSender.app/Contents/Resources/appIcon.icns +0 -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/demo/tools/mac/CmdTlmServer.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +16 -0
- data/demo/tools/mac/CmdTlmServer.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/CmdTlmServer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/CmdTlmServer.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/ConfigEditor.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/ConfigEditor.app/Contents/MacOS/ConfigEditor.rb +16 -0
- data/demo/tools/mac/ConfigEditor.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/ConfigEditor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/ConfigEditor.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/DataViewer.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +16 -0
- data/demo/tools/mac/DataViewer.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/DataViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/DataViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/HandbookCreator.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +16 -0
- data/demo/tools/mac/HandbookCreator.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/HandbookCreator.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/HandbookCreator.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/Launcher.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +16 -0
- data/demo/tools/mac/Launcher.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/Launcher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/Launcher.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/LimitsMonitor.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +16 -0
- data/demo/tools/mac/LimitsMonitor.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/LimitsMonitor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/LimitsMonitor.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/OpenGLBuilder.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +16 -0
- data/demo/tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/OpenGLBuilder.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/OpenGLBuilder.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/PacketViewer.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +16 -0
- data/demo/tools/mac/PacketViewer.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/PacketViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/PacketViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/Replay.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/Replay.app/Contents/MacOS/Replay.rb +16 -0
- data/demo/tools/mac/Replay.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/Replay.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/Replay.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/ScriptRunner.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +16 -0
- data/demo/tools/mac/ScriptRunner.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/ScriptRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/ScriptRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/TableManager.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +16 -0
- data/demo/tools/mac/TableManager.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/TableManager.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TableManager.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/TestRunner.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +16 -0
- data/demo/tools/mac/TestRunner.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/TestRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TestRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/TlmExtractor.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +16 -0
- data/demo/tools/mac/TlmExtractor.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/TlmExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TlmExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/TlmGrapher.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +16 -0
- data/demo/tools/mac/TlmGrapher.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/TlmGrapher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TlmGrapher.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/mac/TlmViewer.app/Contents/Info.plist +38 -0
- data/demo/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +16 -0
- data/demo/tools/mac/TlmViewer.app/Contents/MacOS/main.sh +10 -0
- data/demo/tools/mac/TlmViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TlmViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/demo/tools/tool_launch.rb +38 -0
- data/ext/cosmos/ext/array/array.c +111 -0
- data/ext/cosmos/ext/array/extconf.rb +13 -0
- data/ext/cosmos/ext/buffered_file/buffered_file.c +167 -0
- data/ext/cosmos/ext/buffered_file/extconf.rb +13 -0
- data/ext/cosmos/ext/config_parser/config_parser.c +237 -0
- data/ext/cosmos/ext/config_parser/extconf.rb +13 -0
- data/ext/cosmos/ext/cosmos_io/cosmos_io.c +117 -0
- data/ext/cosmos/ext/cosmos_io/extconf.rb +13 -0
- data/ext/cosmos/ext/crc/crc.c +341 -0
- data/ext/cosmos/ext/crc/extconf.rb +13 -0
- data/ext/cosmos/ext/line_graph/extconf.rb +13 -0
- data/ext/cosmos/ext/line_graph/line_graph.c +501 -0
- data/ext/cosmos/ext/low_fragmentation_array/extconf.rb +13 -0
- data/ext/cosmos/ext/low_fragmentation_array/low_fragmentation_array.c +265 -0
- data/ext/cosmos/ext/packet/extconf.rb +13 -0
- data/ext/cosmos/ext/packet/packet.c +350 -0
- data/ext/cosmos/ext/platform/extconf.rb +13 -0
- data/ext/cosmos/ext/platform/platform.c +101 -0
- data/ext/cosmos/ext/polynomial_conversion/extconf.rb +13 -0
- data/ext/cosmos/ext/polynomial_conversion/polynomial_conversion.c +73 -0
- data/ext/cosmos/ext/string/extconf.rb +13 -0
- data/ext/cosmos/ext/string/string.c +49 -0
- data/ext/cosmos/ext/structure/structure.c +1433 -0
- data/ext/cosmos/ext/tabbed_plots_config/extconf.rb +13 -0
- data/ext/cosmos/ext/tabbed_plots_config/tabbed_plots_config.c +51 -0
- data/ext/cosmos/ext/telemetry/extconf.rb +13 -0
- data/ext/cosmos/ext/telemetry/telemetry.c +307 -0
- data/ext/mkrf_conf.rb +40 -0
- data/install/Gemfile +10 -0
- data/install/Launcher +16 -0
- data/install/Launcher.bat +9 -0
- data/install/Rakefile +77 -0
- data/install/config/data/README.txt +1 -0
- data/install/config/data/crc.txt +160 -0
- data/install/config/system/system.txt +39 -0
- data/install/config/targets/SYSTEM/cmd_tlm/meta_tlm.txt +9 -0
- data/install/config/targets/SYSTEM/target.txt +12 -0
- data/install/config/tools/cmd_tlm_server/cmd_tlm_server.txt +2 -0
- data/install/config/tools/data_viewer/data_viewer.txt +4 -0
- data/install/config/tools/handbook_creator/default_toc.xsl +59 -0
- data/install/config/tools/handbook_creator/handbook_creator.txt +49 -0
- data/install/config/tools/handbook_creator/templates/command_packets.html.erb +86 -0
- data/install/config/tools/handbook_creator/templates/command_toc.html.erb +38 -0
- data/install/config/tools/handbook_creator/templates/footer.html.erb +9 -0
- data/install/config/tools/handbook_creator/templates/header.html.erb +25 -0
- data/install/config/tools/handbook_creator/templates/limits_groups.html.erb +13 -0
- data/install/config/tools/handbook_creator/templates/nav.html.erb +27 -0
- data/install/config/tools/handbook_creator/templates/overview.html.erb +1 -0
- data/install/config/tools/handbook_creator/templates/pdf_cover.html.erb +23 -0
- data/install/config/tools/handbook_creator/templates/pdf_footer.html.erb +33 -0
- data/install/config/tools/handbook_creator/templates/pdf_header.html.erb +41 -0
- data/install/config/tools/handbook_creator/templates/telemetry_packets.html.erb +80 -0
- data/install/config/tools/handbook_creator/templates/telemetry_toc.html.erb +38 -0
- data/install/config/tools/handbook_creator/templates/title.html.erb +1 -0
- data/install/config/tools/launcher/launcher.txt +40 -0
- data/install/config/tools/limits_monitor/README.txt +1 -0
- data/install/config/tools/opengl_builder/README.txt +1 -0
- data/install/config/tools/script_runner/script_runner.txt +3 -0
- data/install/config/tools/table_manager/README.txt +1 -0
- data/install/config/tools/test_runner/test_runner.txt +8 -0
- data/install/config/tools/tlm_extractor/README.txt +1 -0
- data/install/config/tools/tlm_grapher/README.txt +1 -0
- data/install/config/tools/tlm_viewer/tlm_viewer.txt +5 -0
- data/install/lib/user_version.rb +3 -0
- data/install/procedures/README.txt +1 -0
- data/install/tools/CmdExtractor +16 -0
- data/install/tools/CmdExtractor.bat +9 -0
- data/install/tools/CmdSender +16 -0
- data/install/tools/CmdSender.bat +9 -0
- data/install/tools/CmdSequence +16 -0
- data/install/tools/CmdSequence.bat +9 -0
- data/install/tools/CmdTlmServer +16 -0
- data/install/tools/CmdTlmServer.bat +9 -0
- data/install/tools/ConfigEditor +16 -0
- data/install/tools/ConfigEditor.bat +9 -0
- data/install/tools/DataViewer +16 -0
- data/install/tools/DataViewer.bat +9 -0
- data/install/tools/HandbookCreator +16 -0
- data/install/tools/HandbookCreator.bat +9 -0
- data/install/tools/Launcher +16 -0
- data/install/tools/Launcher.bat +9 -0
- data/install/tools/LimitsMonitor +16 -0
- data/install/tools/LimitsMonitor.bat +9 -0
- data/install/tools/OpenGLBuilder +16 -0
- data/install/tools/OpenGLBuilder.bat +9 -0
- data/install/tools/PacketViewer +16 -0
- data/install/tools/PacketViewer.bat +9 -0
- data/install/tools/Replay +16 -0
- data/install/tools/Replay.bat +9 -0
- data/install/tools/ScriptRunner +16 -0
- data/install/tools/ScriptRunner.bat +9 -0
- data/install/tools/TableManager +16 -0
- data/install/tools/TableManager.bat +9 -0
- data/install/tools/TestRunner +16 -0
- data/install/tools/TestRunner.bat +9 -0
- data/install/tools/TlmExtractor +16 -0
- data/install/tools/TlmExtractor.bat +9 -0
- data/install/tools/TlmGrapher +16 -0
- data/install/tools/TlmGrapher.bat +9 -0
- data/install/tools/TlmViewer +16 -0
- data/install/tools/TlmViewer.bat +9 -0
- data/install/tools/ToolLaunch.bat +72 -0
- data/install/tools/mac/CmdExtractor.app/Contents/Info.plist +38 -0
- data/install/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +16 -0
- data/install/tools/mac/CmdExtractor.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/CmdExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/CmdExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/CmdSender.app/Contents/Info.plist +38 -0
- data/install/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +16 -0
- data/install/tools/mac/CmdSender.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/CmdSender.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/CmdSender.app/Contents/Resources/appIcon.icns +0 -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/install/tools/mac/CmdTlmServer.app/Contents/Info.plist +38 -0
- data/install/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +16 -0
- data/install/tools/mac/CmdTlmServer.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/CmdTlmServer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/CmdTlmServer.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/ConfigEditor.app/Contents/Info.plist +38 -0
- data/install/tools/mac/ConfigEditor.app/Contents/MacOS/ConfigEditor.rb +16 -0
- data/install/tools/mac/ConfigEditor.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/ConfigEditor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/ConfigEditor.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/DataViewer.app/Contents/Info.plist +38 -0
- data/install/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +16 -0
- data/install/tools/mac/DataViewer.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/DataViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/DataViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/HandbookCreator.app/Contents/Info.plist +38 -0
- data/install/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +16 -0
- data/install/tools/mac/HandbookCreator.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/HandbookCreator.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/HandbookCreator.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/Launcher.app/Contents/Info.plist +38 -0
- data/install/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +16 -0
- data/install/tools/mac/Launcher.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/Launcher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/Launcher.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/LimitsMonitor.app/Contents/Info.plist +38 -0
- data/install/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +16 -0
- data/install/tools/mac/LimitsMonitor.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/LimitsMonitor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/LimitsMonitor.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/OpenGLBuilder.app/Contents/Info.plist +38 -0
- data/install/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +16 -0
- data/install/tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/OpenGLBuilder.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/OpenGLBuilder.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/PacketViewer.app/Contents/Info.plist +38 -0
- data/install/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +16 -0
- data/install/tools/mac/PacketViewer.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/PacketViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/PacketViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/Replay.app/Contents/Info.plist +38 -0
- data/install/tools/mac/Replay.app/Contents/MacOS/Replay.rb +16 -0
- data/install/tools/mac/Replay.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/Replay.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/Replay.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/ScriptRunner.app/Contents/Info.plist +38 -0
- data/install/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +16 -0
- data/install/tools/mac/ScriptRunner.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/ScriptRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/ScriptRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/TableManager.app/Contents/Info.plist +38 -0
- data/install/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +16 -0
- data/install/tools/mac/TableManager.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/TableManager.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TableManager.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/TestRunner.app/Contents/Info.plist +38 -0
- data/install/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +16 -0
- data/install/tools/mac/TestRunner.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/TestRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TestRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/TlmExtractor.app/Contents/Info.plist +38 -0
- data/install/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +16 -0
- data/install/tools/mac/TlmExtractor.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/TlmExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TlmExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/TlmGrapher.app/Contents/Info.plist +38 -0
- data/install/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +16 -0
- data/install/tools/mac/TlmGrapher.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/TlmGrapher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TlmGrapher.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/mac/TlmViewer.app/Contents/Info.plist +38 -0
- data/install/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +16 -0
- data/install/tools/mac/TlmViewer.app/Contents/MacOS/main.sh +10 -0
- data/install/tools/mac/TlmViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TlmViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/install/tools/tool_launch.rb +38 -0
- data/lib/cosmos.rb +63 -0
- data/lib/cosmos/ccsds/ccsds_packet.rb +63 -0
- data/lib/cosmos/ccsds/ccsds_parser.rb +143 -0
- data/lib/cosmos/config/config_parser.rb +508 -0
- data/lib/cosmos/config/meta_config_parser.rb +57 -0
- data/lib/cosmos/conversions.rb +13 -0
- data/lib/cosmos/conversions/conversion.rb +52 -0
- data/lib/cosmos/conversions/generic_conversion.rb +67 -0
- data/lib/cosmos/conversions/new_packet_log_conversion.rb +52 -0
- data/lib/cosmos/conversions/polynomial_conversion.rb +79 -0
- data/lib/cosmos/conversions/processor_conversion.rb +56 -0
- data/lib/cosmos/conversions/received_count_conversion.rb +33 -0
- data/lib/cosmos/conversions/received_time_formatted_conversion.rb +37 -0
- data/lib/cosmos/conversions/received_time_seconds_conversion.rb +37 -0
- data/lib/cosmos/conversions/segmented_polynomial_conversion.rb +139 -0
- data/lib/cosmos/conversions/unix_time_conversion.rb +57 -0
- data/lib/cosmos/conversions/unix_time_formatted_conversion.rb +44 -0
- data/lib/cosmos/conversions/unix_time_seconds_conversion.rb +44 -0
- data/lib/cosmos/core_ext.rb +18 -0
- data/lib/cosmos/core_ext/array.rb +397 -0
- data/lib/cosmos/core_ext/class.rb +53 -0
- data/lib/cosmos/core_ext/cosmos_io.rb +45 -0
- data/lib/cosmos/core_ext/exception.rb +52 -0
- data/lib/cosmos/core_ext/file.rb +76 -0
- data/lib/cosmos/core_ext/hash.rb +28 -0
- data/lib/cosmos/core_ext/io.rb +93 -0
- data/lib/cosmos/core_ext/kernel.rb +33 -0
- data/lib/cosmos/core_ext/math.rb +119 -0
- data/lib/cosmos/core_ext/matrix.rb +149 -0
- data/lib/cosmos/core_ext/objectspace.rb +27 -0
- data/lib/cosmos/core_ext/range.rb +18 -0
- data/lib/cosmos/core_ext/socket.rb +32 -0
- data/lib/cosmos/core_ext/string.rb +351 -0
- data/lib/cosmos/core_ext/stringio.rb +24 -0
- data/lib/cosmos/core_ext/time.rb +481 -0
- data/lib/cosmos/ext/.keep +0 -0
- data/lib/cosmos/gui/choosers/combobox_chooser.rb +141 -0
- data/lib/cosmos/gui/choosers/file_chooser.rb +85 -0
- data/lib/cosmos/gui/choosers/float_chooser.rb +67 -0
- data/lib/cosmos/gui/choosers/integer_chooser.rb +69 -0
- data/lib/cosmos/gui/choosers/string_chooser.rb +35 -0
- data/lib/cosmos/gui/choosers/telemetry_chooser.rb +326 -0
- data/lib/cosmos/gui/choosers/value_chooser.rb +67 -0
- data/lib/cosmos/gui/dialogs/about_dialog.rb +166 -0
- data/lib/cosmos/gui/dialogs/calendar_dialog.rb +140 -0
- data/lib/cosmos/gui/dialogs/cmd_details_dialog.rb +51 -0
- data/lib/cosmos/gui/dialogs/cmd_tlm_raw_dialog.rb +163 -0
- data/lib/cosmos/gui/dialogs/details_dialog.rb +190 -0
- data/lib/cosmos/gui/dialogs/exception_dialog.rb +106 -0
- data/lib/cosmos/gui/dialogs/exception_list_dialog.rb +60 -0
- data/lib/cosmos/gui/dialogs/find_replace_dialog.rb +272 -0
- data/lib/cosmos/gui/dialogs/interface_raw_dialog.rb +143 -0
- data/lib/cosmos/gui/dialogs/legal_dialog.rb +183 -0
- data/lib/cosmos/gui/dialogs/packet_log_dialog.rb +97 -0
- data/lib/cosmos/gui/dialogs/progress_dialog.rb +313 -0
- data/lib/cosmos/gui/dialogs/pry_dialog.rb +169 -0
- data/lib/cosmos/gui/dialogs/scroll_text_dialog.rb +51 -0
- data/lib/cosmos/gui/dialogs/select_dialog.rb +59 -0
- data/lib/cosmos/gui/dialogs/set_tlm_dialog.rb +159 -0
- data/lib/cosmos/gui/dialogs/splash.rb +145 -0
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +201 -0
- data/lib/cosmos/gui/dialogs/tlm_edit_dialog.rb +79 -0
- data/lib/cosmos/gui/dialogs/tlm_graph_dialog.rb +108 -0
- data/lib/cosmos/gui/line_graph/line_graph.rb +482 -0
- data/lib/cosmos/gui/line_graph/line_graph_dialog.rb +36 -0
- data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +521 -0
- data/lib/cosmos/gui/line_graph/line_graph_popups.rb +112 -0
- data/lib/cosmos/gui/line_graph/line_graph_scaling.rb +452 -0
- data/lib/cosmos/gui/line_graph/line_graph_script.rb +81 -0
- data/lib/cosmos/gui/line_graph/lines.rb +304 -0
- data/lib/cosmos/gui/line_graph/overview_graph.rb +474 -0
- data/lib/cosmos/gui/opengl/earth_model.rb +25 -0
- data/lib/cosmos/gui/opengl/gl_bounds.rb +55 -0
- data/lib/cosmos/gui/opengl/gl_light.rb +38 -0
- data/lib/cosmos/gui/opengl/gl_material.rb +28 -0
- data/lib/cosmos/gui/opengl/gl_scene.rb +78 -0
- data/lib/cosmos/gui/opengl/gl_shape.rb +150 -0
- data/lib/cosmos/gui/opengl/gl_viewer.rb +712 -0
- data/lib/cosmos/gui/opengl/gl_viewport.rb +34 -0
- data/lib/cosmos/gui/opengl/moon_model.rb +25 -0
- data/lib/cosmos/gui/opengl/opengl.rb +8 -0
- data/lib/cosmos/gui/opengl/stl_reader.rb +210 -0
- data/lib/cosmos/gui/opengl/stl_shape.rb +127 -0
- data/lib/cosmos/gui/opengl/texture_mapped_sphere.rb +202 -0
- data/lib/cosmos/gui/qt.rb +841 -0
- data/lib/cosmos/gui/qt_tool.rb +489 -0
- data/lib/cosmos/gui/text/completion.rb +402 -0
- data/lib/cosmos/gui/text/completion_line_edit.rb +30 -0
- data/lib/cosmos/gui/text/completion_text_edit.rb +194 -0
- data/lib/cosmos/gui/text/ruby_editor.rb +463 -0
- data/lib/cosmos/gui/utilities/analyze_log.rb +153 -0
- data/lib/cosmos/gui/utilities/screenshot.rb +33 -0
- data/lib/cosmos/gui/utilities/script_module_gui.rb +364 -0
- data/lib/cosmos/gui/widgets/full_text_search_line_edit.rb +171 -0
- data/lib/cosmos/gui/widgets/packet_log_frame.rb +344 -0
- data/lib/cosmos/gui/widgets/realtime_button_bar.rb +98 -0
- data/lib/cosmos/interfaces.rb +21 -0
- data/lib/cosmos/interfaces/cmd_tlm_server_interface.rb +134 -0
- data/lib/cosmos/interfaces/interface.rb +449 -0
- data/lib/cosmos/interfaces/linc_interface.rb +459 -0
- data/lib/cosmos/interfaces/protocols/burst_protocol.rb +173 -0
- data/lib/cosmos/interfaces/protocols/crc_protocol.rb +141 -0
- data/lib/cosmos/interfaces/protocols/fixed_protocol.rb +114 -0
- data/lib/cosmos/interfaces/protocols/length_protocol.rb +147 -0
- 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 +240 -0
- data/lib/cosmos/interfaces/protocols/terminated_protocol.rb +81 -0
- data/lib/cosmos/interfaces/serial_interface.rb +81 -0
- data/lib/cosmos/interfaces/simulated_target_interface.rb +140 -0
- data/lib/cosmos/interfaces/stream_interface.rb +64 -0
- data/lib/cosmos/interfaces/tcpip_client_interface.rb +60 -0
- data/lib/cosmos/interfaces/tcpip_server_interface.rb +625 -0
- data/lib/cosmos/interfaces/udp_interface.rb +141 -0
- data/lib/cosmos/io/buffered_file.rb +101 -0
- data/lib/cosmos/io/cosmos_snmp.rb +50 -0
- data/lib/cosmos/io/io_multiplexer.rb +71 -0
- data/lib/cosmos/io/json_drb.rb +386 -0
- data/lib/cosmos/io/json_drb_object.rb +201 -0
- data/lib/cosmos/io/json_rpc.rb +365 -0
- data/lib/cosmos/io/posix_serial_driver.rb +147 -0
- data/lib/cosmos/io/raw_logger.rb +170 -0
- data/lib/cosmos/io/raw_logger_pair.rb +71 -0
- data/lib/cosmos/io/serial_driver.rb +94 -0
- data/lib/cosmos/io/stderr.rb +36 -0
- data/lib/cosmos/io/stdout.rb +36 -0
- data/lib/cosmos/io/udp_sockets.rb +152 -0
- data/lib/cosmos/io/win32_serial_driver.rb +165 -0
- data/lib/cosmos/packet_logs.rb +6 -0
- data/lib/cosmos/packet_logs/ccsds_log_reader.rb +104 -0
- data/lib/cosmos/packet_logs/packet_log_reader.rb +461 -0
- data/lib/cosmos/packet_logs/packet_log_writer.rb +341 -0
- data/lib/cosmos/packet_logs/packet_log_writer_pair.rb +30 -0
- data/lib/cosmos/packets/binary_accessor.rb +1201 -0
- data/lib/cosmos/packets/commands.rb +318 -0
- data/lib/cosmos/packets/limits.rb +264 -0
- data/lib/cosmos/packets/limits_response.rb +42 -0
- data/lib/cosmos/packets/packet.rb +994 -0
- data/lib/cosmos/packets/packet_config.rb +1393 -0
- data/lib/cosmos/packets/packet_item.rb +585 -0
- data/lib/cosmos/packets/packet_item_limits.rb +140 -0
- data/lib/cosmos/packets/parsers/format_string_parser.rb +59 -0
- data/lib/cosmos/packets/parsers/limits_parser.rb +147 -0
- data/lib/cosmos/packets/parsers/limits_response_parser.rb +52 -0
- data/lib/cosmos/packets/parsers/macro_parser.rb +118 -0
- data/lib/cosmos/packets/parsers/packet_item_parser.rb +234 -0
- data/lib/cosmos/packets/parsers/packet_parser.rb +131 -0
- data/lib/cosmos/packets/parsers/processor_parser.rb +63 -0
- data/lib/cosmos/packets/parsers/state_parser.rb +119 -0
- data/lib/cosmos/packets/structure.rb +508 -0
- data/lib/cosmos/packets/structure_item.rb +292 -0
- data/lib/cosmos/packets/telemetry.rb +444 -0
- data/lib/cosmos/processors.rb +6 -0
- data/lib/cosmos/processors/new_packet_log_processor.rb +39 -0
- data/lib/cosmos/processors/processor.rb +76 -0
- data/lib/cosmos/processors/statistics_processor.rb +70 -0
- data/lib/cosmos/processors/watermark_processor.rb +49 -0
- data/lib/cosmos/script.rb +9 -0
- data/lib/cosmos/script/api_shared.rb +972 -0
- data/lib/cosmos/script/cmd_tlm_server.rb +138 -0
- data/lib/cosmos/script/commands.rb +189 -0
- data/lib/cosmos/script/extract.rb +139 -0
- data/lib/cosmos/script/limits.rb +116 -0
- data/lib/cosmos/script/script.rb +76 -0
- data/lib/cosmos/script/scripting.rb +144 -0
- data/lib/cosmos/script/telemetry.rb +216 -0
- data/lib/cosmos/script/tools.rb +97 -0
- data/lib/cosmos/streams/serial_stream.rb +150 -0
- data/lib/cosmos/streams/stream.rb +54 -0
- data/lib/cosmos/streams/tcpip_client_stream.rb +113 -0
- data/lib/cosmos/streams/tcpip_socket_stream.rb +186 -0
- data/lib/cosmos/system.rb +4 -0
- data/lib/cosmos/system/system.rb +778 -0
- data/lib/cosmos/system/target.rb +228 -0
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +268 -0
- data/lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb +78 -0
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +773 -0
- data/lib/cosmos/tools/cmd_sender/cmd_sender_text_edit.rb +70 -0
- 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 +1337 -0
- data/lib/cosmos/tools/cmd_tlm_server/background_task.rb +54 -0
- data/lib/cosmos/tools/cmd_tlm_server/background_tasks.rb +77 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +537 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +274 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +480 -0
- data/lib/cosmos/tools/cmd_tlm_server/commanding.rb +121 -0
- data/lib/cosmos/tools/cmd_tlm_server/connections.rb +175 -0
- data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +213 -0
- data/lib/cosmos/tools/cmd_tlm_server/gui/logging_tab.rb +176 -0
- data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +151 -0
- data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +255 -0
- data/lib/cosmos/tools/cmd_tlm_server/gui/targets_tab.rb +85 -0
- data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +274 -0
- data/lib/cosmos/tools/cmd_tlm_server/interfaces.rb +153 -0
- data/lib/cosmos/tools/cmd_tlm_server/limits_groups_background_task.rb +122 -0
- data/lib/cosmos/tools/cmd_tlm_server/packet_logging.rb +161 -0
- data/lib/cosmos/tools/cmd_tlm_server/router_thread.rb +66 -0
- data/lib/cosmos/tools/cmd_tlm_server/routers.rb +134 -0
- data/lib/cosmos/tools/config_editor/config_editor.rb +728 -0
- data/lib/cosmos/tools/config_editor/config_editor_frame.rb +690 -0
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +633 -0
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +120 -0
- data/lib/cosmos/tools/data_viewer/dump_component.rb +40 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +156 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +382 -0
- data/lib/cosmos/tools/launcher/launcher.rb +194 -0
- data/lib/cosmos/tools/launcher/launcher_config.rb +256 -0
- data/lib/cosmos/tools/launcher/launcher_multitool.rb +40 -0
- data/lib/cosmos/tools/launcher/launcher_tool.rb +116 -0
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +972 -0
- data/lib/cosmos/tools/opengl_builder/opengl_builder.rb +416 -0
- data/lib/cosmos/tools/opengl_builder/scene_config.rb +118 -0
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +608 -0
- data/lib/cosmos/tools/replay/replay.rb +517 -0
- data/lib/cosmos/tools/replay/replay_server.rb +91 -0
- data/lib/cosmos/tools/script_runner/script_audit.rb +147 -0
- data/lib/cosmos/tools/script_runner/script_runner.rb +979 -0
- data/lib/cosmos/tools/script_runner/script_runner_config.rb +40 -0
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +1838 -0
- data/lib/cosmos/tools/table_manager/table.rb +61 -0
- data/lib/cosmos/tools/table_manager/table_config.rb +189 -0
- data/lib/cosmos/tools/table_manager/table_item.rb +58 -0
- data/lib/cosmos/tools/table_manager/table_item_parser.rb +46 -0
- data/lib/cosmos/tools/table_manager/table_manager.rb +1152 -0
- data/lib/cosmos/tools/table_manager/table_manager_core.rb +321 -0
- data/lib/cosmos/tools/table_manager/table_parser.rb +75 -0
- data/lib/cosmos/tools/test_runner/results_writer.rb +283 -0
- data/lib/cosmos/tools/test_runner/test.rb +539 -0
- data/lib/cosmos/tools/test_runner/test_runner.rb +1271 -0
- data/lib/cosmos/tools/test_runner/test_runner_chooser.rb +341 -0
- data/lib/cosmos/tools/tlm_extractor/text_item_chooser.rb +60 -0
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +1152 -0
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +441 -0
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +60 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/housekeeping_data_object_adder.rb +92 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/singlexy_data_object_adder.rb +44 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +95 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/data_object_editor.rb +61 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +222 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/linegraph_data_object_editor.rb +141 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/singlexy_data_object_editor.rb +30 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/xy_data_object_editor.rb +174 -0
- data/lib/cosmos/tools/tlm_grapher/data_objects/data_object.rb +193 -0
- data/lib/cosmos/tools/tlm_grapher/data_objects/housekeeping_data_object.rb +422 -0
- data/lib/cosmos/tools/tlm_grapher/data_objects/linegraph_data_object.rb +176 -0
- data/lib/cosmos/tools/tlm_grapher/data_objects/singlexy_data_object.rb +25 -0
- data/lib/cosmos/tools/tlm_grapher/data_objects/xy_data_object.rb +325 -0
- data/lib/cosmos/tools/tlm_grapher/plot_editors/linegraph_plot_editor.rb +191 -0
- data/lib/cosmos/tools/tlm_grapher/plot_editors/plot_editor.rb +28 -0
- data/lib/cosmos/tools/tlm_grapher/plot_editors/singlexy_plot_editor.rb +30 -0
- data/lib/cosmos/tools/tlm_grapher/plot_editors/xy_plot_editor.rb +59 -0
- data/lib/cosmos/tools/tlm_grapher/plot_gui_objects/linegraph_plot_gui_object.rb +173 -0
- data/lib/cosmos/tools/tlm_grapher/plot_gui_objects/singlexy_plot_gui_object.rb +27 -0
- data/lib/cosmos/tools/tlm_grapher/plot_gui_objects/xy_plot_gui_object.rb +74 -0
- data/lib/cosmos/tools/tlm_grapher/plots/linegraph_plot.rb +209 -0
- data/lib/cosmos/tools/tlm_grapher/plots/plot.rb +69 -0
- data/lib/cosmos/tools/tlm_grapher/plots/singlexy_plot.rb +20 -0
- data/lib/cosmos/tools/tlm_grapher/plots/xy_plot.rb +61 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +1291 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_config.rb +451 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_data_object_editor.rb +107 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_logfile_thread.rb +114 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_plot_editor.rb +101 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_realtime_thread.rb +78 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb +57 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tool.rb +1004 -0
- data/lib/cosmos/tools/tlm_grapher/tlm_grapher.rb +103 -0
- data/lib/cosmos/tools/tlm_viewer/screen.rb +502 -0
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +571 -0
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb +293 -0
- data/lib/cosmos/tools/tlm_viewer/widgets.rb +61 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/aging_widget.rb +110 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/array_widget.rb +66 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/block_widget.rb +57 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/button_widget.rb +39 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvas_clickable.rb +33 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvas_widget.rb +70 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +77 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasimage_widget.rb +43 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasimagevalue_widget.rb +59 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslabel_widget.rb +44 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslabelvalue_widget.rb +54 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasline_widget.rb +53 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslinevalue_widget.rb +63 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasvalue_widget.rb +123 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/checkbutton_widget.rb +38 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/combobox_widget.rb +30 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/formatfontvalue_widget.rb +31 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/formatvalue_widget.rb +35 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontal_widget.rb +27 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontalbox_widget.rb +31 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontalline_widget.rb +26 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/label_widget.rb +29 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelformatvalue_widget.rb +39 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelprogressbar_widget.rb +38 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labeltrendlimitsbar_widget.rb +38 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvalue_widget.rb +57 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluedesc_widget.rb +42 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitsbar_widget.rb +37 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitscolumn_widget.rb +38 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangebar_widget.rb +37 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangecolumn_widget.rb +39 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/layout_widget.rb +34 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/limits_widget.rb +113 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb +116 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/limitscolor_widget.rb +102 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/limitscolumn_widget.rb +116 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/linegraph_widget.rb +63 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/matrixbycolumns_widget.rb +58 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/multi_widget.rb +116 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/progressbar_widget.rb +34 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/radiobutton_widget.rb +38 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb +65 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/rangecolumn_widget.rb +65 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/screenshotbutton_widget.rb +34 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/scrollwindow_widget.rb +35 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/sectionheader_widget.rb +33 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/spacer_widget.rb +55 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/tabbook_widget.rb +26 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/tabitem_widget.rb +28 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/textbox_widget.rb +47 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb +26 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/timegraph_widget.rb +91 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/title_widget.rb +27 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/trendbar_widget.rb +130 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/trendlimitsbar_widget.rb +46 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/value_widget.rb +43 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/valuelimitsbar_widget.rb +37 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/valuelimitscolumn_widget.rb +37 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/valuerangebar_widget.rb +37 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/valuerangecolumn_widget.rb +37 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/vertical_widget.rb +36 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/verticalbox_widget.rb +38 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/widget.rb +257 -0
- data/lib/cosmos/top_level.rb +790 -0
- data/lib/cosmos/utilities.rb +11 -0
- data/lib/cosmos/utilities/crc.rb +268 -0
- data/lib/cosmos/utilities/csv.rb +137 -0
- data/lib/cosmos/utilities/logger.rb +137 -0
- data/lib/cosmos/utilities/low_fragmentation_array.rb +19 -0
- data/lib/cosmos/utilities/message_log.rb +79 -0
- data/lib/cosmos/utilities/quaternion.rb +258 -0
- data/lib/cosmos/utilities/ruby_lex_utils.rb +313 -0
- data/lib/cosmos/utilities/simulated_target.rb +100 -0
- data/lib/cosmos/utilities/sleeper.rb +44 -0
- data/lib/cosmos/version.rb +12 -0
- data/lib/cosmos/win32/excel.rb +66 -0
- data/lib/cosmos/win32/win32.rb +387 -0
- data/lib/cosmos/win32/win32_main.rb +325 -0
- data/roodi.yml +24 -0
- data/run_gui_tests.bat +44 -0
- data/spec/ccsds/ccsds_packet_spec.rb +67 -0
- data/spec/ccsds/ccsds_parser_spec.rb +148 -0
- data/spec/config/config_parser_spec.rb +353 -0
- data/spec/conversions/conversion_spec.rb +31 -0
- data/spec/conversions/generic_conversion_spec.rb +45 -0
- data/spec/conversions/new_packet_log_conversion_spec.rb +39 -0
- data/spec/conversions/polynomial_conversion_spec.rb +40 -0
- data/spec/conversions/processor_conversion_spec.rb +45 -0
- data/spec/conversions/received_count_conversion_spec.rb +43 -0
- data/spec/conversions/received_time_formatted_conversion_spec.rb +49 -0
- data/spec/conversions/received_time_seconds_conversion_spec.rb +50 -0
- data/spec/conversions/segmented_polynomial_conversion_spec.rb +51 -0
- data/spec/conversions/unix_time_formatted_conversion_spec.rb +74 -0
- data/spec/conversions/unix_time_seconds_conversion_spec.rb +76 -0
- data/spec/core_ext/array_spec.rb +247 -0
- data/spec/core_ext/class_spec.rb +36 -0
- data/spec/core_ext/cosmos_io_spec.rb +77 -0
- data/spec/core_ext/exception_spec.rb +91 -0
- data/spec/core_ext/file_spec.rb +72 -0
- data/spec/core_ext/hash_spec.rb +24 -0
- data/spec/core_ext/io_spec.rb +46 -0
- data/spec/core_ext/kernel_spec.rb +54 -0
- data/spec/core_ext/math_spec.rb +116 -0
- data/spec/core_ext/matrix_spec.rb +127 -0
- data/spec/core_ext/objectspace_spec.rb +32 -0
- data/spec/core_ext/range_spec.rb +21 -0
- data/spec/core_ext/socket_spec.rb +32 -0
- data/spec/core_ext/string_spec.rb +239 -0
- data/spec/core_ext/stringio_spec.rb +21 -0
- data/spec/core_ext/time_spec.rb +220 -0
- data/spec/gui/line_graph/line_clip_spec.rb +324 -0
- data/spec/gui/qt_spec.rb +104 -0
- data/spec/install/config/system/system.txt +27 -0
- data/spec/install/config/targets/INST/cmd_tlm/inst_cmd_linc.txt +30 -0
- data/spec/install/config/targets/INST/cmd_tlm/inst_cmds.txt +111 -0
- data/spec/install/config/targets/INST/cmd_tlm/inst_tlm.txt +236 -0
- data/spec/install/config/targets/INST/cmd_tlm/inst_tlm_linc.txt +25 -0
- data/spec/install/config/targets/INST/cmd_tlm_server.txt +5 -0
- data/spec/install/config/targets/INST/lib/sim_inst.rb +305 -0
- data/spec/install/config/targets/INST/target.txt +10 -0
- data/spec/install/config/targets/SYSTEM/cmd_tlm/limits_groups.txt +7 -0
- data/spec/install/config/targets/SYSTEM/cmd_tlm/meta_tlm.txt +10 -0
- data/spec/install/config/targets/SYSTEM/cmd_tlm/system_cmds.txt +41 -0
- data/spec/install/config/targets/SYSTEM/cmd_tlm/system_tlm.txt +7 -0
- data/spec/install/config/targets/SYSTEM/cmd_tlm_server.txt +6 -0
- data/spec/install/config/targets/SYSTEM/screens/status.txt +12 -0
- data/spec/install/config/targets/SYSTEM/target.txt +12 -0
- data/spec/install/lib/README.txt +1 -0
- data/spec/interfaces/cmd_tlm_server_interface_spec.rb +146 -0
- data/spec/interfaces/interface_spec.rb +514 -0
- data/spec/interfaces/linc_interface_spec.rb +248 -0
- 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 +322 -0
- data/spec/interfaces/protocols/terminated_protocol_spec.rb +174 -0
- data/spec/interfaces/serial_interface_spec.rb +57 -0
- data/spec/interfaces/simulated_target_interface_spec.rb +128 -0
- data/spec/interfaces/tcpip_client_interface_spec.rb +60 -0
- data/spec/interfaces/tcpip_server_interface_spec.rb +157 -0
- data/spec/interfaces/udp_interface_spec.rb +246 -0
- data/spec/io/buffered_file_spec.rb +113 -0
- data/spec/io/io_multiplexer_spec.rb +102 -0
- data/spec/io/json_drb_object_spec.rb +119 -0
- data/spec/io/json_drb_spec.rb +297 -0
- data/spec/io/json_rpc_spec.rb +264 -0
- data/spec/io/raw_logger_pair_spec.rb +76 -0
- data/spec/io/raw_logger_spec.rb +137 -0
- data/spec/io/serial_driver_spec.rb +62 -0
- data/spec/io/stderr_spec.rb +32 -0
- data/spec/io/stdout_spec.rb +32 -0
- data/spec/io/udp_sockets_spec.rb +99 -0
- data/spec/io/win32_serial_driver_spec.rb +91 -0
- data/spec/packet_logs/packet_log_reader_spec.rb +553 -0
- data/spec/packet_logs/packet_log_writer_pair_spec.rb +30 -0
- data/spec/packet_logs/packet_log_writer_spec.rb +227 -0
- data/spec/packets/binary_accessor_spec.rb +2326 -0
- data/spec/packets/commands_spec.rb +379 -0
- data/spec/packets/limits_response_spec.rb +25 -0
- data/spec/packets/limits_spec.rb +344 -0
- data/spec/packets/packet_config_spec.rb +960 -0
- data/spec/packets/packet_item_limits_spec.rb +188 -0
- data/spec/packets/packet_item_spec.rb +386 -0
- data/spec/packets/packet_spec.rb +1456 -0
- data/spec/packets/parsers/format_string_parser_spec.rb +133 -0
- data/spec/packets/parsers/limits_parser_spec.rb +293 -0
- data/spec/packets/parsers/limits_response_parser_spec.rb +149 -0
- data/spec/packets/parsers/macro_parser_spec.rb +220 -0
- data/spec/packets/parsers/packet_item_parser_spec.rb +366 -0
- data/spec/packets/parsers/packet_parser_spec.rb +99 -0
- data/spec/packets/parsers/processor_parser_spec.rb +114 -0
- data/spec/packets/parsers/state_parser_spec.rb +189 -0
- data/spec/packets/structure_item_spec.rb +213 -0
- data/spec/packets/structure_spec.rb +565 -0
- data/spec/packets/telemetry_spec.rb +578 -0
- data/spec/processors/new_packet_log_processor_spec.rb +39 -0
- data/spec/processors/processor_spec.rb +55 -0
- data/spec/processors/statistics_processor_spec.rb +60 -0
- data/spec/processors/watermark_processor_spec.rb +51 -0
- data/spec/script/cmd_tlm_server_spec.rb +176 -0
- data/spec/script/commands_disconnect_spec.rb +270 -0
- data/spec/script/commands_spec.rb +303 -0
- data/spec/script/extract_spec.rb +158 -0
- data/spec/script/limits_spec.rb +153 -0
- data/spec/script/script_spec.rb +90 -0
- data/spec/script/scripting_spec.rb +745 -0
- data/spec/script/telemetry_spec.rb +176 -0
- data/spec/script/tools_spec.rb +134 -0
- data/spec/spec_helper.rb +225 -0
- data/spec/streams/serial_stream_spec.rb +122 -0
- data/spec/streams/stream_spec.rb +30 -0
- data/spec/streams/tcpip_client_stream_spec.rb +65 -0
- data/spec/streams/tcpip_socket_stream_spec.rb +226 -0
- data/spec/system/system_spec.rb +891 -0
- data/spec/system/target_spec.rb +304 -0
- data/spec/tools/cmd_tlm_server/api_spec.rb +1123 -0
- data/spec/tools/cmd_tlm_server/background_task_spec.rb +44 -0
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +227 -0
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +610 -0
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_spec.rb +431 -0
- data/spec/tools/cmd_tlm_server/commanding_spec.rb +151 -0
- data/spec/tools/cmd_tlm_server/connections_spec.rb +235 -0
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +401 -0
- data/spec/tools/cmd_tlm_server/interfaces_spec.rb +252 -0
- data/spec/tools/cmd_tlm_server/limits_groups_background_task_spec.rb +145 -0
- data/spec/tools/cmd_tlm_server/packet_logging_spec.rb +143 -0
- data/spec/tools/cmd_tlm_server/router_thread_spec.rb +191 -0
- data/spec/tools/cmd_tlm_server/routers_spec.rb +223 -0
- data/spec/tools/launcher/launcher_config_spec.rb +474 -0
- data/spec/tools/table_manager/table_config_spec.rb +226 -0
- data/spec/tools/table_manager/table_item_parser_spec.rb +61 -0
- data/spec/tools/table_manager/table_item_spec.rb +57 -0
- data/spec/tools/table_manager/table_parser_spec.rb +96 -0
- data/spec/tools/table_manager/table_spec.rb +90 -0
- data/spec/tools/table_manager/tablemanager_core_spec.rb +556 -0
- data/spec/top_level/top_level_spec.rb +373 -0
- data/spec/utilities/crc_spec.rb +45 -0
- data/spec/utilities/csv_spec.rb +139 -0
- data/spec/utilities/logger_spec.rb +102 -0
- data/spec/utilities/message_log_spec.rb +89 -0
- data/spec/utilities/quaternion_spec.rb +107 -0
- data/spec/utilities/ruby_lex_utils_spec.rb +86 -0
- data/tasks/gemfile_stats.rake +79 -0
- data/tasks/manifest.rake +22 -0
- data/tasks/spec.rake +23 -0
- data/test/benchmarks/binary_accessor_benchmark.rb +14 -0
- data/test/benchmarks/gsub_benchmark.rb +152 -0
- data/test/benchmarks/is_a_benchmark.rb +34 -0
- data/test/performance/PACKETS.bat +1 -0
- data/test/performance/Rakefile +77 -0
- data/test/performance/THREADS.bat +1 -0
- data/test/performance/config/data/attitude.bin +0 -0
- data/test/performance/config/data/crc.txt +196 -0
- data/test/performance/config/data/diamond.STL +58 -0
- data/test/performance/config/data/groundoff.gif +0 -0
- data/test/performance/config/data/groundon.gif +0 -0
- data/test/performance/config/data/hselectoff.gif +0 -0
- data/test/performance/config/data/hselecton.gif +0 -0
- data/test/performance/config/data/hswitchoff.gif +0 -0
- data/test/performance/config/data/hswitchon.gif +0 -0
- data/test/performance/config/data/meta_init.txt +4 -0
- data/test/performance/config/data/position.bin +0 -0
- data/test/performance/config/data/poweroff.gif +0 -0
- data/test/performance/config/data/poweron.gif +0 -0
- data/test/performance/config/data/satellite.gif +0 -0
- data/test/performance/config/data/tada.wav +0 -0
- data/test/performance/config/data/vswitchoff.gif +0 -0
- data/test/performance/config/data/vswitchon.gif +0 -0
- data/test/performance/config/system/system_packets.txt +38 -0
- data/test/performance/config/system/system_threads.txt +58 -0
- data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +46 -0
- data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +15 -0
- data/test/performance/config/targets/COSMOS/cmd_tlm_server.txt +6 -0
- data/test/performance/config/targets/COSMOS/screens/limits_change.txt +20 -0
- data/test/performance/config/targets/COSMOS/screens/version.txt +19 -0
- data/test/performance/config/targets/COSMOS/target.txt +11 -0
- data/test/performance/config/targets/PACKET/cmd_tlm/packet_cmds.txt +20 -0
- data/test/performance/config/targets/PACKET/cmd_tlm/packet_tlm.txt +98 -0
- data/test/performance/config/targets/PACKET/cmd_tlm_server.txt +6 -0
- data/test/performance/config/targets/PACKET/lib/packet_interface.rb +22 -0
- data/test/performance/config/targets/PACKET/lib/packet_limits_response.rb +24 -0
- data/test/performance/config/targets/PACKET/screens/status.txt +25 -0
- data/test/performance/config/targets/PACKET/target.txt +28 -0
- data/test/performance/config/targets/SYSTEM/screens/status.txt +12 -0
- data/test/performance/config/targets/THREAD/cmd_tlm/thread_cmds.txt +17 -0
- data/test/performance/config/targets/THREAD/cmd_tlm/thread_tlm.txt +18 -0
- data/test/performance/config/targets/THREAD/cmd_tlm_server.txt +6 -0
- data/test/performance/config/targets/THREAD/lib/thread_interface.rb +22 -0
- data/test/performance/config/targets/THREAD/screens/status.txt +25 -0
- data/test/performance/config/targets/THREAD/target.txt +7 -0
- data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt +28 -0
- data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt +68 -0
- data/test/performance/config/tools/data_viewer/data_viewer.txt +11 -0
- data/test/performance/config/tools/handbook_creator/default_toc.xsl +59 -0
- data/test/performance/config/tools/handbook_creator/handbook_creator.txt +66 -0
- data/test/performance/config/tools/handbook_creator/templates/command_packets.html.erb +86 -0
- data/test/performance/config/tools/handbook_creator/templates/command_toc.html.erb +38 -0
- data/test/performance/config/tools/handbook_creator/templates/footer.html.erb +9 -0
- data/test/performance/config/tools/handbook_creator/templates/header.html.erb +25 -0
- data/test/performance/config/tools/handbook_creator/templates/limits_groups.html.erb +13 -0
- data/test/performance/config/tools/handbook_creator/templates/nav.html.erb +27 -0
- data/test/performance/config/tools/handbook_creator/templates/overview.html.erb +1 -0
- data/test/performance/config/tools/handbook_creator/templates/pdf_cover.html.erb +23 -0
- data/test/performance/config/tools/handbook_creator/templates/pdf_footer.html.erb +33 -0
- data/test/performance/config/tools/handbook_creator/templates/pdf_header.html.erb +41 -0
- data/test/performance/config/tools/handbook_creator/templates/telemetry_packets.html.erb +80 -0
- data/test/performance/config/tools/handbook_creator/templates/telemetry_toc.html.erb +38 -0
- data/test/performance/config/tools/handbook_creator/templates/title.html.erb +1 -0
- data/test/performance/config/tools/launcher/launcher_packets.txt +34 -0
- data/test/performance/config/tools/launcher/launcher_threads.txt +83 -0
- data/test/performance/config/tools/limits_monitor/README.txt +1 -0
- data/test/performance/config/tools/opengl_builder/README.txt +1 -0
- data/test/performance/config/tools/script_runner/script_runner.txt +3 -0
- data/test/performance/config/tools/table_manager/ConfigTables_def.txt +8 -0
- data/test/performance/config/tools/table_manager/ExampleTableDefinition.txt +24 -0
- data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw1_def.txt +25 -0
- data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw2_def.txt +25 -0
- data/test/performance/config/tools/table_manager/PPSSelectionTable_def.txt +8 -0
- data/test/performance/config/tools/table_manager/TLMMonitoringTable_def.txt +248 -0
- data/test/performance/config/tools/test_runner/test_runner.txt +17 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor.txt +13 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor2.txt +2 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor3.txt +2 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor4.txt +2 -0
- data/test/performance/config/tools/tlm_grapher/README.txt +1 -0
- data/test/performance/config/tools/tlm_grapher/tlm_grapher.txt +204 -0
- data/test/performance/config/tools/tlm_viewer/tlm_viewer.txt +13 -0
- data/test/performance/lib/packet_target.rb +126 -0
- data/test/performance/lib/thread_target.rb +120 -0
- data/test/performance/lib/user_version.rb +3 -0
- data/test/performance/outputs/handbooks/README.txt +1 -0
- data/test/performance/outputs/logs/README.txt +1 -0
- data/test/performance/outputs/saved_config/README.txt +1 -0
- data/test/performance/outputs/tables/README.txt +1 -0
- data/test/performance/outputs/tmp/README.txt +1 -0
- data/test/performance/procedures/checks.rb +11 -0
- data/test/performance/procedures/clear_util.rb +7 -0
- data/test/performance/procedures/collect.rb +18 -0
- data/test/performance/procedures/collect_util.rb +14 -0
- data/test/performance/procedures/cosmos_api_test.rb +293 -0
- data/test/performance/procedures/disconnect.rb +29 -0
- data/test/performance/procedures/example_test.rb +182 -0
- data/test/performance/procedures/plot_test.rb +8 -0
- data/test/performance/procedures/procedure.rb +3 -0
- data/test/performance/procedures/run_example_test.rb +3 -0
- data/test/performance/procedures/test.rb +51 -0
- data/test/performance/tools/CmdExtractor +14 -0
- data/test/performance/tools/CmdExtractor.bat +59 -0
- data/test/performance/tools/CmdSender +14 -0
- data/test/performance/tools/CmdSender.bat +59 -0
- data/test/performance/tools/CmdTlmServer +16 -0
- data/test/performance/tools/CmdTlmServer.bat +59 -0
- data/test/performance/tools/CmdTlmServerMemProf +20 -0
- data/test/performance/tools/CmdTlmServerMemProf.bat +59 -0
- data/test/performance/tools/DataViewer +14 -0
- data/test/performance/tools/DataViewer.bat +59 -0
- data/test/performance/tools/HandbookCreator +14 -0
- data/test/performance/tools/HandbookCreator.bat +61 -0
- data/test/performance/tools/Launcher +14 -0
- data/test/performance/tools/Launcher.bat +59 -0
- data/test/performance/tools/LimitsMonitor +14 -0
- data/test/performance/tools/LimitsMonitor.bat +59 -0
- data/test/performance/tools/OpenGLBuilder +14 -0
- data/test/performance/tools/OpenGLBuilder.bat +59 -0
- data/test/performance/tools/PacketTarget +14 -0
- data/test/performance/tools/PacketTarget.bat +59 -0
- data/test/performance/tools/PacketViewer +14 -0
- data/test/performance/tools/PacketViewer.bat +59 -0
- data/test/performance/tools/Replay +14 -0
- data/test/performance/tools/Replay.bat +59 -0
- data/test/performance/tools/ScpiTarget +14 -0
- data/test/performance/tools/ScpiTarget.bat +59 -0
- data/test/performance/tools/ScriptRunner +14 -0
- data/test/performance/tools/ScriptRunner.bat +59 -0
- data/test/performance/tools/TableManager +14 -0
- data/test/performance/tools/TableManager.bat +59 -0
- data/test/performance/tools/TestRunner +14 -0
- data/test/performance/tools/TestRunner.bat +59 -0
- data/test/performance/tools/ThreadTarget +14 -0
- data/test/performance/tools/ThreadTarget.bat +59 -0
- data/test/performance/tools/TlmExtractor +14 -0
- data/test/performance/tools/TlmExtractor.bat +59 -0
- data/test/performance/tools/TlmGrapher +14 -0
- data/test/performance/tools/TlmGrapher.bat +59 -0
- data/test/performance/tools/TlmGrapherMemProf +19 -0
- data/test/performance/tools/TlmGrapherMemProf.bat +59 -0
- data/test/performance/tools/TlmViewer +14 -0
- data/test/performance/tools/TlmViewer.bat +59 -0
- data/test/performance/tools/TlmViewerMemProf +19 -0
- data/test/performance/tools/TlmViewerMemProf.bat +59 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +15 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +15 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +15 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +15 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +15 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/Launcher.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +15 -0
- data/test/performance/tools/mac/Launcher.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/Launcher.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +15 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +15 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +15 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/Replay.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/Replay.app/Contents/MacOS/Replay.rb +15 -0
- data/test/performance/tools/mac/Replay.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/Replay.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +15 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TableManager.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +15 -0
- data/test/performance/tools/mac/TableManager.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TableManager.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +15 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +15 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +15 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +15 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/Resources/appIcon.icns +0 -0
- metadata +1964 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
|
3
|
+
# Copyright 2014 Ball Aerospace & Technologies Corp.
|
4
|
+
# All Rights Reserved.
|
5
|
+
#
|
6
|
+
# This program is free software; you can modify and/or redistribute it
|
7
|
+
# under the terms of the GNU General Public License
|
8
|
+
# as published by the Free Software Foundation; version 3 with
|
9
|
+
# attribution addendums as found in the LICENSE.txt
|
10
|
+
|
11
|
+
# This file implements a class to handle responses to limits state changes.
|
12
|
+
|
13
|
+
require 'cosmos/tools/cmd_tlm_server/api'
|
14
|
+
|
15
|
+
module Cosmos
|
16
|
+
# This class defines a #call method which is called when a PacketItem
|
17
|
+
# goes out of limits. This class must be subclassed and the call method
|
18
|
+
# implemented. Do NOT use this class directly.
|
19
|
+
class LimitsResponse
|
20
|
+
|
21
|
+
include Api
|
22
|
+
|
23
|
+
# @param packet [Packet] Packet the limits response is assigned to
|
24
|
+
# @param item [PacketItem] PacketItem the limits response is assigned to
|
25
|
+
# @param old_limits_state [Symbol] Previous value of the limit. One of nil,
|
26
|
+
# :GREEN_HIGH, :GREEN_LOW, :YELLOW, :YELLOW_HIGH, :YELLOW_LOW,
|
27
|
+
# :RED, :RED_HIGH, :RED_LOW. nil if the previous limit state has not yet
|
28
|
+
# been established.
|
29
|
+
def call(packet, item, old_limits_state)
|
30
|
+
raise "call method must be defined by subclass"
|
31
|
+
end
|
32
|
+
|
33
|
+
def to_s
|
34
|
+
self.class.to_s.split('::')[-1]
|
35
|
+
end
|
36
|
+
|
37
|
+
def to_config
|
38
|
+
" LIMITS_RESPONSE #{self.class.name.class_name_to_filename}\n"
|
39
|
+
end
|
40
|
+
|
41
|
+
end # class LimitsResponse
|
42
|
+
end
|
@@ -0,0 +1,994 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
|
3
|
+
# Copyright 2014 Ball Aerospace & Technologies Corp.
|
4
|
+
# All Rights Reserved.
|
5
|
+
#
|
6
|
+
# This program is free software; you can modify and/or redistribute it
|
7
|
+
# under the terms of the GNU General Public License
|
8
|
+
# as published by the Free Software Foundation; version 3 with
|
9
|
+
# attribution addendums as found in the LICENSE.txt
|
10
|
+
|
11
|
+
require 'digest/md5'
|
12
|
+
require 'cosmos/packets/structure'
|
13
|
+
require 'cosmos/packets/packet_item'
|
14
|
+
require 'cosmos/ext/packet' if RUBY_ENGINE == 'ruby' and !ENV['COSMOS_NO_EXT']
|
15
|
+
|
16
|
+
module Cosmos
|
17
|
+
|
18
|
+
# Adds features common to all COSMOS packets of data to the Structure class.
|
19
|
+
# This includes the additional attributes listed below. The primary behavior
|
20
|
+
# Packet adds is the ability to apply formatting to PacketItem values as well
|
21
|
+
# as managing PacketItem's limit states.
|
22
|
+
class Packet < Structure
|
23
|
+
|
24
|
+
RESERVED_ITEM_NAMES = ['RECEIVED_TIMESECONDS'.freeze, 'RECEIVED_TIMEFORMATTED'.freeze, 'RECEIVED_COUNT'.freeze]
|
25
|
+
|
26
|
+
# @return [String] Name of the target this packet is associated with
|
27
|
+
attr_reader :target_name
|
28
|
+
|
29
|
+
# @return [String] Name of the packet
|
30
|
+
attr_reader :packet_name
|
31
|
+
|
32
|
+
# @return [String] Description of the packet
|
33
|
+
attr_reader :description
|
34
|
+
|
35
|
+
# @return [Time] Time at which the packet was received
|
36
|
+
attr_reader :received_time
|
37
|
+
|
38
|
+
# @return [Integer] Number of times the packet has been received
|
39
|
+
attr_reader :received_count
|
40
|
+
|
41
|
+
# @return [Boolean] Flag indicating if the packet is hazardous (typically for commands)
|
42
|
+
attr_accessor :hazardous
|
43
|
+
|
44
|
+
# @return [String] Description of why the packet is hazardous
|
45
|
+
attr_reader :hazardous_description
|
46
|
+
|
47
|
+
# Contains the values given by the user for a command (distinguished from defaults)
|
48
|
+
# These values should be used within command conversions if present because the order
|
49
|
+
# that values are written into the actual packet can vary
|
50
|
+
# @return [Hash<Item Name, Value>] Given values when constructing the packet
|
51
|
+
attr_reader :given_values
|
52
|
+
|
53
|
+
# @return [Boolean] Flag indicating if the packet is stale (hasn't been received recently)
|
54
|
+
attr_reader :stale
|
55
|
+
|
56
|
+
# @return [Boolean] Whether or not this is a 'raw' packet
|
57
|
+
attr_accessor :raw
|
58
|
+
|
59
|
+
# @return [Boolean] Whether or not this is a 'hidden' packet
|
60
|
+
attr_accessor :hidden
|
61
|
+
|
62
|
+
# @return [Boolean] Whether or not this is a 'disabled' packet
|
63
|
+
attr_accessor :disabled
|
64
|
+
|
65
|
+
# @return [Boolean] Whether or not messages should be printed for this packet
|
66
|
+
attr_accessor :messages_disabled
|
67
|
+
|
68
|
+
# @return [Boolean] Whether or not this is a 'abstract' packet
|
69
|
+
attr_accessor :abstract
|
70
|
+
|
71
|
+
# Valid format types
|
72
|
+
VALUE_TYPES = [:RAW, :CONVERTED, :FORMATTED, :WITH_UNITS]
|
73
|
+
|
74
|
+
if RUBY_ENGINE != 'ruby' or ENV['COSMOS_NO_EXT']
|
75
|
+
# Creates a new packet by initalizing the attributes.
|
76
|
+
#
|
77
|
+
# @param target_name [String] Name of the target this packet is associated with
|
78
|
+
# @param packet_name [String] Name of the packet
|
79
|
+
# @param default_endianness [Symbol] One of {BinaryAccessor::ENDIANNESS}
|
80
|
+
# @param description [String] Description of the packet
|
81
|
+
# @param buffer [String] String buffer to hold the packet data
|
82
|
+
# @param item_class [Class] Class used to instantiate items (Must be a
|
83
|
+
# subclass of PacketItem)
|
84
|
+
def initialize(target_name, packet_name, default_endianness = :BIG_ENDIAN, description = nil, buffer = '', item_class = PacketItem)
|
85
|
+
super(default_endianness, buffer, item_class)
|
86
|
+
self.target_name = target_name
|
87
|
+
self.packet_name = packet_name
|
88
|
+
self.description = description
|
89
|
+
@received_time = nil
|
90
|
+
@received_count = 0
|
91
|
+
@id_items = nil
|
92
|
+
@hazardous = false
|
93
|
+
@hazardous_description = nil
|
94
|
+
@given_values = nil
|
95
|
+
@limits_items = nil
|
96
|
+
@processors = nil
|
97
|
+
@stale = true
|
98
|
+
@limits_change_callback = nil
|
99
|
+
@read_conversion_cache = nil
|
100
|
+
@raw = nil
|
101
|
+
@messages_disabled = false
|
102
|
+
@meta = nil
|
103
|
+
@hidden = false
|
104
|
+
@disabled = false
|
105
|
+
end
|
106
|
+
|
107
|
+
# Sets the target name this packet is associated with. Unidentified packets
|
108
|
+
# will have target name set to nil.
|
109
|
+
#
|
110
|
+
# @param target_name [String] Name of the target this packet is associated with
|
111
|
+
def target_name=(target_name)
|
112
|
+
if target_name
|
113
|
+
if !(String === target_name)
|
114
|
+
raise(ArgumentError, "target_name must be a String but is a #{target_name.class}")
|
115
|
+
end
|
116
|
+
@target_name = target_name.upcase.freeze
|
117
|
+
else
|
118
|
+
@target_name = nil
|
119
|
+
end
|
120
|
+
@target_name
|
121
|
+
end
|
122
|
+
|
123
|
+
# Sets the packet name. Unidentified packets will have packet name set to
|
124
|
+
# nil.
|
125
|
+
#
|
126
|
+
# @param packet_name [String] Name of the packet
|
127
|
+
def packet_name=(packet_name)
|
128
|
+
if packet_name
|
129
|
+
if !(String === packet_name)
|
130
|
+
raise(ArgumentError, "packet_name must be a String but is a #{packet_name.class}")
|
131
|
+
end
|
132
|
+
@packet_name = packet_name.upcase.freeze
|
133
|
+
else
|
134
|
+
@packet_name = nil
|
135
|
+
end
|
136
|
+
@packet_name
|
137
|
+
end
|
138
|
+
|
139
|
+
# Sets the description of the packet
|
140
|
+
#
|
141
|
+
# @param description [String] Description of the packet
|
142
|
+
def description=(description)
|
143
|
+
if description
|
144
|
+
if !(String === description)
|
145
|
+
raise(ArgumentError, "description must be a String but is a #{description.class}")
|
146
|
+
end
|
147
|
+
@description = description.clone.freeze
|
148
|
+
else
|
149
|
+
@description = nil
|
150
|
+
end
|
151
|
+
@description
|
152
|
+
end
|
153
|
+
|
154
|
+
# Sets the received time of the packet
|
155
|
+
#
|
156
|
+
# @param received_time [Time] Time this packet was received
|
157
|
+
def received_time=(received_time)
|
158
|
+
if received_time
|
159
|
+
if !(Time === received_time)
|
160
|
+
raise(ArgumentError, "received_time must be a Time but is a #{received_time.class}")
|
161
|
+
end
|
162
|
+
@received_time = received_time.clone.freeze
|
163
|
+
else
|
164
|
+
@received_time = nil
|
165
|
+
end
|
166
|
+
@read_conversion_cache.clear if @read_conversion_cache
|
167
|
+
@received_time
|
168
|
+
end
|
169
|
+
|
170
|
+
# Sets the received count of the packet
|
171
|
+
#
|
172
|
+
# @param received_count [Integer] Number of times this packet has been
|
173
|
+
# received
|
174
|
+
def received_count=(received_count)
|
175
|
+
if !(Integer === received_count)
|
176
|
+
raise(ArgumentError, "received_count must be an Integer but is a #{received_count.class}")
|
177
|
+
end
|
178
|
+
@received_count = received_count
|
179
|
+
@read_conversion_cache.clear if @read_conversion_cache
|
180
|
+
@received_count
|
181
|
+
end
|
182
|
+
|
183
|
+
# Tries to identify if a buffer represents the currently defined packet. It
|
184
|
+
# does this by iterating over all the packet items that were created with
|
185
|
+
# an ID value and checking whether that ID value is present at the correct
|
186
|
+
# location in the buffer.
|
187
|
+
#
|
188
|
+
# Incorrectly sized buffers will still positively identify if there is
|
189
|
+
# enough data to match the ID values. This is to allow incorrectly sized
|
190
|
+
# packets to still be processed as well as possible given the incorrectly
|
191
|
+
# sized data.
|
192
|
+
#
|
193
|
+
# @param buffer [String] Raw buffer of binary data
|
194
|
+
# @return [Boolean] Whether or not the buffer of data is this packet
|
195
|
+
def identify?(buffer)
|
196
|
+
return false unless buffer
|
197
|
+
return true unless @id_items
|
198
|
+
|
199
|
+
@id_items.each do |item|
|
200
|
+
begin
|
201
|
+
value = read_item(item, :RAW, buffer)
|
202
|
+
rescue Exception
|
203
|
+
value = nil
|
204
|
+
end
|
205
|
+
return false if item.id_value != value
|
206
|
+
end
|
207
|
+
|
208
|
+
true
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
212
|
+
|
213
|
+
# Calculates a unique MD5Sum that changes if the parts of the packet configuration change that could affect
|
214
|
+
# the "shape" of the packet. This value is cached and that packet should not be changed if this method is being used
|
215
|
+
def config_name
|
216
|
+
return @config_name if @config_name
|
217
|
+
string = "#{self.target_name} #{self.packet_name}"
|
218
|
+
@sorted_items.each do |item|
|
219
|
+
string << " ITEM #{item.name} #{item.bit_offset} #{item.bit_size} #{item.data_type} #{item.array_size} #{item.endianness} #{item.overflow} #{item.states} #{item.read_conversion ? item.read_conversion.class : 'NO_CONVERSION'}"
|
220
|
+
end
|
221
|
+
digest = Digest::MD5.new
|
222
|
+
digest << string
|
223
|
+
@config_name = digest.hexdigest
|
224
|
+
@config_name
|
225
|
+
end
|
226
|
+
|
227
|
+
# (see Structure#buffer=)
|
228
|
+
def buffer=(buffer)
|
229
|
+
synchronize() do
|
230
|
+
begin
|
231
|
+
internal_buffer_equals(buffer)
|
232
|
+
rescue RuntimeError
|
233
|
+
Logger.instance.error "#{@target_name} #{@packet_name} received with actual packet length of #{buffer.length} but defined length of #{@defined_length}"
|
234
|
+
end
|
235
|
+
@read_conversion_cache.clear if @read_conversion_cache
|
236
|
+
process()
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
# Sets the received time of the packet (without cloning)
|
241
|
+
#
|
242
|
+
# @param received_time [Time] Time this packet was received
|
243
|
+
def set_received_time_fast(received_time)
|
244
|
+
@received_time = received_time
|
245
|
+
@received_time.freeze if @received_time
|
246
|
+
if @read_conversion_cache
|
247
|
+
synchronize() do
|
248
|
+
@read_conversion_cache.clear
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
# Sets the hazardous description of the packet
|
254
|
+
#
|
255
|
+
# @param hazardous_description [String] Hazardous description of the packet
|
256
|
+
def hazardous_description=(hazardous_description)
|
257
|
+
if hazardous_description
|
258
|
+
raise ArgumentError, "hazardous_description must be a String but is a #{hazardous_description.class}" unless String === hazardous_description
|
259
|
+
@hazardous_description = hazardous_description.clone.freeze
|
260
|
+
else
|
261
|
+
@hazardous_description = nil
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
# Saves a hash of the values given by a user when constructing a command
|
266
|
+
#
|
267
|
+
# @param given_values [Hash<Item Name, Value>] Hash of given command parameters
|
268
|
+
def given_values=(given_values)
|
269
|
+
if given_values
|
270
|
+
raise ArgumentError, "given_values must be a Hash but is a #{given_values.class}" unless Hash === given_values
|
271
|
+
@given_values = given_values.clone
|
272
|
+
else
|
273
|
+
@given_values = nil
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
# Sets the callback object called when a limits state changes
|
278
|
+
#
|
279
|
+
# @param limits_change_callback [#call] Object must respond to the call
|
280
|
+
# method and take the following arguments: packet (Packet), item (PacketItem),
|
281
|
+
# old_limits_state (Symbol), item_value (Object), log_change (Boolean). The
|
282
|
+
# current item state can be found by querying the item object:
|
283
|
+
# item.limits.state.
|
284
|
+
def limits_change_callback=(limits_change_callback)
|
285
|
+
if limits_change_callback
|
286
|
+
raise ArgumentError, "limits_change_callback must respond to call" unless limits_change_callback.respond_to?(:call)
|
287
|
+
@limits_change_callback = limits_change_callback
|
288
|
+
else
|
289
|
+
@limits_change_callback = nil
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
# Review bit offset to look for overlapping definitions. This will allow
|
294
|
+
# gaps in the packet, but not allow the same bits to be used for multiple
|
295
|
+
# variables.
|
296
|
+
#
|
297
|
+
# @return [Array<String>] Warning messages for big definition overlaps
|
298
|
+
def check_bit_offsets
|
299
|
+
expected_next_offset = nil
|
300
|
+
previous_item = nil
|
301
|
+
warnings = []
|
302
|
+
@sorted_items.each do |item|
|
303
|
+
if expected_next_offset and item.bit_offset < expected_next_offset
|
304
|
+
msg = "Bit definition overlap at bit offset #{item.bit_offset} for packet #{@target_name} #{@packet_name} items #{item.name} and #{previous_item.name}"
|
305
|
+
Logger.instance.warn(msg)
|
306
|
+
warnings << msg
|
307
|
+
end
|
308
|
+
expected_next_offset = Packet.next_bit_offset(item)
|
309
|
+
previous_item = item
|
310
|
+
end
|
311
|
+
warnings
|
312
|
+
end
|
313
|
+
|
314
|
+
# Checks if the packet has any gaps or overlapped items
|
315
|
+
#
|
316
|
+
# @return [Boolean] true if the packet has no gaps or overlapped items
|
317
|
+
def packed?
|
318
|
+
expected_next_offset = nil
|
319
|
+
@sorted_items.each do |item|
|
320
|
+
if expected_next_offset and item.bit_offset != expected_next_offset
|
321
|
+
return false
|
322
|
+
end
|
323
|
+
expected_next_offset = Packet.next_bit_offset(item)
|
324
|
+
end
|
325
|
+
true
|
326
|
+
end
|
327
|
+
|
328
|
+
# Returns the bit offset of the next item after the current item if items are packed
|
329
|
+
#
|
330
|
+
# @param item [PacketItem] The item to calculate the next offset for
|
331
|
+
# @return [Integer] Bit Offset of Next Item if Packed
|
332
|
+
def self.next_bit_offset(item)
|
333
|
+
if item.array_size
|
334
|
+
if item.array_size > 0
|
335
|
+
next_offset = item.bit_offset + item.array_size
|
336
|
+
else
|
337
|
+
next_offset = item.array_size
|
338
|
+
end
|
339
|
+
else
|
340
|
+
next_offset = nil
|
341
|
+
if item.bit_offset > 0
|
342
|
+
# Handle little-endian bit fields
|
343
|
+
byte_aligned = ((item.bit_offset % 8) == 0)
|
344
|
+
if item.endianness == :LITTLE_ENDIAN and (item.data_type == :INT or item.data_type == :UINT) and !(byte_aligned and (item.bit_size == 8 or item.bit_size == 16 or item.bit_size == 32 or item.bit_size == 64))
|
345
|
+
# Bit offset always refers to the most significant bit of a bitfield
|
346
|
+
bits_remaining_in_last_byte = 8 - (item.bit_offset % 8)
|
347
|
+
if item.bit_size > bits_remaining_in_last_byte
|
348
|
+
next_offset = item.bit_offset + bits_remaining_in_last_byte
|
349
|
+
end
|
350
|
+
end
|
351
|
+
end
|
352
|
+
unless next_offset
|
353
|
+
if item.bit_size > 0
|
354
|
+
next_offset = item.bit_offset + item.bit_size
|
355
|
+
else
|
356
|
+
next_offset = item.bit_size
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|
360
|
+
next_offset
|
361
|
+
end
|
362
|
+
|
363
|
+
# Id items are used by the identify? method to determine if a raw buffer of
|
364
|
+
# data represents this packet.
|
365
|
+
# @return [Array<PacketItem>] Packet item identifiers
|
366
|
+
def id_items
|
367
|
+
@id_items ||= []
|
368
|
+
end
|
369
|
+
|
370
|
+
# @return [Array<PacketItem>] All items with defined limits
|
371
|
+
def limits_items
|
372
|
+
@limits_items ||= []
|
373
|
+
end
|
374
|
+
|
375
|
+
# @return [Hash] Hash of processors associated with this packet
|
376
|
+
def processors
|
377
|
+
@processors ||= {}
|
378
|
+
end
|
379
|
+
|
380
|
+
# Returns packet specific metadata
|
381
|
+
# @return [Hash<Meta Name, Meta Values>]
|
382
|
+
def meta
|
383
|
+
@meta ||= {}
|
384
|
+
end
|
385
|
+
|
386
|
+
# Indicates if the packet has been identified
|
387
|
+
# @return [TrueClass or FalseClass]
|
388
|
+
def identified?
|
389
|
+
!@target_name.nil? && !@packet_name.nil?
|
390
|
+
end
|
391
|
+
|
392
|
+
# Define an item in the packet. This creates a new instance of the
|
393
|
+
# item_class as given in the constructor and adds it to the items hash. It
|
394
|
+
# also resizes the buffer to accomodate the new item.
|
395
|
+
#
|
396
|
+
# @param name [String] Name of the item. Used by the items hash to retrieve
|
397
|
+
# the item.
|
398
|
+
# @param bit_offset [Integer] Bit offset of the item in the raw buffer
|
399
|
+
# @param bit_size [Integer] Bit size of the item in the raw buffer
|
400
|
+
# @param data_type [Symbol] Type of data contained by the item. This is
|
401
|
+
# dependant on the item_class but by default see StructureItem.
|
402
|
+
# @param array_size [Integer] Set to a non nil value if the item is to
|
403
|
+
# represented as an array.
|
404
|
+
# @param endianness [Symbol] Endianness of this item. By default the
|
405
|
+
# endianness as set in the constructure is used.
|
406
|
+
# @param overflow [Symbol] How to handle value overflows. This is
|
407
|
+
# dependant on the item_class but by default see StructureItem.
|
408
|
+
# @param format_string [String] String to pass to Kernel#sprintf
|
409
|
+
# @param read_conversion [Conversion] Conversion to apply when reading the
|
410
|
+
# item from the packet buffer
|
411
|
+
# @param write_conversion [Conversion] Conversion to apply before writing
|
412
|
+
# the item to the packet buffer
|
413
|
+
# @param id_value [Object] Set to something other than nil to indicate that
|
414
|
+
# this item should be used to identify a buffer as this packet. The
|
415
|
+
# id_value should make sense according to the data_type.
|
416
|
+
# @return [PacketItem] The new packet item
|
417
|
+
def define_item(name, bit_offset, bit_size, data_type, array_size = nil, endianness = @default_endianness, overflow = :ERROR, format_string = nil, read_conversion = nil, write_conversion = nil, id_value = nil)
|
418
|
+
item = super(name, bit_offset, bit_size, data_type, array_size, endianness, overflow)
|
419
|
+
packet_define_item(item, format_string, read_conversion, write_conversion, id_value)
|
420
|
+
end
|
421
|
+
|
422
|
+
# Add an item to the packet by adding it to the items hash. It also
|
423
|
+
# resizes the buffer to accomodate the new item.
|
424
|
+
#
|
425
|
+
# @param item [PacketItem] Item to add to the packet
|
426
|
+
# @return [PacketItem] The same packet item
|
427
|
+
def define(item)
|
428
|
+
item = super(item)
|
429
|
+
update_id_items(item)
|
430
|
+
update_limits_items_cache(item)
|
431
|
+
item
|
432
|
+
end
|
433
|
+
|
434
|
+
# Define an item at the end of the packet. This creates a new instance of the
|
435
|
+
# item_class as given in the constructor and adds it to the items hash. It
|
436
|
+
# also resizes the buffer to accomodate the new item.
|
437
|
+
#
|
438
|
+
# @param name (see #define_item)
|
439
|
+
# @param bit_size (see #define_item)
|
440
|
+
# @param data_type (see #define_item)
|
441
|
+
# @param array_size (see #define_item)
|
442
|
+
# @param endianness (see #define_item)
|
443
|
+
# @param overflow (see #define_item)
|
444
|
+
# @param format_string (see #define_item)
|
445
|
+
# @param read_conversion (see #define_item)
|
446
|
+
# @param write_conversion (see #define_item)
|
447
|
+
# @param id_value (see #define_item)
|
448
|
+
# @return (see #define_item)
|
449
|
+
def append_item(name, bit_size, data_type, array_size = nil, endianness = @default_endianness, overflow = :ERROR, format_string = nil, read_conversion = nil, write_conversion = nil, id_value = nil)
|
450
|
+
item = super(name, bit_size, data_type, array_size, endianness, overflow)
|
451
|
+
packet_define_item(item, format_string, read_conversion, write_conversion, id_value)
|
452
|
+
end
|
453
|
+
|
454
|
+
# (see Structure#get_item)
|
455
|
+
def get_item(name)
|
456
|
+
super(name)
|
457
|
+
rescue ArgumentError
|
458
|
+
raise "Packet item '#{@target_name} #{@packet_name} #{name.upcase}' does not exist"
|
459
|
+
end
|
460
|
+
|
461
|
+
# Read an item in the packet
|
462
|
+
#
|
463
|
+
# @param item [PacketItem] Instance of PacketItem or one of its subclasses
|
464
|
+
# @param value_type [Symbol] How to convert the item before returning it.
|
465
|
+
# Must be one of {VALUE_TYPES}
|
466
|
+
# @param buffer (see Structure#read_item)
|
467
|
+
# @return The value. :FORMATTED and :WITH_UNITS values are always returned
|
468
|
+
# as Strings. :RAW values will match their data_type. :CONVERTED values
|
469
|
+
# can be any type.
|
470
|
+
def read_item(item, value_type = :CONVERTED, buffer = @buffer)
|
471
|
+
value = super(item, :RAW, buffer)
|
472
|
+
derived_raw = false
|
473
|
+
if item.data_type == :DERIVED && value_type == :RAW
|
474
|
+
value_type = :CONVERTED
|
475
|
+
derived_raw = true
|
476
|
+
end
|
477
|
+
case value_type
|
478
|
+
when :RAW
|
479
|
+
# Done above
|
480
|
+
when :CONVERTED, :FORMATTED, :WITH_UNITS
|
481
|
+
if item.read_conversion
|
482
|
+
using_cached_value = false
|
483
|
+
|
484
|
+
check_cache = buffer.equal?(@buffer)
|
485
|
+
if check_cache and @read_conversion_cache
|
486
|
+
synchronize_allow_reads() do
|
487
|
+
if @read_conversion_cache[item]
|
488
|
+
value = @read_conversion_cache[item]
|
489
|
+
|
490
|
+
# Make sure cached value is not modified by anyone by creating
|
491
|
+
# a deep copy
|
492
|
+
if String === value
|
493
|
+
value = value.clone
|
494
|
+
elsif Array === value
|
495
|
+
value = Marshal.load(Marshal.dump(value))
|
496
|
+
end
|
497
|
+
|
498
|
+
using_cached_value = true
|
499
|
+
end
|
500
|
+
end
|
501
|
+
end
|
502
|
+
|
503
|
+
unless using_cached_value
|
504
|
+
if item.array_size
|
505
|
+
value.map! do |val, index|
|
506
|
+
item.read_conversion.call(val, self, buffer)
|
507
|
+
end
|
508
|
+
else
|
509
|
+
value = item.read_conversion.call(value, self, buffer)
|
510
|
+
end
|
511
|
+
if check_cache
|
512
|
+
synchronize_allow_reads() do
|
513
|
+
@read_conversion_cache ||= {}
|
514
|
+
@read_conversion_cache[item] = value
|
515
|
+
|
516
|
+
# Make sure cached value is not modified by anyone by creating
|
517
|
+
# a deep copy
|
518
|
+
if String === value
|
519
|
+
value = value.clone
|
520
|
+
elsif Array === value
|
521
|
+
value = Marshal.load(Marshal.dump(value))
|
522
|
+
end
|
523
|
+
end
|
524
|
+
end
|
525
|
+
end
|
526
|
+
end
|
527
|
+
|
528
|
+
# Derived raw values perform read_conversions but nothing else
|
529
|
+
return value if derived_raw
|
530
|
+
|
531
|
+
# Convert from value to state if possible
|
532
|
+
if item.states
|
533
|
+
if Array === value
|
534
|
+
value = value.map do |val, index|
|
535
|
+
if item.states.key(val)
|
536
|
+
item.states.key(val)
|
537
|
+
else
|
538
|
+
apply_format_string_and_units(item, val, value_type)
|
539
|
+
end
|
540
|
+
end
|
541
|
+
else
|
542
|
+
state_value = item.states.key(value)
|
543
|
+
if state_value
|
544
|
+
value = state_value
|
545
|
+
else
|
546
|
+
value = apply_format_string_and_units(item, value, value_type)
|
547
|
+
end
|
548
|
+
end
|
549
|
+
else
|
550
|
+
if Array === value
|
551
|
+
value = value.map do |val, index|
|
552
|
+
apply_format_string_and_units(item, val, value_type)
|
553
|
+
end
|
554
|
+
else
|
555
|
+
value = apply_format_string_and_units(item, value, value_type)
|
556
|
+
end
|
557
|
+
end
|
558
|
+
else
|
559
|
+
raise ArgumentError, "Unknown value type on read: #{value_type}"
|
560
|
+
end
|
561
|
+
return value
|
562
|
+
end
|
563
|
+
|
564
|
+
# Write an item in the packet
|
565
|
+
#
|
566
|
+
# @param item [PacketItem] Instance of PacketItem or one of its subclasses
|
567
|
+
# @param value (see Structure#write_item)
|
568
|
+
# @param value_type (see #read_item)
|
569
|
+
# @param buffer (see Structure#write_item)
|
570
|
+
def write_item(item, value, value_type = :CONVERTED, buffer = @buffer)
|
571
|
+
case value_type
|
572
|
+
when :RAW
|
573
|
+
super(item, value, value_type, buffer)
|
574
|
+
when :CONVERTED
|
575
|
+
if item.states
|
576
|
+
# Convert from state to value if possible
|
577
|
+
state_value = item.states[value.to_s.upcase]
|
578
|
+
value = state_value if state_value
|
579
|
+
end
|
580
|
+
if item.write_conversion
|
581
|
+
value = item.write_conversion.call(value, self, buffer)
|
582
|
+
else
|
583
|
+
raise "Cannot write DERIVED item without a write conversion" if item.data_type == :DERIVED
|
584
|
+
end
|
585
|
+
begin
|
586
|
+
super(item, value, :RAW, buffer) unless item.data_type == :DERIVED
|
587
|
+
rescue ArgumentError => err
|
588
|
+
if item.states and String === value and err.message =~ /invalid value for/
|
589
|
+
raise "Unknown state #{value} for #{item.name}"
|
590
|
+
else
|
591
|
+
raise err
|
592
|
+
end
|
593
|
+
end
|
594
|
+
when :FORMATTED, :WITH_UNITS
|
595
|
+
raise ArgumentError, "Invalid value type on write: #{value_type}"
|
596
|
+
else
|
597
|
+
raise ArgumentError, "Unknown value type on write: #{value_type}"
|
598
|
+
end
|
599
|
+
if @read_conversion_cache
|
600
|
+
synchronize() do
|
601
|
+
@read_conversion_cache.clear
|
602
|
+
end
|
603
|
+
end
|
604
|
+
end
|
605
|
+
|
606
|
+
# Read an item in the packet by name
|
607
|
+
#
|
608
|
+
# @param name [String] Name of the item to read
|
609
|
+
# @param value_type (see #read_item)
|
610
|
+
# @param buffer (see #read_item)
|
611
|
+
# @return (see #read_item)
|
612
|
+
def read(name, value_type = :CONVERTED, buffer = @buffer)
|
613
|
+
return super(name, value_type, buffer)
|
614
|
+
end
|
615
|
+
|
616
|
+
# Write an item in the packet by name
|
617
|
+
#
|
618
|
+
# @param name [String] Name of the item to write
|
619
|
+
# @param value (see #write_item)
|
620
|
+
# @param value_type (see #write_item)
|
621
|
+
# @param buffer (see #write_item)
|
622
|
+
def write(name, value, value_type = :CONVERTED, buffer = @buffer)
|
623
|
+
super(name, value, value_type, buffer)
|
624
|
+
end
|
625
|
+
|
626
|
+
# Read all items in the packet into an array of arrays
|
627
|
+
# [[item name, item value], ...]
|
628
|
+
#
|
629
|
+
# @param value_type (see #read_item)
|
630
|
+
# @param buffer (see Structure#read_all)
|
631
|
+
# @param top (See Structure#read_all)
|
632
|
+
# @return (see Structure#read_all)
|
633
|
+
def read_all(value_type = :CONVERTED, buffer = @buffer, top = true)
|
634
|
+
return super(value_type, buffer, top)
|
635
|
+
end
|
636
|
+
|
637
|
+
# Read all items in the packet into an array of arrays
|
638
|
+
# [[item name, item value], [item limits state], ...]
|
639
|
+
#
|
640
|
+
# @param value_type (see #read_all)
|
641
|
+
# @param buffer (see #read_all)
|
642
|
+
# @return [Array<String, Object, Symbol|nil>] Returns an Array consisting
|
643
|
+
# of [item name, item value, item limits state] where the item limits
|
644
|
+
# state can be one of {Cosmos::Limits::LIMITS_STATES}
|
645
|
+
def read_all_with_limits_states(value_type = :CONVERTED, buffer = @buffer)
|
646
|
+
result = nil
|
647
|
+
synchronize_allow_reads(true) do
|
648
|
+
result = read_all(value_type, buffer, false).map! do |array|
|
649
|
+
array << @items[array[0]].limits.state
|
650
|
+
end
|
651
|
+
end
|
652
|
+
return result
|
653
|
+
end
|
654
|
+
|
655
|
+
# Create a string that shows the name and value of each item in the packet
|
656
|
+
#
|
657
|
+
# @param value_type (see #read_item)
|
658
|
+
# @param indent (see Structure#formatted)
|
659
|
+
# @param buffer (see Structure#formatted)
|
660
|
+
# @return (see Structure#formatted)
|
661
|
+
def formatted(value_type = :CONVERTED, indent = 0, buffer = @buffer)
|
662
|
+
return super(value_type, indent, buffer)
|
663
|
+
end
|
664
|
+
|
665
|
+
# Restore all items in the packet to their default value
|
666
|
+
#
|
667
|
+
# @param buffer [String] Raw buffer of binary data
|
668
|
+
# @param skip_item_names [Array] Array of item names to skip
|
669
|
+
def restore_defaults(buffer = @buffer, skip_item_names = nil)
|
670
|
+
upcase_skip_item_names = skip_item_names.map(&:upcase) if skip_item_names
|
671
|
+
@sorted_items.each do |item|
|
672
|
+
write_item(item, item.default, :CONVERTED, buffer) unless (skip_item_names and upcase_skip_item_names.include?(item.name))
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
676
|
+
# Enable limits on an item by name
|
677
|
+
#
|
678
|
+
# @param name [String] Name of the item to enable limits
|
679
|
+
def enable_limits(name)
|
680
|
+
get_item(name).limits.enabled = true
|
681
|
+
end
|
682
|
+
|
683
|
+
# Disable limits on an item by name
|
684
|
+
#
|
685
|
+
# @param name [String] Name of the item to disable limits
|
686
|
+
def disable_limits(name)
|
687
|
+
item = get_item(name)
|
688
|
+
item.limits.enabled = false
|
689
|
+
unless item.limits.state == :STALE
|
690
|
+
old_limits_state = item.limits.state
|
691
|
+
item.limits.state = nil
|
692
|
+
@limits_change_callback.call(self, item, old_limits_state, nil, false) if @limits_change_callback
|
693
|
+
end
|
694
|
+
end
|
695
|
+
|
696
|
+
# Add an item to the limits items cache if necessary.
|
697
|
+
# You MUST call this after adding limits to an item
|
698
|
+
#This is an optimization so we don't have to iterate through all the items when
|
699
|
+
# checking for limits.
|
700
|
+
def update_limits_items_cache(item)
|
701
|
+
if item.limits.values || item.state_colors
|
702
|
+
@limits_items ||= []
|
703
|
+
@limits_items_hash ||= {}
|
704
|
+
unless @limits_items_hash[item]
|
705
|
+
@limits_items << item
|
706
|
+
@limits_items_hash[item] = true
|
707
|
+
end
|
708
|
+
end
|
709
|
+
end
|
710
|
+
|
711
|
+
# Return an array of arrays indicating all items in the packet that are out of limits
|
712
|
+
# [[target name, packet name, item name, item limits state], ...]
|
713
|
+
#
|
714
|
+
# @return [Array<Array<String, String, String, Symbol>>]
|
715
|
+
def out_of_limits
|
716
|
+
items = []
|
717
|
+
return items unless @limits_items
|
718
|
+
@limits_items.each do |item|
|
719
|
+
if (item.limits.enabled && item.limits.state &&
|
720
|
+
PacketItemLimits::OUT_OF_LIMITS_STATES.include?(item.limits.state))
|
721
|
+
items << [@target_name, @packet_name, item.name, item.limits.state]
|
722
|
+
end
|
723
|
+
end
|
724
|
+
return items
|
725
|
+
end
|
726
|
+
|
727
|
+
# Set the limits state for all items to the given state
|
728
|
+
#
|
729
|
+
# @param state [Symbol] Must be one of PacketItemLimits::LIMITS_STATES
|
730
|
+
def set_all_limits_states(state)
|
731
|
+
@sorted_items.each {|item| item.limits.state = state}
|
732
|
+
end
|
733
|
+
|
734
|
+
# Check all the items in the packet against their defined limits. Update
|
735
|
+
# their internal limits state and persistence and call the
|
736
|
+
# limits_change_callback as necessary.
|
737
|
+
#
|
738
|
+
# @param limits_set [Symbol] Which limits set to check the item values
|
739
|
+
# against.
|
740
|
+
# @param ignore_persistence [Boolean] Whether to ignore persistence when
|
741
|
+
# checking for out of limits
|
742
|
+
def check_limits(limits_set = :DEFAULT, ignore_persistence = false)
|
743
|
+
# If check_limits is being called, then a new packet has arrived and
|
744
|
+
# this packet is no longer stale
|
745
|
+
if @stale
|
746
|
+
@stale = false
|
747
|
+
set_all_limits_states(nil)
|
748
|
+
end
|
749
|
+
|
750
|
+
return unless @limits_items
|
751
|
+
@limits_items.each do |item|
|
752
|
+
# Verify limits monitoring is enabled for this item
|
753
|
+
if item.limits.enabled
|
754
|
+
value = read_item(item)
|
755
|
+
|
756
|
+
# Handle state monitoring and value monitoring differently
|
757
|
+
if item.states
|
758
|
+
handle_limits_states(item, value)
|
759
|
+
elsif item.limits.values
|
760
|
+
handle_limits_values(item, value, limits_set, ignore_persistence)
|
761
|
+
end
|
762
|
+
end
|
763
|
+
end
|
764
|
+
end
|
765
|
+
|
766
|
+
# Sets the overall packet stale state to true and sets each packet item
|
767
|
+
# limits state to :STALE.
|
768
|
+
def set_stale
|
769
|
+
@stale = true
|
770
|
+
set_all_limits_states(:STALE)
|
771
|
+
end
|
772
|
+
|
773
|
+
# Reset temporary packet data
|
774
|
+
# This includes packet received time, received count, and processor state
|
775
|
+
def reset
|
776
|
+
@received_time = nil
|
777
|
+
@received_count = 0
|
778
|
+
if @read_conversion_cache
|
779
|
+
synchronize() do
|
780
|
+
@read_conversion_cache.clear
|
781
|
+
end
|
782
|
+
end
|
783
|
+
return unless @processors
|
784
|
+
@processors.each do |processor_name, processor|
|
785
|
+
processor.reset
|
786
|
+
end
|
787
|
+
end
|
788
|
+
|
789
|
+
# Make a light weight clone of this packet. This only creates a new buffer
|
790
|
+
# of data and clones the processors. The defined packet items are the same.
|
791
|
+
#
|
792
|
+
# @return [Packet] A copy of the current packet with a new underlying
|
793
|
+
# buffer of data and processors
|
794
|
+
def clone
|
795
|
+
packet = super()
|
796
|
+
if packet.instance_variable_get("@processors".freeze)
|
797
|
+
packet.instance_variable_set("@processors".freeze, packet.processors.clone)
|
798
|
+
packet.processors.each do |processor_name, processor|
|
799
|
+
packet.processors[processor_name] = processor.clone
|
800
|
+
end
|
801
|
+
end
|
802
|
+
packet.instance_variable_set("@read_conversion_cache".freeze, nil)
|
803
|
+
packet
|
804
|
+
end
|
805
|
+
alias dup clone
|
806
|
+
|
807
|
+
def update_id_items(item)
|
808
|
+
if item.id_value
|
809
|
+
@id_items ||= []
|
810
|
+
@id_items << item
|
811
|
+
end
|
812
|
+
item
|
813
|
+
end
|
814
|
+
|
815
|
+
def to_config(cmd_or_tlm)
|
816
|
+
config = ''
|
817
|
+
|
818
|
+
if cmd_or_tlm == :TELEMETRY
|
819
|
+
config << "TELEMETRY #{self.target_name.to_s.quote_if_necessary} #{self.packet_name.to_s.quote_if_necessary} #{@default_endianness} \"#{self.description}\"\n"
|
820
|
+
else
|
821
|
+
config << "COMMAND #{self.target_name.to_s.quote_if_necessary} #{self.packet_name.to_s.quote_if_necessary} #{@default_endianness} \"#{self.description}\"\n"
|
822
|
+
end
|
823
|
+
config << " ALLOW_SHORT\n" if self.short_buffer_allowed
|
824
|
+
config << " HAZARDOUS #{self.hazardous_description.to_s.quote_if_necessary}\n" if self.hazardous
|
825
|
+
config << " DISABLE_MESSAGES\n" if self.messages_disabled
|
826
|
+
if self.disabled
|
827
|
+
config << " DISABLED\n"
|
828
|
+
elsif self.hidden
|
829
|
+
config << " HIDDEN\n"
|
830
|
+
end
|
831
|
+
|
832
|
+
if @processors
|
833
|
+
@processors.each do |processor_name, processor|
|
834
|
+
config << processor.to_config
|
835
|
+
end
|
836
|
+
end
|
837
|
+
|
838
|
+
if @meta
|
839
|
+
@meta.each do |key, values|
|
840
|
+
config << " META #{key.to_s.quote_if_necessary} #{values.map {|a| a..to_s.quote_if_necessary}.join(" ")}\n"
|
841
|
+
end
|
842
|
+
end
|
843
|
+
|
844
|
+
# Items with derived items last
|
845
|
+
self.sorted_items.each do |item|
|
846
|
+
if item.data_type != :DERIVED
|
847
|
+
config << item.to_config(cmd_or_tlm, @default_endianness)
|
848
|
+
end
|
849
|
+
end
|
850
|
+
self.sorted_items.each do |item|
|
851
|
+
if item.data_type == :DERIVED
|
852
|
+
unless RESERVED_ITEM_NAMES.include?(item.name)
|
853
|
+
config << item.to_config(cmd_or_tlm, @default_endianness)
|
854
|
+
end
|
855
|
+
end
|
856
|
+
end
|
857
|
+
|
858
|
+
config
|
859
|
+
end
|
860
|
+
|
861
|
+
protected
|
862
|
+
|
863
|
+
# Performs packet specific processing on the packet. Intended to only be run once for each packet received
|
864
|
+
def process(buffer = @buffer)
|
865
|
+
return unless @processors
|
866
|
+
@processors.each do |processor_name, processor|
|
867
|
+
processor.call(self, buffer)
|
868
|
+
end
|
869
|
+
end
|
870
|
+
|
871
|
+
def handle_limits_states(item, value)
|
872
|
+
# Retrieve limits state for the given value
|
873
|
+
limits_state = item.state_colors[value]
|
874
|
+
|
875
|
+
if item.limits.state != limits_state # PacketItemLimits state has changed
|
876
|
+
# Save old limits state
|
877
|
+
old_limits_state = item.limits.state
|
878
|
+
# Update to new limits state
|
879
|
+
item.limits.state = limits_state
|
880
|
+
|
881
|
+
if old_limits_state == nil # Changing from nil
|
882
|
+
if limits_state != :GREEN && limits_state != :BLUE # Warnings are needed
|
883
|
+
@limits_change_callback.call(self, item, old_limits_state, value, true) if @limits_change_callback
|
884
|
+
end
|
885
|
+
else # Changing from a state other than nil so always call the callback
|
886
|
+
if @limits_change_callback
|
887
|
+
if item.limits.state.nil?
|
888
|
+
@limits_change_callback.call(self, item, old_limits_state, value, false)
|
889
|
+
else
|
890
|
+
@limits_change_callback.call(self, item, old_limits_state, value, true)
|
891
|
+
end
|
892
|
+
end
|
893
|
+
end
|
894
|
+
end
|
895
|
+
end
|
896
|
+
|
897
|
+
def handle_limits_values(item, value, limits_set, ignore_persistence)
|
898
|
+
# Retrieve limits settings for the specified limits_set
|
899
|
+
limits = item.limits.values[limits_set]
|
900
|
+
|
901
|
+
# Use the default limits set if limits aren't specified for the
|
902
|
+
# particular limits set
|
903
|
+
limits = item.limits.values[:DEFAULT] unless limits
|
904
|
+
|
905
|
+
# Extract limits from array
|
906
|
+
red_low = limits[0]
|
907
|
+
yellow_low = limits[1]
|
908
|
+
yellow_high = limits[2]
|
909
|
+
red_high = limits[3]
|
910
|
+
green_low = limits[4]
|
911
|
+
green_high = limits[5]
|
912
|
+
limits_state = nil
|
913
|
+
|
914
|
+
# Determine the limits_state based on the limits values and the current
|
915
|
+
# value of the item
|
916
|
+
if (value > yellow_low)
|
917
|
+
if (value < yellow_high)
|
918
|
+
if green_low
|
919
|
+
if value < green_high
|
920
|
+
if value > green_low
|
921
|
+
limits_state = :BLUE
|
922
|
+
else
|
923
|
+
limits_state = :GREEN_LOW
|
924
|
+
end
|
925
|
+
else
|
926
|
+
limits_state = :GREEN_HIGH
|
927
|
+
end
|
928
|
+
else
|
929
|
+
limits_state = :GREEN
|
930
|
+
end
|
931
|
+
elsif (value < red_high)
|
932
|
+
limits_state = :YELLOW_HIGH
|
933
|
+
else
|
934
|
+
limits_state = :RED_HIGH
|
935
|
+
end
|
936
|
+
else # value <= yellow_low
|
937
|
+
if (value > red_low)
|
938
|
+
limits_state = :YELLOW_LOW
|
939
|
+
else
|
940
|
+
limits_state = :RED_LOW
|
941
|
+
end
|
942
|
+
end
|
943
|
+
|
944
|
+
if item.limits.state != limits_state # limits state has changed
|
945
|
+
# Save old limits state for use in the callback
|
946
|
+
old_limits_state = item.limits.state
|
947
|
+
|
948
|
+
item.limits.persistence_count += 1
|
949
|
+
|
950
|
+
# Check for item to achieve its persistence which means we
|
951
|
+
# have to update the state and call the callback
|
952
|
+
# Note when going back to green (or blue) persistence is ignored
|
953
|
+
if (item.limits.persistence_count >= item.limits.persistence_setting) || ignore_persistence
|
954
|
+
item.limits.state = limits_state
|
955
|
+
|
956
|
+
# Additional actions for limits change
|
957
|
+
@limits_change_callback.call(self, item, old_limits_state, value, true) if @limits_change_callback
|
958
|
+
|
959
|
+
# Clear persistence since we've entered a new state
|
960
|
+
item.limits.persistence_count = 0
|
961
|
+
end
|
962
|
+
else # limits state has not changed so clear persistence
|
963
|
+
item.limits.persistence_count = 0
|
964
|
+
end
|
965
|
+
end
|
966
|
+
|
967
|
+
def apply_format_string_and_units(item, value, value_type)
|
968
|
+
if value_type == :FORMATTED or value_type == :WITH_UNITS
|
969
|
+
if item.format_string && value
|
970
|
+
value = sprintf(item.format_string, value)
|
971
|
+
else
|
972
|
+
value = value.to_s
|
973
|
+
end
|
974
|
+
end
|
975
|
+
value << ' ' << item.units if value_type == :WITH_UNITS and item.units
|
976
|
+
value
|
977
|
+
end
|
978
|
+
|
979
|
+
def packet_define_item(item, format_string, read_conversion, write_conversion, id_value)
|
980
|
+
item.format_string = format_string
|
981
|
+
item.read_conversion = read_conversion
|
982
|
+
item.write_conversion = write_conversion
|
983
|
+
|
984
|
+
# Change id_value to the correct type
|
985
|
+
if id_value
|
986
|
+
item.id_value = id_value
|
987
|
+
update_id_items(item)
|
988
|
+
end
|
989
|
+
item
|
990
|
+
end
|
991
|
+
|
992
|
+
end # class Packet
|
993
|
+
|
994
|
+
end # module Cosmos
|