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.
Files changed (364) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +195 -0
  3. data/README.md +3 -3
  4. data/data/crc.txt +52 -52
  5. data/lib/cosmos.rb +1 -1
  6. data/lib/cosmos/core_ext/time.rb +11 -9
  7. data/lib/cosmos/gui/choosers/telemetry_chooser.rb +0 -2
  8. data/lib/cosmos/gui/dialogs/about_dialog.rb +2 -2
  9. data/lib/cosmos/gui/dialogs/exception_dialog.rb +2 -2
  10. data/lib/cosmos/gui/dialogs/progress_dialog.rb +11 -5
  11. data/lib/cosmos/gui/dialogs/splash.rb +32 -10
  12. data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +1 -1
  13. data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +2 -2
  14. data/lib/cosmos/gui/qt.rb +22 -22
  15. data/lib/cosmos/io/json_drb.rb +4 -4
  16. data/lib/cosmos/io/json_rpc.rb +21 -21
  17. data/lib/cosmos/packet_logs/packet_log_writer.rb +18 -20
  18. data/lib/cosmos/packets/commands.rb +8 -6
  19. data/lib/cosmos/packets/limits.rb +3 -2
  20. data/lib/cosmos/packets/packet.rb +14 -11
  21. data/lib/cosmos/packets/parsers/limits_parser.rb +1 -1
  22. data/lib/cosmos/packets/parsers/macro_parser.rb +4 -4
  23. data/lib/cosmos/packets/parsers/state_parser.rb +1 -1
  24. data/lib/cosmos/packets/structure.rb +2 -2
  25. data/lib/cosmos/packets/telemetry.rb +5 -4
  26. data/lib/cosmos/script/script.rb +6 -6
  27. data/lib/cosmos/streams/tcpip_socket_stream.rb +2 -1
  28. data/lib/cosmos/streams/template_stream_protocol.rb +1 -1
  29. data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +1 -1
  30. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +5 -8
  31. data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +4 -3
  32. data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +9 -3
  33. data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +15 -11
  34. data/lib/cosmos/tools/data_viewer/data_viewer.rb +1 -1
  35. data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +2 -2
  36. data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +2 -2
  37. data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +0 -2
  38. data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +1 -1
  39. data/lib/cosmos/tools/replay/replay.rb +2 -2
  40. data/lib/cosmos/tools/script_runner/script_audit.rb +1 -1
  41. data/lib/cosmos/tools/script_runner/script_runner.rb +1 -1
  42. data/lib/cosmos/tools/script_runner/script_runner_frame.rb +3 -7
  43. data/lib/cosmos/tools/table_manager/table_config.rb +1 -1
  44. data/lib/cosmos/tools/test_runner/results_writer.rb +1 -1
  45. data/lib/cosmos/tools/test_runner/test_runner.rb +2 -2
  46. data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +2 -1
  47. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +1 -1
  48. data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +1 -0
  49. data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +1 -0
  50. data/lib/cosmos/tools/tlm_grapher/data_object_editors/xy_data_object_editor.rb +1 -0
  51. data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +3 -3
  52. data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +1 -3
  53. data/lib/cosmos/top_level.rb +2 -6
  54. data/lib/cosmos/utilities/ruby_lex_utils.rb +1 -1
  55. data/lib/cosmos/version.rb +5 -5
  56. data/lib/cosmos/win32/win32_main.rb +11 -7
  57. data/spec/ccsds/ccsds_packet_spec.rb +28 -28
  58. data/spec/ccsds/ccsds_parser_spec.rb +27 -27
  59. data/spec/config/config_parser_spec.rb +88 -88
  60. data/spec/conversions/conversion_spec.rb +3 -3
  61. data/spec/conversions/generic_conversion_spec.rb +9 -9
  62. data/spec/conversions/new_packet_log_conversion_spec.rb +4 -4
  63. data/spec/conversions/polynomial_conversion_spec.rb +7 -7
  64. data/spec/conversions/processor_conversion_spec.rb +9 -9
  65. data/spec/conversions/received_count_conversion_spec.rb +7 -7
  66. data/spec/conversions/received_time_formatted_conversion_spec.rb +9 -9
  67. data/spec/conversions/received_time_seconds_conversion_spec.rb +9 -9
  68. data/spec/conversions/segmented_polynomial_conversion_spec.rb +11 -11
  69. data/spec/conversions/unix_time_formatted_conversion_spec.rb +13 -13
  70. data/spec/conversions/unix_time_seconds_conversion_spec.rb +13 -13
  71. data/spec/core_ext/array_spec.rb +76 -76
  72. data/spec/core_ext/class_spec.rb +3 -3
  73. data/spec/core_ext/cosmos_io_spec.rb +16 -16
  74. data/spec/core_ext/exception_spec.rb +19 -19
  75. data/spec/core_ext/file_spec.rb +16 -16
  76. data/spec/core_ext/hash_spec.rb +3 -3
  77. data/spec/core_ext/io_spec.rb +2 -2
  78. data/spec/core_ext/kernel_spec.rb +2 -2
  79. data/spec/core_ext/math_spec.rb +43 -43
  80. data/spec/core_ext/matrix_spec.rb +22 -22
  81. data/spec/core_ext/objectspace_spec.rb +6 -6
  82. data/spec/core_ext/range_spec.rb +2 -2
  83. data/spec/core_ext/socket_spec.rb +4 -4
  84. data/spec/core_ext/string_spec.rb +67 -67
  85. data/spec/core_ext/stringio_spec.rb +2 -2
  86. data/spec/core_ext/time_spec.rb +82 -82
  87. data/spec/gui/line_graph/line_clip_spec.rb +34 -34
  88. data/spec/interfaces/interface_spec.rb +46 -46
  89. data/spec/interfaces/linc_interface_spec.rb +26 -26
  90. data/spec/interfaces/serial_interface_spec.rb +16 -16
  91. data/spec/interfaces/simulated_target_interface_spec.rb +21 -21
  92. data/spec/interfaces/stream_interface_spec.rb +22 -22
  93. data/spec/interfaces/tcpip_client_interface_spec.rb +14 -14
  94. data/spec/interfaces/tcpip_server_interface_spec.rb +41 -41
  95. data/spec/interfaces/udp_interface_spec.rb +46 -46
  96. data/spec/io/buffered_file_spec.rb +50 -50
  97. data/spec/io/io_multiplexer_spec.rb +9 -9
  98. data/spec/io/json_drb_object_spec.rb +7 -7
  99. data/spec/io/json_drb_spec.rb +55 -55
  100. data/spec/io/json_rpc_spec.rb +68 -68
  101. data/spec/io/raw_logger_pair_spec.rb +28 -28
  102. data/spec/io/raw_logger_spec.rb +22 -22
  103. data/spec/io/serial_driver_spec.rb +3 -3
  104. data/spec/io/stderr_spec.rb +2 -2
  105. data/spec/io/stdout_spec.rb +2 -2
  106. data/spec/io/tcpip_server_spec.rb +62 -62
  107. data/spec/io/udp_sockets_spec.rb +19 -19
  108. data/spec/io/win32_serial_driver_spec.rb +10 -10
  109. data/spec/packet_logs/meta_packet_log_writer_spec.rb +32 -32
  110. data/spec/packet_logs/packet_log_reader_spec.rb +138 -138
  111. data/spec/packet_logs/packet_log_writer_pair_spec.rb +3 -3
  112. data/spec/packet_logs/packet_log_writer_spec.rb +26 -26
  113. data/spec/packets/binary_accessor_spec.rb +672 -672
  114. data/spec/packets/commands_spec.rb +123 -123
  115. data/spec/packets/limits_response_spec.rb +1 -1
  116. data/spec/packets/limits_spec.rb +69 -69
  117. data/spec/packets/packet_config_spec.rb +93 -93
  118. data/spec/packets/packet_item_limits_spec.rb +46 -46
  119. data/spec/packets/packet_item_spec.rb +108 -108
  120. data/spec/packets/packet_spec.rb +364 -348
  121. data/spec/packets/parsers/format_string_parser_spec.rb +13 -13
  122. data/spec/packets/parsers/limits_parser_spec.rb +8 -8
  123. data/spec/packets/parsers/limits_response_parser_spec.rb +9 -9
  124. data/spec/packets/parsers/macro_parser_spec.rb +34 -6
  125. data/spec/packets/parsers/packet_parser_spec.rb +6 -6
  126. data/spec/packets/parsers/processor_parser_spec.rb +7 -7
  127. data/spec/packets/parsers/state_parser_spec.rb +23 -23
  128. data/spec/packets/structure_item_spec.rb +62 -62
  129. data/spec/packets/structure_spec.rb +183 -183
  130. data/spec/packets/telemetry_spec.rb +174 -174
  131. data/spec/processors/new_packet_log_processor_spec.rb +4 -4
  132. data/spec/processors/processor_spec.rb +9 -9
  133. data/spec/processors/statistics_processor_spec.rb +21 -21
  134. data/spec/processors/watermark_processor_spec.rb +12 -12
  135. data/spec/script/script_spec.rb +158 -158
  136. data/spec/spec_helper.rb +44 -13
  137. data/spec/streams/burst_stream_protocol_spec.rb +8 -8
  138. data/spec/streams/fixed_stream_protocol_spec.rb +26 -26
  139. data/spec/streams/length_stream_protocol_spec.rb +27 -27
  140. data/spec/streams/preidentified_stream_protocol_spec.rb +25 -25
  141. data/spec/streams/serial_stream_spec.rb +19 -19
  142. data/spec/streams/stream_protocol_spec.rb +52 -52
  143. data/spec/streams/stream_spec.rb +1 -1
  144. data/spec/streams/tcpip_client_stream_spec.rb +7 -7
  145. data/spec/streams/tcpip_socket_stream_spec.rb +84 -49
  146. data/spec/streams/template_stream_protocol_spec.rb +17 -17
  147. data/spec/streams/terminated_stream_protocol_spec.rb +19 -19
  148. data/spec/system/system_spec.rb +95 -95
  149. data/spec/system/target_spec.rb +32 -32
  150. data/spec/tools/cmd_tlm_server/api_spec.rb +386 -386
  151. data/spec/tools/cmd_tlm_server/background_task_spec.rb +3 -3
  152. data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +8 -8
  153. data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +57 -57
  154. data/spec/tools/cmd_tlm_server/cmd_tlm_server_spec.rb +85 -85
  155. data/spec/tools/cmd_tlm_server/commanding_spec.rb +11 -11
  156. data/spec/tools/cmd_tlm_server/connections_spec.rb +23 -23
  157. data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +57 -57
  158. data/spec/tools/cmd_tlm_server/interfaces_spec.rb +32 -32
  159. data/spec/tools/cmd_tlm_server/packet_logging_spec.rb +17 -17
  160. data/spec/tools/cmd_tlm_server/router_thread_spec.rb +15 -15
  161. data/spec/tools/cmd_tlm_server/routers_spec.rb +36 -36
  162. data/spec/top_level/top_level_spec.rb +60 -60
  163. data/spec/utilities/crc_spec.rb +6 -6
  164. data/spec/utilities/csv_spec.rb +13 -13
  165. data/spec/utilities/logger_spec.rb +20 -20
  166. data/spec/utilities/message_log_spec.rb +13 -13
  167. data/spec/utilities/quaternion_spec.rb +30 -30
  168. data/spec/utilities/ruby_lex_utils_spec.rb +14 -14
  169. data/test/benchmarks/binary_accessor_benchmark.rb +14 -0
  170. data/test/benchmarks/gsub_benchmark.rb +114 -0
  171. data/test/performance/PACKETS.bat +1 -0
  172. data/test/performance/Rakefile +77 -0
  173. data/test/performance/THREADS.bat +1 -0
  174. data/test/performance/config/data/attitude.bin +0 -0
  175. data/test/performance/config/data/crc.txt +206 -0
  176. data/test/performance/config/data/diamond.STL +58 -0
  177. data/test/performance/config/data/groundoff.gif +0 -0
  178. data/test/performance/config/data/groundon.gif +0 -0
  179. data/test/performance/config/data/hselectoff.gif +0 -0
  180. data/test/performance/config/data/hselecton.gif +0 -0
  181. data/test/performance/config/data/hswitchoff.gif +0 -0
  182. data/test/performance/config/data/hswitchon.gif +0 -0
  183. data/test/performance/config/data/meta_init.txt +4 -0
  184. data/test/performance/config/data/position.bin +0 -0
  185. data/test/performance/config/data/poweroff.gif +0 -0
  186. data/test/performance/config/data/poweron.gif +0 -0
  187. data/test/performance/config/data/satellite.gif +0 -0
  188. data/test/performance/config/data/tada.wav +0 -0
  189. data/test/performance/config/data/vswitchoff.gif +0 -0
  190. data/test/performance/config/data/vswitchon.gif +0 -0
  191. data/test/performance/config/system/system_packets.txt +39 -0
  192. data/test/performance/config/system/system_threads.txt +59 -0
  193. data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +41 -0
  194. data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +15 -0
  195. data/test/performance/config/targets/COSMOS/cmd_tlm_server.txt +6 -0
  196. data/test/performance/config/targets/COSMOS/screens/limits_change.txt +20 -0
  197. data/test/performance/config/targets/COSMOS/screens/version.txt +19 -0
  198. data/test/performance/config/targets/COSMOS/target.txt +11 -0
  199. data/test/performance/config/targets/EXAMPLE/cmd_tlm/example_cmds.txt +17 -0
  200. data/test/performance/config/targets/EXAMPLE/cmd_tlm/example_tlm.txt +18 -0
  201. data/test/performance/config/targets/EXAMPLE/cmd_tlm_server.txt +6 -0
  202. data/test/performance/config/targets/EXAMPLE/lib/example_interface.rb +22 -0
  203. data/test/performance/config/targets/EXAMPLE/target.txt +7 -0
  204. data/test/performance/config/targets/SYSTEM/screens/status.txt +12 -0
  205. data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt +34 -0
  206. data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt +68 -0
  207. data/test/performance/config/tools/data_viewer/data_viewer.txt +11 -0
  208. data/test/performance/config/tools/handbook_creator/default_toc.xsl +59 -0
  209. data/test/performance/config/tools/handbook_creator/handbook_creator.txt +66 -0
  210. data/test/performance/config/tools/handbook_creator/templates/command_packets.html.erb +86 -0
  211. data/test/performance/config/tools/handbook_creator/templates/command_toc.html.erb +38 -0
  212. data/test/performance/config/tools/handbook_creator/templates/footer.html.erb +9 -0
  213. data/test/performance/config/tools/handbook_creator/templates/header.html.erb +25 -0
  214. data/test/performance/config/tools/handbook_creator/templates/limits_groups.html.erb +13 -0
  215. data/test/performance/config/tools/handbook_creator/templates/nav.html.erb +27 -0
  216. data/test/performance/config/tools/handbook_creator/templates/overview.html.erb +1 -0
  217. data/test/performance/config/tools/handbook_creator/templates/pdf_cover.html.erb +23 -0
  218. data/test/performance/config/tools/handbook_creator/templates/pdf_footer.html.erb +33 -0
  219. data/test/performance/config/tools/handbook_creator/templates/pdf_header.html.erb +41 -0
  220. data/test/performance/config/tools/handbook_creator/templates/telemetry_packets.html.erb +80 -0
  221. data/test/performance/config/tools/handbook_creator/templates/telemetry_toc.html.erb +38 -0
  222. data/test/performance/config/tools/handbook_creator/templates/title.html.erb +1 -0
  223. data/test/performance/config/tools/launcher/launcher_packets.txt +29 -0
  224. data/test/performance/config/tools/launcher/launcher_threads.txt +70 -0
  225. data/test/performance/config/tools/limits_monitor/README.txt +1 -0
  226. data/test/performance/config/tools/opengl_builder/README.txt +1 -0
  227. data/test/performance/config/tools/script_runner/script_runner.txt +3 -0
  228. data/test/performance/config/tools/table_manager/ConfigTables_def.txt +8 -0
  229. data/test/performance/config/tools/table_manager/ExampleTableDefinition.txt +24 -0
  230. data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw1_def.txt +25 -0
  231. data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw2_def.txt +25 -0
  232. data/test/performance/config/tools/table_manager/PPSSelectionTable_def.txt +8 -0
  233. data/test/performance/config/tools/table_manager/TLMMonitoringTable_def.txt +248 -0
  234. data/test/performance/config/tools/test_runner/test_runner.txt +17 -0
  235. data/test/performance/config/tools/tlm_extractor/tlm_extractor.txt +13 -0
  236. data/test/performance/config/tools/tlm_extractor/tlm_extractor2.txt +2 -0
  237. data/test/performance/config/tools/tlm_extractor/tlm_extractor3.txt +2 -0
  238. data/test/performance/config/tools/tlm_extractor/tlm_extractor4.txt +2 -0
  239. data/test/performance/config/tools/tlm_grapher/README.txt +1 -0
  240. data/test/performance/config/tools/tlm_viewer/tlm_viewer.txt +41 -0
  241. data/test/performance/lib/example_background_task.rb +57 -0
  242. data/test/performance/lib/example_target.rb +120 -0
  243. data/test/performance/lib/scpi_target.rb +74 -0
  244. data/test/performance/lib/user_version.rb +3 -0
  245. data/test/performance/outputs/handbooks/README.txt +1 -0
  246. data/test/performance/outputs/logs/README.txt +1 -0
  247. data/test/performance/outputs/saved_config/README.txt +1 -0
  248. data/test/performance/outputs/tables/README.txt +1 -0
  249. data/test/performance/outputs/tmp/README.txt +1 -0
  250. data/test/performance/procedures/checks.rb +11 -0
  251. data/test/performance/procedures/clear_util.rb +7 -0
  252. data/test/performance/procedures/collect.rb +18 -0
  253. data/test/performance/procedures/collect_util.rb +14 -0
  254. data/test/performance/procedures/cosmos_api_test.rb +293 -0
  255. data/test/performance/procedures/disconnect.rb +29 -0
  256. data/test/performance/procedures/example_test.rb +182 -0
  257. data/test/performance/procedures/plot_test.rb +8 -0
  258. data/test/performance/procedures/procedure.rb +3 -0
  259. data/test/performance/procedures/run_example_test.rb +3 -0
  260. data/test/performance/procedures/test.rb +51 -0
  261. data/test/performance/tools/CmdExtractor +14 -0
  262. data/test/performance/tools/CmdExtractor.bat +59 -0
  263. data/test/performance/tools/CmdSender +14 -0
  264. data/test/performance/tools/CmdSender.bat +59 -0
  265. data/test/performance/tools/CmdTlmServer +16 -0
  266. data/test/performance/tools/CmdTlmServer.bat +59 -0
  267. data/test/performance/tools/CmdTlmServerMemProf +20 -0
  268. data/test/performance/tools/CmdTlmServerMemProf.bat +59 -0
  269. data/test/performance/tools/DataViewer +14 -0
  270. data/test/performance/tools/DataViewer.bat +59 -0
  271. data/test/performance/tools/ExampleTarget +14 -0
  272. data/test/performance/tools/ExampleTarget.bat +59 -0
  273. data/test/performance/tools/HandbookCreator +14 -0
  274. data/test/performance/tools/HandbookCreator.bat +61 -0
  275. data/test/performance/tools/Launcher +14 -0
  276. data/test/performance/tools/Launcher.bat +59 -0
  277. data/test/performance/tools/LimitsMonitor +14 -0
  278. data/test/performance/tools/LimitsMonitor.bat +59 -0
  279. data/test/performance/tools/OpenGLBuilder +14 -0
  280. data/test/performance/tools/OpenGLBuilder.bat +59 -0
  281. data/test/performance/tools/PacketViewer +14 -0
  282. data/test/performance/tools/PacketViewer.bat +59 -0
  283. data/test/performance/tools/Replay +14 -0
  284. data/test/performance/tools/Replay.bat +59 -0
  285. data/test/performance/tools/ScpiTarget +14 -0
  286. data/test/performance/tools/ScpiTarget.bat +59 -0
  287. data/test/performance/tools/ScriptRunner +14 -0
  288. data/test/performance/tools/ScriptRunner.bat +59 -0
  289. data/test/performance/tools/TableManager +14 -0
  290. data/test/performance/tools/TableManager.bat +59 -0
  291. data/test/performance/tools/TestRunner +14 -0
  292. data/test/performance/tools/TestRunner.bat +59 -0
  293. data/test/performance/tools/TlmExtractor +14 -0
  294. data/test/performance/tools/TlmExtractor.bat +59 -0
  295. data/test/performance/tools/TlmGrapher +14 -0
  296. data/test/performance/tools/TlmGrapher.bat +59 -0
  297. data/test/performance/tools/TlmViewer +14 -0
  298. data/test/performance/tools/TlmViewer.bat +59 -0
  299. data/test/performance/tools/mac/CmdExtractor.app/Contents/Info.plist +38 -0
  300. data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +15 -0
  301. data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/main.sh +6 -0
  302. data/test/performance/tools/mac/CmdExtractor.app/Contents/Resources/appIcon.icns +0 -0
  303. data/test/performance/tools/mac/CmdSender.app/Contents/Info.plist +38 -0
  304. data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +15 -0
  305. data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/main.sh +6 -0
  306. data/test/performance/tools/mac/CmdSender.app/Contents/Resources/appIcon.icns +0 -0
  307. data/test/performance/tools/mac/CmdTlmServer.app/Contents/Info.plist +38 -0
  308. data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +15 -0
  309. data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/main.sh +6 -0
  310. data/test/performance/tools/mac/CmdTlmServer.app/Contents/Resources/appIcon.icns +0 -0
  311. data/test/performance/tools/mac/DataViewer.app/Contents/Info.plist +38 -0
  312. data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +15 -0
  313. data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/main.sh +6 -0
  314. data/test/performance/tools/mac/DataViewer.app/Contents/Resources/appIcon.icns +0 -0
  315. data/test/performance/tools/mac/HandbookCreator.app/Contents/Info.plist +38 -0
  316. data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +15 -0
  317. data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/main.sh +6 -0
  318. data/test/performance/tools/mac/HandbookCreator.app/Contents/Resources/appIcon.icns +0 -0
  319. data/test/performance/tools/mac/Launcher.app/Contents/Info.plist +38 -0
  320. data/test/performance/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +15 -0
  321. data/test/performance/tools/mac/Launcher.app/Contents/MacOS/main.sh +6 -0
  322. data/test/performance/tools/mac/Launcher.app/Contents/Resources/appIcon.icns +0 -0
  323. data/test/performance/tools/mac/LimitsMonitor.app/Contents/Info.plist +38 -0
  324. data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +15 -0
  325. data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/main.sh +6 -0
  326. data/test/performance/tools/mac/LimitsMonitor.app/Contents/Resources/appIcon.icns +0 -0
  327. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Info.plist +38 -0
  328. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +15 -0
  329. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh +6 -0
  330. data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Resources/appIcon.icns +0 -0
  331. data/test/performance/tools/mac/PacketViewer.app/Contents/Info.plist +38 -0
  332. data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +15 -0
  333. data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/main.sh +6 -0
  334. data/test/performance/tools/mac/PacketViewer.app/Contents/Resources/appIcon.icns +0 -0
  335. data/test/performance/tools/mac/Replay.app/Contents/Info.plist +38 -0
  336. data/test/performance/tools/mac/Replay.app/Contents/MacOS/Replay.rb +15 -0
  337. data/test/performance/tools/mac/Replay.app/Contents/MacOS/main.sh +6 -0
  338. data/test/performance/tools/mac/Replay.app/Contents/Resources/appIcon.icns +0 -0
  339. data/test/performance/tools/mac/ScriptRunner.app/Contents/Info.plist +38 -0
  340. data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +15 -0
  341. data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/main.sh +6 -0
  342. data/test/performance/tools/mac/ScriptRunner.app/Contents/Resources/appIcon.icns +0 -0
  343. data/test/performance/tools/mac/TableManager.app/Contents/Info.plist +38 -0
  344. data/test/performance/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +15 -0
  345. data/test/performance/tools/mac/TableManager.app/Contents/MacOS/main.sh +6 -0
  346. data/test/performance/tools/mac/TableManager.app/Contents/Resources/appIcon.icns +0 -0
  347. data/test/performance/tools/mac/TestRunner.app/Contents/Info.plist +38 -0
  348. data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +15 -0
  349. data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/main.sh +6 -0
  350. data/test/performance/tools/mac/TestRunner.app/Contents/Resources/appIcon.icns +0 -0
  351. data/test/performance/tools/mac/TlmExtractor.app/Contents/Info.plist +38 -0
  352. data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +15 -0
  353. data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/main.sh +6 -0
  354. data/test/performance/tools/mac/TlmExtractor.app/Contents/Resources/appIcon.icns +0 -0
  355. data/test/performance/tools/mac/TlmGrapher.app/Contents/Info.plist +38 -0
  356. data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +15 -0
  357. data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/main.sh +6 -0
  358. data/test/performance/tools/mac/TlmGrapher.app/Contents/Resources/appIcon.icns +0 -0
  359. data/test/performance/tools/mac/TlmViewer.app/Contents/Info.plist +38 -0
  360. data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +15 -0
  361. data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/main.sh +6 -0
  362. data/test/performance/tools/mac/TlmViewer.app/Contents/Resources/appIcon.icns +0 -0
  363. data/test/performance/userpath.txt +1 -0
  364. metadata +197 -2
@@ -22,7 +22,7 @@ module Cosmos
22
22
  @pc = PacketConfig.new
23
23
  end
24
24
 
25
- it "should complain about unknown keywords" do
25
+ it "complains about unknown keywords" do
26
26
  tf = Tempfile.new('unittest')
27
27
  tf.puts("BLAH")
28
28
  tf.close
@@ -40,7 +40,7 @@ module Cosmos
40
40
  @item_keywords = %w(STATE READ_CONVERSION WRITE_CONVERSION POLY_READ_CONVERSION POLY_WRITE_CONVERSION SEG_POLY_READ_CONVERSION SEG_POLY_WRITE_CONVERSION GENERIC_READ_CONVERSION_START GENERIC_WRITE_CONVERSION_START LIMITS LIMITS_RESPONSE UNITS FORMAT_STRING DESCRIPTION META)
41
41
  end
42
42
 
43
- it "should complain if a current packet is not defined" do
43
+ it "complains if a current packet is not defined" do
44
44
  # Check for missing TELEMETRY line
45
45
  @tlm_keywords.each do |keyword|
46
46
  tf = Tempfile.new('unittest')
@@ -51,7 +51,7 @@ module Cosmos
51
51
  end # end for each tlm_keywords
52
52
  end
53
53
 
54
- it "should complain if a current item is not defined" do
54
+ it "complains if a current item is not defined" do
55
55
  # Check for missing ITEM definitions
56
56
  @item_keywords.each do |keyword|
57
57
  next if %w(META).include? keyword
@@ -64,7 +64,7 @@ module Cosmos
64
64
  end
65
65
  end
66
66
 
67
- it "should complain if there are not enough parameters" do
67
+ it "complains if there are not enough parameters" do
68
68
  @top_keywords.each do |keyword|
69
69
  tf = Tempfile.new('unittest')
70
70
  tf.puts(keyword)
@@ -94,7 +94,7 @@ module Cosmos
94
94
  end
95
95
  end
96
96
 
97
- it "should complain if there are too many parameters" do
97
+ it "complains if there are too many parameters" do
98
98
  @top_keywords.each do |keyword|
99
99
  tf = Tempfile.new('unittest')
100
100
  case keyword
@@ -164,7 +164,7 @@ module Cosmos
164
164
  end
165
165
 
166
166
  context "with SELECT_COMMAND or SELECT_TELEMETRY" do
167
- it "should complain if the packet is not found" do
167
+ it "complains if the packet is not found" do
168
168
  %w(SELECT_COMMAND SELECT_TELEMETRY).each do |keyword|
169
169
  tf = Tempfile.new('unittest')
170
170
  tf.puts keyword + ' tgt1 pkt1'
@@ -176,7 +176,7 @@ module Cosmos
176
176
  end
177
177
  end
178
178
 
179
- it "should select a packet for modification" do
179
+ it "selects a packet for modification" do
180
180
  %w(SELECT_COMMAND SELECT_TELEMETRY).each do |keyword|
181
181
  tf = Tempfile.new('unittest')
182
182
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Packet"'
@@ -187,7 +187,7 @@ module Cosmos
187
187
  @pc.process_file(tf.path, "TGT1")
188
188
  pkt = @pc.commands["TGT1"]["PKT1"] if keyword =~ /COMMAND/
189
189
  pkt = @pc.telemetry["TGT1"]["PKT1"] if keyword =~ /TELEMETRY/
190
- pkt.get_item("ITEM1").description.should eql "Item"
190
+ expect(pkt.get_item("ITEM1").description).to eql "Item"
191
191
  tf.unlink
192
192
 
193
193
  tf = Tempfile.new('unittest')
@@ -199,12 +199,12 @@ module Cosmos
199
199
  @pc.process_file(tf.path, "TGT1")
200
200
  pkt = @pc.commands["TGT1"]["PKT1"] if keyword =~ /COMMAND/
201
201
  pkt = @pc.telemetry["TGT1"]["PKT1"] if keyword =~ /TELEMETRY/
202
- pkt.get_item("ITEM1").description.should eql "New description"
202
+ expect(pkt.get_item("ITEM1").description).to eql "New description"
203
203
  tf.unlink
204
204
  end
205
205
  end
206
206
 
207
- it "should substitute the target name" do
207
+ it "substitutes the target name" do
208
208
  %w(SELECT_COMMAND SELECT_TELEMETRY).each do |keyword|
209
209
  tf = Tempfile.new('unittest')
210
210
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Packet"'
@@ -215,7 +215,7 @@ module Cosmos
215
215
  @pc.process_file(tf.path, "NEW")
216
216
  pkt = @pc.commands["NEW"]["PKT1"] if keyword =~ /COMMAND/
217
217
  pkt = @pc.telemetry["NEW"]["PKT1"] if keyword =~ /TELEMETRY/
218
- pkt.get_item("ITEM1").description.should eql "Item"
218
+ expect(pkt.get_item("ITEM1").description).to eql "Item"
219
219
  tf.unlink
220
220
 
221
221
  tf = Tempfile.new('unittest')
@@ -227,14 +227,14 @@ module Cosmos
227
227
  @pc.process_file(tf.path, "NEW")
228
228
  pkt = @pc.commands["NEW"]["PKT1"] if keyword =~ /COMMAND/
229
229
  pkt = @pc.telemetry["NEW"]["PKT1"] if keyword =~ /TELEMETRY/
230
- pkt.get_item("ITEM1").description.should eql "New description"
230
+ expect(pkt.get_item("ITEM1").description).to eql "New description"
231
231
  tf.unlink
232
232
  end
233
233
  end
234
234
  end
235
235
 
236
236
  context "with SELECT_PARAMETER" do
237
- it "should complain if used with SELECT_TELEMETRY" do
237
+ it "complains if used with SELECT_TELEMETRY" do
238
238
  tf = Tempfile.new('unittest')
239
239
  tf.puts 'TELEMETRY TGT PKT LITTLE_ENDIAN "Packet"'
240
240
  tf.puts ' APPEND_ITEM ITEM 16 UINT "Item"'
@@ -244,14 +244,14 @@ module Cosmos
244
244
  expect { @pc.process_file(tf.path, "TGT") }.to raise_error(ConfigParser::Error, "SELECT_PARAMETER only applies to command packets")
245
245
  end
246
246
 
247
- it "should complain if the parameter is not found" do
247
+ it "complains if the parameter is not found" do
248
248
  tf = Tempfile.new('unittest')
249
249
  tf.puts 'COMMAND TGT PKT LITTLE_ENDIAN "Packet"'
250
250
  tf.puts ' APPEND_PARAMETER PARAM 16 UINT 0 0 0 "Param"'
251
251
  tf.close
252
252
  @pc.process_file(tf.path, "TGT")
253
253
  pkt = @pc.commands["TGT"]["PKT"]
254
- pkt.get_item("PARAM").description.should eql "Param"
254
+ expect(pkt.get_item("PARAM").description).to eql "Param"
255
255
  tf.unlink
256
256
 
257
257
  tf = Tempfile.new('unittest')
@@ -264,7 +264,7 @@ module Cosmos
264
264
  end
265
265
 
266
266
  context "with SELECT_ITEM" do
267
- it "should complain if used with SELECT_COMMAND" do
267
+ it "complains if used with SELECT_COMMAND" do
268
268
  tf = Tempfile.new('unittest')
269
269
  tf.puts 'COMMAND TGT PKT LITTLE_ENDIAN "Packet"'
270
270
  tf.puts ' APPEND_PARAMETER PARAM 16 UINT 0 0 0 "Param"'
@@ -274,14 +274,14 @@ module Cosmos
274
274
  expect { @pc.process_file(tf.path, "TGT") }.to raise_error(ConfigParser::Error, "SELECT_ITEM only applies to telemetry packets")
275
275
  end
276
276
 
277
- it "should complain if the item is not found" do
277
+ it "complains if the item is not found" do
278
278
  tf = Tempfile.new('unittest')
279
279
  tf.puts 'TELEMETRY TGT PKT LITTLE_ENDIAN "Packet"'
280
280
  tf.puts ' APPEND_ITEM ITEM 16 UINT "Item"'
281
281
  tf.close
282
282
  @pc.process_file(tf.path, "TGT")
283
283
  pkt = @pc.telemetry["TGT"]["PKT"]
284
- pkt.get_item("ITEM").description.should eql "Item"
284
+ expect(pkt.get_item("ITEM").description).to eql "Item"
285
285
  tf.unlink
286
286
 
287
287
  tf = Tempfile.new('unittest')
@@ -313,27 +313,27 @@ module Cosmos
313
313
  end
314
314
 
315
315
  context "with LIMITS_GROUP" do
316
- it "should create a new limits group" do
316
+ it "creates a new limits group" do
317
317
  tf = Tempfile.new('unittest')
318
318
  tf.puts 'LIMITS_GROUP TVAC'
319
319
  tf.puts 'LIMITS_GROUP VIBE'
320
320
  tf.close
321
- @pc.limits_groups.should be_empty
321
+ expect(@pc.limits_groups).to be_empty
322
322
  @pc.process_file(tf.path, "TGT1")
323
- @pc.limits_groups.should include('TVAC','VIBE')
323
+ expect(@pc.limits_groups).to include('TVAC','VIBE')
324
324
  tf.unlink
325
325
  end
326
326
  end
327
327
 
328
328
  context "with LIMITS_ITEM" do
329
- it "should add a new limits item to the group" do
329
+ it "adds a new limits item to the group" do
330
330
  tf = Tempfile.new('unittest')
331
331
  tf.puts 'LIMITS_GROUP TVAC'
332
332
  tf.puts 'LIMITS_GROUP_ITEM TGT1 PKT1 ITEM1'
333
333
  tf.close
334
- @pc.limits_groups.should be_empty
334
+ expect(@pc.limits_groups).to be_empty
335
335
  @pc.process_file(tf.path, "TGT1")
336
- @pc.limits_groups["TVAC"].should eql [%w(TGT1 PKT1 ITEM1)]
336
+ expect(@pc.limits_groups["TVAC"]).to eql [%w(TGT1 PKT1 ITEM1)]
337
337
  tf.unlink
338
338
 
339
339
  # Show we can 're-open' the group and add items
@@ -342,27 +342,27 @@ module Cosmos
342
342
  tf.puts 'LIMITS_GROUP_ITEM TGT1 PKT1 ITEM2'
343
343
  tf.close
344
344
  @pc.process_file(tf.path, "TGT1")
345
- @pc.limits_groups["TVAC"].should eql [%w(TGT1 PKT1 ITEM1), %w(TGT1 PKT1 ITEM2)]
345
+ expect(@pc.limits_groups["TVAC"]).to eql [%w(TGT1 PKT1 ITEM1), %w(TGT1 PKT1 ITEM2)]
346
346
  tf.unlink
347
347
  end
348
348
  end
349
349
 
350
350
  context "with ALLOW_SHORT" do
351
- it "should mark the packet as allowing short buffers" do
351
+ it "marks the packet as allowing short buffers" do
352
352
  tf = Tempfile.new('unittest')
353
353
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Description"'
354
354
  tf.puts 'ALLOW_SHORT'
355
355
  tf.puts 'TELEMETRY tgt1 pkt2 LITTLE_ENDIAN "Description"'
356
356
  tf.close
357
357
  @pc.process_file(tf.path, "TGT1")
358
- @pc.telemetry["TGT1"]["PKT1"].short_buffer_allowed.should be_truthy
359
- @pc.telemetry["TGT1"]["PKT2"].short_buffer_allowed.should be_falsey
358
+ expect(@pc.telemetry["TGT1"]["PKT1"].short_buffer_allowed).to be_truthy
359
+ expect(@pc.telemetry["TGT1"]["PKT2"].short_buffer_allowed).to be_falsey
360
360
  tf.unlink
361
361
  end
362
362
  end
363
363
 
364
364
  context "with META" do
365
- it "should save metadata" do
365
+ it "saves metadata" do
366
366
  tf = Tempfile.new('unittest')
367
367
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Description"'
368
368
  tf.puts 'META TYPE "struct packet"'
@@ -370,60 +370,60 @@ module Cosmos
370
370
  tf.puts 'META TYPE "struct packet2"'
371
371
  tf.close
372
372
  @pc.process_file(tf.path, "TGT1")
373
- @pc.telemetry["TGT1"]["PKT1"].meta['TYPE'].should eql ["struct packet"]
374
- @pc.telemetry["TGT1"]["PKT2"].meta['TYPE'].should eql ["struct packet2"]
373
+ expect(@pc.telemetry["TGT1"]["PKT1"].meta['TYPE']).to eql ["struct packet"]
374
+ expect(@pc.telemetry["TGT1"]["PKT2"].meta['TYPE']).to eql ["struct packet2"]
375
375
  tf.unlink
376
376
  end
377
377
  end
378
378
 
379
379
  context "with DISABLE_MESSAGES" do
380
- it "should mark the packet as messages disabled" do
380
+ it "marks the packet as messages disabled" do
381
381
  tf = Tempfile.new('unittest')
382
382
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Description"'
383
383
  tf.puts 'DISABLE_MESSAGES'
384
384
  tf.puts 'COMMAND tgt1 pkt2 LITTLE_ENDIAN "Description"'
385
385
  tf.close
386
386
  @pc.process_file(tf.path, "TGT1")
387
- @pc.commands["TGT1"]["PKT1"].messages_disabled.should be_truthy
388
- @pc.commands["TGT1"]["PKT2"].messages_disabled.should be_falsey
387
+ expect(@pc.commands["TGT1"]["PKT1"].messages_disabled).to be_truthy
388
+ expect(@pc.commands["TGT1"]["PKT2"].messages_disabled).to be_falsey
389
389
  tf.unlink
390
390
  end
391
391
  end
392
392
 
393
393
  context "with HIDDEN" do
394
- it "should mark the packet as hidden" do
394
+ it "marks the packet as hidden" do
395
395
  tf = Tempfile.new('unittest')
396
396
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Description"'
397
397
  tf.puts 'HIDDEN'
398
398
  tf.puts 'COMMAND tgt1 pkt2 LITTLE_ENDIAN "Description"'
399
399
  tf.close
400
400
  @pc.process_file(tf.path, "TGT1")
401
- @pc.commands["TGT1"]["PKT1"].hidden.should be_truthy
402
- @pc.commands["TGT1"]["PKT1"].disabled.should be_falsey
403
- @pc.commands["TGT1"]["PKT2"].hidden.should be_falsey
404
- @pc.commands["TGT1"]["PKT2"].disabled.should be_falsey
401
+ expect(@pc.commands["TGT1"]["PKT1"].hidden).to be_truthy
402
+ expect(@pc.commands["TGT1"]["PKT1"].disabled).to be_falsey
403
+ expect(@pc.commands["TGT1"]["PKT2"].hidden).to be_falsey
404
+ expect(@pc.commands["TGT1"]["PKT2"].disabled).to be_falsey
405
405
  tf.unlink
406
406
  end
407
407
  end
408
408
 
409
409
  context "with DISABLED" do
410
- it "should mark the packet as disabled" do
410
+ it "marks the packet as disabled" do
411
411
  tf = Tempfile.new('unittest')
412
412
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Description"'
413
413
  tf.puts 'DISABLED'
414
414
  tf.puts 'COMMAND tgt1 pkt2 LITTLE_ENDIAN "Description"'
415
415
  tf.close
416
416
  @pc.process_file(tf.path, "TGT1")
417
- @pc.commands["TGT1"]["PKT1"].hidden.should be_truthy
418
- @pc.commands["TGT1"]["PKT1"].disabled.should be_truthy
419
- @pc.commands["TGT1"]["PKT2"].hidden.should be_falsey
420
- @pc.commands["TGT1"]["PKT2"].disabled.should be_falsey
417
+ expect(@pc.commands["TGT1"]["PKT1"].hidden).to be_truthy
418
+ expect(@pc.commands["TGT1"]["PKT1"].disabled).to be_truthy
419
+ expect(@pc.commands["TGT1"]["PKT2"].hidden).to be_falsey
420
+ expect(@pc.commands["TGT1"]["PKT2"].disabled).to be_falsey
421
421
  tf.unlink
422
422
  end
423
423
  end
424
424
 
425
425
  context "with HAZARDOUS" do
426
- it "should mark the packet as hazardous" do
426
+ it "marks the packet as hazardous" do
427
427
  tf = Tempfile.new('unittest')
428
428
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Description"'
429
429
  tf.puts 'HAZARDOUS'
@@ -433,27 +433,27 @@ module Cosmos
433
433
  tf.puts 'COMMAND tgt2 pkt2 LITTLE_ENDIAN "Description"'
434
434
  tf.close
435
435
  @pc.process_file(tf.path, "SYSTEM")
436
- @pc.telemetry["TGT1"]["PKT1"].hazardous.should be_truthy
437
- @pc.telemetry["TGT1"]["PKT2"].hazardous.should be_falsey
438
- @pc.commands["TGT2"]["PKT1"].hazardous.should be_truthy
439
- @pc.commands["TGT2"]["PKT2"].hazardous.should be_falsey
436
+ expect(@pc.telemetry["TGT1"]["PKT1"].hazardous).to be_truthy
437
+ expect(@pc.telemetry["TGT1"]["PKT2"].hazardous).to be_falsey
438
+ expect(@pc.commands["TGT2"]["PKT1"].hazardous).to be_truthy
439
+ expect(@pc.commands["TGT2"]["PKT2"].hazardous).to be_falsey
440
440
  tf.unlink
441
441
  end
442
442
 
443
- it "should take a description" do
443
+ it "takes a description" do
444
444
  tf = Tempfile.new('unittest')
445
445
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Description"'
446
446
  tf.puts 'HAZARDOUS "Hazardous description"'
447
447
  tf.close
448
448
  @pc.process_file(tf.path, "TGT1")
449
- @pc.commands["TGT1"]["PKT1"].hazardous.should be_truthy
450
- @pc.commands["TGT1"]["PKT1"].hazardous_description.should eql "Hazardous description"
449
+ expect(@pc.commands["TGT1"]["PKT1"].hazardous).to be_truthy
450
+ expect(@pc.commands["TGT1"]["PKT1"].hazardous_description).to eql "Hazardous description"
451
451
  tf.unlink
452
452
  end
453
453
  end
454
454
 
455
455
  context "with READ_CONVERSION and WRITE_CONVERSION" do
456
- it "should complain about missing conversion file" do
456
+ it "complains about missing conversion file" do
457
457
  filename = File.join(File.dirname(__FILE__), "../test_only.rb")
458
458
  File.delete(filename) if File.exist?(filename)
459
459
  @pc = PacketConfig.new
@@ -475,7 +475,7 @@ module Cosmos
475
475
  tf.unlink
476
476
  end
477
477
 
478
- it "should complain about a non Cosmos::Conversion class" do
478
+ it "complains about a non Cosmos::Conversion class" do
479
479
  filename = File.join(File.dirname(__FILE__), "../conversion1.rb")
480
480
  File.open(filename, 'w') do |file|
481
481
  file.puts "class Conversion1"
@@ -503,7 +503,7 @@ module Cosmos
503
503
  tf.unlink
504
504
  end
505
505
 
506
- it "should parse the conversion" do
506
+ it "parses the conversion" do
507
507
  filename = File.join(File.dirname(__FILE__), "../conversion2.rb")
508
508
  File.open(filename, 'w') do |file|
509
509
  file.puts "require 'cosmos/conversions/conversion'"
@@ -522,7 +522,7 @@ module Cosmos
522
522
  tf.close
523
523
  @pc.process_file(tf.path, "TGT1")
524
524
  @pc.telemetry["TGT1"]["PKT1"].buffer = "\x01"
525
- @pc.telemetry["TGT1"]["PKT1"].read("ITEM1").should eql 2
525
+ expect(@pc.telemetry["TGT1"]["PKT1"].read("ITEM1")).to eql 2
526
526
  tf.unlink
527
527
 
528
528
  tf = Tempfile.new('unittest')
@@ -532,7 +532,7 @@ module Cosmos
532
532
  tf.close
533
533
  @pc.process_file(tf.path, "TGT1")
534
534
  @pc.commands["TGT1"]["PKT1"].write("ITEM1", 3)
535
- @pc.commands["TGT1"]["PKT1"].read("ITEM1").should eql 6
535
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM1")).to eql 6
536
536
  tf.unlink
537
537
 
538
538
  File.delete(filename) if File.exist?(filename)
@@ -540,7 +540,7 @@ module Cosmos
540
540
  end
541
541
 
542
542
  context "with POLY_READ_CONVERSION and POLY_WRITE_CONVERSION" do
543
- it "should perform a polynomial conversion" do
543
+ it "performs a polynomial conversion" do
544
544
  tf = Tempfile.new('unittest')
545
545
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
546
546
  tf.puts ' ITEM item1 0 16 INT "Integer Item"'
@@ -548,7 +548,7 @@ module Cosmos
548
548
  tf.close
549
549
  @pc.process_file(tf.path, "TGT1")
550
550
  @pc.telemetry["TGT1"]["PKT1"].buffer = "\x01"
551
- @pc.telemetry["TGT1"]["PKT1"].read("ITEM1").should eql 7.0
551
+ expect(@pc.telemetry["TGT1"]["PKT1"].read("ITEM1")).to eql 7.0
552
552
  tf.unlink
553
553
 
554
554
  tf = Tempfile.new('unittest')
@@ -558,13 +558,13 @@ module Cosmos
558
558
  tf.close
559
559
  @pc.process_file(tf.path, "TGT1")
560
560
  @pc.commands["TGT1"]["PKT1"].write("ITEM1", 3)
561
- @pc.commands["TGT1"]["PKT1"].read("ITEM1").should eql 11
561
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM1")).to eql 11
562
562
  tf.unlink
563
563
  end
564
564
  end
565
565
 
566
566
  context "with SEG_POLY_READ_CONVERSION and SEG_POLY_WRITE_CONVERSION" do
567
- it "should perform a segmented polynomial conversion" do
567
+ it "performs a segmented polynomial conversion" do
568
568
  tf = Tempfile.new('unittest')
569
569
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
570
570
  tf.puts ' ITEM item1 0 16 INT "Integer Item"'
@@ -573,9 +573,9 @@ module Cosmos
573
573
  tf.close
574
574
  @pc.process_file(tf.path, "TGT1")
575
575
  @pc.telemetry["TGT1"]["PKT1"].buffer = "\x01"
576
- @pc.telemetry["TGT1"]["PKT1"].read("ITEM1").should eql 3.0
576
+ expect(@pc.telemetry["TGT1"]["PKT1"].read("ITEM1")).to eql 3.0
577
577
  @pc.telemetry["TGT1"]["PKT1"].buffer = "\x05"
578
- @pc.telemetry["TGT1"]["PKT1"].read("ITEM1").should eql 17.0
578
+ expect(@pc.telemetry["TGT1"]["PKT1"].read("ITEM1")).to eql 17.0
579
579
  tf.unlink
580
580
 
581
581
  tf = Tempfile.new('unittest')
@@ -586,15 +586,15 @@ module Cosmos
586
586
  tf.close
587
587
  @pc.process_file(tf.path, "TGT1")
588
588
  @pc.commands["TGT1"]["PKT1"].write("ITEM1", 1)
589
- @pc.commands["TGT1"]["PKT1"].read("ITEM1").should eql 3
589
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM1")).to eql 3
590
590
  @pc.commands["TGT1"]["PKT1"].write("ITEM1", 5)
591
- @pc.commands["TGT1"]["PKT1"].read("ITEM1").should eql 17
591
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM1")).to eql 17
592
592
  tf.unlink
593
593
  end
594
594
  end
595
595
 
596
596
  context "with GENERIC_READ_CONVERSION and GENERIC_WRITE_CONVERSION" do
597
- it "should process a generic conversion" do
597
+ it "processes a generic conversion" do
598
598
  tf = Tempfile.new('unittest')
599
599
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
600
600
  tf.puts ' APPEND_ITEM item1 16 UINT "Item"'
@@ -610,12 +610,12 @@ module Cosmos
610
610
  pkt = @pc.telemetry["TGT1"]["PKT1"]
611
611
  pkt.enable_method_missing
612
612
  pkt.item1 = 2
613
- pkt.item1.should eql 4
614
- pkt.item2.should eql "Number 0"
613
+ expect(pkt.item1).to eql 4
614
+ expect(pkt.item2).to eql "Number 0"
615
615
  tf.unlink
616
616
  end
617
617
 
618
- it "should process a generic conversion with a defined type" do
618
+ it "processes a generic conversion with a defined type" do
619
619
  tf = Tempfile.new('unittest')
620
620
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
621
621
  tf.puts ' APPEND_ITEM item1 16 UINT "Item"'
@@ -631,9 +631,9 @@ module Cosmos
631
631
  pkt = @pc.telemetry["TGT1"]["PKT1"]
632
632
  pkt.enable_method_missing
633
633
  pkt.item1 = 400
634
- pkt.item1.should eql 800
634
+ expect(pkt.item1).to eql 800
635
635
  pkt.item2 = 400
636
- pkt.item2.should eql 800.0
636
+ expect(pkt.item2).to eql 800.0
637
637
  tf.unlink
638
638
  end
639
639
  end
@@ -654,7 +654,7 @@ module Cosmos
654
654
  @pc.telemetry["TGT1"]["PKT1"].buffer = "\x04"
655
655
  @pc.telemetry["TGT1"]["PKT1"].enable_limits("ITEM1")
656
656
  @pc.telemetry["TGT1"]["PKT1"].check_limits
657
- item.limits.state.should eql :RED_LOW
657
+ expect(item.limits.state).to eql :RED_LOW
658
658
  tf.unlink
659
659
  end
660
660
  end
@@ -667,13 +667,13 @@ module Cosmos
667
667
  tf.puts ' UNITS Volts V'
668
668
  tf.close
669
669
  @pc.process_file(tf.path, "TGT1")
670
- @pc.telemetry["TGT1"]["PKT1"].read("ITEM1",:WITH_UNITS).should eql "0 V"
670
+ expect(@pc.telemetry["TGT1"]["PKT1"].read("ITEM1",:WITH_UNITS)).to eql "0 V"
671
671
  tf.unlink
672
672
  end
673
673
  end
674
674
 
675
675
  context "with META" do
676
- it "should save metadata for items" do
676
+ it "saves metadata for items" do
677
677
  tf = Tempfile.new('unittest')
678
678
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
679
679
  tf.puts ' ITEM item1 0 8 UINT'
@@ -681,14 +681,14 @@ module Cosmos
681
681
  tf.puts ' META OTHER'
682
682
  tf.close
683
683
  @pc.process_file(tf.path, "TGT1")
684
- @pc.telemetry["TGT1"]["PKT1"].get_item('item1').meta['TYPE'].should eql ['unsigned int']
685
- @pc.telemetry["TGT1"]["PKT1"].get_item('item1').meta['OTHER'].should eql []
684
+ expect(@pc.telemetry["TGT1"]["PKT1"].get_item('item1').meta['TYPE']).to eql ['unsigned int']
685
+ expect(@pc.telemetry["TGT1"]["PKT1"].get_item('item1').meta['OTHER']).to eql []
686
686
  tf.unlink
687
687
  end
688
688
  end
689
689
 
690
690
  context "with OVERFLOW" do
691
- it "should set the overflow type for items" do
691
+ it "sets the overflow type for items" do
692
692
  tf = Tempfile.new('unittest')
693
693
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
694
694
  tf.puts ' ITEM item1 0 8 UINT'
@@ -701,16 +701,16 @@ module Cosmos
701
701
  tf.puts ' OVERFLOW ERROR_ALLOW_HEX'
702
702
  tf.close
703
703
  @pc.process_file(tf.path, "TGT1")
704
- @pc.telemetry["TGT1"]["PKT1"].get_item('item1').overflow.should eql :TRUNCATE
705
- @pc.telemetry["TGT1"]["PKT1"].get_item('item2').overflow.should eql :SATURATE
706
- @pc.telemetry["TGT1"]["PKT1"].get_item('item3').overflow.should eql :ERROR
707
- @pc.telemetry["TGT1"]["PKT1"].get_item('item4').overflow.should eql :ERROR_ALLOW_HEX
704
+ expect(@pc.telemetry["TGT1"]["PKT1"].get_item('item1').overflow).to eql :TRUNCATE
705
+ expect(@pc.telemetry["TGT1"]["PKT1"].get_item('item2').overflow).to eql :SATURATE
706
+ expect(@pc.telemetry["TGT1"]["PKT1"].get_item('item3').overflow).to eql :ERROR
707
+ expect(@pc.telemetry["TGT1"]["PKT1"].get_item('item4').overflow).to eql :ERROR_ALLOW_HEX
708
708
  tf.unlink
709
709
  end
710
710
  end
711
711
 
712
712
  context "with REQUIRED" do
713
- it "should only apply to a command parameter" do
713
+ it "only applies to a command parameter" do
714
714
  tf = Tempfile.new('unittest')
715
715
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
716
716
  tf.puts ' ITEM item1 0 8 UINT'
@@ -727,7 +727,7 @@ module Cosmos
727
727
  tf.unlink
728
728
  end
729
729
 
730
- it "should mark a command parameter as required" do
730
+ it "marks a command parameter as required" do
731
731
  tf = Tempfile.new('unittest')
732
732
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Packet"'
733
733
  tf.puts ' PARAMETER item1 0 8 UINT 0 1 1'
@@ -735,14 +735,14 @@ module Cosmos
735
735
  tf.puts ' PARAMETER item2 0 8 UINT 0 1 1'
736
736
  tf.close
737
737
  @pc.process_file(tf.path, "TGT1")
738
- @pc.commands["TGT1"]["PKT1"].items["ITEM1"].required.should be_truthy
739
- @pc.commands["TGT1"]["PKT1"].items["ITEM2"].required.should be_falsey
738
+ expect(@pc.commands["TGT1"]["PKT1"].items["ITEM1"].required).to be_truthy
739
+ expect(@pc.commands["TGT1"]["PKT1"].items["ITEM2"].required).to be_falsey
740
740
  tf.unlink
741
741
  end
742
742
  end
743
743
 
744
744
  context "with MINIMUM_VALUE, MAXIMUM_VALUE, DEFAULT_VALUE" do
745
- it "should complain if used on telemetry items" do
745
+ it "complains if used on telemetry items" do
746
746
  tf = Tempfile.new('unittest')
747
747
  tf.puts 'TELEMETRY tgt1 pkt1 LITTLE_ENDIAN "Packet"'
748
748
  tf.puts ' APPEND_ITEM item1 16 UINT'
@@ -768,7 +768,7 @@ module Cosmos
768
768
  tf.unlink
769
769
  end
770
770
 
771
- it "should allow overriding the defined value" do
771
+ it "allows overriding the defined value" do
772
772
  tf = Tempfile.new('unittest')
773
773
  tf.puts 'COMMAND tgt1 pkt1 LITTLE_ENDIAN "Packet"'
774
774
  tf.puts ' APPEND_PARAMETER item1 16 UINT 0 1 1'
@@ -776,9 +776,9 @@ module Cosmos
776
776
  tf.close
777
777
  @pc.process_file(tf.path, "TGT1")
778
778
  @pc.commands["TGT1"]["PKT1"].restore_defaults
779
- @pc.commands["TGT1"]["PKT1"].read("ITEM1").should eql 1
780
- @pc.commands["TGT1"]["PKT1"].items["ITEM1"].range.should eql (0..1)
781
- @pc.commands["TGT1"]["PKT1"].read("ITEM2").should eql "HI"
779
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM1")).to eql 1
780
+ expect(@pc.commands["TGT1"]["PKT1"].items["ITEM1"].range).to eql (0..1)
781
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM2")).to eql "HI"
782
782
  tf.unlink
783
783
 
784
784
  # Now override the values from above
@@ -793,9 +793,9 @@ module Cosmos
793
793
  tf.close
794
794
  @pc.process_file(tf.path, "TGT1")
795
795
  @pc.commands["TGT1"]["PKT1"].restore_defaults
796
- @pc.commands["TGT1"]["PKT1"].read("ITEM1").should eql 2
797
- @pc.commands["TGT1"]["PKT1"].items["ITEM1"].range.should eql (1..3)
798
- @pc.commands["TGT1"]["PKT1"].read("ITEM2").should eql "NO"
796
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM1")).to eql 2
797
+ expect(@pc.commands["TGT1"]["PKT1"].items["ITEM1"].range).to eql (1..3)
798
+ expect(@pc.commands["TGT1"]["PKT1"].read("ITEM2")).to eql "NO"
799
799
  tf.unlink
800
800
  end
801
801
  end