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
@@ -35,13 +35,11 @@ module Cosmos
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# Update the status tab in the GUI
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
update_system_status
|
44
|
-
update_background_task_status
|
38
|
+
def update
|
39
|
+
update_limits_set()
|
40
|
+
update_api_status()
|
41
|
+
update_system_status()
|
42
|
+
update_background_task_status()
|
45
43
|
end
|
46
44
|
|
47
45
|
private
|
@@ -76,6 +74,12 @@ module Cosmos
|
|
76
74
|
end
|
77
75
|
|
78
76
|
def populate_api_status(layout)
|
77
|
+
if CmdTlmServer.json_drb
|
78
|
+
@previous_request_count = CmdTlmServer.json_drb.request_count
|
79
|
+
else
|
80
|
+
@previous_request_count = 0
|
81
|
+
end
|
82
|
+
|
79
83
|
api = Qt::GroupBox.new(Qt::Object.tr("API Status"))
|
80
84
|
api_layout = Qt::VBoxLayout.new(api)
|
81
85
|
@api_table = Qt::TableWidget.new()
|
@@ -88,7 +92,7 @@ module Cosmos
|
|
88
92
|
item0 = Qt::TableWidgetItem.new(Qt::Object.tr(CmdTlmServer.json_drb.num_clients.to_s))
|
89
93
|
item0.setTextAlignment(Qt::AlignCenter)
|
90
94
|
@api_table.setItem(0, 1, item0)
|
91
|
-
item = Qt::TableWidgetItem.new(Qt::Object.tr(
|
95
|
+
item = Qt::TableWidgetItem.new(Qt::Object.tr(@previous_request_count.to_s))
|
92
96
|
item.setTextAlignment(Qt::AlignCenter)
|
93
97
|
@api_table.setItem(0, 2, item)
|
94
98
|
item2 = Qt::TableWidgetItem.new("0.0")
|
@@ -188,14 +192,14 @@ module Cosmos
|
|
188
192
|
end
|
189
193
|
|
190
194
|
# Update the API statistics in the GUI
|
191
|
-
def update_api_status
|
195
|
+
def update_api_status
|
192
196
|
if CmdTlmServer.json_drb
|
193
197
|
@api_table.item(0,1).setText(CmdTlmServer.json_drb.num_clients.to_s)
|
194
198
|
@api_table.item(0,2).setText(CmdTlmServer.json_drb.request_count.to_s)
|
195
199
|
request_count = CmdTlmServer.json_drb.request_count
|
196
|
-
requests_per_second = request_count - previous_request_count
|
200
|
+
requests_per_second = request_count - @previous_request_count
|
197
201
|
@api_table.item(0,3).setText(requests_per_second.to_s)
|
198
|
-
previous_request_count = request_count
|
202
|
+
@previous_request_count = request_count
|
199
203
|
average_request_time = CmdTlmServer.json_drb.average_request_time
|
200
204
|
@api_table.item(0,4).setText(sprintf("%0.6f s", average_request_time))
|
201
205
|
estimated_utilization = requests_per_second * average_request_time * 100.0
|
@@ -413,7 +413,7 @@ module Cosmos
|
|
413
413
|
@time_start = packet_log_dialog.time_start
|
414
414
|
@time_end = packet_log_dialog.time_end
|
415
415
|
@log_file_directory = File.dirname(@log_filenames[0])
|
416
|
-
@log_file_directory
|
416
|
+
@log_file_directory << '/' unless @log_file_directory[-1..-1] == '\\'
|
417
417
|
|
418
418
|
# Stop realtime collection
|
419
419
|
handle_stop()
|
@@ -37,7 +37,7 @@ module Cosmos
|
|
37
37
|
|
38
38
|
@text = Qt::PlainTextEdit.new
|
39
39
|
@text.setReadOnly(true)
|
40
|
-
@text.setMaximumBlockCount(
|
40
|
+
@text.setMaximumBlockCount(100)
|
41
41
|
if Kernel.is_windows?
|
42
42
|
@text.font = Cosmos.getFont("courier", 9)
|
43
43
|
else
|
@@ -55,7 +55,7 @@ module Cosmos
|
|
55
55
|
filename = Qt::FileDialog::getSaveFileName(self, "Save As...", filename, "Text Files (*.txt);;All Files (*)")
|
56
56
|
if not filename.nil? and not filename.empty?
|
57
57
|
@log_file_directory = File.dirname(filename)
|
58
|
-
@log_file_directory
|
58
|
+
@log_file_directory << '/' unless @log_file_directory[-1..-1] == '\\'
|
59
59
|
|
60
60
|
File.open(filename, 'w') do |file|
|
61
61
|
file.write(@text.toPlainText)
|
@@ -61,8 +61,8 @@ module Cosmos
|
|
61
61
|
success = @config.create_pdf(progress_dialog)
|
62
62
|
if success
|
63
63
|
msg = "\n\n"
|
64
|
-
msg
|
65
|
-
msg
|
64
|
+
msg << "HTML and " if both
|
65
|
+
msg << "PDF Handbooks created successfully"
|
66
66
|
progress_dialog.append_text(msg)
|
67
67
|
else
|
68
68
|
progress_dialog.append_text("\nPDF Handbooks could not be created.\n\nIs wkhtmltopdf in your PATH and are all existing pdfs closed?\n\nUsing version 0.11.0_rc1 of wkhtmltox is recommended which can be found at: https://code.google.com/p/wkhtmltopdf/downloads/list?can=1.\n\nVersion 0.12.x has shown issues with Handbook Creator's default templates.")
|
@@ -70,7 +70,6 @@ module Cosmos
|
|
70
70
|
if @type == :TARGETS
|
71
71
|
target_names = @target_names
|
72
72
|
target_names = System.commands.target_names | System.telemetry.target_names if @target_names.empty?
|
73
|
-
target_names.delete('UNKNOWN')
|
74
73
|
target_names.each {|target_name| create_file(target_name.downcase + @filename, [target_name], true, :HTML)}
|
75
74
|
else # @type == :NORMAL
|
76
75
|
create_file(@filename, @target_names, false, :HTML)
|
@@ -93,7 +92,6 @@ module Cosmos
|
|
93
92
|
if @type == :TARGETS
|
94
93
|
target_names = @target_names
|
95
94
|
target_names = System.commands.target_names | System.telemetry.target_names if @target_names.empty?
|
96
|
-
target_names.delete('UNKNOWN')
|
97
95
|
target_names.each do |target_name|
|
98
96
|
create_pdf_file(progress_dialog, target_name)
|
99
97
|
end
|
@@ -127,7 +127,7 @@ module Cosmos
|
|
127
127
|
|
128
128
|
@log_output = Qt::PlainTextEdit.new
|
129
129
|
@log_output.setReadOnly(true)
|
130
|
-
@log_output.setMaximumBlockCount(
|
130
|
+
@log_output.setMaximumBlockCount(100)
|
131
131
|
|
132
132
|
@tabbook.addTab(@widget, "Limits")
|
133
133
|
@tabbook.addTab(@log_output, "Log")
|
@@ -50,7 +50,7 @@ module Cosmos
|
|
50
50
|
# Initialize variables
|
51
51
|
@packet_log_reader = System.default_packet_log_reader.new
|
52
52
|
@log_directory = System.paths['LOGS']
|
53
|
-
@log_directory
|
53
|
+
@log_directory << '/' unless @log_directory[-1..-1] == '\\' or @log_directory[-1..-1] == '/'
|
54
54
|
@log_filename = nil
|
55
55
|
@playing = false
|
56
56
|
@playback_thread = nil
|
@@ -194,7 +194,7 @@ module Cosmos
|
|
194
194
|
# Add the message output
|
195
195
|
@output = Qt::PlainTextEdit.new
|
196
196
|
@output.setReadOnly(true)
|
197
|
-
@output.setMaximumBlockCount(
|
197
|
+
@output.setMaximumBlockCount(100)
|
198
198
|
|
199
199
|
@top_layout.addWidget(@output, 500)
|
200
200
|
|
@@ -53,7 +53,7 @@ module Cosmos
|
|
53
53
|
packets.each do |packet_name, packet|
|
54
54
|
# Skip hidden and disabled packets
|
55
55
|
next if packet.hidden || packet.disabled
|
56
|
-
packet.items.
|
56
|
+
packet.items.each_key do |item_name|
|
57
57
|
# Skip ignored items
|
58
58
|
next if System.targets[target_name].ignored_items.include? item_name
|
59
59
|
all_telemetry["#{target_name},#{packet_name},#{item_name}"] = 0
|
@@ -793,7 +793,7 @@ module Cosmos
|
|
793
793
|
else
|
794
794
|
self.setWindowTitle("Script Runner : #{@tab_book.currentTab.filename}")
|
795
795
|
end
|
796
|
-
self.setWindowTitle(self.windowTitle
|
796
|
+
self.setWindowTitle(self.windowTitle << '*') if @tab_book.currentTab.modified
|
797
797
|
end
|
798
798
|
|
799
799
|
# Returns the script runner frame of the active tab
|
@@ -171,7 +171,7 @@ module Cosmos
|
|
171
171
|
@bottom_layout.addWidget(@bottom_layout_label)
|
172
172
|
@output = Qt::PlainTextEdit.new
|
173
173
|
@output.setReadOnly(true)
|
174
|
-
@output.setMaximumBlockCount(
|
174
|
+
@output.setMaximumBlockCount(100)
|
175
175
|
@bottom_layout.addWidget(@output)
|
176
176
|
@bottom_frame.setLayout(@bottom_layout)
|
177
177
|
@splitter.addWidget(@bottom_frame)
|
@@ -470,10 +470,6 @@ module Cosmos
|
|
470
470
|
|
471
471
|
ruby_lex_utils = RubyLexUtils.new
|
472
472
|
instrumented_text = ''
|
473
|
-
# Add an extra newline because the Ruby 1.9.1 lexer RubyLex has a bug
|
474
|
-
# where it loops unless the file ends in a newline. If there is already
|
475
|
-
# a newline then so what, we add an extra.
|
476
|
-
text += "\n"
|
477
473
|
|
478
474
|
Qt.execute_in_main_thread(true) do
|
479
475
|
window = Qt::CoreApplication.instance.activeWindow
|
@@ -1196,7 +1192,7 @@ module Cosmos
|
|
1196
1192
|
end
|
1197
1193
|
end
|
1198
1194
|
@output.add_formatted_text(line_to_write, color)
|
1199
|
-
lines_to_write
|
1195
|
+
lines_to_write << line_to_write
|
1200
1196
|
|
1201
1197
|
line_count += 1
|
1202
1198
|
if line_count > 1000
|
@@ -1207,7 +1203,7 @@ module Cosmos
|
|
1207
1203
|
line_to_write = time_formatted + " (SCRIPTRUNNER): " + out_line
|
1208
1204
|
end
|
1209
1205
|
@output.addText(line_to_write, Cosmos::RED)
|
1210
|
-
lines_to_write
|
1206
|
+
lines_to_write << line_to_write
|
1211
1207
|
break
|
1212
1208
|
end
|
1213
1209
|
end # string.each_line
|
@@ -228,7 +228,7 @@ module Cosmos
|
|
228
228
|
end
|
229
229
|
end
|
230
230
|
run_time = Time.format_seconds(@stop_time - @start_time)
|
231
|
-
run_time
|
231
|
+
run_time << " (#{@stop_time - @start_time} seconds)" if @stop_time-@start_time > 60
|
232
232
|
@file.puts("Run Time : #{run_time}")
|
233
233
|
@file.puts("Total Tests : #{@results.length}")
|
234
234
|
@file.puts("Pass : #{pass_count}")
|
@@ -1056,10 +1056,10 @@ module Cosmos
|
|
1056
1056
|
if @@test_suites.empty? || tests.empty?
|
1057
1057
|
msg = "No TestSuites or no Test classes found"
|
1058
1058
|
if !ignored_test_suite_classes.empty?
|
1059
|
-
msg
|
1059
|
+
msg << "\n\nThe following TestSuites were found but ignored:\n#{ignored_test_suite_classes.join(", ")}"
|
1060
1060
|
end
|
1061
1061
|
if !ignored_test_classes.empty?
|
1062
|
-
msg
|
1062
|
+
msg << "\n\nThe following Tests were found but ignored:\n#{ignored_test_classes.join(", ")}"
|
1063
1063
|
end
|
1064
1064
|
Qt.execute_in_main_thread(true) do
|
1065
1065
|
Qt::MessageBox.critical(self, 'Error', msg)
|
@@ -48,7 +48,7 @@ module Cosmos
|
|
48
48
|
|
49
49
|
def remove_selected_items
|
50
50
|
indexes = selected_items()
|
51
|
-
indexes.
|
51
|
+
indexes.reverse_each do |index|
|
52
52
|
item = takeItem(index)
|
53
53
|
item.dispose if item
|
54
54
|
end
|
@@ -92,6 +92,7 @@ module Cosmos
|
|
92
92
|
@tlm_extractor_config = TlmExtractorConfig.new(options.config_file)
|
93
93
|
@tlm_extractor_processor = TlmExtractorProcessor.new
|
94
94
|
Qt.execute_in_main_thread(true) do
|
95
|
+
@telemetry_chooser.update
|
95
96
|
sync_config_to_gui()
|
96
97
|
end
|
97
98
|
|
@@ -28,7 +28,7 @@ module Cosmos
|
|
28
28
|
base = File.basename(config_filename)
|
29
29
|
extension = File.extname(base)
|
30
30
|
filename_no_extension = base[0..-(extension.length + 1)]
|
31
|
-
configs[-1].output_filename = File.join(output_dir, batch_name.
|
31
|
+
configs[-1].output_filename = File.join(output_dir, batch_name.tr(' ', '_') + '_' + filename_no_extension.tr(' ', '_') + output_extension)
|
32
32
|
end
|
33
33
|
process(input_filenames, configs, time_start, time_end, &block)
|
34
34
|
end # def process_batch
|
@@ -38,6 +38,7 @@ module Cosmos
|
|
38
38
|
|
39
39
|
# Chooser for packet and y item
|
40
40
|
@telemetry_chooser = TelemetryChooser.new(self, orientation, true, false, true, true)
|
41
|
+
@telemetry_chooser.update
|
41
42
|
@overall_frame.addWidget(@telemetry_chooser)
|
42
43
|
@telemetry_chooser.target_changed_callback = method(:packet_changed_callback)
|
43
44
|
@telemetry_chooser.packet_changed_callback = method(:packet_changed_callback)
|
@@ -43,6 +43,7 @@ module Cosmos
|
|
43
43
|
|
44
44
|
# Telemetry Chooser for housekeeping item
|
45
45
|
@telemetry_chooser = TelemetryChooser.new(self, Qt::Vertical, true, false, true)
|
46
|
+
@telemetry_chooser.update
|
46
47
|
@telemetry_chooser.set_item(data_object.target_name, data_object.packet_name, data_object.item_name)
|
47
48
|
@telemetry_chooser.target_changed_callback = method(:target_packet_changed_callback)
|
48
49
|
@telemetry_chooser.packet_changed_callback = method(:target_packet_changed_callback)
|
@@ -50,6 +50,7 @@ module Cosmos
|
|
50
50
|
|
51
51
|
# Telemetry Chooser for x item
|
52
52
|
@telemetry_chooser = TelemetryChooser.new(self, Qt::Vertical, true, false)
|
53
|
+
@telemetry_chooser.update
|
53
54
|
@telemetry_chooser.set_item(data_object.target_name, data_object.packet_name, data_object.y_item_name)
|
54
55
|
@telemetry_chooser.target_changed_callback = method(:target_packet_changed_callback)
|
55
56
|
@telemetry_chooser.packet_changed_callback = method(:target_packet_changed_callback)
|
@@ -573,7 +573,7 @@ module Cosmos
|
|
573
573
|
tab_index,
|
574
574
|
plot_index,
|
575
575
|
data_object_index)
|
576
|
-
data_object_indexes.
|
576
|
+
data_object_indexes.reverse_each do |data_object_idx|
|
577
577
|
@tabbed_plots_config.remove_data_object(tab_index, plot_index, data_object_idx)
|
578
578
|
end
|
579
579
|
|
@@ -686,7 +686,7 @@ module Cosmos
|
|
686
686
|
|
687
687
|
if plot_index
|
688
688
|
data_object_indexes = selected_data_object_indexes()
|
689
|
-
data_object_indexes.
|
689
|
+
data_object_indexes.reverse_each do |data_object_idx|
|
690
690
|
@tabbed_plots_config.reset_data_objects(tab_index, plot_index, data_object_idx)
|
691
691
|
end
|
692
692
|
redraw_plots(true, true)
|
@@ -823,7 +823,7 @@ module Cosmos
|
|
823
823
|
# Create GUI objects
|
824
824
|
def create
|
825
825
|
# Select first plot on each tab in reverse order
|
826
|
-
@tabbed_plots_config.tabs.
|
826
|
+
@tabbed_plots_config.tabs.reverse_each {|tab| select_plot(tab.plots[0]) if tab.plots[0]}
|
827
827
|
|
828
828
|
# Setup timeout to redraw graphs
|
829
829
|
@timeout = Qt::Timer.new(self)
|
@@ -338,7 +338,6 @@ module Cosmos
|
|
338
338
|
|
339
339
|
def file_generate
|
340
340
|
target_names = System.telemetry.target_names
|
341
|
-
target_names.delete('UNKNOWN')
|
342
341
|
target_names.unshift('ALL')
|
343
342
|
|
344
343
|
dialog = SelectDialog.new(self, 'Target Name:', target_names, 'Select Target Name to Generate Screens')
|
@@ -347,7 +346,6 @@ module Cosmos
|
|
347
346
|
ProgressDialog.execute(self, 'Generating Telemetry Screens', 500, 10, false, false, true, true, false) do |progress_dialog|
|
348
347
|
if target_name == 'ALL'
|
349
348
|
System.telemetry.target_names.each do |my_target_name|
|
350
|
-
next if my_target_name == 'UNKNOWN'
|
351
349
|
progress_dialog.append_text(generate_target(my_target_name))
|
352
350
|
end
|
353
351
|
else
|
@@ -520,7 +518,7 @@ module Cosmos
|
|
520
518
|
option_parser.on("-s", "--screen FILE", "Start up the specified screen") { |arg| options.screen = arg }
|
521
519
|
option_parser.on("-n", "--nolisten", "Don't listen for requests") do
|
522
520
|
options.listen = false
|
523
|
-
options.title
|
521
|
+
options.title << ' : Not Listening'
|
524
522
|
end
|
525
523
|
option_parser.parse!(ARGV)
|
526
524
|
end
|
data/lib/cosmos/top_level.rb
CHANGED
@@ -291,12 +291,8 @@ module Cosmos
|
|
291
291
|
digest = Digest::MD5.new
|
292
292
|
Cosmos.set_working_dir do
|
293
293
|
filenames.each do |filename|
|
294
|
-
# Read the file's data
|
295
|
-
|
296
|
-
File.open(filename, 'r') {|file| data = file.read.gsub("\r",'')}
|
297
|
-
|
298
|
-
# Add to the running MD5 sum
|
299
|
-
digest << data
|
294
|
+
# Read the file's data and add to the running MD5 sum
|
295
|
+
digest << File.read(filename).gsub(/\r/,'')
|
300
296
|
end
|
301
297
|
end
|
302
298
|
digest << additional_data if additional_data
|
data/lib/cosmos/version.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
COSMOS_VERSION = '3.
|
3
|
+
COSMOS_VERSION = '3.3.0'
|
4
4
|
module Cosmos
|
5
5
|
module Version
|
6
6
|
MAJOR = '3'
|
7
|
-
MINOR = '
|
8
|
-
PATCH = '
|
9
|
-
BUILD = '
|
7
|
+
MINOR = '3'
|
8
|
+
PATCH = '0'
|
9
|
+
BUILD = 'f3db0cfa39b8f3cf8121ab8ead4e5b82964da8d5'
|
10
10
|
end
|
11
|
-
VERSION = '3.
|
11
|
+
VERSION = '3.3.0'
|
12
12
|
end
|
@@ -11,22 +11,26 @@
|
|
11
11
|
module Cosmos
|
12
12
|
|
13
13
|
# Win32API is deprecated in 1.9.x so recreate it
|
14
|
-
require '
|
14
|
+
require 'fiddle'
|
15
15
|
class Win32API
|
16
16
|
# Cache to hold already opened dll files
|
17
17
|
DLL_CACHE = {}
|
18
18
|
|
19
|
-
|
19
|
+
VALUE_TYPEMAP = {"0" => Fiddle::TYPE_VOID, "S" => Fiddle::TYPE_VOIDP, "I" => Fiddle::TYPE_LONG}
|
20
20
|
|
21
21
|
def initialize(dll_name, function_name, import, export = "0")
|
22
22
|
# Convert all input parameters into either 0, S, or I
|
23
|
-
@function_prototype = [import].join.tr("
|
23
|
+
@function_prototype = [import].join.tr("VPpNnLlIiCc", "0SSI")
|
24
|
+
params = []
|
25
|
+
@function_prototype.split('').each do |param|
|
26
|
+
params << VALUE_TYPEMAP[param]
|
27
|
+
end
|
24
28
|
|
25
29
|
# Get handle to dll file and add to cache if necessary
|
26
|
-
dll_handle = DLL_CACHE[dll_name] ||=
|
30
|
+
dll_handle = DLL_CACHE[dll_name] ||= Fiddle.dlopen(dll_name)
|
27
31
|
|
28
|
-
# Create
|
29
|
-
@function =
|
32
|
+
# Create Fiddle::Function necessary to call a function with proper return type and name
|
33
|
+
@function = Fiddle::Function.new(dll_handle[function_name], params, VALUE_TYPEMAP[export.tr("VPpNnLlIi", "0SSI")])
|
30
34
|
end
|
31
35
|
|
32
36
|
def call(*args)
|
@@ -48,7 +52,7 @@ module Cosmos
|
|
48
52
|
end
|
49
53
|
|
50
54
|
# Call the function and return its return value
|
51
|
-
return_value = @function.call(args)
|
55
|
+
return_value = @function.call(*args)
|
52
56
|
return_value ||= 0
|
53
57
|
return_value
|
54
58
|
end
|
@@ -16,50 +16,50 @@ module Cosmos
|
|
16
16
|
describe CcsdsPacket do
|
17
17
|
|
18
18
|
describe "constants" do
|
19
|
-
it "
|
20
|
-
CcsdsPacket::TELEMETRY.
|
21
|
-
CcsdsPacket::COMMAND.
|
19
|
+
it "defines COMMAND and TELEMETRY" do
|
20
|
+
expect(CcsdsPacket::TELEMETRY).to eql 0
|
21
|
+
expect(CcsdsPacket::COMMAND).to eql 1
|
22
22
|
end
|
23
23
|
|
24
|
-
it "
|
25
|
-
CcsdsPacket::CONTINUATION.
|
26
|
-
CcsdsPacket::FIRST.
|
27
|
-
CcsdsPacket::LAST.
|
28
|
-
CcsdsPacket::STANDALONE.
|
24
|
+
it "defines sequence flags" do
|
25
|
+
expect(CcsdsPacket::CONTINUATION).to eql 0
|
26
|
+
expect(CcsdsPacket::FIRST).to eql 1
|
27
|
+
expect(CcsdsPacket::LAST).to eql 2
|
28
|
+
expect(CcsdsPacket::STANDALONE).to eql 3
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
32
|
describe "initialize" do
|
33
|
-
it "
|
33
|
+
it "sets the target_name and packet_name" do
|
34
34
|
p = CcsdsPacket.new("tgt", "pkt")
|
35
|
-
p.target_name.
|
36
|
-
p.packet_name.
|
35
|
+
expect(p.target_name).to eql "TGT"
|
36
|
+
expect(p.packet_name).to eql "PKT"
|
37
37
|
|
38
38
|
version = p.get_item("CCSDSVERSION")
|
39
|
-
version.bit_offset.
|
40
|
-
version.bit_size.
|
39
|
+
expect(version.bit_offset).to eql 0
|
40
|
+
expect(version.bit_size).to eql 3
|
41
41
|
type = p.get_item("CCSDSTYPE")
|
42
|
-
type.bit_offset.
|
43
|
-
type.bit_size.
|
42
|
+
expect(type.bit_offset).to eql 3
|
43
|
+
expect(type.bit_size).to eql 1
|
44
44
|
type = p.get_item("CCSDSSHF")
|
45
|
-
type.bit_offset.
|
46
|
-
type.bit_size.
|
45
|
+
expect(type.bit_offset).to eql 4
|
46
|
+
expect(type.bit_size).to eql 1
|
47
47
|
type = p.get_item("CCSDSAPID")
|
48
|
-
type.bit_offset.
|
49
|
-
type.bit_size.
|
48
|
+
expect(type.bit_offset).to eql 5
|
49
|
+
expect(type.bit_size).to eql 11
|
50
50
|
type = p.get_item("CCSDSSEQFLAGS")
|
51
|
-
type.bit_offset.
|
52
|
-
type.bit_size.
|
51
|
+
expect(type.bit_offset).to eql 16
|
52
|
+
expect(type.bit_size).to eql 2
|
53
53
|
type = p.get_item("CCSDSSEQCNT")
|
54
|
-
type.bit_offset.
|
55
|
-
type.bit_size.
|
56
|
-
type.overflow.
|
54
|
+
expect(type.bit_offset).to eql 18
|
55
|
+
expect(type.bit_size).to eql 14
|
56
|
+
expect(type.overflow).to eql :TRUNCATE
|
57
57
|
type = p.get_item("CCSDSLENGTH")
|
58
|
-
type.bit_offset.
|
59
|
-
type.bit_size.
|
58
|
+
expect(type.bit_offset).to eql 32
|
59
|
+
expect(type.bit_size).to eql 16
|
60
60
|
type = p.get_item("CCSDSDATA")
|
61
|
-
type.bit_offset.
|
62
|
-
type.bit_size.
|
61
|
+
expect(type.bit_offset).to eql 48
|
62
|
+
expect(type.bit_size).to eql 0 # fill the packet
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|