cosmos 4.4.0 → 4.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.dockerignore +2 -0
- data/.gitignore +1 -0
- data/.travis.yml +6 -6
- data/Dockerfile +70 -0
- data/Manifest.txt +37 -2
- data/README.md +9 -0
- data/Rakefile +55 -5
- data/appveyor.yml +18 -8
- data/autohotkey/config/tools/cmd_sequence/cmd_sequence.txt +2 -0
- data/autohotkey/lib/cmd_sequence_exporter.rb +52 -0
- data/autohotkey/procedures/collect.rb +2 -2
- data/autohotkey/procedures/collect_util.rb +1 -1
- data/autohotkey/procedures/script_test.rb +1 -1
- data/autohotkey/tools/CmdSenderAHK2 +18 -0
- data/autohotkey/tools/cmd_extractor.ahk +11 -9
- data/autohotkey/tools/cmd_sender.ahk +35 -7
- data/autohotkey/tools/cmd_sender2.ahk +4 -0
- data/autohotkey/tools/cmd_sequence.ahk +22 -9
- data/autohotkey/tools/config_editor.ahk +4 -4
- data/autohotkey/tools/data_viewer.ahk +1 -1
- data/autohotkey/tools/limits_monitor.ahk +1 -1
- data/autohotkey/tools/packet_viewer.ahk +1 -1
- data/autohotkey/tools/script_runner.ahk +1 -1
- data/autohotkey/tools/test_runner2.ahk +1 -1
- data/autohotkey/tools/tlm_grapher.ahk +1 -1
- data/autohotkey/tools/tlm_grapher3.ahk +1 -1
- data/autohotkey/tools/tlm_viewer.ahk +1 -1
- data/autohotkey/tools/tlm_viewer2.ahk +1 -1
- data/autohotkey/tools/tlm_viewer5.ahk +1 -1
- data/bin/cstol_converter +1 -1
- data/bin/rubysloc +73 -28
- data/bin/xtce_converter +1 -1
- data/cosmos.gemspec +2 -2
- data/data/config/command_modifiers.yaml +16 -1
- data/data/config/interface_modifiers.yaml +3 -2
- data/data/config/param_item_modifiers.yaml +5 -0
- data/data/config/system.yaml +110 -23
- data/data/config/telemetry_modifiers.yaml +16 -1
- data/data/crc.txt +416 -411
- data/demo/Rakefile +4 -4
- data/demo/config/dart/Gemfile +1 -6
- data/demo/config/data/crc.txt +233 -232
- data/demo/config/system/system.txt +17 -6
- data/demo/config/system/system2.txt +17 -6
- data/demo/config/system/system_alt_ports.txt +17 -6
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +4 -4
- data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +4 -0
- data/demo/config/targets/INST/cmd_tlm/inst_tlm_override.txt +12 -0
- data/demo/config/targets/INST/lib/sim_inst.rb +2 -2
- data/demo/config/targets/INST/target.txt +1 -0
- data/demo/config/tools/handbook_creator/default_toc.xsl +59 -59
- data/demo/procedures/cosmos_api_test.rb +8 -8
- data/ext/cosmos/ext/buffered_file/buffered_file.c +2 -2
- data/ext/cosmos/ext/config_parser/config_parser.c +1 -2
- data/ext/cosmos/ext/line_graph/line_graph.c +53 -94
- data/ext/cosmos/ext/platform/platform.c +56 -21
- data/ext/cosmos/ext/polynomial_conversion/polynomial_conversion.c +4 -8
- data/ext/cosmos/ext/structure/structure.c +12 -0
- data/extensions/vscode/.gitignore +4 -0
- data/extensions/vscode/.vscode/launch.json +32 -0
- data/extensions/vscode/.vscode/settings.json +13 -0
- data/extensions/vscode/.vscode/tasks.json +79 -0
- data/extensions/vscode/License.txt +879 -0
- data/extensions/vscode/README.md +9 -0
- data/extensions/vscode/client/License.txt +879 -0
- data/extensions/vscode/client/README.md +39 -0
- data/extensions/vscode/client/cosmos.configuration.json +23 -0
- data/extensions/vscode/client/images/icon.png +0 -0
- data/extensions/vscode/client/package-lock.json +414 -0
- data/extensions/vscode/client/package.json +105 -0
- data/extensions/vscode/client/src/extension.ts +132 -0
- data/extensions/vscode/client/src/screen_preview.rb +25 -0
- data/extensions/vscode/client/syntaxes/cosmos.tmLanguage.json +219 -0
- data/extensions/vscode/client/tsconfig.json +17 -0
- data/extensions/vscode/package-lock.json +26 -0
- data/extensions/vscode/package.json +35 -0
- data/extensions/vscode/server/License.txt +879 -0
- data/extensions/vscode/server/package-lock.json +236 -0
- data/extensions/vscode/server/package.json +29 -0
- data/extensions/vscode/server/src/server.ts +59 -0
- data/extensions/vscode/server/tsconfig.json +16 -0
- data/install/Rakefile +4 -4
- data/install/config/dart/Gemfile +2 -7
- data/install/config/data/crc.txt +137 -137
- data/install/config/system/system.txt +17 -6
- data/install/config/tools/handbook_creator/default_toc.xsl +59 -59
- data/lib/cosmos/config/config_parser.rb +2 -10
- data/lib/cosmos/core_ext/class.rb +10 -0
- data/lib/cosmos/core_ext/time.rb +5 -3
- data/lib/cosmos/dart/config/boot.rb +1 -1
- data/lib/cosmos/dart/config/database.yml +2 -0
- data/lib/cosmos/dart/examples/dart_decom_client.rb +1 -1
- data/lib/cosmos/dart/lib/dart_common.rb +12 -5
- data/lib/cosmos/dart/lib/dart_constants.rb +15 -0
- data/lib/cosmos/dart/lib/dart_decom_query.rb +5 -6
- data/lib/cosmos/dart/lib/dart_decommutator.rb +64 -54
- data/lib/cosmos/dart/lib/dart_master_query.rb +71 -0
- data/lib/cosmos/dart/lib/dart_reducer_worker_thread.rb +165 -134
- data/lib/cosmos/dart/processes/dart.rb +4 -2
- data/lib/cosmos/dart/processes/dart_decom_server.rb +3 -3
- data/lib/cosmos/dart/processes/dart_ingester.rb +38 -1
- data/lib/cosmos/dart/processes/dart_master.rb +44 -0
- data/lib/cosmos/dart/processes/dart_util.rb +115 -0
- data/lib/cosmos/dart/spec/dart/dart_database_cleaner_spec.rb +2 -2
- data/lib/cosmos/gui/qt.rb +10 -10
- data/lib/cosmos/gui/qt_tool.rb +17 -12
- data/lib/cosmos/gui/text/completion_text_edit.rb +2 -0
- data/lib/cosmos/gui/widgets/dart_meta_frame.rb +22 -3
- data/lib/cosmos/interfaces/dart_status_interface.rb +1 -1
- data/lib/cosmos/interfaces/linc_interface.rb +3 -3
- data/lib/cosmos/interfaces/protocols/burst_protocol.rb +1 -1
- data/lib/cosmos/interfaces/protocols/crc_protocol.rb +1 -1
- data/lib/cosmos/interfaces/protocols/length_protocol.rb +5 -0
- data/lib/cosmos/interfaces/protocols/template_protocol.rb +3 -3
- data/lib/cosmos/interfaces/serial_interface.rb +7 -1
- data/lib/cosmos/interfaces/stream_interface.rb +1 -1
- data/lib/cosmos/interfaces/tcpip_server_interface.rb +16 -16
- data/lib/cosmos/io/io_multiplexer.rb +6 -2
- data/lib/cosmos/io/json_drb.rb +5 -5
- data/lib/cosmos/io/json_drb_object.rb +7 -2
- data/lib/cosmos/io/json_drb_rack.rb +25 -5
- data/lib/cosmos/io/json_rpc.rb +1 -1
- data/lib/cosmos/io/posix_serial_driver.rb +60 -22
- data/lib/cosmos/io/serial_driver.rb +11 -8
- data/lib/cosmos/io/win32_serial_driver.rb +31 -3
- data/lib/cosmos/packet_logs/packet_log_reader.rb +2 -2
- data/lib/cosmos/packets/packet.rb +9 -9
- data/lib/cosmos/packets/packet_config.rb +27 -9
- data/lib/cosmos/packets/parsers/xtce_converter.rb +10 -10
- data/lib/cosmos/packets/parsers/xtce_parser.rb +3 -0
- data/lib/cosmos/packets/structure.rb +35 -5
- data/lib/cosmos/packets/structure_item.rb +5 -1
- data/lib/cosmos/packets/telemetry.rb +7 -1
- data/lib/cosmos/script/api_shared.rb +18 -1
- data/lib/cosmos/script/extract.rb +1 -1
- data/lib/cosmos/script/script.rb +4 -11
- data/lib/cosmos/streams/serial_stream.rb +11 -6
- data/lib/cosmos/system/system.rb +155 -57
- data/lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb +15 -0
- data/lib/cosmos/tools/cmd_sender/cmd_params.rb +382 -0
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +29 -318
- data/lib/cosmos/tools/cmd_sequence/cmd_sequence.rb +14 -17
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +38 -331
- data/lib/cosmos/tools/cmd_sequence/sequence_list.rb +16 -11
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +10 -8
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +2 -2
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +1 -0
- data/lib/cosmos/tools/cmd_tlm_server/gui/logging_tab.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +29 -26
- data/lib/cosmos/tools/cmd_tlm_server/limits_groups_background_task.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/router_thread.rb +5 -0
- data/lib/cosmos/tools/config_editor/config_editor.rb +34 -3
- data/lib/cosmos/tools/config_editor/config_editor_frame.rb +8 -9
- data/lib/cosmos/tools/config_editor/system_config_dialog.rb +158 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +1 -1
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +7 -4
- data/lib/cosmos/tools/test_runner/test.rb +6 -3
- data/lib/cosmos/tools/test_runner/test_runner.rb +6 -6
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +3 -3
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +1 -4
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +20 -16
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_dart_thread.rb +21 -17
- data/lib/cosmos/tools/tlm_grapher/tlm_grapher.rb +18 -11
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +17 -6
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +2 -0
- data/lib/cosmos/top_level.rb +1 -1
- data/lib/cosmos/utilities/ruby_lex_utils.rb +34 -30
- data/lib/cosmos/utilities/simulated_target.rb +1 -1
- data/lib/cosmos/version.rb +5 -5
- data/lib/cosmos/win32/excel.rb +23 -17
- data/run_gui_tests.bat +1 -0
- data/spec/core_ext/class_spec.rb +54 -0
- data/spec/core_ext/socket_spec.rb +1 -1
- data/spec/core_ext/time_spec.rb +4 -0
- data/spec/install/yaml_docs_spec.rb +26 -6
- data/spec/interfaces/linc_interface_spec.rb +1 -1
- data/spec/interfaces/protocols/length_protocol_spec.rb +39 -0
- data/spec/interfaces/serial_interface_spec.rb +1 -5
- data/spec/io/json_drb_rack_spec.rb +166 -0
- data/spec/io/json_drb_spec.rb +14 -0
- data/spec/io/json_rpc_spec.rb +4 -5
- data/spec/io/posix_serial_driver_spec.rb +81 -0
- data/spec/io/win32_serial_driver_spec.rb +33 -3
- data/spec/packet_logs/packet_log_reader_spec.rb +36 -37
- data/spec/packets/structure_spec.rb +52 -2
- data/spec/packets/telemetry_spec.rb +29 -1
- data/spec/script/extract_spec.rb +4 -1
- data/spec/system/system_spec.rb +111 -3
- data/spec/tools/cmd_tlm_server/api_spec.rb +12 -12
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +2 -2
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +4 -3
- data/spec/tools/cmd_tlm_server/router_thread_spec.rb +2 -3
- data/spec/utilities/logger_spec.rb +3 -3
- data/spec/utilities/message_log_spec.rb +6 -3
- data/tasks/gemfile_stats.rake +22 -13
- data/test/performance/Rakefile +4 -4
- data/test/performance/config/data/crc.txt +67 -48
- metadata +52 -11
- data/demo/outputs/dart/logs/README.txt +0 -1
- data/lib/cosmos/dart/Gemfile +0 -69
@@ -1,7 +1,7 @@
|
|
1
1
|
SetWinDelay 1000
|
2
2
|
WinWaitActive Command Sequence
|
3
3
|
Run ruby.exe %A_ScriptDir%/CmdTlmServer
|
4
|
-
Sleep
|
4
|
+
Sleep 10000
|
5
5
|
WinActivate Command Sequence
|
6
6
|
|
7
7
|
Send ^o ; Open
|
@@ -28,12 +28,24 @@ Sleep 500
|
|
28
28
|
Send a ; Save As
|
29
29
|
WinWaitActive Save
|
30
30
|
Send test_sequence.txt{Enter}
|
31
|
+
Sleep 500
|
32
|
+
Send y ; Just in case test_sequence.txt already exists we say 'y' to overwrites
|
33
|
+
WinWaitActive Command Sequence
|
34
|
+
|
35
|
+
Send ^e ; Export
|
36
|
+
Sleep 500
|
37
|
+
WinWaitActive Export
|
38
|
+
Send sequence.bin{Enter}
|
39
|
+
Sleep 500
|
40
|
+
Send y ; Just in case sequence.bin already exists we say 'y' to overwrites
|
31
41
|
WinWaitActive Command Sequence
|
32
42
|
|
33
43
|
Send !a ; Actions menu
|
34
44
|
Sleep 500
|
35
45
|
Send e ; Expand All
|
36
46
|
Sleep 1000
|
47
|
+
Click 190 180 ; Click on sequence item to collapse it
|
48
|
+
Sleep 1000
|
37
49
|
Send !a ; Actions menu
|
38
50
|
Sleep 500
|
39
51
|
Send d ; Display state values in hex
|
@@ -57,7 +69,7 @@ Sleep 500
|
|
57
69
|
Send s ; Show ignored items
|
58
70
|
Sleep 500
|
59
71
|
|
60
|
-
Click right 170
|
72
|
+
Click right 170 335 ; Right click collect type
|
61
73
|
Sleep 500
|
62
74
|
Send {Tab}{Enter}
|
63
75
|
WinWaitActive INST
|
@@ -65,20 +77,21 @@ Sleep 500
|
|
65
77
|
Send {Enter}
|
66
78
|
WinWaitActive Command Sequence
|
67
79
|
|
68
|
-
Click right 170
|
80
|
+
Click right 170 335 ; Right click collect type
|
69
81
|
Sleep 500
|
70
82
|
Send {Tab 2}{Enter} ; Insert filename
|
71
83
|
WinWaitActive Insert
|
72
84
|
Sleep 500
|
73
85
|
Send {Esc}
|
74
|
-
|
86
|
+
Sleep 500
|
87
|
+
WinActivate Command Sequence ; Not sure why but we have to explicitly activate here
|
75
88
|
|
76
|
-
Click 260
|
89
|
+
Click 260 335 2 ; Double click the collect type manual entry
|
77
90
|
Sleep 500
|
78
91
|
Send 9{Enter}
|
79
92
|
Sleep 500
|
80
93
|
|
81
|
-
Click 170
|
94
|
+
Click 170 335 2 ; Double click the collect Type
|
82
95
|
Sleep 500
|
83
96
|
Click ; Click again to activate the drop down
|
84
97
|
Sleep 500
|
@@ -129,11 +142,11 @@ Click 610 124 ; Add Abort command
|
|
129
142
|
Sleep 500
|
130
143
|
Click 610 124 ; Add Abort command
|
131
144
|
Sleep 500
|
132
|
-
Click
|
145
|
+
Click 100 100 ; Click the search box
|
133
146
|
Sleep 500
|
134
|
-
Send
|
147
|
+
Send ASCIICMD
|
135
148
|
Sleep 500
|
136
|
-
|
149
|
+
Send {Enter} ; Add ASCICMD
|
137
150
|
Sleep 500
|
138
151
|
Click 300 234 ; Click on the ASCIICMD to expand it
|
139
152
|
Sleep 500
|
@@ -1,5 +1,5 @@
|
|
1
1
|
WinWaitActive, Config Editor
|
2
|
-
Sleep
|
2
|
+
Sleep 20000
|
3
3
|
|
4
4
|
Click right 288 62 ; Right click on the tab
|
5
5
|
Sleep 500
|
@@ -14,7 +14,7 @@ Send ^w ; Close
|
|
14
14
|
Send !t ; alt T
|
15
15
|
sleep 500
|
16
16
|
Send {ENTER} ; Change file type
|
17
|
-
|
17
|
+
sleep 1000
|
18
18
|
Send ^s ; File Save
|
19
19
|
WinWaitActive Save As
|
20
20
|
Send {Esc}
|
@@ -149,13 +149,13 @@ Sleep 1000
|
|
149
149
|
|
150
150
|
Send !a ; alt A
|
151
151
|
sleep 500
|
152
|
-
Send
|
152
|
+
Send t ; Create target
|
153
153
|
WinWaitActive Target
|
154
154
|
Send {Esc}
|
155
155
|
|
156
156
|
Send !a ; alt A
|
157
157
|
sleep 500
|
158
|
-
Send
|
158
|
+
Send t ; Create target
|
159
159
|
WinWaitActive Target
|
160
160
|
Send AHK_TEST{ENTER}
|
161
161
|
Sleep 2000
|
data/bin/cstol_converter
CHANGED
@@ -731,7 +731,7 @@ def parse_line(full_line, loc_out_file, wait_check_flag=false)
|
|
731
731
|
# Process procedures with arguments as functions
|
732
732
|
else
|
733
733
|
# Add the statement to require the function
|
734
|
-
str = str + "
|
734
|
+
str = str + "load_utility(\"" + words[1].downcase + ".rb\")\n"
|
735
735
|
numSpaces.times {str = str + " "}
|
736
736
|
|
737
737
|
# Split the list of arguments on commas
|
data/bin/rubysloc
CHANGED
@@ -13,25 +13,72 @@
|
|
13
13
|
# Blank lines and comment lines are ignored. All other
|
14
14
|
# lines count as one line.
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
require 'ostruct'
|
17
|
+
require 'optparse'
|
18
|
+
|
19
|
+
options = OpenStruct.new
|
20
|
+
options.filename = nil
|
21
|
+
options.sort_column = nil
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
opts = OptionParser.new do |opts|
|
24
|
+
opts.banner = "Usage: rubysloc"
|
25
|
+
opts.separator ""
|
26
|
+
opts.separator "Recursively calculate SLOC for all ruby files (*.rb) sorted by filename"
|
27
|
+
opts.separator ""
|
28
|
+
opts.on("-h", "--help", "Show this message") do
|
29
|
+
puts opts
|
30
|
+
exit
|
25
31
|
end
|
26
|
-
|
27
|
-
|
28
|
-
|
32
|
+
opts.on("-i DIRECTORY/FILENAME", "--input DIRECTORY/FILENAME",
|
33
|
+
"Parse only the specified directory/filename (relative or absolute path)") do |arg|
|
34
|
+
options.filename = arg
|
35
|
+
end
|
36
|
+
opts.on("-s SORT", "--sort SORT", "Sort by the specified column. Must be one of LINES, COMMENTS, SLOC, or RATIO.") do |arg|
|
37
|
+
case arg
|
38
|
+
when 'LINES'
|
39
|
+
options.sort_column = 1
|
40
|
+
when 'COMMENTS'
|
41
|
+
options.sort_column = 2
|
42
|
+
when 'SLOC'
|
43
|
+
options.sort_column = 3
|
44
|
+
when 'RATIO'
|
45
|
+
options.sort_column = 4
|
46
|
+
else
|
47
|
+
puts opts
|
48
|
+
exit
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
begin
|
54
|
+
opts.parse!(ARGV)
|
55
|
+
rescue => err
|
56
|
+
puts err
|
57
|
+
puts opts
|
58
|
+
exit
|
59
|
+
end
|
60
|
+
|
61
|
+
files = []
|
62
|
+
if options.filename
|
63
|
+
options.filename = File.join(Dir.pwd, options.filename) unless File.exist?(options.filename)
|
64
|
+
if File.exist?(options.filename)
|
65
|
+
if File.directory?(options.filename)
|
66
|
+
# Dir only works with unix paths so swap backslashes
|
67
|
+
files = Dir[File.join(options.filename.gsub('\\','/'), '**', '*.rb')]
|
68
|
+
else
|
69
|
+
files << options.filename
|
70
|
+
end
|
29
71
|
else
|
30
|
-
|
72
|
+
puts "File #{options.filename} not found."
|
73
|
+
puts opts
|
74
|
+
exit
|
31
75
|
end
|
76
|
+
else
|
77
|
+
files = Dir['**/*.rb']
|
32
78
|
end
|
33
79
|
|
34
80
|
# Build results over all found ruby files
|
81
|
+
longest_path = 1
|
35
82
|
results = []
|
36
83
|
files.each do |full_filename|
|
37
84
|
filename = File.basename(full_filename)
|
@@ -43,21 +90,20 @@ files.each do |full_filename|
|
|
43
90
|
lines += 1
|
44
91
|
split_line = line.split
|
45
92
|
if split_line[0].nil?
|
46
|
-
#Blank Line - Do Nothing
|
47
|
-
#puts "NOT COUNTED - #{line.chomp}"
|
93
|
+
# Blank Line - Do Nothing
|
48
94
|
elsif split_line[0].to_s[0..0] == '#'
|
49
|
-
#Comment Line
|
50
|
-
#puts "COMMENT LINE - #{line.chomp}"
|
51
95
|
comments += 1
|
52
96
|
else
|
53
|
-
#puts "COUNTED - #{line.chomp}"
|
54
97
|
slocs += 1
|
55
98
|
end
|
56
99
|
end
|
57
|
-
results << [
|
100
|
+
results << [full_filename, lines, comments, slocs, comments.to_f / slocs.to_f]
|
101
|
+
longest_path = full_filename.length if full_filename.length > longest_path
|
58
102
|
end
|
59
103
|
end
|
60
104
|
|
105
|
+
results.sort_by! {|col| col[options.sort_column].finite? ? col[options.sort_column] : -1 } if options.sort_column
|
106
|
+
|
61
107
|
# Print results to STDOUT
|
62
108
|
total_files = 0
|
63
109
|
total_lines = 0
|
@@ -65,12 +111,12 @@ total_comments = 0
|
|
65
111
|
total_slocs = 0
|
66
112
|
total_ratio = 0
|
67
113
|
|
68
|
-
puts "
|
69
|
-
puts "|
|
70
|
-
puts "
|
114
|
+
puts sprintf("|-%-#{longest_path}s-|----------|----------|----------|--------|", "-"*longest_path)
|
115
|
+
puts sprintf("| %-#{longest_path}s | Lines | Comments | SLOCs | Ratio |", "Filename")
|
116
|
+
puts sprintf("|-%-#{longest_path}s-|----------|----------|----------|--------|", "-"*longest_path)
|
71
117
|
results.each do |filename, lines, comments, slocs, ratio|
|
72
|
-
filename = filename[0..32] if filename.length > 33
|
73
|
-
puts sprintf("|
|
118
|
+
# filename = filename[0..32] if filename.length > 33
|
119
|
+
puts sprintf("| %-#{longest_path}s | %8d | %8d | %8d | %6.2f |",
|
74
120
|
filename, lines, comments, slocs, ratio)
|
75
121
|
total_files += 1
|
76
122
|
total_lines += lines
|
@@ -78,8 +124,7 @@ results.each do |filename, lines, comments, slocs, ratio|
|
|
78
124
|
total_slocs += slocs
|
79
125
|
end
|
80
126
|
total_ratio = total_comments.to_f / total_slocs.to_f if total_slocs != 0
|
81
|
-
puts "
|
82
|
-
puts sprintf("|
|
83
|
-
|
84
|
-
|
85
|
-
puts "|-----------------------------------|----------|----------|----------|--------|"
|
127
|
+
puts sprintf("|-%-#{longest_path}s-|----------|----------|----------|--------|", "-"*longest_path)
|
128
|
+
puts sprintf("| %-#{longest_path}s | %8d | %8d | %8d | %6.2f |",
|
129
|
+
"Totals - #{total_files} Files", total_lines, total_comments, total_slocs, total_ratio)
|
130
|
+
puts sprintf("|-%-#{longest_path}s-|----------|----------|----------|--------|", "-"*longest_path)
|
data/bin/xtce_converter
CHANGED
@@ -36,7 +36,7 @@ option_parser = OptionParser.new do |option_parser|
|
|
36
36
|
|
37
37
|
# Create the system option
|
38
38
|
option_parser.on("--system VALUE", "Use an alternative system.txt file") do |arg|
|
39
|
-
Cosmos::System.instance(File.join(USERPATH, 'config', 'system', arg))
|
39
|
+
Cosmos::System.instance(File.join(Cosmos::USERPATH, 'config', 'system', arg))
|
40
40
|
end
|
41
41
|
|
42
42
|
# Handle --import mode
|
data/cosmos.gemspec
CHANGED
@@ -113,8 +113,8 @@ spec = Gem::Specification.new do |s|
|
|
113
113
|
s.add_development_dependency 'guard-rspec', '~> 4.0'
|
114
114
|
s.add_development_dependency 'simplecov', '~> 0.15'
|
115
115
|
s.add_development_dependency 'codecov', '~> 0.1'
|
116
|
-
s.add_development_dependency 'benchmark-ips', '
|
117
|
-
s.add_development_dependency 'ruby-prof', '~> 0.
|
116
|
+
s.add_development_dependency 'benchmark-ips', '= 2.7.2'
|
117
|
+
s.add_development_dependency 'ruby-prof', ['~> 1.0', '< 1.3'] if RUBY_ENGINE == 'ruby' # MRI Only
|
118
118
|
|
119
119
|
s.post_install_message = "Thanks for installing Ball Aerospace COSMOS!\nStart your first project with: cosmos demo demo\n"
|
120
120
|
end
|
@@ -8,7 +8,7 @@ PARAMETER:
|
|
8
8
|
PARAMETER DATA 32 32 INT MIN MAX 0 "Data value"
|
9
9
|
PARAMETER VALUE 64 32 FLOAT 0 10.5 2.5
|
10
10
|
PARAMETER LABEL 96 96 STRING "COSMOS" "The label to apply"
|
11
|
-
PARAMETER BLOCK 192 0 BLOCK
|
11
|
+
PARAMETER BLOCK 192 0 BLOCK 0x0 "Block of binary data"
|
12
12
|
parameters:
|
13
13
|
- name: Name
|
14
14
|
required: true
|
@@ -109,6 +109,21 @@ SELECT_PARAMETER:
|
|
109
109
|
required: true
|
110
110
|
description: Name of the parameter to select for modification
|
111
111
|
values: .+
|
112
|
+
DELETE_PARAMETER:
|
113
|
+
summary: Deletes an existing command parameter from the packet definition
|
114
|
+
description: Deleting a parameter from the command definition does not remove the
|
115
|
+
defined space for that parameter. Thus unless you redefine a new parameter, there
|
116
|
+
will be a "hole" in the packet where the data is not accessible. You can
|
117
|
+
use SELECT_COMMAND and then PARAMETER to define a new parameter.
|
118
|
+
example: |
|
119
|
+
SELECT_COMMAND SYSTEM STARTLOGGING
|
120
|
+
DELETE_PARAMETER LABEL
|
121
|
+
since: 4.4.1
|
122
|
+
parameters:
|
123
|
+
- name: Parameter
|
124
|
+
required: true
|
125
|
+
description: Name of the parameter to delete
|
126
|
+
values: .+
|
112
127
|
HIDDEN:
|
113
128
|
summary: Hides this command from all COSMOS tools such as Command Sender and Handbook Creator
|
114
129
|
description: Hidden commands do not appear in the Script Runner popup helper when writing scripts.
|
@@ -84,8 +84,9 @@ OPTION:
|
|
84
84
|
- name: Name
|
85
85
|
required: true
|
86
86
|
description: The option to set. COSMOS defines several options on the core provided
|
87
|
-
interfaces. The SerialInterface defines FLOW_CONTROL which can be NONE (default) or RTSCTS
|
88
|
-
|
87
|
+
interfaces. The SerialInterface defines FLOW_CONTROL which can be NONE (default) or RTSCTS,
|
88
|
+
STRUCT to directly set fields in the Windows DCB or POSIX structure and it defines
|
89
|
+
DATA_BITS which changes the data bits of the serial interface.
|
89
90
|
The TcpipServerInterface defines LISTEN_ADDRESS which is the IP address to accept
|
90
91
|
connections on (default 0.0.0.0) and AUTO_SYSTEM_META which will automatically send
|
91
92
|
SYSTEM META when the interface connects (default false).
|
@@ -44,3 +44,8 @@ META:
|
|
44
44
|
required: false
|
45
45
|
description: One or more values to be stored for this Meta Name
|
46
46
|
values: .*
|
47
|
+
OVERLAP:
|
48
|
+
summary: This item is allowed to overlap other items in the packet
|
49
|
+
description: If an item's bit offset overlaps another item, COSMOS issues a warning. This keyword explicitly
|
50
|
+
allows an item to overlap another and supresses the warning message.
|
51
|
+
since: 4.4.1
|