cosmos 3.2.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +195 -0
- data/README.md +3 -3
- data/data/crc.txt +52 -52
- data/lib/cosmos.rb +1 -1
- data/lib/cosmos/core_ext/time.rb +11 -9
- data/lib/cosmos/gui/choosers/telemetry_chooser.rb +0 -2
- data/lib/cosmos/gui/dialogs/about_dialog.rb +2 -2
- data/lib/cosmos/gui/dialogs/exception_dialog.rb +2 -2
- data/lib/cosmos/gui/dialogs/progress_dialog.rb +11 -5
- data/lib/cosmos/gui/dialogs/splash.rb +32 -10
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +1 -1
- data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +2 -2
- data/lib/cosmos/gui/qt.rb +22 -22
- data/lib/cosmos/io/json_drb.rb +4 -4
- data/lib/cosmos/io/json_rpc.rb +21 -21
- data/lib/cosmos/packet_logs/packet_log_writer.rb +18 -20
- data/lib/cosmos/packets/commands.rb +8 -6
- data/lib/cosmos/packets/limits.rb +3 -2
- data/lib/cosmos/packets/packet.rb +14 -11
- data/lib/cosmos/packets/parsers/limits_parser.rb +1 -1
- data/lib/cosmos/packets/parsers/macro_parser.rb +4 -4
- data/lib/cosmos/packets/parsers/state_parser.rb +1 -1
- data/lib/cosmos/packets/structure.rb +2 -2
- data/lib/cosmos/packets/telemetry.rb +5 -4
- data/lib/cosmos/script/script.rb +6 -6
- data/lib/cosmos/streams/tcpip_socket_stream.rb +2 -1
- data/lib/cosmos/streams/template_stream_protocol.rb +1 -1
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +5 -8
- data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +4 -3
- data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +9 -3
- data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +15 -11
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +1 -1
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +2 -2
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +2 -2
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +0 -2
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +1 -1
- data/lib/cosmos/tools/replay/replay.rb +2 -2
- data/lib/cosmos/tools/script_runner/script_audit.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +3 -7
- data/lib/cosmos/tools/table_manager/table_config.rb +1 -1
- data/lib/cosmos/tools/test_runner/results_writer.rb +1 -1
- data/lib/cosmos/tools/test_runner/test_runner.rb +2 -2
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +2 -1
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +1 -1
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +1 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +1 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/xy_data_object_editor.rb +1 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +3 -3
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +1 -3
- data/lib/cosmos/top_level.rb +2 -6
- data/lib/cosmos/utilities/ruby_lex_utils.rb +1 -1
- data/lib/cosmos/version.rb +5 -5
- data/lib/cosmos/win32/win32_main.rb +11 -7
- data/spec/ccsds/ccsds_packet_spec.rb +28 -28
- data/spec/ccsds/ccsds_parser_spec.rb +27 -27
- data/spec/config/config_parser_spec.rb +88 -88
- data/spec/conversions/conversion_spec.rb +3 -3
- data/spec/conversions/generic_conversion_spec.rb +9 -9
- data/spec/conversions/new_packet_log_conversion_spec.rb +4 -4
- data/spec/conversions/polynomial_conversion_spec.rb +7 -7
- data/spec/conversions/processor_conversion_spec.rb +9 -9
- data/spec/conversions/received_count_conversion_spec.rb +7 -7
- data/spec/conversions/received_time_formatted_conversion_spec.rb +9 -9
- data/spec/conversions/received_time_seconds_conversion_spec.rb +9 -9
- data/spec/conversions/segmented_polynomial_conversion_spec.rb +11 -11
- data/spec/conversions/unix_time_formatted_conversion_spec.rb +13 -13
- data/spec/conversions/unix_time_seconds_conversion_spec.rb +13 -13
- data/spec/core_ext/array_spec.rb +76 -76
- data/spec/core_ext/class_spec.rb +3 -3
- data/spec/core_ext/cosmos_io_spec.rb +16 -16
- data/spec/core_ext/exception_spec.rb +19 -19
- data/spec/core_ext/file_spec.rb +16 -16
- data/spec/core_ext/hash_spec.rb +3 -3
- data/spec/core_ext/io_spec.rb +2 -2
- data/spec/core_ext/kernel_spec.rb +2 -2
- data/spec/core_ext/math_spec.rb +43 -43
- data/spec/core_ext/matrix_spec.rb +22 -22
- data/spec/core_ext/objectspace_spec.rb +6 -6
- data/spec/core_ext/range_spec.rb +2 -2
- data/spec/core_ext/socket_spec.rb +4 -4
- data/spec/core_ext/string_spec.rb +67 -67
- data/spec/core_ext/stringio_spec.rb +2 -2
- data/spec/core_ext/time_spec.rb +82 -82
- data/spec/gui/line_graph/line_clip_spec.rb +34 -34
- data/spec/interfaces/interface_spec.rb +46 -46
- data/spec/interfaces/linc_interface_spec.rb +26 -26
- data/spec/interfaces/serial_interface_spec.rb +16 -16
- data/spec/interfaces/simulated_target_interface_spec.rb +21 -21
- data/spec/interfaces/stream_interface_spec.rb +22 -22
- data/spec/interfaces/tcpip_client_interface_spec.rb +14 -14
- data/spec/interfaces/tcpip_server_interface_spec.rb +41 -41
- data/spec/interfaces/udp_interface_spec.rb +46 -46
- data/spec/io/buffered_file_spec.rb +50 -50
- data/spec/io/io_multiplexer_spec.rb +9 -9
- data/spec/io/json_drb_object_spec.rb +7 -7
- data/spec/io/json_drb_spec.rb +55 -55
- data/spec/io/json_rpc_spec.rb +68 -68
- data/spec/io/raw_logger_pair_spec.rb +28 -28
- data/spec/io/raw_logger_spec.rb +22 -22
- data/spec/io/serial_driver_spec.rb +3 -3
- data/spec/io/stderr_spec.rb +2 -2
- data/spec/io/stdout_spec.rb +2 -2
- data/spec/io/tcpip_server_spec.rb +62 -62
- data/spec/io/udp_sockets_spec.rb +19 -19
- data/spec/io/win32_serial_driver_spec.rb +10 -10
- data/spec/packet_logs/meta_packet_log_writer_spec.rb +32 -32
- data/spec/packet_logs/packet_log_reader_spec.rb +138 -138
- data/spec/packet_logs/packet_log_writer_pair_spec.rb +3 -3
- data/spec/packet_logs/packet_log_writer_spec.rb +26 -26
- data/spec/packets/binary_accessor_spec.rb +672 -672
- data/spec/packets/commands_spec.rb +123 -123
- data/spec/packets/limits_response_spec.rb +1 -1
- data/spec/packets/limits_spec.rb +69 -69
- data/spec/packets/packet_config_spec.rb +93 -93
- data/spec/packets/packet_item_limits_spec.rb +46 -46
- data/spec/packets/packet_item_spec.rb +108 -108
- data/spec/packets/packet_spec.rb +364 -348
- data/spec/packets/parsers/format_string_parser_spec.rb +13 -13
- data/spec/packets/parsers/limits_parser_spec.rb +8 -8
- data/spec/packets/parsers/limits_response_parser_spec.rb +9 -9
- data/spec/packets/parsers/macro_parser_spec.rb +34 -6
- data/spec/packets/parsers/packet_parser_spec.rb +6 -6
- data/spec/packets/parsers/processor_parser_spec.rb +7 -7
- data/spec/packets/parsers/state_parser_spec.rb +23 -23
- data/spec/packets/structure_item_spec.rb +62 -62
- data/spec/packets/structure_spec.rb +183 -183
- data/spec/packets/telemetry_spec.rb +174 -174
- data/spec/processors/new_packet_log_processor_spec.rb +4 -4
- data/spec/processors/processor_spec.rb +9 -9
- data/spec/processors/statistics_processor_spec.rb +21 -21
- data/spec/processors/watermark_processor_spec.rb +12 -12
- data/spec/script/script_spec.rb +158 -158
- data/spec/spec_helper.rb +44 -13
- data/spec/streams/burst_stream_protocol_spec.rb +8 -8
- data/spec/streams/fixed_stream_protocol_spec.rb +26 -26
- data/spec/streams/length_stream_protocol_spec.rb +27 -27
- data/spec/streams/preidentified_stream_protocol_spec.rb +25 -25
- data/spec/streams/serial_stream_spec.rb +19 -19
- data/spec/streams/stream_protocol_spec.rb +52 -52
- data/spec/streams/stream_spec.rb +1 -1
- data/spec/streams/tcpip_client_stream_spec.rb +7 -7
- data/spec/streams/tcpip_socket_stream_spec.rb +84 -49
- data/spec/streams/template_stream_protocol_spec.rb +17 -17
- data/spec/streams/terminated_stream_protocol_spec.rb +19 -19
- data/spec/system/system_spec.rb +95 -95
- data/spec/system/target_spec.rb +32 -32
- data/spec/tools/cmd_tlm_server/api_spec.rb +386 -386
- data/spec/tools/cmd_tlm_server/background_task_spec.rb +3 -3
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +8 -8
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +57 -57
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_spec.rb +85 -85
- data/spec/tools/cmd_tlm_server/commanding_spec.rb +11 -11
- data/spec/tools/cmd_tlm_server/connections_spec.rb +23 -23
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +57 -57
- data/spec/tools/cmd_tlm_server/interfaces_spec.rb +32 -32
- data/spec/tools/cmd_tlm_server/packet_logging_spec.rb +17 -17
- data/spec/tools/cmd_tlm_server/router_thread_spec.rb +15 -15
- data/spec/tools/cmd_tlm_server/routers_spec.rb +36 -36
- data/spec/top_level/top_level_spec.rb +60 -60
- data/spec/utilities/crc_spec.rb +6 -6
- data/spec/utilities/csv_spec.rb +13 -13
- data/spec/utilities/logger_spec.rb +20 -20
- data/spec/utilities/message_log_spec.rb +13 -13
- data/spec/utilities/quaternion_spec.rb +30 -30
- data/spec/utilities/ruby_lex_utils_spec.rb +14 -14
- data/test/benchmarks/binary_accessor_benchmark.rb +14 -0
- data/test/benchmarks/gsub_benchmark.rb +114 -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 +206 -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 +39 -0
- data/test/performance/config/system/system_threads.txt +59 -0
- data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +41 -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/EXAMPLE/cmd_tlm/example_cmds.txt +17 -0
- data/test/performance/config/targets/EXAMPLE/cmd_tlm/example_tlm.txt +18 -0
- data/test/performance/config/targets/EXAMPLE/cmd_tlm_server.txt +6 -0
- data/test/performance/config/targets/EXAMPLE/lib/example_interface.rb +22 -0
- data/test/performance/config/targets/EXAMPLE/target.txt +7 -0
- data/test/performance/config/targets/SYSTEM/screens/status.txt +12 -0
- data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt +34 -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 +29 -0
- data/test/performance/config/tools/launcher/launcher_threads.txt +70 -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_viewer/tlm_viewer.txt +41 -0
- data/test/performance/lib/example_background_task.rb +57 -0
- data/test/performance/lib/example_target.rb +120 -0
- data/test/performance/lib/scpi_target.rb +74 -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/ExampleTarget +14 -0
- data/test/performance/tools/ExampleTarget.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/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/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/TlmViewer +14 -0
- data/test/performance/tools/TlmViewer.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
- data/test/performance/userpath.txt +1 -0
- metadata +197 -2
data/spec/utilities/crc_spec.rb
CHANGED
@@ -17,27 +17,27 @@ module Cosmos
|
|
17
17
|
|
18
18
|
describe Crc16 do
|
19
19
|
describe "calc" do
|
20
|
-
it "
|
20
|
+
it "calculates a 16 bit CRC" do
|
21
21
|
@crc = Crc16.new()
|
22
|
-
@crc.calc('123456789').
|
22
|
+
expect(@crc.calc('123456789')).to eql 0x29B1
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe Crc32 do
|
28
28
|
describe "calc" do
|
29
|
-
it "
|
29
|
+
it "calculates a 32 bit CRC" do
|
30
30
|
@crc = Crc32.new()
|
31
|
-
@crc.calc('123456789').
|
31
|
+
expect(@crc.calc('123456789')).to eql 0xCBF43926
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
describe Crc64 do
|
37
37
|
describe "calc" do
|
38
|
-
it "
|
38
|
+
it "calculates a 64 bit CRC" do
|
39
39
|
@crc = Crc64.new()
|
40
|
-
@crc.calc('123456789').
|
40
|
+
expect(@crc.calc('123456789')).to eql 0x995dc9bbdf1939fa
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
data/spec/utilities/csv_spec.rb
CHANGED
@@ -42,52 +42,52 @@ module Cosmos
|
|
42
42
|
end
|
43
43
|
|
44
44
|
describe "access" do
|
45
|
-
it "
|
46
|
-
@csv["test"].
|
45
|
+
it "allows hash style access" do
|
46
|
+
expect(@csv["test"]).to eq(%w(1 2 3))
|
47
47
|
end
|
48
48
|
|
49
|
-
it "
|
50
|
-
@csv.keys.
|
49
|
+
it "returns all valid keys" do
|
50
|
+
expect(@csv.keys).to eq(%w(test more foo))
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
describe "create_archive" do
|
55
|
-
it "
|
55
|
+
it "creates a default archive file" do
|
56
56
|
@csv.create_archive
|
57
|
-
File.exist?(@csv.archive_file).
|
57
|
+
expect(File.exist?(@csv.archive_file)).to be_truthy
|
58
58
|
@csv.close_archive
|
59
59
|
end
|
60
60
|
|
61
|
-
it "
|
61
|
+
it "creates an archive file at an arbitrary path" do
|
62
62
|
if Kernel.is_windows?
|
63
63
|
Dir.mkdir("C:/temp") unless File.directory?("C:/temp")
|
64
64
|
@csv.create_archive("C:/temp")
|
65
|
-
File.exist?(@csv.archive_file).
|
65
|
+
expect(File.exist?(@csv.archive_file)).to be_truthy
|
66
66
|
@csv.close_archive
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
71
|
describe "write_archive" do
|
72
|
-
it "
|
72
|
+
it "writes to the archive file" do
|
73
73
|
@csv.create_archive
|
74
74
|
@csv.write_archive(%w(HI a b c))
|
75
75
|
@csv.close_archive
|
76
76
|
data = File.read @csv.archive_file
|
77
|
-
data.include?("HI,a,b,c").
|
77
|
+
expect(data.include?("HI,a,b,c")).to be_truthy
|
78
78
|
end
|
79
79
|
|
80
|
-
it "
|
80
|
+
it "raises an exception if writing to an unopened archive" do
|
81
81
|
expect {@csv.write_archive([])}.to raise_error
|
82
82
|
end
|
83
83
|
|
84
|
-
it "
|
84
|
+
it "raises an exception if trying to reopen archive" do
|
85
85
|
@csv.create_archive
|
86
86
|
expect {@csv.create_archive}.to raise_error
|
87
87
|
@csv.close_archive
|
88
88
|
end
|
89
89
|
|
90
|
-
it "
|
90
|
+
it "raises an exception if trying to write closed archive" do
|
91
91
|
@csv.create_archive
|
92
92
|
@csv.close_archive
|
93
93
|
expect {@csv.write_archive([])}.to raise_error
|
@@ -14,16 +14,16 @@ require "cosmos/utilities/logger"
|
|
14
14
|
module Cosmos
|
15
15
|
describe Logger do
|
16
16
|
describe "initialize" do
|
17
|
-
it "
|
18
|
-
Logger.new.level.
|
17
|
+
it "initializes the level to UNKNOWN" do
|
18
|
+
expect(Logger.new.level).to eql Logger::UNKNOWN
|
19
19
|
Logger.level = Logger::UNKNOWN
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "level" do
|
24
|
-
it "
|
24
|
+
it "gets and set the level" do
|
25
25
|
Logger.level = Logger::DEBUG
|
26
|
-
Logger.level.
|
26
|
+
expect(Logger.level).to eql Logger::DEBUG
|
27
27
|
Logger.level = Logger::UNKNOWN
|
28
28
|
end
|
29
29
|
end
|
@@ -34,66 +34,66 @@ module Cosmos
|
|
34
34
|
Logger.level = level
|
35
35
|
if block
|
36
36
|
Logger.send(method, "Message1") { "Block1" }
|
37
|
-
stdout.string.
|
38
|
-
stdout.string.
|
37
|
+
expect(stdout.string).not_to match "Message1"
|
38
|
+
expect(stdout.string).to match "#{method.upcase}: Block1"
|
39
39
|
else
|
40
40
|
Logger.send(method, "Message1")
|
41
|
-
stdout.string.
|
41
|
+
expect(stdout.string).to match "#{method.upcase}: Message1"
|
42
42
|
end
|
43
43
|
Logger::instance.level = level + 1
|
44
44
|
if block
|
45
45
|
Logger.debug("Message2") { "Block2" }
|
46
|
-
stdout.string.
|
47
|
-
stdout.string.
|
46
|
+
expect(stdout.string).not_to match "Message2"
|
47
|
+
expect(stdout.string).not_to match "Block2"
|
48
48
|
else
|
49
49
|
Logger.send(method, "Message2")
|
50
|
-
stdout.string.
|
50
|
+
expect(stdout.string).not_to match "Message2"
|
51
51
|
end
|
52
52
|
$stdout = STDOUT
|
53
53
|
Logger.level = Logger::UNKNOWN
|
54
54
|
end
|
55
55
|
|
56
56
|
describe "debug" do
|
57
|
-
it "
|
57
|
+
it "only prints if level is DEBUG" do
|
58
58
|
test_output(Logger::DEBUG, 'debug')
|
59
59
|
end
|
60
|
-
it "
|
60
|
+
it "takes a block" do
|
61
61
|
test_output(Logger::DEBUG, 'debug', true)
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
65
|
describe "info" do
|
66
|
-
it "
|
66
|
+
it "only prints if level is INFO" do
|
67
67
|
test_output(Logger::INFO, 'info')
|
68
68
|
end
|
69
|
-
it "
|
69
|
+
it "takes a block" do
|
70
70
|
test_output(Logger::INFO, 'info', true)
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
74
|
describe "warn" do
|
75
|
-
it "
|
75
|
+
it "only prints if level is WARN" do
|
76
76
|
test_output(Logger::WARN, 'warn')
|
77
77
|
end
|
78
|
-
it "
|
78
|
+
it "takes a block" do
|
79
79
|
test_output(Logger::WARN, 'warn', true)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
83
|
describe "error" do
|
84
|
-
it "
|
84
|
+
it "only prints if level is ERROR" do
|
85
85
|
test_output(Logger::ERROR, 'error')
|
86
86
|
end
|
87
|
-
it "
|
87
|
+
it "takes a block" do
|
88
88
|
test_output(Logger::ERROR, 'error', true)
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
92
|
describe "fatal" do
|
93
|
-
it "
|
93
|
+
it "only prints if level is FATAL" do
|
94
94
|
test_output(Logger::FATAL, 'fatal')
|
95
95
|
end
|
96
|
-
it "
|
96
|
+
it "takes a block" do
|
97
97
|
test_output(Logger::FATAL, 'fatal', true)
|
98
98
|
end
|
99
99
|
end
|
@@ -22,49 +22,49 @@ module Cosmos
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe "initialize" do
|
25
|
-
it "
|
25
|
+
it "accepts a tool name and use the default LOG path" do
|
26
26
|
log = MessageLog.new('TEST')
|
27
27
|
log.start
|
28
28
|
log.stop
|
29
29
|
Cosmos.set_working_dir do
|
30
|
-
File.exist?(log.filename).
|
31
|
-
log.filename.
|
32
|
-
log.filename.
|
30
|
+
expect(File.exist?(log.filename)).to be_truthy
|
31
|
+
expect(log.filename).to match 'TEST'
|
32
|
+
expect(log.filename).to match 'logs'
|
33
33
|
File.delete log.filename
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
it "
|
37
|
+
it "accepts a tool name and path" do
|
38
38
|
log = MessageLog.new('TEST', File.expand_path(File.dirname(__FILE__)))
|
39
39
|
log.start
|
40
40
|
log.stop
|
41
|
-
File.exist?(log.filename).
|
42
|
-
log.filename.
|
41
|
+
expect(File.exist?(log.filename)).to be_truthy
|
42
|
+
expect(log.filename).to match File.expand_path(File.dirname(__FILE__))
|
43
43
|
File.delete log.filename
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
describe "write" do
|
48
|
-
it "
|
48
|
+
it "writes a message to the log" do
|
49
49
|
log = MessageLog.new('TEST')
|
50
50
|
log.write("Test message")
|
51
51
|
log.stop
|
52
52
|
Cosmos.set_working_dir do
|
53
|
-
File.read(log.filename).
|
53
|
+
expect(File.read(log.filename)).to eql "Test message"
|
54
54
|
File.delete log.filename
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
59
|
describe "start" do
|
60
|
-
it "
|
60
|
+
it "creates a new message log" do
|
61
61
|
log = MessageLog.new('TEST')
|
62
62
|
log.start
|
63
63
|
filename = log.filename
|
64
64
|
# Allow a second to tick by so we have a unique filename
|
65
65
|
sleep(1.001)
|
66
66
|
log.start
|
67
|
-
log.filename.
|
67
|
+
expect(log.filename).not_to eql filename
|
68
68
|
log.stop
|
69
69
|
Cosmos.set_working_dir do
|
70
70
|
File.delete filename
|
@@ -74,12 +74,12 @@ module Cosmos
|
|
74
74
|
end
|
75
75
|
|
76
76
|
describe "stop" do
|
77
|
-
it "
|
77
|
+
it "closes the message log and mark it read-only" do
|
78
78
|
log = MessageLog.new('TEST')
|
79
79
|
log.start
|
80
80
|
log.stop
|
81
81
|
Cosmos.set_working_dir do
|
82
|
-
File.stat(log.filename).writable
|
82
|
+
expect(File.stat(log.filename).writable?).to be_falsey
|
83
83
|
File.delete log.filename
|
84
84
|
end
|
85
85
|
end
|
@@ -16,90 +16,90 @@ module Cosmos
|
|
16
16
|
describe Quaternion do
|
17
17
|
|
18
18
|
describe "initialize" do
|
19
|
-
it "
|
20
|
-
Quaternion.new.data.
|
19
|
+
it "creates 0.0 elements" do
|
20
|
+
expect(Quaternion.new.data).to eql [0.0,0.0,0.0,0.0]
|
21
21
|
end
|
22
22
|
|
23
|
-
it "
|
24
|
-
Quaternion.new([1.1,2.2,3.3,4.4]).data.
|
23
|
+
it "takes an initialization array" do
|
24
|
+
expect(Quaternion.new([1.1,2.2,3.3,4.4]).data).to eql [1.1,2.2,3.3,4.4]
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "[] and []=" do
|
29
|
-
it "
|
29
|
+
it "gets and set individual elements" do
|
30
30
|
q = Quaternion.new
|
31
31
|
q[0] = 5.5
|
32
|
-
q[0].
|
32
|
+
expect(q[0]).to eql 5.5
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
describe "data and data=" do
|
37
|
-
it "
|
37
|
+
it "gets and set all elements" do
|
38
38
|
q = Quaternion.new
|
39
39
|
q.data = [1.1,2.2,3.3,4.4]
|
40
|
-
q.data.
|
40
|
+
expect(q.data).to eql [1.1,2.2,3.3,4.4]
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
44
|
describe "q0, q1, q2, q3 getter and setter" do
|
45
|
-
it "
|
45
|
+
it "gets and set an element" do
|
46
46
|
q = Quaternion.new()
|
47
47
|
q.q0 = 1.1
|
48
48
|
q.q1 = 2.2
|
49
49
|
q.q2 = 3.3
|
50
50
|
q.q3 = 4.4
|
51
|
-
q.q0.
|
52
|
-
q.q1.
|
53
|
-
q.q2.
|
54
|
-
q.q3.
|
51
|
+
expect(q.q0).to eql 1.1
|
52
|
+
expect(q.q1).to eql 2.2
|
53
|
+
expect(q.q2).to eql 3.3
|
54
|
+
expect(q.q3).to eql 4.4
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
58
|
describe "*" do
|
59
|
-
it "
|
59
|
+
it "multiplies quaternions" do
|
60
60
|
q1 = Quaternion.new([1,0,0,1])
|
61
61
|
q2 = Quaternion.new([0,1,0,1])
|
62
|
-
(q1 * q2).data.
|
62
|
+
expect((q1 * q2).data).to eql [1,1,1,1]
|
63
63
|
q1 = Quaternion.new([0,1,0,1])
|
64
64
|
q2 = Quaternion.new([0,0,1,1])
|
65
|
-
(q1 * q2).data.
|
65
|
+
expect((q1 * q2).data).to eql [1,1,1,1]
|
66
66
|
q1 = Quaternion.new([1,0,0,1])
|
67
67
|
q2 = Quaternion.new([0,0,1,1])
|
68
|
-
(q1 * q2).data.
|
68
|
+
expect((q1 * q2).data).to eql [1,-1,1,1]
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
72
|
describe "inverse" do
|
73
|
-
it "
|
74
|
-
Quaternion.new([1,2,3,4]).inverse.data.
|
73
|
+
it "returns the inverse" do
|
74
|
+
expect(Quaternion.new([1,2,3,4]).inverse.data).to eql [-1,-2,-3,4]
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
78
|
describe "vecrot" do
|
79
|
-
it "
|
80
|
-
Quaternion.new([1,0,0,1]).vecrot([1,1,1]).
|
79
|
+
it "rotates the vector using the quaternion" do
|
80
|
+
expect(Quaternion.new([1,0,0,1]).vecrot([1,1,1])).to eql [2,2,-2]
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
84
|
describe "Quaternion.signnz" do
|
85
|
-
it "
|
86
|
-
Quaternion.signnz(0).
|
85
|
+
it "returns 1 for zero" do
|
86
|
+
expect(Quaternion.signnz(0)).to eql 1.0
|
87
87
|
end
|
88
88
|
|
89
|
-
it "
|
90
|
-
Quaternion.signnz(0.5).
|
89
|
+
it "returns 1 for positive" do
|
90
|
+
expect(Quaternion.signnz(0.5)).to eql 1.0
|
91
91
|
end
|
92
92
|
|
93
|
-
it "
|
94
|
-
Quaternion.signnz(-123456789).
|
93
|
+
it "returns -1 for negative" do
|
94
|
+
expect(Quaternion.signnz(-123456789)).to eql -1.0
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
98
|
describe "Quaternion.qfromc" do
|
99
|
-
it "
|
99
|
+
it "creates a quaternion from the matrix" do
|
100
100
|
q = Quaternion.qfromc(Matrix[[1,0,0],[0,1,0],[0,0,1]])
|
101
|
-
q.
|
102
|
-
q.data.
|
101
|
+
expect(q).to be_a Quaternion
|
102
|
+
expect(q.data).to eql [0.0,0.0,0.0,1.0]
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
@@ -18,40 +18,40 @@ module Cosmos
|
|
18
18
|
end
|
19
19
|
|
20
20
|
describe "contains_begin?" do
|
21
|
-
it "
|
22
|
-
@lex.contains_begin?(" begin ").
|
23
|
-
@lex.contains_begin?(" begin # asdf ").
|
21
|
+
it "detects the begin keyword" do
|
22
|
+
expect(@lex.contains_begin?(" begin ")).to be_truthy
|
23
|
+
expect(@lex.contains_begin?(" begin # asdf ")).to be_truthy
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "contains_keyword?" do
|
28
|
-
it "
|
29
|
-
@lex.contains_keyword?("if something").
|
30
|
-
@lex.contains_keyword?("obj.method = something").
|
28
|
+
it "detects the ruby keywords" do
|
29
|
+
expect(@lex.contains_keyword?("if something")).to be_truthy
|
30
|
+
expect(@lex.contains_keyword?("obj.method = something")).to be_falsey
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
34
|
describe "contains_block_beginning?" do
|
35
|
-
it "
|
36
|
-
@lex.contains_block_beginning?("do").
|
37
|
-
@lex.contains_block_beginning?("[].each {").
|
38
|
-
@lex.contains_block_beginning?("begin").
|
35
|
+
it "detects block beginning keywords" do
|
36
|
+
expect(@lex.contains_block_beginning?("do")).to be_truthy
|
37
|
+
expect(@lex.contains_block_beginning?("[].each {")).to be_truthy
|
38
|
+
expect(@lex.contains_block_beginning?("begin")).to be_truthy
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
42
|
describe "remove_comments" do
|
43
|
-
it "
|
43
|
+
it "removes comments" do
|
44
44
|
text = <<DOC
|
45
45
|
# This is a comment
|
46
46
|
blah = 5 # Inline comment
|
47
47
|
# Another
|
48
48
|
DOC
|
49
|
-
@lex.remove_comments(text).
|
49
|
+
expect(@lex.remove_comments(text)).to eql "\nblah = 5 \n\n"
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
53
|
describe "each_lexed_segment" do
|
54
|
-
it "
|
54
|
+
it "yields each segment" do
|
55
55
|
text = <<DOC
|
56
56
|
begin
|
57
57
|
x = 0
|
@@ -63,7 +63,7 @@ DOC
|
|
63
63
|
["end\n",false,nil,3]) # can't instrument end
|
64
64
|
end
|
65
65
|
|
66
|
-
it "
|
66
|
+
it "yields each segment" do
|
67
67
|
text = <<DOC
|
68
68
|
|
69
69
|
if x
|