cosmos 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/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
@@ -52,23 +52,23 @@ module Cosmos
|
|
52
52
|
end
|
53
53
|
|
54
54
|
describe "start" do
|
55
|
-
it "
|
55
|
+
it "logs connection errors" do
|
56
56
|
capture_io do |stdout|
|
57
57
|
allow(@interface).to receive(:connected?).and_return(false)
|
58
58
|
allow(@interface).to receive(:connect) { raise "ConnectError" }
|
59
59
|
thread = InterfaceThread.new(@interface)
|
60
60
|
thread.start
|
61
61
|
sleep 0.1
|
62
|
-
Thread.list.length.
|
62
|
+
expect(Thread.list.length).to eql(2)
|
63
63
|
thread.stop
|
64
64
|
sleep 0.2
|
65
|
-
Thread.list.length.
|
65
|
+
expect(Thread.list.length).to eql(1)
|
66
66
|
|
67
|
-
stdout.string.
|
67
|
+
expect(stdout.string).to match "Connection Failed: RuntimeError : ConnectError"
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
it "
|
71
|
+
it "does not log connection errors when there is a callback" do
|
72
72
|
capture_io do |stdout|
|
73
73
|
allow(@interface).to receive(:connected?).and_return(false)
|
74
74
|
allow(@interface).to receive(:connect) { raise "ConnectError" }
|
@@ -79,36 +79,36 @@ module Cosmos
|
|
79
79
|
thread = InterfaceThread.new(@interface)
|
80
80
|
error_count = 0
|
81
81
|
thread.connection_failed_callback = Proc.new do |error|
|
82
|
-
error.message.
|
82
|
+
expect(error.message).to eql "ConnectError"
|
83
83
|
error_count += 1
|
84
84
|
end
|
85
85
|
thread.start
|
86
86
|
sleep 0.1
|
87
|
-
Thread.list.length.
|
87
|
+
expect(Thread.list.length).to eql(2)
|
88
88
|
thread.stop
|
89
89
|
sleep 0.2
|
90
|
-
Thread.list.length.
|
91
|
-
error_count.
|
90
|
+
expect(Thread.list.length).to eql(1)
|
91
|
+
expect(error_count).to eql 2
|
92
92
|
|
93
|
-
stdout.string.
|
93
|
+
expect(stdout.string).not_to match "Connection Failed: ConnectError"
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
it "
|
97
|
+
it "logs the connection" do
|
98
98
|
capture_io do |stdout|
|
99
99
|
thread = InterfaceThread.new(@interface)
|
100
100
|
thread.start
|
101
101
|
sleep 0.1
|
102
|
-
Thread.list.length.
|
102
|
+
expect(Thread.list.length).to eql(2)
|
103
103
|
thread.stop
|
104
104
|
sleep 0.2
|
105
|
-
Thread.list.length.
|
105
|
+
expect(Thread.list.length).to eql(1)
|
106
106
|
|
107
|
-
stdout.string.
|
107
|
+
expect(stdout.string).to match "Connection Success"
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
-
it "
|
111
|
+
it "does not log the connection when there is a callback" do
|
112
112
|
capture_io do |stdout|
|
113
113
|
thread = InterfaceThread.new(@interface)
|
114
114
|
callback_called = false
|
@@ -117,17 +117,17 @@ module Cosmos
|
|
117
117
|
end
|
118
118
|
thread.start
|
119
119
|
sleep 0.1
|
120
|
-
Thread.list.length.
|
120
|
+
expect(Thread.list.length).to eql(2)
|
121
121
|
thread.stop
|
122
122
|
sleep 0.2
|
123
|
-
Thread.list.length.
|
124
|
-
callback_called.
|
123
|
+
expect(Thread.list.length).to eql(1)
|
124
|
+
expect(callback_called).to be_truthy
|
125
125
|
|
126
|
-
stdout.string.
|
126
|
+
expect(stdout.string).not_to match "Connection Success"
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
-
it "
|
130
|
+
it "logs the connection being lost" do
|
131
131
|
capture_io do |stdout|
|
132
132
|
allow(@interface).to receive(:read).and_return(nil)
|
133
133
|
# Make the reconnect_delay be slightly longer than half of 0.1 which is
|
@@ -137,16 +137,16 @@ module Cosmos
|
|
137
137
|
thread = InterfaceThread.new(@interface)
|
138
138
|
thread.start
|
139
139
|
sleep 0.1
|
140
|
-
Thread.list.length.
|
140
|
+
expect(Thread.list.length).to eql(2)
|
141
141
|
thread.stop
|
142
142
|
sleep 0.2
|
143
|
-
Thread.list.length.
|
143
|
+
expect(Thread.list.length).to eql(1)
|
144
144
|
|
145
|
-
stdout.string.
|
145
|
+
expect(stdout.string).to match "Connection Lost"
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
-
it "
|
149
|
+
it "does not log the connection being lost when there is a callback" do
|
150
150
|
capture_io do |stdout|
|
151
151
|
allow(@interface).to receive(:read).and_return(nil)
|
152
152
|
@interface.auto_reconnect = false
|
@@ -159,32 +159,32 @@ module Cosmos
|
|
159
159
|
sleep 1
|
160
160
|
# Since we set auto_reconnect to false we shouldn't see the interface
|
161
161
|
# thread because it will be killed
|
162
|
-
Thread.list.length.
|
162
|
+
expect(Thread.list.length).to eql(1)
|
163
163
|
thread.stop
|
164
164
|
sleep 0.2
|
165
|
-
Thread.list.length.
|
166
|
-
callback_called.
|
165
|
+
expect(Thread.list.length).to eql(1)
|
166
|
+
expect(callback_called).to be_truthy
|
167
167
|
|
168
|
-
stdout.string.
|
168
|
+
expect(stdout.string).not_to match "Connection Lost"
|
169
169
|
end
|
170
170
|
end
|
171
171
|
|
172
|
-
it "
|
172
|
+
it "handles a read exception" do
|
173
173
|
capture_io do |stdout|
|
174
174
|
allow(@interface).to receive(:read) { raise "ReadError" }
|
175
175
|
thread = InterfaceThread.new(@interface)
|
176
176
|
thread.start
|
177
177
|
sleep 0.1
|
178
|
-
Thread.list.length.
|
178
|
+
expect(Thread.list.length).to eql(2)
|
179
179
|
thread.stop
|
180
180
|
sleep 0.2
|
181
|
-
Thread.list.length.
|
181
|
+
expect(Thread.list.length).to eql(1)
|
182
182
|
|
183
|
-
stdout.string.
|
183
|
+
expect(stdout.string).to match "ReadError"
|
184
184
|
end
|
185
185
|
end
|
186
186
|
|
187
|
-
it "
|
187
|
+
it "handles a read connection reset" do
|
188
188
|
capture_io do |stdout|
|
189
189
|
allow(@interface).to receive(:read) { raise Errno::ECONNRESET }
|
190
190
|
# Make the reconnect_delay be slightly longer than half of 0.1 which is
|
@@ -194,16 +194,16 @@ module Cosmos
|
|
194
194
|
thread = InterfaceThread.new(@interface)
|
195
195
|
thread.start
|
196
196
|
sleep 0.1
|
197
|
-
Thread.list.length.
|
197
|
+
expect(Thread.list.length).to eql(2)
|
198
198
|
thread.stop
|
199
199
|
sleep 0.2
|
200
|
-
Thread.list.length.
|
200
|
+
expect(Thread.list.length).to eql(1)
|
201
201
|
|
202
|
-
stdout.string.
|
202
|
+
expect(stdout.string).to match "ECONNRESET"
|
203
203
|
end
|
204
204
|
end
|
205
205
|
|
206
|
-
it "
|
206
|
+
it "logs any thread exceptions" do
|
207
207
|
capture_io do |stdout|
|
208
208
|
allow(@interface).to receive(:connected?) { raise "ConnectedError" }
|
209
209
|
thread = InterfaceThread.new(@interface)
|
@@ -212,45 +212,45 @@ module Cosmos
|
|
212
212
|
thread.stop
|
213
213
|
sleep 0.2
|
214
214
|
|
215
|
-
stdout.string.
|
215
|
+
expect(stdout.string).to match "Packet reading thread unexpectedly died"
|
216
216
|
end
|
217
217
|
end
|
218
218
|
|
219
|
-
it "
|
219
|
+
it "does not thread exceptions when there is a callback" do
|
220
220
|
capture_io do |stdout|
|
221
221
|
allow(@interface).to receive(:connected?) { raise "ConnectedError" }
|
222
222
|
thread = InterfaceThread.new(@interface)
|
223
223
|
callback_called = false
|
224
224
|
thread.fatal_exception_callback = Proc.new do |error|
|
225
|
-
error.message.
|
225
|
+
expect(error.message).to eql "ConnectedError"
|
226
226
|
callback_called = true
|
227
227
|
end
|
228
228
|
thread.start
|
229
229
|
sleep 0.1
|
230
230
|
thread.stop
|
231
231
|
sleep 0.2
|
232
|
-
callback_called.
|
232
|
+
expect(callback_called).to be_truthy
|
233
233
|
|
234
|
-
stdout.string.
|
234
|
+
expect(stdout.string).not_to match "Packet reading thread unexpectedly died"
|
235
235
|
end
|
236
236
|
end
|
237
237
|
|
238
|
-
it "
|
238
|
+
it "handles unidentified packets" do
|
239
239
|
capture_io do |stdout|
|
240
240
|
@packet = Packet.new(nil,nil)
|
241
241
|
thread = InterfaceThread.new(@interface)
|
242
242
|
thread.start
|
243
243
|
sleep 0.1
|
244
|
-
Thread.list.length.
|
244
|
+
expect(Thread.list.length).to eql(2)
|
245
245
|
thread.stop
|
246
246
|
sleep 0.2
|
247
|
-
Thread.list.length.
|
247
|
+
expect(Thread.list.length).to eql(1)
|
248
248
|
|
249
|
-
stdout.string.
|
249
|
+
expect(stdout.string).to match "Unknown 2 byte packet"
|
250
250
|
end
|
251
251
|
end
|
252
252
|
|
253
|
-
it "
|
253
|
+
it "handles identified yet unknown telemetry" do
|
254
254
|
capture_io do |stdout|
|
255
255
|
@packet.target_name = 'BOB'
|
256
256
|
@packet.packet_name = 'SMITH'
|
@@ -258,15 +258,15 @@ module Cosmos
|
|
258
258
|
thread = InterfaceThread.new(@interface)
|
259
259
|
thread.start
|
260
260
|
sleep 0.1
|
261
|
-
Thread.list.length.
|
261
|
+
expect(Thread.list.length).to eql(2)
|
262
262
|
thread.stop
|
263
263
|
sleep 0.2
|
264
|
-
Thread.list.length.
|
265
|
-
stdout.string.
|
264
|
+
expect(Thread.list.length).to eql(1)
|
265
|
+
expect(stdout.string).to match "Received unknown identified telemetry: BOB SMITH"
|
266
266
|
end
|
267
267
|
end
|
268
268
|
|
269
|
-
it "
|
269
|
+
it "writes to all defined routers" do
|
270
270
|
capture_io do |stdout|
|
271
271
|
router = double("Router")
|
272
272
|
allow(router).to receive(:write_allowed?).and_return(true)
|
@@ -277,16 +277,16 @@ module Cosmos
|
|
277
277
|
thread = InterfaceThread.new(@interface)
|
278
278
|
thread.start
|
279
279
|
sleep 0.1
|
280
|
-
Thread.list.length.
|
280
|
+
expect(Thread.list.length).to eql(2)
|
281
281
|
thread.stop
|
282
282
|
sleep 0.2
|
283
|
-
Thread.list.length.
|
283
|
+
expect(Thread.list.length).to eql(1)
|
284
284
|
|
285
|
-
stdout.string.
|
285
|
+
expect(stdout.string).to match "Problem writing to router"
|
286
286
|
end
|
287
287
|
end
|
288
288
|
|
289
|
-
it "
|
289
|
+
it "writes to all defined packet log writers" do
|
290
290
|
writer = double("LogWriter")
|
291
291
|
allow(writer).to receive_message_chain(:tlm_log_writer,:write)
|
292
292
|
@interface.packet_log_writer_pairs = [writer]
|
@@ -294,10 +294,10 @@ module Cosmos
|
|
294
294
|
threads = Thread.list.length
|
295
295
|
thread.start
|
296
296
|
sleep 0.1
|
297
|
-
Thread.list.length.
|
297
|
+
expect(Thread.list.length).to eql(2)
|
298
298
|
thread.stop
|
299
299
|
sleep 0.2
|
300
|
-
Thread.list.length.
|
300
|
+
expect(Thread.list.length).to eql(1)
|
301
301
|
end
|
302
302
|
|
303
303
|
end
|
@@ -22,7 +22,7 @@ module Cosmos
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe "map_all_targets" do
|
25
|
-
it "
|
25
|
+
it "complains about an unknown interface" do
|
26
26
|
tf = Tempfile.new('unittest')
|
27
27
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
28
28
|
tf.close
|
@@ -31,10 +31,10 @@ module Cosmos
|
|
31
31
|
tf.unlink
|
32
32
|
end
|
33
33
|
|
34
|
-
it "
|
34
|
+
it "maps all targets to the interface" do
|
35
35
|
System.targets.each do |name, target|
|
36
36
|
target.interface = nil
|
37
|
-
target.interface.
|
37
|
+
expect(target.interface).to be_nil
|
38
38
|
end
|
39
39
|
tf = Tempfile.new('unittest')
|
40
40
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
@@ -42,14 +42,14 @@ module Cosmos
|
|
42
42
|
interfaces = Interfaces.new(CmdTlmServerConfig.new(tf.path))
|
43
43
|
interfaces.map_all_targets("MY_INT")
|
44
44
|
System.targets.each do |name, target|
|
45
|
-
target.interface.name.
|
45
|
+
expect(target.interface.name).to eql 'MY_INT'
|
46
46
|
end
|
47
47
|
tf.unlink
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
describe "map_target" do
|
52
|
-
it "
|
52
|
+
it "complains about an unknown interface" do
|
53
53
|
tf = Tempfile.new('unittest')
|
54
54
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
55
55
|
tf.close
|
@@ -58,7 +58,7 @@ module Cosmos
|
|
58
58
|
tf.unlink
|
59
59
|
end
|
60
60
|
|
61
|
-
it "
|
61
|
+
it "complains about an unknown target" do
|
62
62
|
tf = Tempfile.new('unittest')
|
63
63
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
64
64
|
tf.close
|
@@ -68,23 +68,23 @@ module Cosmos
|
|
68
68
|
end
|
69
69
|
|
70
70
|
|
71
|
-
it "
|
71
|
+
it "maps a target to the interface" do
|
72
72
|
System.targets.each do |name, target|
|
73
73
|
target.interface = nil
|
74
|
-
target.interface.
|
74
|
+
expect(target.interface).to be_nil
|
75
75
|
end
|
76
76
|
tf = Tempfile.new('unittest')
|
77
77
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
78
78
|
tf.close
|
79
79
|
interfaces = Interfaces.new(CmdTlmServerConfig.new(tf.path))
|
80
80
|
interfaces.map_target("COSMOS","MY_INT")
|
81
|
-
System.targets["COSMOS"].interface.name.
|
81
|
+
expect(System.targets["COSMOS"].interface.name).to eql "MY_INT"
|
82
82
|
tf.unlink
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
86
|
describe "start" do
|
87
|
-
it "
|
87
|
+
it "connects each interface" do
|
88
88
|
tf = Tempfile.new('unittest')
|
89
89
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
90
90
|
tf.close
|
@@ -100,7 +100,7 @@ module Cosmos
|
|
100
100
|
interfaces.all['MY_INT'].connect_on_startup = true
|
101
101
|
interfaces.start
|
102
102
|
|
103
|
-
stdout.string.
|
103
|
+
expect(stdout.string).to match "Creating thread for interface MY_INT"
|
104
104
|
|
105
105
|
interfaces.stop
|
106
106
|
sleep 0.1
|
@@ -110,7 +110,7 @@ module Cosmos
|
|
110
110
|
end
|
111
111
|
|
112
112
|
describe "stop" do
|
113
|
-
it "
|
113
|
+
it "disconnects each interface" do
|
114
114
|
tf = Tempfile.new('unittest')
|
115
115
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
116
116
|
tf.close
|
@@ -125,15 +125,15 @@ module Cosmos
|
|
125
125
|
interfaces.all['MY_INT'].connect_on_startup = true
|
126
126
|
interfaces.start
|
127
127
|
sleep 0.5
|
128
|
-
interfaces.state("MY_INT").
|
128
|
+
expect(interfaces.state("MY_INT")).to eql "ATTEMPTING"
|
129
129
|
sleep 0.1
|
130
|
-
interfaces.state("MY_INT").
|
130
|
+
expect(interfaces.state("MY_INT")).to eql "CONNECTED"
|
131
131
|
sleep 0.1
|
132
132
|
interfaces.stop
|
133
133
|
sleep 0.5
|
134
|
-
interfaces.state("MY_INT").
|
134
|
+
expect(interfaces.state("MY_INT")).to eql "DISCONNECTED"
|
135
135
|
|
136
|
-
stdout.string.
|
136
|
+
expect(stdout.string).to match "Disconnected from interface MY_INT"
|
137
137
|
|
138
138
|
sleep 0.1
|
139
139
|
end
|
@@ -142,7 +142,7 @@ module Cosmos
|
|
142
142
|
end
|
143
143
|
|
144
144
|
describe "connect" do
|
145
|
-
it "
|
145
|
+
it "complains about unknown interfaces" do
|
146
146
|
tf = Tempfile.new('unittest')
|
147
147
|
tf.puts 'INTERFACE MY_INT interface.rb'
|
148
148
|
tf.close
|
@@ -151,7 +151,7 @@ module Cosmos
|
|
151
151
|
tf.unlink
|
152
152
|
end
|
153
153
|
|
154
|
-
it "
|
154
|
+
it "connects a interface" do
|
155
155
|
tf = Tempfile.new('unittest')
|
156
156
|
tf.puts 'INTERFACE DEST1 tcpip_client_interface.rb localhost 8888 8888 5 5 burst'
|
157
157
|
tf.puts 'INTERFACE DEST2 tcpip_client_interface.rb localhost 8888 8888 5 5 burst'
|
@@ -183,18 +183,18 @@ module Cosmos
|
|
183
183
|
|
184
184
|
config = CmdTlmServerConfig.new(tf.path)
|
185
185
|
interfaces = Interfaces.new(config)
|
186
|
-
config.interfaces['DEST1'].routers[0].name.
|
187
|
-
config.interfaces['DEST2'].routers[0].name.
|
186
|
+
expect(config.interfaces['DEST1'].routers[0].name).to eql "MY_ROUTER"
|
187
|
+
expect(config.interfaces['DEST2'].routers[0].name).to eql "MY_ROUTER"
|
188
188
|
interfaces.connect("DEST1")
|
189
189
|
sleep 0.2
|
190
|
-
stdout.string.
|
190
|
+
expect(stdout.string).to match "Connecting to DEST1"
|
191
191
|
interfaces.disconnect("DEST1")
|
192
192
|
interfaces.connect("DEST1",'localhost',8888,8888,6,6,'length')
|
193
193
|
sleep 0.2
|
194
|
-
config.interfaces['DEST1'].routers[0].name.
|
195
|
-
config.interfaces['DEST2'].routers[0].name.
|
196
|
-
stdout.string.
|
197
|
-
stdout.string.
|
194
|
+
expect(config.interfaces['DEST1'].routers[0].name).to eql "MY_ROUTER"
|
195
|
+
expect(config.interfaces['DEST2'].routers[0].name).to eql "MY_ROUTER"
|
196
|
+
expect(stdout.string).to match "Disconnected from interface DEST1"
|
197
|
+
expect(stdout.string).to match "Connecting to DEST1"
|
198
198
|
interfaces.disconnect("DEST1")
|
199
199
|
interfaces.stop
|
200
200
|
|
@@ -211,20 +211,20 @@ module Cosmos
|
|
211
211
|
end
|
212
212
|
|
213
213
|
describe "names" do
|
214
|
-
it "
|
214
|
+
it "lists all the interface names" do
|
215
215
|
tf = Tempfile.new('unittest')
|
216
216
|
tf.puts 'INTERFACE INTERFACE1 interface.rb'
|
217
217
|
tf.puts 'INTERFACE INTERFACE2 interface.rb'
|
218
218
|
tf.puts 'INTERFACE INTERFACE3 interface.rb'
|
219
219
|
tf.close
|
220
220
|
interfaces = Interfaces.new(CmdTlmServerConfig.new(tf.path))
|
221
|
-
interfaces.names.
|
221
|
+
expect(interfaces.names).to eql %w(INTERFACE1 INTERFACE2 INTERFACE3)
|
222
222
|
tf.unlink
|
223
223
|
end
|
224
224
|
end
|
225
225
|
|
226
226
|
describe "clear_counters" do
|
227
|
-
it "
|
227
|
+
it "clears all interface counters" do
|
228
228
|
tf = Tempfile.new('unittest')
|
229
229
|
tf.puts 'INTERFACE INTERFACE1 interface.rb'
|
230
230
|
tf.puts 'INTERFACE INTERFACE2 interface.rb'
|
@@ -239,10 +239,10 @@ module Cosmos
|
|
239
239
|
end
|
240
240
|
interfaces.clear_counters
|
241
241
|
interfaces.all.each do |name, interface|
|
242
|
-
interface.bytes_written.
|
243
|
-
interface.bytes_read.
|
244
|
-
interface.write_count.
|
245
|
-
interface.read_count.
|
242
|
+
expect(interface.bytes_written).to eql 0
|
243
|
+
expect(interface.bytes_read).to eql 0
|
244
|
+
expect(interface.write_count).to eql 0
|
245
|
+
expect(interface.read_count).to eql 0
|
246
246
|
end
|
247
247
|
tf.unlink
|
248
248
|
end
|