cosmos 3.4.2 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +69 -11
  3. data/autohotkey/config/targets/INST/cmd_tlm/inst_tlm.txt +23 -0
  4. data/autohotkey/tools/TestRunnerAHK5 +17 -0
  5. data/autohotkey/tools/TestRunnerAHK6 +17 -0
  6. data/autohotkey/tools/cmd_extractor.ahk +6 -0
  7. data/autohotkey/tools/data_viewer.ahk +6 -0
  8. data/autohotkey/tools/limits_monitor.ahk +67 -14
  9. data/autohotkey/tools/replay.ahk +6 -0
  10. data/autohotkey/tools/test_runner5.ahk +8 -0
  11. data/autohotkey/tools/test_runner6.ahk +5 -0
  12. data/autohotkey/tools/tlm_extractor.ahk +25 -1
  13. data/autohotkey/tools/tlm_grapher.ahk +6 -0
  14. data/cosmos.gemspec +19 -19
  15. data/data/crc.txt +46 -46
  16. data/data/critical.wav +0 -0
  17. data/data/information.wav +0 -0
  18. data/data/input.wav +0 -0
  19. data/data/message.wav +0 -0
  20. data/data/question.wav +0 -0
  21. data/data/warning.wav +0 -0
  22. data/demo/Gemfile +5 -1
  23. data/demo/Launcher +5 -4
  24. data/demo/Launcher.bat +6 -56
  25. data/demo/config/data/crc.txt +73 -55
  26. data/demo/config/system/system.txt +1 -0
  27. data/demo/config/targets/EXAMPLE/cmd_tlm/example_tlm.txt +2 -0
  28. data/demo/procedures/example_test.rb +17 -16
  29. data/demo/tools/CmdExtractor +6 -5
  30. data/demo/tools/CmdExtractor.bat +6 -56
  31. data/demo/tools/CmdSender +6 -5
  32. data/demo/tools/CmdSender.bat +6 -56
  33. data/demo/tools/CmdTlmServer +6 -5
  34. data/demo/tools/CmdTlmServer.bat +6 -56
  35. data/demo/tools/DataViewer +6 -5
  36. data/demo/tools/DataViewer.bat +6 -56
  37. data/demo/tools/ExampleTarget +6 -5
  38. data/demo/tools/ExampleTarget.bat +6 -56
  39. data/demo/tools/HandbookCreator +6 -5
  40. data/demo/tools/HandbookCreator.bat +6 -58
  41. data/demo/tools/Launcher +6 -5
  42. data/demo/tools/Launcher.bat +6 -56
  43. data/demo/tools/LimitsMonitor +6 -5
  44. data/demo/tools/LimitsMonitor.bat +6 -56
  45. data/demo/tools/OpenGLBuilder +6 -5
  46. data/demo/tools/OpenGLBuilder.bat +6 -56
  47. data/demo/tools/PacketViewer +6 -5
  48. data/demo/tools/PacketViewer.bat +6 -56
  49. data/demo/tools/Replay +6 -5
  50. data/demo/tools/Replay.bat +6 -56
  51. data/demo/tools/ScpiTarget +6 -5
  52. data/demo/tools/ScpiTarget.bat +6 -56
  53. data/demo/tools/ScriptRunner +6 -5
  54. data/demo/tools/ScriptRunner.bat +6 -56
  55. data/demo/tools/TableManager +6 -5
  56. data/demo/tools/TableManager.bat +6 -56
  57. data/demo/tools/TestRunner +6 -5
  58. data/demo/tools/TestRunner.bat +6 -56
  59. data/demo/tools/TlmExtractor +6 -5
  60. data/demo/tools/TlmExtractor.bat +6 -56
  61. data/demo/tools/TlmGrapher +6 -5
  62. data/demo/tools/TlmGrapher.bat +6 -56
  63. data/demo/tools/TlmViewer +6 -5
  64. data/demo/tools/TlmViewer.bat +6 -56
  65. data/demo/tools/ToolLaunch.bat +63 -0
  66. data/demo/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +6 -5
  67. data/demo/tools/mac/CmdExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
  68. data/demo/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +6 -5
  69. data/demo/tools/mac/CmdSender.app/Contents/MacOS/tool_launch.rb +38 -0
  70. data/demo/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +6 -5
  71. data/demo/tools/mac/CmdTlmServer.app/Contents/MacOS/tool_launch.rb +38 -0
  72. data/demo/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +6 -5
  73. data/demo/tools/mac/DataViewer.app/Contents/MacOS/tool_launch.rb +38 -0
  74. data/demo/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +6 -5
  75. data/demo/tools/mac/HandbookCreator.app/Contents/MacOS/tool_launch.rb +38 -0
  76. data/demo/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +6 -5
  77. data/demo/tools/mac/Launcher.app/Contents/MacOS/tool_launch.rb +38 -0
  78. data/demo/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +6 -5
  79. data/demo/tools/mac/LimitsMonitor.app/Contents/MacOS/tool_launch.rb +38 -0
  80. data/demo/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +6 -5
  81. data/demo/tools/mac/OpenGLBuilder.app/Contents/MacOS/tool_launch.rb +38 -0
  82. data/demo/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +6 -5
  83. data/demo/tools/mac/PacketViewer.app/Contents/MacOS/tool_launch.rb +38 -0
  84. data/demo/tools/mac/Replay.app/Contents/MacOS/Replay.rb +6 -5
  85. data/demo/tools/mac/Replay.app/Contents/MacOS/tool_launch.rb +38 -0
  86. data/demo/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +6 -5
  87. data/demo/tools/mac/ScriptRunner.app/Contents/MacOS/tool_launch.rb +38 -0
  88. data/demo/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +6 -5
  89. data/demo/tools/mac/TableManager.app/Contents/MacOS/tool_launch.rb +38 -0
  90. data/demo/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +6 -5
  91. data/demo/tools/mac/TestRunner.app/Contents/MacOS/tool_launch.rb +38 -0
  92. data/demo/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +6 -5
  93. data/demo/tools/mac/TlmExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
  94. data/demo/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +6 -5
  95. data/demo/tools/mac/TlmGrapher.app/Contents/MacOS/tool_launch.rb +38 -0
  96. data/demo/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +6 -5
  97. data/demo/tools/mac/TlmViewer.app/Contents/MacOS/tool_launch.rb +38 -0
  98. data/demo/tools/tool_launch.rb +38 -0
  99. data/install/Gemfile +5 -1
  100. data/install/Launcher +5 -3
  101. data/install/Launcher.bat +6 -56
  102. data/install/config/data/crc.txt +67 -49
  103. data/install/config/tools/launcher/launcher.txt +1 -0
  104. data/install/tools/CmdExtractor +6 -5
  105. data/install/tools/CmdExtractor.bat +6 -56
  106. data/install/tools/CmdSender +6 -5
  107. data/install/tools/CmdSender.bat +6 -56
  108. data/install/tools/CmdTlmServer +6 -5
  109. data/install/tools/CmdTlmServer.bat +6 -56
  110. data/install/tools/DataViewer +6 -5
  111. data/install/tools/DataViewer.bat +6 -56
  112. data/install/tools/HandbookCreator +6 -5
  113. data/install/tools/HandbookCreator.bat +6 -58
  114. data/install/tools/Launcher +6 -5
  115. data/install/tools/Launcher.bat +6 -56
  116. data/install/tools/LimitsMonitor +6 -5
  117. data/install/tools/LimitsMonitor.bat +6 -56
  118. data/install/tools/OpenGLBuilder +6 -5
  119. data/install/tools/OpenGLBuilder.bat +6 -56
  120. data/install/tools/PacketViewer +6 -5
  121. data/install/tools/PacketViewer.bat +6 -56
  122. data/install/tools/Replay +6 -5
  123. data/install/tools/Replay.bat +6 -56
  124. data/install/tools/ScriptRunner +6 -5
  125. data/install/tools/ScriptRunner.bat +6 -56
  126. data/install/tools/TableManager +6 -5
  127. data/install/tools/TableManager.bat +6 -56
  128. data/install/tools/TestRunner +6 -5
  129. data/install/tools/TestRunner.bat +6 -56
  130. data/install/tools/TlmExtractor +6 -5
  131. data/install/tools/TlmExtractor.bat +6 -56
  132. data/install/tools/TlmGrapher +6 -5
  133. data/install/tools/TlmGrapher.bat +6 -56
  134. data/install/tools/TlmViewer +6 -5
  135. data/install/tools/TlmViewer.bat +6 -56
  136. data/install/tools/ToolLaunch.bat +63 -0
  137. data/install/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +6 -5
  138. data/install/tools/mac/CmdExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
  139. data/install/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +6 -5
  140. data/install/tools/mac/CmdSender.app/Contents/MacOS/tool_launch.rb +38 -0
  141. data/install/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +6 -5
  142. data/install/tools/mac/CmdTlmServer.app/Contents/MacOS/tool_launch.rb +38 -0
  143. data/install/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +6 -5
  144. data/install/tools/mac/DataViewer.app/Contents/MacOS/tool_launch.rb +38 -0
  145. data/install/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +6 -5
  146. data/install/tools/mac/HandbookCreator.app/Contents/MacOS/tool_launch.rb +38 -0
  147. data/install/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +6 -5
  148. data/install/tools/mac/Launcher.app/Contents/MacOS/tool_launch.rb +38 -0
  149. data/install/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +6 -5
  150. data/install/tools/mac/LimitsMonitor.app/Contents/MacOS/tool_launch.rb +38 -0
  151. data/install/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +6 -5
  152. data/install/tools/mac/OpenGLBuilder.app/Contents/MacOS/tool_launch.rb +38 -0
  153. data/install/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +6 -5
  154. data/install/tools/mac/PacketViewer.app/Contents/MacOS/tool_launch.rb +38 -0
  155. data/install/tools/mac/Replay.app/Contents/MacOS/Replay.rb +6 -5
  156. data/install/tools/mac/Replay.app/Contents/MacOS/tool_launch.rb +38 -0
  157. data/install/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +6 -5
  158. data/install/tools/mac/ScriptRunner.app/Contents/MacOS/tool_launch.rb +38 -0
  159. data/install/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +6 -5
  160. data/install/tools/mac/TableManager.app/Contents/MacOS/tool_launch.rb +38 -0
  161. data/install/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +6 -5
  162. data/install/tools/mac/TestRunner.app/Contents/MacOS/tool_launch.rb +38 -0
  163. data/install/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +6 -5
  164. data/install/tools/mac/TlmExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
  165. data/install/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +6 -5
  166. data/install/tools/mac/TlmGrapher.app/Contents/MacOS/tool_launch.rb +38 -0
  167. data/install/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +6 -5
  168. data/install/tools/mac/TlmViewer.app/Contents/MacOS/tool_launch.rb +38 -0
  169. data/install/tools/tool_launch.rb +38 -0
  170. data/lib/cosmos/core_ext/string.rb +3 -2
  171. data/lib/cosmos/gui/dialogs/about_dialog.rb +3 -7
  172. data/lib/cosmos/gui/dialogs/find_replace_dialog.rb +200 -136
  173. data/lib/cosmos/gui/opengl/gl_viewer.rb +8 -8
  174. data/lib/cosmos/gui/qt.rb +56 -27
  175. data/lib/cosmos/gui/qt_tool.rb +3 -1
  176. data/lib/cosmos/gui/text/ruby_editor.rb +130 -110
  177. data/lib/cosmos/gui/utilities/script_module_gui.rb +150 -4
  178. data/lib/cosmos/io/json_drb.rb +1 -1
  179. data/lib/cosmos/io/win32_serial_driver.rb +2 -4
  180. data/lib/cosmos/packet_logs/ccsds_log_reader.rb +1 -0
  181. data/lib/cosmos/packet_logs/packet_log_reader.rb +13 -4
  182. data/lib/cosmos/packets/limits.rb +6 -3
  183. data/lib/cosmos/packets/telemetry.rb +34 -3
  184. data/lib/cosmos/processors/new_packet_log_processor.rb +1 -1
  185. data/lib/cosmos/script/commands.rb +20 -2
  186. data/lib/cosmos/script/extract.rb +11 -3
  187. data/lib/cosmos/script/limits.rb +6 -0
  188. data/lib/cosmos/script/scripting.rb +17 -9
  189. data/lib/cosmos/system/system.rb +73 -17
  190. data/lib/cosmos/system/target.rb +10 -5
  191. data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +1 -0
  192. data/lib/cosmos/tools/cmd_tlm_server/api.rb +95 -0
  193. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +8 -4
  194. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +55 -0
  195. data/lib/cosmos/tools/data_viewer/data_viewer.rb +5 -12
  196. data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +14 -48
  197. data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -5
  198. data/lib/cosmos/tools/launcher/launcher.rb +4 -0
  199. data/lib/cosmos/tools/launcher/launcher_config.rb +50 -0
  200. data/lib/cosmos/tools/launcher/launcher_tool.rb +21 -9
  201. data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +607 -566
  202. data/lib/cosmos/tools/replay/replay.rb +51 -45
  203. data/lib/cosmos/tools/script_runner/script_runner.rb +13 -5
  204. data/lib/cosmos/tools/script_runner/script_runner_frame.rb +8 -109
  205. data/lib/cosmos/tools/test_runner/test.rb +65 -6
  206. data/lib/cosmos/tools/test_runner/test_runner.rb +4 -4
  207. data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +5 -0
  208. data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_logfile_thread.rb +3 -0
  209. data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +3 -2
  210. data/lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb +9 -6
  211. data/lib/cosmos/tools/tlm_viewer/widgets/array_widget.rb +1 -5
  212. data/lib/cosmos/tools/tlm_viewer/widgets/block_widget.rb +1 -5
  213. data/lib/cosmos/top_level.rb +86 -3
  214. data/lib/cosmos/version.rb +5 -5
  215. data/lib/cosmos/win32/win32_main.rb +7 -1
  216. data/spec/packet_logs/packet_log_reader_spec.rb +67 -7
  217. data/spec/packets/limits_spec.rb +19 -1
  218. data/spec/packets/telemetry_spec.rb +44 -1
  219. data/spec/script/commands_spec.rb +14 -0
  220. data/spec/script/scripting_spec.rb +5 -1
  221. data/spec/script/telemetry_spec.rb +38 -3
  222. data/spec/system/system_spec.rb +24 -4
  223. data/spec/tools/cmd_tlm_server/api_spec.rb +30 -0
  224. data/test/benchmarks/gsub_benchmark.rb +42 -4
  225. data/test/benchmarks/is_a_benchmark.rb +34 -0
  226. data/test/performance/config/data/crc.txt +161 -171
  227. data/test/performance/config/system/system_packets.txt +10 -10
  228. data/test/performance/config/system/system_threads.txt +30 -30
  229. data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +7 -2
  230. data/test/performance/config/targets/PACKET/cmd_tlm/packet_cmds.txt +20 -0
  231. data/test/performance/config/targets/PACKET/cmd_tlm/packet_tlm.txt +98 -0
  232. data/test/performance/config/targets/{EXAMPLE → PACKET}/cmd_tlm_server.txt +2 -2
  233. data/test/performance/config/targets/PACKET/lib/packet_interface.rb +22 -0
  234. data/test/performance/config/targets/PACKET/lib/packet_limits_response.rb +24 -0
  235. data/test/performance/config/targets/PACKET/screens/status.txt +25 -0
  236. data/test/performance/config/targets/PACKET/target.txt +28 -0
  237. data/test/performance/config/targets/{EXAMPLE/cmd_tlm/example_cmds.txt → THREAD/cmd_tlm/thread_cmds.txt} +1 -1
  238. data/test/performance/config/targets/{EXAMPLE/cmd_tlm/example_tlm.txt → THREAD/cmd_tlm/thread_tlm.txt} +1 -1
  239. data/test/performance/config/targets/THREAD/cmd_tlm_server.txt +6 -0
  240. data/test/performance/config/targets/{EXAMPLE/lib/example_interface.rb → THREAD/lib/thread_interface.rb} +1 -1
  241. data/test/performance/config/targets/THREAD/screens/status.txt +25 -0
  242. data/test/performance/config/targets/{EXAMPLE → THREAD}/target.txt +0 -0
  243. data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt +24 -30
  244. data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt +31 -31
  245. data/test/performance/config/tools/launcher/launcher_packets.txt +16 -11
  246. data/test/performance/config/tools/launcher/launcher_threads.txt +41 -35
  247. data/test/performance/config/tools/tlm_grapher/tlm_grapher.txt +204 -0
  248. data/test/performance/config/tools/tlm_viewer/tlm_viewer.txt +10 -38
  249. data/test/performance/lib/packet_target.rb +126 -0
  250. data/test/performance/lib/{example_target.rb → thread_target.rb} +9 -9
  251. data/test/performance/tools/CmdTlmServerMemProf +1 -1
  252. data/test/performance/tools/{ExampleTarget → PacketTarget} +2 -2
  253. data/test/performance/tools/{ExampleTarget.bat → PacketTarget.bat} +0 -0
  254. data/test/performance/tools/ThreadTarget +14 -0
  255. data/test/performance/tools/ThreadTarget.bat +59 -0
  256. data/test/performance/tools/TlmGrapherMemProf +1 -1
  257. data/test/performance/tools/TlmViewerMemProf +19 -0
  258. data/{autohotkey/tools/Replay.bat → test/performance/tools/TlmViewerMemProf.bat} +1 -1
  259. metadata +107 -55
  260. data/test/performance/lib/example_background_task.rb +0 -57
  261. data/test/performance/lib/scpi_target.rb +0 -74
@@ -0,0 +1,63 @@
1
+ @ECHO OFF
2
+ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
3
+
4
+ SET RUBYEXE=%1
5
+ SET TOOL=%~dp0%2
6
+
7
+ IF NOT EXIST !TOOL! (
8
+ echo !TOOL! does not exist
9
+ pause
10
+ exit /b
11
+ )
12
+
13
+ IF NOT EXIST %~dp0tool_launch.rb (
14
+ echo %~dp0tool_launch.rb does not exist
15
+ pause
16
+ exit /b
17
+ )
18
+
19
+ :: Get just the parameters for the tool
20
+ shift
21
+ shift
22
+ set PARAMS=%1
23
+ :loop
24
+ shift
25
+ if [%1]==[] goto afterloop
26
+ set PARAMS=!PARAMS! %1
27
+ goto loop
28
+ :afterloop
29
+
30
+ :: First look two directories up
31
+ SET "DESTINATION_DIR=%~dp0..\..\"
32
+ IF NOT EXIST "!DESTINATION_DIR!Vendor\Ruby" (
33
+ :: Then check COSMOS_DIR environment variable
34
+ IF NOT "!COSMOS_DIR!"=="" (
35
+ SET "DESTINATION_DIR=!COSMOS_DIR!\"
36
+ )
37
+ )
38
+
39
+ IF EXIST "!DESTINATION_DIR!Vendor\Ruby" (
40
+ :: Set environmental variables
41
+ for /f "delims=" %%a in ('dir "!DESTINATION_DIR!Vendor\Ruby\lib\ruby\gems\2*" /on /ad /b') do set RUBY_ABI=%%a
42
+ SET "GEM_HOME=!DESTINATION_DIR!Vendor\Ruby\lib\ruby\gems\!RUBY_ABI!"
43
+ SET "GEM_PATH=!GEM_HOME!"
44
+ SET "GEMRC=!DESTINATION_DIR!Vendor\Ruby\lib\ruby\gems\etc\gemrc"
45
+
46
+ :: Prepend embedded bin to PATH so we prefer those binaries
47
+ SET "RI_DEVKIT=!DESTINATION_DIR!Vendor\Devkit\"
48
+ SET "PATH=!DESTINATION_DIR!Vendor\Ruby\bin;!RI_DEVKIT!bin;!RI_DEVKIT!mingw\bin;!DESTINATION_DIR!Vendor\wkhtmltopdf;!PATH!"
49
+
50
+ :: Remove RUBYOPT and RUBYLIB, which can cause serious problems.
51
+ SET RUBYOPT=
52
+ SET RUBYLIB=
53
+
54
+ :: Run tool using Installer Ruby
55
+ ECHO Starting tool using installer ruby in !DESTINATION_DIR!
56
+ START "COSMOS" "!DESTINATION_DIR!Vendor\Ruby\bin\!RUBYEXE!" "!TOOL!" !PARAMS!
57
+ ) else (
58
+ :: Use System Ruby and Environment
59
+ ECHO Starting tool using system ruby and environment
60
+ START "COSMOS" "!RUBYEXE!" "!TOOL!" !PARAMS!
61
+ )
62
+
63
+ ENDLOCAL
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: ascii-8bit
3
3
 
4
- # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
5
  # All Rights Reserved.
6
6
  #
7
7
  # This program is free software; you can modify and/or redistribute it
@@ -9,7 +9,8 @@
9
9
  # as published by the Free Software Foundation; version 3 with
10
10
  # attribution addendums as found in the LICENSE.txt
11
11
 
12
- require 'bundler/setup' unless ENV['COSMOS_DEVEL']
13
- require 'cosmos'
14
- require 'cosmos/tools/cmd_extractor/cmd_extractor'
15
- Cosmos::CmdExtractor.run
12
+ require_relative 'tool_launch'
13
+ tool_launch do
14
+ require 'cosmos/tools/cmd_extractor/cmd_extractor'
15
+ Cosmos::CmdExtractor.run
16
+ end
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: ascii-8bit
3
+
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
+ # All Rights Reserved.
6
+ #
7
+ # This program is free software; you can modify and/or redistribute it
8
+ # under the terms of the GNU General Public License
9
+ # as published by the Free Software Foundation; version 3 with
10
+ # attribution addendums as found in the LICENSE.txt
11
+
12
+ def tool_launch
13
+ begin
14
+ require 'bundler/setup'
15
+ require 'cosmos'
16
+ yield
17
+ rescue Exception => error
18
+ popup_error = error; popup_error = $cosmos_fatal_exception if defined? $cosmos_fatal_exception
19
+ begin
20
+ raise error if STDIN.isatty # Have a console
21
+ raise error unless defined? $cosmos_fatal_exception or (error.class != SystemExit and error.class != Interrupt)
22
+ case RUBY_PLATFORM
23
+ when /mingw32/
24
+ require 'fiddle'
25
+ Fiddle::Function.new(Fiddle.dlopen('user32')['MessageBox'], [Fiddle::TYPE_LONG, Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP, Fiddle::TYPE_LONG], Fiddle::TYPE_LONG).call(0, "#{popup_error.class}:#{popup_error.message}\n\n#{popup_error.backtrace.join("\n")}\n\nNote: Ctrl-C will copy this information to the clipboard.", "Error Starting COSMOS Tool", 0x50030)
26
+ when /darwin/
27
+ system("osascript -e 'display notification \"#{popup_error.class}:#{popup_error.message}:#{popup_error.backtrace[0].tr("'\"`<>", '')}\" with title \"Error Starting COSMOS Tool\"'")
28
+ else
29
+ message = "#{popup_error.class}:#{popup_error.message}\\n\\n#{popup_error.backtrace.join("\\n").tr("'\"`<>", '')}"
30
+ command = "zenity --info --text=\"#{message}\" --title=\"Error Starting COSMOS Tool\""
31
+ success = system(command)
32
+ system("notify-send \"Error Starting COSMOS Tool\" \"#{message}\"") unless success
33
+ end
34
+ ensure
35
+ raise error
36
+ end
37
+ end
38
+ end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: ascii-8bit
3
3
 
4
- # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
5
  # All Rights Reserved.
6
6
  #
7
7
  # This program is free software; you can modify and/or redistribute it
@@ -9,7 +9,8 @@
9
9
  # as published by the Free Software Foundation; version 3 with
10
10
  # attribution addendums as found in the LICENSE.txt
11
11
 
12
- require 'bundler/setup' unless ENV['COSMOS_DEVEL']
13
- require 'cosmos'
14
- require 'cosmos/tools/cmd_sender/cmd_sender'
15
- Cosmos::CmdSender.run
12
+ require_relative 'tool_launch'
13
+ tool_launch do
14
+ require 'cosmos/tools/cmd_sender/cmd_sender'
15
+ Cosmos::CmdSender.run
16
+ end
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: ascii-8bit
3
+
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
+ # All Rights Reserved.
6
+ #
7
+ # This program is free software; you can modify and/or redistribute it
8
+ # under the terms of the GNU General Public License
9
+ # as published by the Free Software Foundation; version 3 with
10
+ # attribution addendums as found in the LICENSE.txt
11
+
12
+ def tool_launch
13
+ begin
14
+ require 'bundler/setup'
15
+ require 'cosmos'
16
+ yield
17
+ rescue Exception => error
18
+ popup_error = error; popup_error = $cosmos_fatal_exception if defined? $cosmos_fatal_exception
19
+ begin
20
+ raise error if STDIN.isatty # Have a console
21
+ raise error unless defined? $cosmos_fatal_exception or (error.class != SystemExit and error.class != Interrupt)
22
+ case RUBY_PLATFORM
23
+ when /mingw32/
24
+ require 'fiddle'
25
+ Fiddle::Function.new(Fiddle.dlopen('user32')['MessageBox'], [Fiddle::TYPE_LONG, Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP, Fiddle::TYPE_LONG], Fiddle::TYPE_LONG).call(0, "#{popup_error.class}:#{popup_error.message}\n\n#{popup_error.backtrace.join("\n")}\n\nNote: Ctrl-C will copy this information to the clipboard.", "Error Starting COSMOS Tool", 0x50030)
26
+ when /darwin/
27
+ system("osascript -e 'display notification \"#{popup_error.class}:#{popup_error.message}:#{popup_error.backtrace[0].tr("'\"`<>", '')}\" with title \"Error Starting COSMOS Tool\"'")
28
+ else
29
+ message = "#{popup_error.class}:#{popup_error.message}\\n\\n#{popup_error.backtrace.join("\\n").tr("'\"`<>", '')}"
30
+ command = "zenity --info --text=\"#{message}\" --title=\"Error Starting COSMOS Tool\""
31
+ success = system(command)
32
+ system("notify-send \"Error Starting COSMOS Tool\" \"#{message}\"") unless success
33
+ end
34
+ ensure
35
+ raise error
36
+ end
37
+ end
38
+ end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: ascii-8bit
3
3
 
4
- # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
5
  # All Rights Reserved.
6
6
  #
7
7
  # This program is free software; you can modify and/or redistribute it
@@ -9,7 +9,8 @@
9
9
  # as published by the Free Software Foundation; version 3 with
10
10
  # attribution addendums as found in the LICENSE.txt
11
11
 
12
- require 'bundler/setup' unless ENV['COSMOS_DEVEL']
13
- require 'cosmos'
14
- require 'cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui'
15
- Cosmos::CmdTlmServerGui.run
12
+ require_relative 'tool_launch'
13
+ tool_launch do
14
+ require 'cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui'
15
+ Cosmos::CmdTlmServerGui.run
16
+ end
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: ascii-8bit
3
+
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
+ # All Rights Reserved.
6
+ #
7
+ # This program is free software; you can modify and/or redistribute it
8
+ # under the terms of the GNU General Public License
9
+ # as published by the Free Software Foundation; version 3 with
10
+ # attribution addendums as found in the LICENSE.txt
11
+
12
+ def tool_launch
13
+ begin
14
+ require 'bundler/setup'
15
+ require 'cosmos'
16
+ yield
17
+ rescue Exception => error
18
+ popup_error = error; popup_error = $cosmos_fatal_exception if defined? $cosmos_fatal_exception
19
+ begin
20
+ raise error if STDIN.isatty # Have a console
21
+ raise error unless defined? $cosmos_fatal_exception or (error.class != SystemExit and error.class != Interrupt)
22
+ case RUBY_PLATFORM
23
+ when /mingw32/
24
+ require 'fiddle'
25
+ Fiddle::Function.new(Fiddle.dlopen('user32')['MessageBox'], [Fiddle::TYPE_LONG, Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP, Fiddle::TYPE_LONG], Fiddle::TYPE_LONG).call(0, "#{popup_error.class}:#{popup_error.message}\n\n#{popup_error.backtrace.join("\n")}\n\nNote: Ctrl-C will copy this information to the clipboard.", "Error Starting COSMOS Tool", 0x50030)
26
+ when /darwin/
27
+ system("osascript -e 'display notification \"#{popup_error.class}:#{popup_error.message}:#{popup_error.backtrace[0].tr("'\"`<>", '')}\" with title \"Error Starting COSMOS Tool\"'")
28
+ else
29
+ message = "#{popup_error.class}:#{popup_error.message}\\n\\n#{popup_error.backtrace.join("\\n").tr("'\"`<>", '')}"
30
+ command = "zenity --info --text=\"#{message}\" --title=\"Error Starting COSMOS Tool\""
31
+ success = system(command)
32
+ system("notify-send \"Error Starting COSMOS Tool\" \"#{message}\"") unless success
33
+ end
34
+ ensure
35
+ raise error
36
+ end
37
+ end
38
+ end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: ascii-8bit
3
3
 
4
- # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
5
  # All Rights Reserved.
6
6
  #
7
7
  # This program is free software; you can modify and/or redistribute it
@@ -9,7 +9,8 @@
9
9
  # as published by the Free Software Foundation; version 3 with
10
10
  # attribution addendums as found in the LICENSE.txt
11
11
 
12
- require 'bundler/setup' unless ENV['COSMOS_DEVEL']
13
- require 'cosmos'
14
- require 'cosmos/tools/data_viewer/data_viewer'
15
- Cosmos::DataViewer.run
12
+ require_relative 'tool_launch'
13
+ tool_launch do
14
+ require 'cosmos/tools/data_viewer/data_viewer'
15
+ Cosmos::DataViewer.run
16
+ end
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: ascii-8bit
3
+
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
+ # All Rights Reserved.
6
+ #
7
+ # This program is free software; you can modify and/or redistribute it
8
+ # under the terms of the GNU General Public License
9
+ # as published by the Free Software Foundation; version 3 with
10
+ # attribution addendums as found in the LICENSE.txt
11
+
12
+ def tool_launch
13
+ begin
14
+ require 'bundler/setup'
15
+ require 'cosmos'
16
+ yield
17
+ rescue Exception => error
18
+ popup_error = error; popup_error = $cosmos_fatal_exception if defined? $cosmos_fatal_exception
19
+ begin
20
+ raise error if STDIN.isatty # Have a console
21
+ raise error unless defined? $cosmos_fatal_exception or (error.class != SystemExit and error.class != Interrupt)
22
+ case RUBY_PLATFORM
23
+ when /mingw32/
24
+ require 'fiddle'
25
+ Fiddle::Function.new(Fiddle.dlopen('user32')['MessageBox'], [Fiddle::TYPE_LONG, Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP, Fiddle::TYPE_LONG], Fiddle::TYPE_LONG).call(0, "#{popup_error.class}:#{popup_error.message}\n\n#{popup_error.backtrace.join("\n")}\n\nNote: Ctrl-C will copy this information to the clipboard.", "Error Starting COSMOS Tool", 0x50030)
26
+ when /darwin/
27
+ system("osascript -e 'display notification \"#{popup_error.class}:#{popup_error.message}:#{popup_error.backtrace[0].tr("'\"`<>", '')}\" with title \"Error Starting COSMOS Tool\"'")
28
+ else
29
+ message = "#{popup_error.class}:#{popup_error.message}\\n\\n#{popup_error.backtrace.join("\\n").tr("'\"`<>", '')}"
30
+ command = "zenity --info --text=\"#{message}\" --title=\"Error Starting COSMOS Tool\""
31
+ success = system(command)
32
+ system("notify-send \"Error Starting COSMOS Tool\" \"#{message}\"") unless success
33
+ end
34
+ ensure
35
+ raise error
36
+ end
37
+ end
38
+ end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: ascii-8bit
3
3
 
4
- # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
5
  # All Rights Reserved.
6
6
  #
7
7
  # This program is free software; you can modify and/or redistribute it
@@ -9,7 +9,8 @@
9
9
  # as published by the Free Software Foundation; version 3 with
10
10
  # attribution addendums as found in the LICENSE.txt
11
11
 
12
- require 'bundler/setup' unless ENV['COSMOS_DEVEL']
13
- require 'cosmos'
14
- require 'cosmos/tools/handbook_creator/handbook_creator'
15
- Cosmos::HandbookCreator.run
12
+ require_relative 'tool_launch'
13
+ tool_launch do
14
+ require 'cosmos/tools/handbook_creator/handbook_creator'
15
+ Cosmos::HandbookCreator.run
16
+ end
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: ascii-8bit
3
+
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
+ # All Rights Reserved.
6
+ #
7
+ # This program is free software; you can modify and/or redistribute it
8
+ # under the terms of the GNU General Public License
9
+ # as published by the Free Software Foundation; version 3 with
10
+ # attribution addendums as found in the LICENSE.txt
11
+
12
+ def tool_launch
13
+ begin
14
+ require 'bundler/setup'
15
+ require 'cosmos'
16
+ yield
17
+ rescue Exception => error
18
+ popup_error = error; popup_error = $cosmos_fatal_exception if defined? $cosmos_fatal_exception
19
+ begin
20
+ raise error if STDIN.isatty # Have a console
21
+ raise error unless defined? $cosmos_fatal_exception or (error.class != SystemExit and error.class != Interrupt)
22
+ case RUBY_PLATFORM
23
+ when /mingw32/
24
+ require 'fiddle'
25
+ Fiddle::Function.new(Fiddle.dlopen('user32')['MessageBox'], [Fiddle::TYPE_LONG, Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP, Fiddle::TYPE_LONG], Fiddle::TYPE_LONG).call(0, "#{popup_error.class}:#{popup_error.message}\n\n#{popup_error.backtrace.join("\n")}\n\nNote: Ctrl-C will copy this information to the clipboard.", "Error Starting COSMOS Tool", 0x50030)
26
+ when /darwin/
27
+ system("osascript -e 'display notification \"#{popup_error.class}:#{popup_error.message}:#{popup_error.backtrace[0].tr("'\"`<>", '')}\" with title \"Error Starting COSMOS Tool\"'")
28
+ else
29
+ message = "#{popup_error.class}:#{popup_error.message}\\n\\n#{popup_error.backtrace.join("\\n").tr("'\"`<>", '')}"
30
+ command = "zenity --info --text=\"#{message}\" --title=\"Error Starting COSMOS Tool\""
31
+ success = system(command)
32
+ system("notify-send \"Error Starting COSMOS Tool\" \"#{message}\"") unless success
33
+ end
34
+ ensure
35
+ raise error
36
+ end
37
+ end
38
+ end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: ascii-8bit
3
3
 
4
- # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
5
  # All Rights Reserved.
6
6
  #
7
7
  # This program is free software; you can modify and/or redistribute it
@@ -9,7 +9,8 @@
9
9
  # as published by the Free Software Foundation; version 3 with
10
10
  # attribution addendums as found in the LICENSE.txt
11
11
 
12
- require 'bundler/setup' unless ENV['COSMOS_DEVEL']
13
- require 'cosmos'
14
- require 'cosmos/tools/launcher/launcher'
15
- Cosmos::Launcher.run
12
+ require_relative 'tool_launch'
13
+ tool_launch do
14
+ require 'cosmos/tools/launcher/launcher'
15
+ Cosmos::Launcher.run
16
+ end
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: ascii-8bit
3
+
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
+ # All Rights Reserved.
6
+ #
7
+ # This program is free software; you can modify and/or redistribute it
8
+ # under the terms of the GNU General Public License
9
+ # as published by the Free Software Foundation; version 3 with
10
+ # attribution addendums as found in the LICENSE.txt
11
+
12
+ def tool_launch
13
+ begin
14
+ require 'bundler/setup'
15
+ require 'cosmos'
16
+ yield
17
+ rescue Exception => error
18
+ popup_error = error; popup_error = $cosmos_fatal_exception if defined? $cosmos_fatal_exception
19
+ begin
20
+ raise error if STDIN.isatty # Have a console
21
+ raise error unless defined? $cosmos_fatal_exception or (error.class != SystemExit and error.class != Interrupt)
22
+ case RUBY_PLATFORM
23
+ when /mingw32/
24
+ require 'fiddle'
25
+ Fiddle::Function.new(Fiddle.dlopen('user32')['MessageBox'], [Fiddle::TYPE_LONG, Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP, Fiddle::TYPE_LONG], Fiddle::TYPE_LONG).call(0, "#{popup_error.class}:#{popup_error.message}\n\n#{popup_error.backtrace.join("\n")}\n\nNote: Ctrl-C will copy this information to the clipboard.", "Error Starting COSMOS Tool", 0x50030)
26
+ when /darwin/
27
+ system("osascript -e 'display notification \"#{popup_error.class}:#{popup_error.message}:#{popup_error.backtrace[0].tr("'\"`<>", '')}\" with title \"Error Starting COSMOS Tool\"'")
28
+ else
29
+ message = "#{popup_error.class}:#{popup_error.message}\\n\\n#{popup_error.backtrace.join("\\n").tr("'\"`<>", '')}"
30
+ command = "zenity --info --text=\"#{message}\" --title=\"Error Starting COSMOS Tool\""
31
+ success = system(command)
32
+ system("notify-send \"Error Starting COSMOS Tool\" \"#{message}\"") unless success
33
+ end
34
+ ensure
35
+ raise error
36
+ end
37
+ end
38
+ end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: ascii-8bit
3
3
 
4
- # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # Copyright 2015 Ball Aerospace & Technologies Corp.
5
5
  # All Rights Reserved.
6
6
  #
7
7
  # This program is free software; you can modify and/or redistribute it
@@ -9,7 +9,8 @@
9
9
  # as published by the Free Software Foundation; version 3 with
10
10
  # attribution addendums as found in the LICENSE.txt
11
11
 
12
- require 'bundler/setup' unless ENV['COSMOS_DEVEL']
13
- require 'cosmos'
14
- require 'cosmos/tools/limits_monitor/limits_monitor'
15
- Cosmos::LimitsMonitor.run
12
+ require_relative 'tool_launch'
13
+ tool_launch do
14
+ require 'cosmos/tools/limits_monitor/limits_monitor'
15
+ Cosmos::LimitsMonitor.run
16
+ end