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
@@ -16,14 +16,14 @@ module Cosmos
|
|
16
16
|
describe Conversion do
|
17
17
|
|
18
18
|
describe "call" do
|
19
|
-
it "
|
19
|
+
it "raises an exception" do
|
20
20
|
expect { Conversion.new.call(0, 0, 0) }.to raise_error("call method must be defined by subclass")
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
describe "to_s" do
|
25
|
-
it "
|
26
|
-
Conversion.new.to_s.
|
25
|
+
it "returns a String" do
|
26
|
+
expect(Conversion.new.to_s).to eql "Conversion"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -16,28 +16,28 @@ module Cosmos
|
|
16
16
|
describe GenericConversion do
|
17
17
|
|
18
18
|
describe "initialize" do
|
19
|
-
it "
|
19
|
+
it "takes code_to_eval, converted_type and converted_bit_size" do
|
20
20
|
gc = GenericConversion.new("10 / 2",:UINT,8)
|
21
|
-
gc.code_to_eval.
|
22
|
-
gc.converted_type.
|
23
|
-
gc.converted_bit_size.
|
21
|
+
expect(gc.code_to_eval).to eql "10 / 2"
|
22
|
+
expect(gc.converted_type).to eql :UINT
|
23
|
+
expect(gc.converted_bit_size).to eql 8
|
24
24
|
end
|
25
25
|
|
26
|
-
it "
|
26
|
+
it "complains about invalid converted_type" do
|
27
27
|
expect { GenericConversion.new("",:MINE,8) }.to raise_error("Invalid type MINE")
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
describe "call" do
|
32
|
-
it "
|
32
|
+
it "calls the code to eval and return the result" do
|
33
33
|
gc = GenericConversion.new("10 / 2",:UINT,8)
|
34
|
-
gc.call(0,0,0).
|
34
|
+
expect(gc.call(0,0,0)).to eql 5
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe "to_s" do
|
39
|
-
it "
|
40
|
-
GenericConversion.new("10 / 2").to_s.
|
39
|
+
it "returns the code to eval" do
|
40
|
+
expect(GenericConversion.new("10 / 2").to_s).to eql "10 / 2"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -17,21 +17,21 @@ module Cosmos
|
|
17
17
|
describe NewPacketLogConversion do
|
18
18
|
|
19
19
|
describe "call" do
|
20
|
-
it "
|
20
|
+
it "returns the value given and call start_logging" do
|
21
21
|
cmd_tlm_server = double("CmdTlmServer", :packet_logging => '')
|
22
22
|
allow(CmdTlmServer).to receive(:instance).and_return(cmd_tlm_server)
|
23
23
|
expect(cmd_tlm_server).to receive(:start_logging).with('ALL')
|
24
24
|
conversion = NewPacketLogConversion.new('ALL')
|
25
25
|
packet = Packet.new("TGT","PKT")
|
26
26
|
packet.append_item("TIME",32,:UINT)
|
27
|
-
conversion.call(5,packet,packet.buffer).
|
27
|
+
expect(conversion.call(5,packet,packet.buffer)).to eql 5
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
describe "to_s" do
|
32
|
-
it "
|
32
|
+
it "returns the conversion and packet_log_writer_name" do
|
33
33
|
conversion = NewPacketLogConversion.new('BOB')
|
34
|
-
conversion.to_s.
|
34
|
+
expect(conversion.to_s).to eql "NewPacketLogConversion (BOB)"
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -16,23 +16,23 @@ module Cosmos
|
|
16
16
|
describe PolynomialConversion do
|
17
17
|
|
18
18
|
describe "initialize" do
|
19
|
-
it "
|
19
|
+
it "takes a coefficents array" do
|
20
20
|
gc = PolynomialConversion.new([1,2,3])
|
21
|
-
gc.converted_type.
|
22
|
-
gc.converted_bit_size.
|
21
|
+
expect(gc.converted_type).to eql :FLOAT
|
22
|
+
expect(gc.converted_bit_size).to eql 64
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
describe "call" do
|
27
|
-
it "
|
27
|
+
it "calls the code to eval and return the result" do
|
28
28
|
gc = PolynomialConversion.new([1,2,3])
|
29
|
-
gc.call(1,nil,nil).
|
29
|
+
expect(gc.call(1,nil,nil)).to eql 6.0
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
33
|
describe "to_s" do
|
34
|
-
it "
|
35
|
-
PolynomialConversion.new([1,2,3]).to_s.
|
34
|
+
it "returns the equation" do
|
35
|
+
expect(PolynomialConversion.new([1,2,3]).to_s).to eql "1.0 + 2.0x + 3.0x^2"
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -16,28 +16,28 @@ module Cosmos
|
|
16
16
|
describe PolynomialConversion do
|
17
17
|
|
18
18
|
describe "initialize" do
|
19
|
-
it "
|
19
|
+
it "takes processor_name, result_name, converted_type, and converted_bit_size" do
|
20
20
|
c = ProcessorConversion.new('TEST', 'TEST', 'FLOAT', '64')
|
21
|
-
c.instance_variable_get("@processor_name").
|
22
|
-
c.instance_variable_get("@result_name").
|
23
|
-
c.converted_type.
|
24
|
-
c.converted_bit_size.
|
21
|
+
expect(c.instance_variable_get("@processor_name")).to eql 'TEST'
|
22
|
+
expect(c.instance_variable_get("@result_name")).to eql :TEST
|
23
|
+
expect(c.converted_type).to eql :FLOAT
|
24
|
+
expect(c.converted_bit_size).to eql 64
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "call" do
|
29
|
-
it "
|
29
|
+
it "retrieves the result from the processor" do
|
30
30
|
c = ProcessorConversion.new('TEST', 'TEST', 'FLOAT', '64')
|
31
31
|
packet = Packet.new("tgt","pkt")
|
32
32
|
packet.append_item('ITEM1', 64, :FLOAT)
|
33
33
|
packet.processors['TEST'] = double("processor", :results => {:TEST => 6.0})
|
34
|
-
c.call(1,packet,nil).
|
34
|
+
expect(c.call(1,packet,nil)).to eql 6.0
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe "to_s" do
|
39
|
-
it "
|
40
|
-
ProcessorConversion.new('TEST1', 'TEST2', 'FLOAT', '64').to_s.
|
39
|
+
it "returns the equation" do
|
40
|
+
expect(ProcessorConversion.new('TEST1', 'TEST2', 'FLOAT', '64').to_s).to eql "ProcessorConversion TEST1 TEST2"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -17,25 +17,25 @@ module Cosmos
|
|
17
17
|
describe ReceivedCountConversion do
|
18
18
|
|
19
19
|
describe "initialize" do
|
20
|
-
it "
|
20
|
+
it "initializes converted_type and converted_bit_size" do
|
21
21
|
gc = ReceivedCountConversion.new()
|
22
|
-
gc.converted_type.
|
23
|
-
gc.converted_bit_size.
|
22
|
+
expect(gc.converted_type).to eql :UINT
|
23
|
+
expect(gc.converted_bit_size).to eql 32
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "call" do
|
28
|
-
it "
|
28
|
+
it "calls the code to eval and return the result" do
|
29
29
|
gc = ReceivedCountConversion.new()
|
30
30
|
packet = Packet.new("TGT","PKT")
|
31
31
|
packet.received_count = 100
|
32
|
-
gc.call(nil,packet,nil).
|
32
|
+
expect(gc.call(nil,packet,nil)).to eql 100
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
describe "to_s" do
|
37
|
-
it "
|
38
|
-
ReceivedCountConversion.new().to_s.
|
37
|
+
it "returns the class" do
|
38
|
+
expect(ReceivedCountConversion.new().to_s).to eql "ReceivedCountConversion"
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -17,31 +17,31 @@ module Cosmos
|
|
17
17
|
describe ReceivedTimeFormattedConversion do
|
18
18
|
|
19
19
|
describe "initialize" do
|
20
|
-
it "
|
20
|
+
it "initializes converted_type and converted_bit_size" do
|
21
21
|
gc = ReceivedTimeFormattedConversion.new()
|
22
|
-
gc.converted_type.
|
23
|
-
gc.converted_bit_size.
|
22
|
+
expect(gc.converted_type).to eql :STRING
|
23
|
+
expect(gc.converted_bit_size).to eql 0
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "call" do
|
28
|
-
it "
|
28
|
+
it "returns the formatted packet time" do
|
29
29
|
gc = ReceivedTimeFormattedConversion.new()
|
30
30
|
packet = Packet.new("TGT","PKT")
|
31
31
|
packet.received_time = Time.new(2020,1,31,12,15,30)
|
32
|
-
gc.call(nil,packet,nil).
|
32
|
+
expect(gc.call(nil,packet,nil)).to eql "2020/01/31 12:15:30.000"
|
33
33
|
end
|
34
34
|
|
35
|
-
it "
|
35
|
+
it "returns a string if packet time isn't set" do
|
36
36
|
gc = ReceivedTimeFormattedConversion.new()
|
37
37
|
packet = Packet.new("TGT","PKT")
|
38
|
-
gc.call(nil,packet,nil).
|
38
|
+
expect(gc.call(nil,packet,nil)).to eql "No Packet Received Time"
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
42
|
describe "to_s" do
|
43
|
-
it "
|
44
|
-
ReceivedTimeFormattedConversion.new().to_s.
|
43
|
+
it "returns the class" do
|
44
|
+
expect(ReceivedTimeFormattedConversion.new().to_s).to eql "ReceivedTimeFormattedConversion"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -17,32 +17,32 @@ module Cosmos
|
|
17
17
|
describe ReceivedTimeSecondsConversion do
|
18
18
|
|
19
19
|
describe "initialize" do
|
20
|
-
it "
|
20
|
+
it "initializes converted_type and converted_bit_size" do
|
21
21
|
gc = ReceivedTimeSecondsConversion.new()
|
22
|
-
gc.converted_type.
|
23
|
-
gc.converted_bit_size.
|
22
|
+
expect(gc.converted_type).to eql :FLOAT
|
23
|
+
expect(gc.converted_bit_size).to eql 64
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "call" do
|
28
|
-
it "
|
28
|
+
it "returns the formatted packet time" do
|
29
29
|
gc = ReceivedTimeSecondsConversion.new()
|
30
30
|
packet = Packet.new("TGT","PKT")
|
31
31
|
time = Time.new(2020,1,31,12,15,30)
|
32
32
|
packet.received_time = time
|
33
|
-
gc.call(nil,packet,nil).
|
33
|
+
expect(gc.call(nil,packet,nil)).to eql time.to_f
|
34
34
|
end
|
35
35
|
|
36
|
-
it "
|
36
|
+
it "returns 0.0 if packet time isn't set" do
|
37
37
|
gc = ReceivedTimeSecondsConversion.new()
|
38
38
|
packet = Packet.new("TGT","PKT")
|
39
|
-
gc.call(nil,packet,nil).
|
39
|
+
expect(gc.call(nil,packet,nil)).to eql 0.0
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
43
|
describe "to_s" do
|
44
|
-
it "
|
45
|
-
ReceivedTimeSecondsConversion.new().to_s.
|
44
|
+
it "returns the class" do
|
45
|
+
expect(ReceivedTimeSecondsConversion.new().to_s).to eql "ReceivedTimeSecondsConversion"
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -16,34 +16,34 @@ module Cosmos
|
|
16
16
|
describe SegmentedPolynomialConversion do
|
17
17
|
|
18
18
|
describe "initialize" do
|
19
|
-
it "
|
19
|
+
it "initializes converted_type and converted_bit_size" do
|
20
20
|
gc = SegmentedPolynomialConversion.new()
|
21
|
-
gc.converted_type.
|
22
|
-
gc.converted_bit_size.
|
21
|
+
expect(gc.converted_type).to eql :FLOAT
|
22
|
+
expect(gc.converted_bit_size).to eql 64
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
describe "call" do
|
27
|
-
it "
|
27
|
+
it "performs the conversion and return the result" do
|
28
28
|
gc = SegmentedPolynomialConversion.new()
|
29
29
|
gc.add_segment(10, 1,2)
|
30
30
|
gc.add_segment(5, 2,2)
|
31
31
|
gc.add_segment(15, 3,2)
|
32
|
-
gc.call(1,nil,nil).
|
33
|
-
gc.call(5,nil,nil).
|
34
|
-
gc.call(11,nil,nil).
|
35
|
-
gc.call(20,nil,nil).
|
32
|
+
expect(gc.call(1,nil,nil)).to eql 4.0
|
33
|
+
expect(gc.call(5,nil,nil)).to eql 12.0
|
34
|
+
expect(gc.call(11,nil,nil)).to eql 23.0
|
35
|
+
expect(gc.call(20,nil,nil)).to eql 43.0
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
describe "to_s" do
|
40
|
-
it "
|
41
|
-
SegmentedPolynomialConversion.new().to_s.
|
40
|
+
it "returns the equations" do
|
41
|
+
expect(SegmentedPolynomialConversion.new().to_s).to eql ""
|
42
42
|
gc = SegmentedPolynomialConversion.new()
|
43
43
|
gc.add_segment(10, 1)
|
44
44
|
gc.add_segment(5, 2,2)
|
45
45
|
gc.add_segment(15, 3,2,3)
|
46
|
-
gc.to_s.
|
46
|
+
expect(gc.to_s).to eql "Lower Bound: 15 Polynomial: 3 + 2x + 3x^2\nLower Bound: 10 Polynomial: 1\nLower Bound: 5 Polynomial: 2 + 2x"
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
@@ -17,39 +17,39 @@ module Cosmos
|
|
17
17
|
describe UnixTimeFormattedConversion do
|
18
18
|
|
19
19
|
describe "initialize" do
|
20
|
-
it "
|
20
|
+
it "initializes converted_type and converted_bit_size" do
|
21
21
|
gc = UnixTimeFormattedConversion.new('TIME')
|
22
|
-
gc.converted_type.
|
23
|
-
gc.converted_bit_size.
|
22
|
+
expect(gc.converted_type).to eql :STRING
|
23
|
+
expect(gc.converted_bit_size).to eql 0
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "call" do
|
28
|
-
it "
|
28
|
+
it "returns the formatted packet time based on seconds" do
|
29
29
|
gc = UnixTimeFormattedConversion.new('TIME')
|
30
30
|
packet = Packet.new("TGT","PKT")
|
31
31
|
packet.append_item("TIME",32,:UINT)
|
32
32
|
packet.write("TIME",Time.new(2020,1,31,12,15,30).to_f)
|
33
|
-
gc.call(nil,packet,packet.buffer).
|
33
|
+
expect(gc.call(nil,packet,packet.buffer)).to eql "2020/01/31 12:15:30.000"
|
34
34
|
end
|
35
35
|
|
36
|
-
it "
|
36
|
+
it "returns the formatted packet time based on seconds and microseconds" do
|
37
37
|
gc = UnixTimeFormattedConversion.new('TIME','TIME_US')
|
38
38
|
packet = Packet.new("TGT","PKT")
|
39
39
|
packet.append_item("TIME",32,:UINT)
|
40
40
|
packet.write("TIME",Time.new(2020,1,31,12,15,30).to_f)
|
41
41
|
packet.append_item("TIME_US",32,:UINT)
|
42
42
|
packet.write("TIME_US",500000)
|
43
|
-
gc.call(nil,packet,packet.buffer).
|
43
|
+
expect(gc.call(nil,packet,packet.buffer)).to eql "2020/01/31 12:15:30.500"
|
44
44
|
end
|
45
45
|
|
46
|
-
it "
|
46
|
+
it "complains if the seconds item doesn't exist" do
|
47
47
|
gc = UnixTimeFormattedConversion.new('TIME')
|
48
48
|
packet = Packet.new("TGT","PKT")
|
49
49
|
expect { gc.call(nil,packet,packet.buffer) }.to raise_error("Packet item 'TGT PKT TIME' does not exist")
|
50
50
|
end
|
51
51
|
|
52
|
-
it "
|
52
|
+
it "complains if the microseconds item doesn't exist" do
|
53
53
|
gc = UnixTimeFormattedConversion.new('TIME','TIME_US')
|
54
54
|
packet = Packet.new("TGT","PKT")
|
55
55
|
packet.append_item("TIME",32,:UINT)
|
@@ -59,14 +59,14 @@ module Cosmos
|
|
59
59
|
end
|
60
60
|
|
61
61
|
describe "to_s" do
|
62
|
-
it "
|
62
|
+
it "returns the seconds conversion" do
|
63
63
|
gc = UnixTimeFormattedConversion.new('TIME')
|
64
|
-
gc.to_s.
|
64
|
+
expect(gc.to_s).to eql "Time.at(packet.read('TIME', :RAW, buffer), 0).formatted"
|
65
65
|
end
|
66
66
|
|
67
|
-
it "
|
67
|
+
it "returns the microseconds conversion" do
|
68
68
|
gc = UnixTimeFormattedConversion.new('TIME','TIME_US')
|
69
|
-
gc.to_s.
|
69
|
+
expect(gc.to_s).to eql "Time.at(packet.read('TIME', :RAW, buffer), packet.read('TIME_US', :RAW, buffer)).formatted"
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
@@ -17,24 +17,24 @@ module Cosmos
|
|
17
17
|
describe UnixTimeSecondsConversion do
|
18
18
|
|
19
19
|
describe "initialize" do
|
20
|
-
it "
|
20
|
+
it "initializes converted_type and converted_bit_size" do
|
21
21
|
gc = UnixTimeSecondsConversion.new('TIME')
|
22
|
-
gc.converted_type.
|
23
|
-
gc.converted_bit_size.
|
22
|
+
expect(gc.converted_type).to eql :FLOAT
|
23
|
+
expect(gc.converted_bit_size).to eql 64
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "call" do
|
28
|
-
it "
|
28
|
+
it "returns the formatted packet time based on seconds" do
|
29
29
|
gc = UnixTimeSecondsConversion.new('TIME')
|
30
30
|
packet = Packet.new("TGT","PKT")
|
31
31
|
packet.append_item("TIME",32,:UINT)
|
32
32
|
time = Time.new(2020,1,31,12,15,30).to_f
|
33
33
|
packet.write("TIME",time)
|
34
|
-
gc.call(nil,packet,packet.buffer).
|
34
|
+
expect(gc.call(nil,packet,packet.buffer)).to eql time
|
35
35
|
end
|
36
36
|
|
37
|
-
it "
|
37
|
+
it "returns the formatted packet time based on seconds and microseconds" do
|
38
38
|
gc = UnixTimeSecondsConversion.new('TIME','TIME_US')
|
39
39
|
packet = Packet.new("TGT","PKT")
|
40
40
|
packet.append_item("TIME",32,:UINT)
|
@@ -42,16 +42,16 @@ module Cosmos
|
|
42
42
|
packet.write("TIME",time)
|
43
43
|
packet.append_item("TIME_US",32,:UINT)
|
44
44
|
packet.write("TIME_US",500000)
|
45
|
-
gc.call(nil,packet,packet.buffer).
|
45
|
+
expect(gc.call(nil,packet,packet.buffer)).to eql time + 0.5
|
46
46
|
end
|
47
47
|
|
48
|
-
it "
|
48
|
+
it "complains if the seconds item doesn't exist" do
|
49
49
|
gc = UnixTimeSecondsConversion.new('TIME')
|
50
50
|
packet = Packet.new("TGT","PKT")
|
51
51
|
expect { gc.call(nil,packet,packet.buffer) }.to raise_error("Packet item 'TGT PKT TIME' does not exist")
|
52
52
|
end
|
53
53
|
|
54
|
-
it "
|
54
|
+
it "complains if the microseconds item doesn't exist" do
|
55
55
|
gc = UnixTimeSecondsConversion.new('TIME','TIME_US')
|
56
56
|
packet = Packet.new("TGT","PKT")
|
57
57
|
packet.append_item("TIME",32,:UINT)
|
@@ -61,14 +61,14 @@ module Cosmos
|
|
61
61
|
end
|
62
62
|
|
63
63
|
describe "to_s" do
|
64
|
-
it "
|
64
|
+
it "returns the seconds conversion" do
|
65
65
|
gc = UnixTimeSecondsConversion.new('TIME')
|
66
|
-
gc.to_s.
|
66
|
+
expect(gc.to_s).to eql "Time.at(packet.read('TIME', :RAW, buffer), 0).to_f"
|
67
67
|
end
|
68
68
|
|
69
|
-
it "
|
69
|
+
it "returns the microseconds conversion" do
|
70
70
|
gc = UnixTimeSecondsConversion.new('TIME','TIME_US')
|
71
|
-
gc.to_s.
|
71
|
+
expect(gc.to_s).to eql "Time.at(packet.read('TIME', :RAW, buffer), packet.read('TIME_US', :RAW, buffer)).to_f"
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|