cosmos 4.4.2 → 4.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +6 -2
  3. data/Manifest.txt +25 -0
  4. data/README.md +4 -0
  5. data/Rakefile +3 -8
  6. data/bin/rubysloc +73 -28
  7. data/cosmos.gemspec +1 -1
  8. data/data/config/interface_modifiers.yaml +3 -2
  9. data/data/config/system.yaml +81 -24
  10. data/data/crc.txt +426 -426
  11. data/demo/config/data/crc.txt +233 -233
  12. data/demo/config/system/system.txt +15 -7
  13. data/demo/config/system/system2.txt +15 -7
  14. data/demo/config/system/system_alt_ports.txt +15 -7
  15. data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -1
  16. data/extensions/vscode/.gitignore +4 -0
  17. data/extensions/vscode/.vscode/launch.json +32 -0
  18. data/extensions/vscode/.vscode/settings.json +13 -0
  19. data/extensions/vscode/.vscode/tasks.json +79 -0
  20. data/extensions/vscode/License.txt +879 -0
  21. data/extensions/vscode/README.md +9 -0
  22. data/extensions/vscode/client/License.txt +879 -0
  23. data/extensions/vscode/client/README.md +39 -0
  24. data/extensions/vscode/client/cosmos.configuration.json +23 -0
  25. data/extensions/vscode/client/images/icon.png +0 -0
  26. data/extensions/vscode/client/package-lock.json +414 -0
  27. data/extensions/vscode/client/package.json +105 -0
  28. data/extensions/vscode/client/src/extension.ts +132 -0
  29. data/extensions/vscode/client/src/screen_preview.rb +25 -0
  30. data/extensions/vscode/client/syntaxes/cosmos.tmLanguage.json +219 -0
  31. data/extensions/vscode/client/tsconfig.json +17 -0
  32. data/extensions/vscode/package-lock.json +26 -0
  33. data/extensions/vscode/package.json +35 -0
  34. data/extensions/vscode/server/License.txt +879 -0
  35. data/extensions/vscode/server/package-lock.json +236 -0
  36. data/extensions/vscode/server/package.json +29 -0
  37. data/extensions/vscode/server/src/server.ts +59 -0
  38. data/extensions/vscode/server/tsconfig.json +16 -0
  39. data/install/config/data/crc.txt +132 -132
  40. data/install/config/system/system.txt +15 -7
  41. data/lib/cosmos/core_ext/time.rb +3 -1
  42. data/lib/cosmos/dart/examples/dart_decom_client.rb +1 -1
  43. data/lib/cosmos/dart/lib/dart_decommutator.rb +4 -4
  44. data/lib/cosmos/dart/processes/dart_decom_server.rb +1 -1
  45. data/lib/cosmos/dart/processes/dart_master.rb +1 -1
  46. data/lib/cosmos/gui/qt_tool.rb +10 -12
  47. data/lib/cosmos/gui/widgets/dart_meta_frame.rb +1 -1
  48. data/lib/cosmos/interfaces/dart_status_interface.rb +1 -1
  49. data/lib/cosmos/interfaces/serial_interface.rb +7 -1
  50. data/lib/cosmos/io/json_drb.rb +2 -2
  51. data/lib/cosmos/io/json_drb_object.rb +7 -2
  52. data/lib/cosmos/io/json_drb_rack.rb +25 -5
  53. data/lib/cosmos/io/json_rpc.rb +1 -1
  54. data/lib/cosmos/io/posix_serial_driver.rb +60 -22
  55. data/lib/cosmos/io/serial_driver.rb +11 -8
  56. data/lib/cosmos/io/win32_serial_driver.rb +8 -1
  57. data/lib/cosmos/packets/structure.rb +11 -2
  58. data/lib/cosmos/script/api_shared.rb +8 -1
  59. data/lib/cosmos/script/script.rb +2 -9
  60. data/lib/cosmos/streams/serial_stream.rb +11 -6
  61. data/lib/cosmos/system/system.rb +43 -12
  62. data/lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb +15 -0
  63. data/lib/cosmos/tools/cmd_sender/cmd_params.rb +25 -3
  64. data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +7 -0
  65. data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +0 -5
  66. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +2 -2
  67. data/lib/cosmos/tools/cmd_tlm_server/router_thread.rb +5 -0
  68. data/lib/cosmos/tools/config_editor/config_editor.rb +1 -1
  69. data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -1
  70. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +1 -4
  71. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +3 -3
  72. data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_dart_thread.rb +1 -1
  73. data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +2 -2
  74. data/lib/cosmos/version.rb +5 -5
  75. data/spec/core_ext/time_spec.rb +4 -0
  76. data/spec/io/json_drb_rack_spec.rb +166 -0
  77. data/spec/io/json_rpc_spec.rb +4 -5
  78. data/spec/io/posix_serial_driver_spec.rb +81 -0
  79. data/spec/io/win32_serial_driver_spec.rb +17 -1
  80. data/spec/system/system_spec.rb +108 -0
  81. data/spec/tools/cmd_tlm_server/router_thread_spec.rb +2 -3
  82. metadata +31 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 118c33651e0616201ed73bde1566f2e1d645ef30d06fe558e9d6585602e912e7
4
- data.tar.gz: eaf90fcf26d5313349cd0f11c05fdfce4c24ee3de2a9d73d222dd349eae10af7
3
+ metadata.gz: 59047da4090004297591f443b9e77596f9bf961be49624ff2f8f164a0866f723
4
+ data.tar.gz: e3b59eaff1ed3381bf9b6befaf6651073cd95fc2f7ebf62a119a8680503ae065
5
5
  SHA512:
6
- metadata.gz: 38a5ee8dd5fc1d4b5c1a2e97c3ecfe6e5e944150da861f9fa0a32db9c69c1896019e804f021fdbc4da5f7a47874d614d385cb246f76adb3542fa55a7101ea0c1
7
- data.tar.gz: 20503f8f9121ab812625cc778b911feda6ca9b3d9b7e699f44b3d6676e5691551b3734893a5bee0ab6a2ff5eda7ed45f62fc1ddaca65a3d16b385e27d349ec2f
6
+ metadata.gz: e03e1726b97758e8e86702832f4838fd700daad9e3248832eb8583b1307d6746d4e5223e56549b93455dbab1da82b5534b48767744124ad4833eb785c4a78220
7
+ data.tar.gz: 40c5ae08da8b346230612f3ccfb2d0c23d40c93ab9188e4c9d27a152c2c36c52ed1f051bce9443f4ab817aa5c8a705473f7aa85732c9f72da4b1a0e30ff4810d
data/Dockerfile CHANGED
@@ -49,16 +49,20 @@ RUN cd /opt \
49
49
  && tar xvf jruby.tar.gz \
50
50
  && mv jruby-9.2.9.0 jruby
51
51
 
52
+ ARG COSMOS_REPO=https://github.com/BallAerospace/COSMOS.git
53
+
52
54
  # Download and setup COSMOS devel area
53
55
  RUN gem install bundler --no-document
54
56
  RUN cd /devel \
55
- && git clone https://github.com/BallAerospace/COSMOS.git \
57
+ && git clone ${COSMOS_REPO} COSMOS \
56
58
  && cd /devel/COSMOS \
57
59
  && bundle install
58
60
 
61
+ ARG COSMOS_DOCKER_REPO=https://github.com/BallAerospace/cosmos-docker.git
62
+
59
63
  # Download COSMOS docker files to support docker release
60
64
  RUN cd /devel \
61
- && git clone https://github.com/BallAerospace/cosmos-docker.git
65
+ && git clone ${COSMOS_DOCKER_REPO}
62
66
 
63
67
  ENV COSMOS_DEVEL /devel/COSMOS
64
68
  WORKDIR /devel/COSMOS
@@ -694,6 +694,29 @@ ext/cosmos/ext/tabbed_plots_config/tabbed_plots_config.c
694
694
  ext/cosmos/ext/telemetry/extconf.rb
695
695
  ext/cosmos/ext/telemetry/telemetry.c
696
696
  ext/mkrf_conf.rb
697
+ extensions/vscode/.gitignore
698
+ extensions/vscode/.vscode/launch.json
699
+ extensions/vscode/.vscode/settings.json
700
+ extensions/vscode/.vscode/tasks.json
701
+ extensions/vscode/License.txt
702
+ extensions/vscode/README.md
703
+ extensions/vscode/client/License.txt
704
+ extensions/vscode/client/README.md
705
+ extensions/vscode/client/cosmos.configuration.json
706
+ extensions/vscode/client/images/icon.png
707
+ extensions/vscode/client/package-lock.json
708
+ extensions/vscode/client/package.json
709
+ extensions/vscode/client/src/extension.ts
710
+ extensions/vscode/client/src/screen_preview.rb
711
+ extensions/vscode/client/syntaxes/cosmos.tmLanguage.json
712
+ extensions/vscode/client/tsconfig.json
713
+ extensions/vscode/package-lock.json
714
+ extensions/vscode/package.json
715
+ extensions/vscode/server/License.txt
716
+ extensions/vscode/server/package-lock.json
717
+ extensions/vscode/server/package.json
718
+ extensions/vscode/server/src/server.ts
719
+ extensions/vscode/server/tsconfig.json
697
720
  install/Gemfile
698
721
  install/Launcher
699
722
  install/Launcher.bat
@@ -1454,8 +1477,10 @@ spec/interfaces/udp_interface_spec.rb
1454
1477
  spec/io/buffered_file_spec.rb
1455
1478
  spec/io/io_multiplexer_spec.rb
1456
1479
  spec/io/json_drb_object_spec.rb
1480
+ spec/io/json_drb_rack_spec.rb
1457
1481
  spec/io/json_drb_spec.rb
1458
1482
  spec/io/json_rpc_spec.rb
1483
+ spec/io/posix_serial_driver_spec.rb
1459
1484
  spec/io/raw_logger_pair_spec.rb
1460
1485
  spec/io/raw_logger_spec.rb
1461
1486
  spec/io/serial_driver_spec.rb
data/README.md CHANGED
@@ -105,6 +105,10 @@ Before any contributions can be incorporated we do require all contributors to s
105
105
 
106
106
  This protects both you and us and you retain full rights to any code you write.
107
107
 
108
+ ## Vulnerability Disclosure
109
+
110
+ If you discover a security vulnerability in COSMOS, please do not disclose to any public forum or our Github tickets system. Please email the vulnerability details to COSMOS@ball.com, and give us 90 days to incorporate any needed changes. Also please also let us know how how you would like to be reffered to for attribution when we post the fix. Thanks!
111
+
108
112
  ## Code Status
109
113
 
110
114
  * [![Travis Build Status](https://travis-ci.org/BallAerospace/COSMOS.svg?branch=master)](https://travis-ci.org/BallAerospace/COSMOS)
data/Rakefile CHANGED
@@ -312,7 +312,7 @@ end
312
312
  task :docker_run do
313
313
  STDOUT.puts "Note, this is not automated on purpose to ensure each step is successful (with user entry of credentials for github/rubygems.org)"
314
314
  STDOUT.puts "Steps to perform a COSMOS release:"
315
- STDOUT.puts "1. git config --global user.name \"First Last\""
315
+ STDOUT.puts "1. git config --global user.name \"Last, First\""
316
316
  STDOUT.puts "2. git config --global user.email \"me@ball.com\""
317
317
  STDOUT.puts "3. git pull"
318
318
  STDOUT.puts "4. export VERSION=X.X.X"
@@ -324,17 +324,12 @@ task :docker_run do
324
324
  STDOUT.puts "10. /usr/bin/gem push cosmos-X.X.X-java.gem"
325
325
  STDOUT.puts "11. cd /devel/cosmos-docker"
326
326
  STDOUT.puts "12. git pull"
327
- STDOUT.puts "13. Update COSMOS_VERSION in all Dockerfiles"
327
+ STDOUT.puts "13. Update COSMOS_VERSION in all Dockerfiles. Also update README.md"
328
328
  STDOUT.puts "14. git commit -a -m \"Release COSMOS vX.X.X\""
329
329
  STDOUT.puts "15. git push"
330
330
  STDOUT.puts "16. git checkout -b vX.X.X"
331
331
  STDOUT.puts "17. git push --set-upstream origin vX.X.X"
332
332
  STDOUT.puts "18. Update release notes on github.com and cosmosrb.com"
333
333
 
334
- _, platform, *_ = RUBY_PLATFORM.split("-")
335
- if (platform == 'mswin32' or platform == 'mingw32') and which('winpty')
336
- system('winpty docker run -it --rm cosmos-dev')
337
- else
338
- system('docker run -it --rm cosmos-dev')
339
- end
334
+ system('docker run -it --rm cosmos-dev')
340
335
  end
@@ -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
- files = []
17
- if ARGV.length == 0
18
- require 'find'
16
+ require 'ostruct'
17
+ require 'optparse'
18
+
19
+ options = OpenStruct.new
20
+ options.filename = nil
21
+ options.sort_column = nil
19
22
 
20
- #Find all .rb and .rbw files from the current directory
21
- Find.find('.') do |path|
22
- Find.prune if FileTest.directory?(path) and File.basename(path) == 'pkg'
23
- extension = File.extname(path)
24
- files << path if extension.to_s =~ /\.rb/i
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
- else
27
- if ARGV[0] == '--infile' or ARGV[0] == '-i'
28
- File.open(ARGV[1], 'r') {|file| file.each_line {|line| files << line.chomp.strip}}
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
- files = ARGV
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 << [filename, lines, comments, slocs, comments.to_f / slocs.to_f]
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 "| Filename | Lines | Comments | SLOCs | Ratio |"
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("| %-33s | %8d | %8d | %8d | %6.2f |",
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("| Totals - %3d Files | %8d | %8d | %8d | %6.2f |",
83
- total_files, total_lines, total_comments, total_slocs, total_ratio)
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)
@@ -113,7 +113,7 @@ 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', '~> 2.0'
116
+ s.add_development_dependency 'benchmark-ips', '= 2.7.2'
117
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"
@@ -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
- and DATA_BITS which changes the data bits of the serial interface.
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).
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  AUTO_DECLARE_TARGETS:
3
3
  summary: Automatically load all the target folders under config/targets into the system
4
- description: When automatically discovering target folders the COSMOS naming convention
4
+ description:
5
+ When automatically discovering target folders the COSMOS naming convention
5
6
  must be followed. Target folders must be uppercase and be named according to how
6
7
  COSMOS will access them. For example, if you create a config/targets/INST directory,
7
8
  COSMOS will create a target named 'INST' which is how it will be referenced.
@@ -9,7 +10,8 @@ AUTO_DECLARE_TARGETS:
9
10
  DECLARE_TARGET keyword.
10
11
  DECLARE_TARGET:
11
12
  summary: Declare a COSMOS target and name it
12
- description: Declare target is used in place of AUTO_DECLARE_TARGETS to give more
13
+ description:
14
+ Declare target is used in place of AUTO_DECLARE_TARGETS to give more
13
15
  fine grained control over how the target folder is loaded and named within COSMOS.
14
16
  This is required if AUTO_DECLARE_TARGET is not present.
15
17
  example: DECLARE_TARGET INST INST2 inst.txt
@@ -26,7 +28,8 @@ DECLARE_TARGET:
26
28
  the target name will be the directory name given above.
27
29
  - name: Target Filename
28
30
  required: false
29
- description: The name of the file in the target directory which contains the
31
+ description:
32
+ The name of the file in the target directory which contains the
30
33
  configuration information for the target. By default this is 'target.txt'
31
34
  but if you want to rename this you need to set this parameter.
32
35
  DECLARE_GEM_TARGET:
@@ -38,7 +41,8 @@ DECLARE_GEM_TARGET:
38
41
  parameters:
39
42
  - name: Gem Name
40
43
  required: true
41
- description: The COSMOS gem name which must be cosmos-<gem-name> where <gem-name>
44
+ description:
45
+ The COSMOS gem name which must be cosmos-<gem-name> where <gem-name>
42
46
  is the descriptive gem name. In the above example, the target will be named
43
47
  'GEM-NAME' (note the cosmos- prefix is stripped off).
44
48
  values: .+
@@ -49,7 +53,8 @@ DECLARE_GEM_TARGET:
49
53
  the target name will be the gem name as described above.
50
54
  - name: Target Filename
51
55
  required: false
52
- description: The name of the file in the target directory which contains the
56
+ description:
57
+ The name of the file in the target directory which contains the
53
58
  configuration information for the target. By default this is 'target.txt'
54
59
  but if you want to rename this you need to set this parameter.
55
60
  DECLARE_GEM_MULTI_TARGET:
@@ -64,7 +69,8 @@ DECLARE_GEM_MULTI_TARGET:
64
69
  parameters:
65
70
  - name: Gem Name
66
71
  required: true
67
- description: The COSMOS gem name which must be cosmos-<gem-name> where <gem-name>
72
+ description:
73
+ The COSMOS gem name which must be cosmos-<gem-name> where <gem-name>
68
74
  is the descriptive gem name. In the above example, the target will be named
69
75
  'GEM-NAME' (note the cosmos- prefix is stripped off).
70
76
  values: .+
@@ -80,12 +86,14 @@ DECLARE_GEM_MULTI_TARGET:
80
86
  the target name will be the gem name as described above.
81
87
  - name: Target Filename
82
88
  required: false
83
- description: The name of the file in the target directory which contains the
89
+ description:
90
+ The name of the file in the target directory which contains the
84
91
  configuration information for the target. By default this is 'target.txt'
85
92
  but if you want to rename this you need to set this parameter.
86
93
  PORT:
87
94
  summary: Set a Server Port
88
- description: Port is used to set the default ports used by the Command and Telemetry Server.
95
+ description:
96
+ Port is used to set the default ports used by the Command and Telemetry Server.
89
97
  It is not necessary to set this option unless you wish to override the defaults
90
98
  (given in the example usage). Overriding ports is necessary if you want to run
91
99
  two Command and Telemetry Servers on the same computer simultaneously.
@@ -96,7 +104,8 @@ PORT:
96
104
  parameters:
97
105
  - name: Port Name
98
106
  required: true
99
- description: CTS_API - This port is what tools connect to to communicate with the COSMOS Scripting API.
107
+ description:
108
+ CTS_API - This port is what tools connect to to communicate with the COSMOS Scripting API.
100
109
  TLMVIEWER_API - This port is used to remotely open and close telemetry screens in Telemetry Viewer.
101
110
  CTS_PREIDENTIFIED - This port provides access to a preidentified stream of all telemetry packets
102
111
  in the system. This is currently used by Telemetry Grapher and can be used to chain Command
@@ -114,7 +123,8 @@ LISTEN_HOST:
114
123
  parameters:
115
124
  - name: Host Port Name
116
125
  required: true
117
- description: CTS_API - This port is what tools connect to to communicate with the COSMOS Scripting API.
126
+ description:
127
+ CTS_API - This port is what tools connect to to communicate with the COSMOS Scripting API.
118
128
  TLMVIEWER_API - This port is used to remotely open and close telemetry screens in Telemetry Viewer.
119
129
  CTS_PREIDENTIFIED - This port provides access to a preidentified stream of all telemetry packets
120
130
  in the system. This is currently used by Telemetry Grapher and can be used to chain Command
@@ -124,7 +134,8 @@ LISTEN_HOST:
124
134
  values: <%= %w(CTS_API TLMVIEWER_API CTS_PREIDENTIFIED CTS_CMD_ROUTER) %>
125
135
  - name: Host Value
126
136
  required: true
127
- description: The IP address or host name to bind the Host Port Name to. By default,
137
+ description:
138
+ The IP address or host name to bind the Host Port Name to. By default,
128
139
  the CTS_API and TLMVIEWER_API are bound to localhost meaning that only tools
129
140
  on the same machine can connect. By default, CTS_PREIDENTIFIED and CTS_CMD_ROUTER
130
141
  are bound to '0.0.0.0' to allow for tools on any machines to connect. This
@@ -136,7 +147,8 @@ CONNECT_HOST:
136
147
  parameters:
137
148
  - name: Host Port Name
138
149
  required: true
139
- description: CTS_API - This port is what tools connect to to communicate with the COSMOS Scripting API.
150
+ description:
151
+ CTS_API - This port is what tools connect to to communicate with the COSMOS Scripting API.
140
152
  TLMVIEWER_API - This port is used to remotely open and close telemetry screens in Telemetry Viewer.
141
153
  CTS_PREIDENTIFIED - This port provides access to a preidentified stream of all telemetry packets
142
154
  in the system. This is currently used by Telemetry Grapher and can be used to chain Command
@@ -146,15 +158,18 @@ CONNECT_HOST:
146
158
  values: <%= %w(CTS_API TLMVIEWER_API CTS_PREIDENTIFIED CTS_CMD_ROUTER) %>
147
159
  - name: Host Value
148
160
  required: true
149
- description: The IP address or host name to connect tools to. By default all
161
+ description:
162
+ The IP address or host name to connect tools to. By default all
150
163
  ports are bound to localhost so all tools connect to the local machine.
151
164
  values: .+
152
165
  PATH:
153
166
  summary: Set a Server Path
154
- description: Path is used to set the default paths used by the Command and Telemetry Server
167
+ description:
168
+ Path is used to set the default paths used by the Command and Telemetry Server
155
169
  to access or create files. It is not necessary to set this option unless you wish to
156
170
  override the defaults (given in the example usage).
157
- warning: The PROCEDURES path must be set for Script Runner and Test Runner to locate your
171
+ warning:
172
+ The PROCEDURES path must be set for Script Runner and Test Runner to locate your
158
173
  procedure files. You can add multiple 'PATH PROCEDURES' lines to your configuration file
159
174
  to set multiple locations.
160
175
  example: |
@@ -205,7 +220,8 @@ DEFAULT_PACKET_LOG_READER:
205
220
  since: 4.0.0
206
221
  STALENESS_SECONDS:
207
222
  summary: Number of seconds before marking the packet stale
208
- description: A stale packet is identified in telemetry screens by all the telemetry
223
+ description:
224
+ A stale packet is identified in telemetry screens by all the telemetry
209
225
  items in the stale packet being colored purple..
210
226
  example: STALENESS_SECONDS 30 # Default
211
227
  parameters:
@@ -227,7 +243,8 @@ DISABLE_DNS:
227
243
  As of COSMOS 3.5.0 the default is to not use DNS
228
244
  ENABLE_SOUND:
229
245
  summary: Enable audible sounds when popups occur
230
- description: Enable sound makes any prompts that occur in ScriptRunner/TestRunner
246
+ description:
247
+ Enable sound makes any prompts that occur in ScriptRunner/TestRunner
231
248
  make an audible sound when they popup to alert the operator of needed input.
232
249
  since: 3.5.0
233
250
  ALLOW_ACCESS:
@@ -236,12 +253,14 @@ ALLOW_ACCESS:
236
253
  parameters:
237
254
  - name: Name or IP Address
238
255
  required: true
239
- description: Machine name to allow access or you can specify 'ALL' to allow
256
+ description:
257
+ Machine name to allow access or you can specify 'ALL' to allow
240
258
  all machines access
241
259
  values: .+
242
260
  META_INIT:
243
261
  summary: Specify a file to initialize the SYSTEM META packet
244
- description: Filename should be a text file with key value pairs where the keyword
262
+ description:
263
+ Filename should be a text file with key value pairs where the keyword
245
264
  matches an item in the SYSTEM META packet. Note you do not have to specify ALL
246
265
  the items in the SYSTEM META packet.
247
266
  since: 4.0.0
@@ -252,7 +271,8 @@ META_INIT:
252
271
  values: .+
253
272
  TIME_ZONE_UTC:
254
273
  summary: Report all times as UTC
255
- description: COSMOS will report all times as UTC time. If this keyword is not used,
274
+ description:
275
+ COSMOS will report all times as UTC time. If this keyword is not used,
256
276
  COSMOS will report all times as local times, where the local time zone is determined
257
277
  automatically by Ruby based upon the operating system time settings. This setting
258
278
  affects packet receive times, timestamped log filenames, message logs,
@@ -260,7 +280,8 @@ TIME_ZONE_UTC:
260
280
  since: 3.10.0
261
281
  ADD_HASH_FILE:
262
282
  summary: Add a file to the hashing sum calculation
263
- description: Adds a file to the set of files used in marshal file hashing sum calculation.
283
+ description:
284
+ Adds a file to the set of files used in marshal file hashing sum calculation.
264
285
  Upon startup, COSMOS calculates a hashing sum over the command/telemetry definition files
265
286
  for all targets. After the definitions have been processed, COSMOS saves the resulting
266
287
  objects as marshal files in a folder with the hashing sum as part of the name.
@@ -288,11 +309,11 @@ CLASSIFICATION:
288
309
  - name: Display Text
289
310
  required: true
290
311
  description: The text to display in the classification banner
291
- values: '.*'
312
+ values: ".*"
292
313
  - name: Color Name | Red Hex
293
314
  required: true
294
315
  description: The color name or the red value of a RGB triplet
295
- values: '.*'
316
+ values: ".*"
296
317
  - name: Green Hex
297
318
  required: false
298
319
  description: The green value of a RGB triplet
@@ -303,7 +324,8 @@ CLASSIFICATION:
303
324
  values: '\d+'
304
325
  HASHING_ALGORITHM:
305
326
  summary: Specify which Ruby Digest hashing algorithm to use
306
- description: Set the hashing algorithm used for config hashing, tlm_viewer hashing, and
327
+ description:
328
+ Set the hashing algorithm used for config hashing, tlm_viewer hashing, and
307
329
  script hashing. COSMOS will truncate the resulting hash string down to 32 characters
308
330
  since: 4.4.0
309
331
  example: HASHING_ALGORITHM SHA256
@@ -312,3 +334,38 @@ HASHING_ALGORITHM:
312
334
  required: true
313
335
  description: Digest algorithm, one of MD5, RMD160, SHA1, SHA256, SHA384, SHA512
314
336
  values: .+
337
+ ALLOW_ROUTER_COMMANDING:
338
+ summary: Allow routers to receive and forward commands to interfaces
339
+ since: 4.5.0
340
+ example: ALLOW_ROUTER_COMMANDING
341
+ X_CSRF_TOKEN:
342
+ summary: Secret token passed with API calls
343
+ since: 4.5.0
344
+ example: X_CSRF_TOKEN Secret
345
+ parameters:
346
+ - name: token
347
+ required: true
348
+ description: Token passed with api calls
349
+ values: .+
350
+ ALLOW_ORIGIN:
351
+ summary: Allow a specific HTTP Origin header in Api calls
352
+ description: This keyword should only be used if COSMOS needs to be commanded from a web server.
353
+ since: 4.5.0
354
+ example: ALLOW_ORIGIN 1.2.4.4:8080
355
+ parameters:
356
+ - name: origin
357
+ required: true
358
+ description: Hostname colon port of origin
359
+ values: .+
360
+ ALLOW_HOST:
361
+ summary: Allow a specific HTTP Host header in Api calls
362
+ description:
363
+ By default includes ['127.0.0.1:7777', '127.0.0.1:7778', '127.0.0.1:7877', '127.0.0.1:8779', '127.0.0.1:8780'].
364
+ API Ports changed by a PORT line will also be added automatically. If you need external connections you must add your ip and
365
+ these ports to allow external access to work for apis
366
+ example: ALLOW_HOST 1.2.4.4:7777
367
+ parameters:
368
+ - name: host
369
+ required: true
370
+ description: Hostname colon port of host
371
+ values: .+