cosmos 3.8.0 → 3.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/autohotkey/tools/packet_viewer.ahk +4 -0
- data/cosmos.gemspec +1 -1
- data/data/crc.txt +277 -277
- data/demo/Gemfile +2 -2
- data/demo/config/data/crc.txt +176 -176
- data/demo/config/targets/INST/cmd_tlm/_ccsds_cmd.txt +2 -2
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +4 -4
- data/demo/procedures/example_test.rb +4 -0
- data/install/Gemfile +1 -1
- data/install/config/data/crc.txt +112 -112
- data/lib/cosmos/config/config_parser.rb +35 -1
- data/lib/cosmos/core_ext/string.rb +21 -17
- data/lib/cosmos/core_ext/time.rb +6 -2
- data/lib/cosmos/gui/opengl/gl_viewer.rb +4 -4
- data/lib/cosmos/gui/opengl/stl_shape.rb +5 -1
- data/lib/cosmos/gui/qt.rb +0 -26
- data/lib/cosmos/io/io_multiplexer.rb +27 -45
- data/lib/cosmos/packets/packet.rb +64 -24
- data/lib/cosmos/packets/packet_config.rb +254 -54
- data/lib/cosmos/packets/packet_item.rb +39 -10
- data/lib/cosmos/packets/parsers/packet_item_parser.rb +7 -2
- data/lib/cosmos/script/commands.rb +5 -0
- data/lib/cosmos/script/scripting.rb +5 -5
- data/lib/cosmos/script/telemetry.rb +5 -0
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +22 -0
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +38 -10
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +48 -9
- data/lib/cosmos/tools/test_runner/test_runner.rb +76 -14
- data/lib/cosmos/tools/tlm_viewer/widgets/linegraph_widget.rb +11 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/timegraph_widget.rb +15 -12
- data/lib/cosmos/top_level.rb +29 -32
- data/lib/cosmos/version.rb +4 -4
- data/spec/config/config_parser_spec.rb +8 -15
- data/spec/core_ext/socket_spec.rb +2 -2
- data/spec/core_ext/string_spec.rb +10 -0
- data/spec/core_ext/time_spec.rb +12 -4
- data/spec/io/io_multiplexer_spec.rb +11 -3
- data/spec/packets/packet_spec.rb +30 -0
- data/spec/script/commands_spec.rb +2 -1
- data/spec/script/scripting_spec.rb +22 -0
- data/spec/script/telemetry_spec.rb +2 -1
- data/spec/spec_helper.rb +2 -2
- data/spec/tools/cmd_tlm_server/router_thread_spec.rb +2 -2
- data/spec/top_level/top_level_spec.rb +4 -2
- metadata +5 -5
@@ -283,7 +283,7 @@ module Cosmos
|
|
283
283
|
end
|
284
284
|
end
|
285
285
|
|
286
|
-
describe "get_cmd_value, get_cmd_time" do
|
286
|
+
describe "get_cmd_value, get_cmd_time, get_cmd_buffer" do
|
287
287
|
it "passes through to the cmd_tlm_server" do
|
288
288
|
expect {
|
289
289
|
get_cmd_value("INST", "COLLECT", "TYPE")
|
@@ -293,6 +293,7 @@ module Cosmos
|
|
293
293
|
get_cmd_time("INST", "COLLECT")
|
294
294
|
get_cmd_time("INST")
|
295
295
|
get_cmd_time()
|
296
|
+
get_cmd_buffer("INST", "COLLECT")
|
296
297
|
}.to_not raise_error
|
297
298
|
end
|
298
299
|
end
|
@@ -190,6 +190,28 @@ module Cosmos
|
|
190
190
|
stdout.rewind
|
191
191
|
end
|
192
192
|
end
|
193
|
+
|
194
|
+
it "handles a negative tolerance" do
|
195
|
+
capture_io do |stdout|
|
196
|
+
check_tolerance("INST HEALTH_STATUS TEMP1", -100.0, -1)
|
197
|
+
expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 was within range"
|
198
|
+
stdout.rewind
|
199
|
+
|
200
|
+
check_tolerance("INST", "HEALTH_STATUS", "TEMP1", -100.0, -1)
|
201
|
+
expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 was within range"
|
202
|
+
stdout.rewind
|
203
|
+
|
204
|
+
expect { check_tolerance("INST HEALTH_STATUS TEMP1", -200.0, -1) }.to raise_error(CheckError, /CHECK: INST HEALTH_STATUS TEMP1 failed to be within range/)
|
205
|
+
stdout.rewind
|
206
|
+
|
207
|
+
check_tolerance_raw("INST HEALTH_STATUS TEMP1", 0, -1)
|
208
|
+
expect(stdout.string).to match "CHECK: INST HEALTH_STATUS TEMP1 was within range"
|
209
|
+
stdout.rewind
|
210
|
+
|
211
|
+
expect { check_tolerance_raw("INST HEALTH_STATUS TEMP1", 100, -1) }.to raise_error(CheckError, /CHECK: INST HEALTH_STATUS TEMP1 failed to be within range/)
|
212
|
+
stdout.rewind
|
213
|
+
end
|
214
|
+
end
|
193
215
|
end
|
194
216
|
|
195
217
|
describe "check_expression" do
|
@@ -52,7 +52,7 @@ module Cosmos
|
|
52
52
|
sleep(0.1)
|
53
53
|
end
|
54
54
|
|
55
|
-
describe "tlm, tlm_raw, tlm_formatted, tlm_with_units, tlm_variable" do
|
55
|
+
describe "tlm, tlm_raw, tlm_formatted, tlm_with_units, tlm_variable, get_tlm_buffer" do
|
56
56
|
it "passes through to the cmd_tlm_server" do
|
57
57
|
expect {
|
58
58
|
expect(tlm("INST HEALTH_STATUS TEMP1")).to eql -100.0
|
@@ -60,6 +60,7 @@ module Cosmos
|
|
60
60
|
expect(tlm_formatted("INST HEALTH_STATUS TEMP1")).to eql "-100.000"
|
61
61
|
expect(tlm_with_units("INST HEALTH_STATUS TEMP1")).to eql "-100.000 C"
|
62
62
|
expect(tlm_variable("INST HEALTH_STATUS TEMP1", :RAW)).to eql 0
|
63
|
+
get_tlm_buffer("INST", "HEALTH_STATUS")
|
63
64
|
}.to_not raise_error
|
64
65
|
end
|
65
66
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -22,10 +22,10 @@ unless ENV['COSMOS_NO_SIMPLECOV']
|
|
22
22
|
require 'simplecov'
|
23
23
|
require 'coveralls'
|
24
24
|
Coveralls.wear!
|
25
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
25
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
26
26
|
SimpleCov::Formatter::HTMLFormatter,
|
27
27
|
Coveralls::SimpleCov::Formatter
|
28
|
-
]
|
28
|
+
])
|
29
29
|
SimpleCov.start do
|
30
30
|
merge_timeout 12 * 60 * 60 # merge the last 12 hours of results
|
31
31
|
add_filter '/spec/'
|
@@ -27,7 +27,7 @@ module Cosmos
|
|
27
27
|
allow(@interface).to receive(:disconnect)
|
28
28
|
allow(@interface).to receive(:read) do
|
29
29
|
sleep 0.06
|
30
|
-
@packet
|
30
|
+
@packet.clone
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -115,7 +115,7 @@ module Cosmos
|
|
115
115
|
expect(Thread.list.length).to eql(1)
|
116
116
|
expect(stdout.string).to match "Received unknown identified command: BOB SMITH"
|
117
117
|
end
|
118
|
-
expect(target).to have_received(:interface).
|
118
|
+
expect(target).to have_received(:interface).at_least(2).times #and_return(@interface)
|
119
119
|
end
|
120
120
|
|
121
121
|
it "does not send identified commands with a target and no interface" do
|
@@ -319,8 +319,10 @@ module Cosmos
|
|
319
319
|
|
320
320
|
describe "open_in_text_editor" do
|
321
321
|
it "opens the file in a text editor" do
|
322
|
-
|
323
|
-
|
322
|
+
unless ENV['TRAVIS']
|
323
|
+
expect(Cosmos).to receive(:system).with(/#{File.basename(__FILE__)}/)
|
324
|
+
Cosmos.open_in_text_editor(__FILE__)
|
325
|
+
end
|
324
326
|
end
|
325
327
|
end
|
326
328
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cosmos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -367,14 +367,14 @@ dependencies:
|
|
367
367
|
requirements:
|
368
368
|
- - "~>"
|
369
369
|
- !ruby/object:Gem::Version
|
370
|
-
version: '0.
|
370
|
+
version: '0.11'
|
371
371
|
type: :development
|
372
372
|
prerelease: false
|
373
373
|
version_requirements: !ruby/object:Gem::Requirement
|
374
374
|
requirements:
|
375
375
|
- - "~>"
|
376
376
|
- !ruby/object:Gem::Version
|
377
|
-
version: '0.
|
377
|
+
version: '0.11'
|
378
378
|
- !ruby/object:Gem::Dependency
|
379
379
|
name: ruby-prof
|
380
380
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1900,7 +1900,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1900
1900
|
version: '0'
|
1901
1901
|
requirements: []
|
1902
1902
|
rubyforge_project:
|
1903
|
-
rubygems_version: 2.4.5
|
1903
|
+
rubygems_version: 2.4.5.1
|
1904
1904
|
signing_key:
|
1905
1905
|
specification_version: 4
|
1906
1906
|
summary: Ball Aerospace COSMOS
|