cosmos 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Manifest.txt +5 -0
- data/appveyor.yml +2 -0
- data/autohotkey/tools/replay.ahk +45 -45
- data/autohotkey/tools/script_runner.ahk +3 -9
- data/cosmos.gemspec +1 -1
- data/data/config/interface_modifiers.yaml +23 -0
- data/data/config/screen.yaml +1 -1
- data/data/crc.txt +20 -18
- data/demo/config/targets/INST/cmd_tlm_server.txt +1 -1
- data/lib/cosmos/config/config_parser.rb +8 -3
- data/lib/cosmos/gui/dialogs/exception_dialog.rb +20 -5
- data/lib/cosmos/interfaces/protocols/burst_protocol.rb +13 -3
- data/lib/cosmos/interfaces/protocols/crc_protocol.rb +27 -3
- data/lib/cosmos/interfaces/protocols/fixed_protocol.rb +4 -2
- data/lib/cosmos/interfaces/protocols/length_protocol.rb +4 -2
- data/lib/cosmos/interfaces/protocols/override_protocol.rb +2 -2
- data/lib/cosmos/interfaces/protocols/preidentified_protocol.rb +3 -2
- data/lib/cosmos/interfaces/protocols/protocol.rb +16 -4
- data/lib/cosmos/interfaces/protocols/template_protocol.rb +7 -2
- data/lib/cosmos/interfaces/protocols/terminated_protocol.rb +4 -2
- data/lib/cosmos/packets/packet_config.rb +19 -859
- data/lib/cosmos/packets/packet_item.rb +56 -201
- data/lib/cosmos/packets/parsers/xtce_converter.rb +440 -0
- data/lib/cosmos/packets/parsers/xtce_parser.rb +682 -0
- data/lib/cosmos/tools/config_editor/config_editor.rb +143 -5
- data/lib/cosmos/tools/tlm_viewer/screen.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +5 -3
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb +40 -27
- data/lib/cosmos/version.rb +4 -4
- data/spec/config/config_parser_spec.rb +39 -2
- data/spec/install/config/targets/INST/screens/hs.txt +42 -0
- data/spec/install/config/targets/INST/target.txt +2 -0
- data/spec/interfaces/protocols/burst_protocol_spec.rb +18 -0
- data/spec/interfaces/protocols/length_protocol_spec.rb +49 -0
- data/spec/interfaces/udp_interface_spec.rb +0 -9
- data/spec/packets/packet_config_spec.rb +21 -144
- data/spec/packets/packet_item_spec.rb +68 -4
- data/spec/packets/parsers/packet_item_parser_spec.rb +12 -0
- data/spec/packets/parsers/xtce_parser_spec.rb +398 -0
- data/spec/tools/tlm_viewer/tlm_viewer_config_spec.rb +401 -0
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1f058c672206badfe10d062b885f7e49d9ece2
|
4
|
+
data.tar.gz: e90e755c7e6057b883c70b1bb205f697665ff663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ff59863ce7d987090510452c1a53252bfb4837521e709c37f3f00100caac5d7f5bf483139a4326a52e3bd3f254ead20bdb5434b62dffaca079e3a3463d2a2b
|
7
|
+
data.tar.gz: 1c038dc69f1fa7316da309b32389a4c16934618775dddab7dfafac2ed2f41bd5ac4d7259a193f3f5b87319efd20bf942e4fa73fc72b56bd254b8e9bf1fe01807
|
data/Manifest.txt
CHANGED
@@ -992,6 +992,8 @@ lib/cosmos/packets/parsers/packet_item_parser.rb
|
|
992
992
|
lib/cosmos/packets/parsers/packet_parser.rb
|
993
993
|
lib/cosmos/packets/parsers/processor_parser.rb
|
994
994
|
lib/cosmos/packets/parsers/state_parser.rb
|
995
|
+
lib/cosmos/packets/parsers/xtce_converter.rb
|
996
|
+
lib/cosmos/packets/parsers/xtce_parser.rb
|
995
997
|
lib/cosmos/packets/structure.rb
|
996
998
|
lib/cosmos/packets/structure_item.rb
|
997
999
|
lib/cosmos/packets/telemetry.rb
|
@@ -1239,6 +1241,7 @@ spec/install/config/targets/INST/cmd_tlm/inst_tlm.txt
|
|
1239
1241
|
spec/install/config/targets/INST/cmd_tlm/inst_tlm_linc.txt
|
1240
1242
|
spec/install/config/targets/INST/cmd_tlm_server.txt
|
1241
1243
|
spec/install/config/targets/INST/lib/sim_inst.rb
|
1244
|
+
spec/install/config/targets/INST/screens/hs.txt
|
1242
1245
|
spec/install/config/targets/INST/target.txt
|
1243
1246
|
spec/install/config/targets/SYSTEM/cmd_tlm/limits_groups.txt
|
1244
1247
|
spec/install/config/targets/SYSTEM/cmd_tlm/meta_tlm.txt
|
@@ -1295,6 +1298,7 @@ spec/packets/parsers/packet_item_parser_spec.rb
|
|
1295
1298
|
spec/packets/parsers/packet_parser_spec.rb
|
1296
1299
|
spec/packets/parsers/processor_parser_spec.rb
|
1297
1300
|
spec/packets/parsers/state_parser_spec.rb
|
1301
|
+
spec/packets/parsers/xtce_parser_spec.rb
|
1298
1302
|
spec/packets/structure_item_spec.rb
|
1299
1303
|
spec/packets/structure_spec.rb
|
1300
1304
|
spec/packets/telemetry_spec.rb
|
@@ -1338,6 +1342,7 @@ spec/tools/table_manager/table_item_spec.rb
|
|
1338
1342
|
spec/tools/table_manager/table_parser_spec.rb
|
1339
1343
|
spec/tools/table_manager/table_spec.rb
|
1340
1344
|
spec/tools/table_manager/tablemanager_core_spec.rb
|
1345
|
+
spec/tools/tlm_viewer/tlm_viewer_config_spec.rb
|
1341
1346
|
spec/top_level/top_level_spec.rb
|
1342
1347
|
spec/utilities/crc_spec.rb
|
1343
1348
|
spec/utilities/csv_spec.rb
|
data/appveyor.yml
CHANGED
data/autohotkey/tools/replay.ahk
CHANGED
@@ -4,100 +4,100 @@ WinWaitActive Replay
|
|
4
4
|
Sleep 1000
|
5
5
|
|
6
6
|
; Click on all the buttons with no file loaded
|
7
|
-
Click 75
|
7
|
+
Click 75 180 ; Rewind
|
8
8
|
Sleep 500
|
9
|
-
Click 188
|
9
|
+
Click 188 180 ; Go back one packet
|
10
10
|
Sleep 500
|
11
|
-
Click 300
|
11
|
+
Click 300 180 ; Play backwards
|
12
12
|
Sleep 500
|
13
|
-
Click 408
|
13
|
+
Click 408 180 ; Stop
|
14
14
|
Sleep 500
|
15
|
-
Click 515
|
15
|
+
Click 515 180 ; Play
|
16
16
|
Sleep 500
|
17
|
-
Click 625
|
17
|
+
Click 625 180 ; Advance one packet
|
18
18
|
Sleep 500
|
19
|
-
Click 737
|
19
|
+
Click 737 180 ; Go to the end
|
20
20
|
Sleep 500
|
21
21
|
|
22
|
-
Click
|
23
|
-
WinWaitActive Select
|
22
|
+
Click 710 115 ; Browse
|
23
|
+
WinWaitActive Select Log File
|
24
|
+
Click 370 50 ; Browse
|
25
|
+
WinWaitActive Select Log File:
|
24
26
|
Send bigtlm.bin{Enter}
|
27
|
+
Sleep 500
|
28
|
+
WinWaitActive Select Log File
|
29
|
+
Click 150 315 ; Ok
|
25
30
|
WinWaitActive Warning
|
26
31
|
Sleep 500
|
27
32
|
Send {Enter} ;
|
28
|
-
WinWaitActive Analyzing
|
29
|
-
Send {Enter}
|
30
33
|
WinWaitActive Replay
|
31
|
-
|
32
|
-
|
34
|
+
Sleep 2000
|
35
|
+
Click 710 115 ; Browse
|
36
|
+
WinWaitActive Select Log File
|
37
|
+
Click 370 50 ; Browse
|
38
|
+
WinWaitActive Select Log File:
|
33
39
|
Send bigtlm.bin{Enter}
|
40
|
+
Sleep 500
|
41
|
+
WinWaitActive Select Log File
|
42
|
+
Click 150 315 ; Ok
|
34
43
|
WinWaitActive Warning
|
35
44
|
Sleep 500
|
36
45
|
Send {Enter} ;
|
37
|
-
WinWaitActive Analyzing
|
38
46
|
WinWaitActive Replay
|
39
|
-
Sleep
|
47
|
+
Sleep 2000
|
40
48
|
|
41
|
-
Click 515
|
49
|
+
Click 515 180 ; Play RPY-1
|
42
50
|
Sleep 5000
|
43
|
-
Click 408
|
51
|
+
Click 408 180 ; Stop
|
44
52
|
Sleep 500
|
45
|
-
Click 75
|
53
|
+
Click 75 180 ; Rewind
|
46
54
|
Sleep 1000
|
47
|
-
Click 515
|
55
|
+
Click 515 180 ; Play RPY-2
|
48
56
|
Sleep 3000
|
49
|
-
Click 408
|
57
|
+
Click 408 180 ; Stop
|
50
58
|
Sleep 500
|
51
|
-
Click 300
|
59
|
+
Click 300 180 ; Play backwards RPY-2
|
52
60
|
Sleep 2000
|
53
|
-
Click 408
|
61
|
+
Click 408 180 ; Stop
|
54
62
|
Sleep 1000
|
55
63
|
Loop 4
|
56
64
|
{
|
57
|
-
Click 625
|
65
|
+
Click 625 180 ; Advance one packet RPY-6
|
58
66
|
Sleep 500
|
59
67
|
}
|
60
68
|
Loop 4
|
61
69
|
{
|
62
|
-
Click 188
|
70
|
+
Click 188 180 ; Go back one packet
|
63
71
|
Sleep 500
|
64
72
|
}
|
65
73
|
Sleep 1000
|
66
|
-
Click 737
|
74
|
+
Click 737 180 ; Go to the end
|
67
75
|
Sleep 500
|
68
|
-
Click 625
|
76
|
+
Click 625 180 ; Advance one packet RPY-5
|
69
77
|
Sleep 500
|
70
|
-
Click 75
|
78
|
+
Click 75 180 ; Rewind
|
71
79
|
Sleep 500
|
72
|
-
Click 188
|
80
|
+
Click 188 180 ; Go back one packet RPY-5
|
73
81
|
Sleep 1000
|
74
82
|
|
75
|
-
Click 100
|
83
|
+
Click 100 207 ; Delay dropdown RPY-4
|
76
84
|
Sleep 500
|
77
|
-
Click 100
|
85
|
+
Click 100 352
|
78
86
|
Sleep 1000
|
79
|
-
Click 515
|
87
|
+
Click 515 180 ; Play
|
80
88
|
Sleep 5000
|
81
|
-
Click 408
|
89
|
+
Click 408 180 ; Stop
|
82
90
|
Sleep 500
|
83
|
-
Click 75
|
91
|
+
Click 75 180 ; Rewind
|
84
92
|
Sleep 500
|
85
93
|
|
86
|
-
MouseClickDrag, L, 32,
|
94
|
+
MouseClickDrag, L, 32, 322, 750, 322, 60 ; Move the bar right RPY-7
|
87
95
|
Sleep 1000
|
88
|
-
MouseClickDrag, L,
|
89
|
-
|
90
|
-
; Start CmdTlmServer RPY-3
|
91
|
-
Run ruby.exe %A_ScriptDir%/CmdTlmServer
|
92
|
-
Sleep 4000
|
93
|
-
|
94
|
-
; Shut down the CTS
|
95
|
-
WinActivate, Command and Telemetry Server
|
96
|
-
Sleep 500
|
97
|
-
Send {Enter}
|
96
|
+
MouseClickDrag, L, 750, 322, 15, 322, 60 ; Move the bar left
|
98
97
|
|
99
98
|
; Quit Replay
|
100
99
|
WinActivate, Replay
|
101
100
|
Sleep 1000
|
102
101
|
Send ^q
|
103
|
-
Sleep
|
102
|
+
Sleep 1000
|
103
|
+
Send {Enter}
|
@@ -327,23 +327,17 @@ Sleep 500
|
|
327
327
|
Send puts "blank"
|
328
328
|
Sleep 500
|
329
329
|
|
330
|
-
Click
|
330
|
+
Click 320 90 ; Step SR-22
|
331
331
|
Sleep 500
|
332
|
-
|
333
|
-
Click 400 90 ; Start SR-4, SR-5
|
334
|
-
Sleep 500
|
335
|
-
Click 400 90 ; Go
|
332
|
+
Click 320 90 ; Step
|
336
333
|
Sleep 500
|
337
|
-
Click
|
334
|
+
Click 320 90 ; Step
|
338
335
|
Sleep 500
|
339
336
|
Click 480 90 ; Pause SR-6
|
340
337
|
Sleep 500
|
341
338
|
Click 550 90 ; Stop SR-7
|
342
339
|
Sleep 500
|
343
340
|
|
344
|
-
Click 470 790 ; Toggle Run/Step
|
345
|
-
Sleep 500
|
346
|
-
|
347
341
|
Send ^t ; Toggle Disconnect SR-20
|
348
342
|
WinWaitActive Server
|
349
343
|
Send {Enter}
|
data/cosmos.gemspec
CHANGED
@@ -87,7 +87,7 @@ spec = Gem::Specification.new do |s|
|
|
87
87
|
s.add_runtime_dependency 'snmp', '~> 1.0'
|
88
88
|
s.add_runtime_dependency 'rubyzip', '~> 1.2.1'
|
89
89
|
s.add_runtime_dependency 'nokogiri', '~> 1.6'
|
90
|
-
s.add_runtime_dependency 'opengl', '
|
90
|
+
s.add_runtime_dependency 'opengl', '~> 0.10' if RUBY_ENGINE == 'ruby' # MRI Only
|
91
91
|
s.add_runtime_dependency 'qtbindings', '~> 4.8.6', '>= 4.8.6.2' if RUBY_ENGINE == 'ruby' # MRI Only
|
92
92
|
s.add_runtime_dependency 'puma', '~> 3.10.0'
|
93
93
|
s.add_runtime_dependency 'rack', '~> 2.0.3'
|
@@ -42,3 +42,26 @@ LOG_RAW:
|
|
42
42
|
description: LOG_RAW does not add any COSMOS headers and thus can not be read by COSMOS tools.
|
43
43
|
It is primarily useful for low level debugging of an interface. You will have to
|
44
44
|
manually parse these logs yourself using a hex editor or other application.
|
45
|
+
PROTOCOL:
|
46
|
+
summary: Protocols modify the interface by processing the data
|
47
|
+
description: Protocols can be either READ, WRITE, or READ_WRITE. READ protocols act on the data
|
48
|
+
received by the interface while write acts on the data before it is sent out. READ_WRITE applies
|
49
|
+
the protocol to both reading and writing.<br/><br/>
|
50
|
+
There is only one built in protocol implemented by override_protocol.rb.
|
51
|
+
This protocol allows for Scripts to use the override_tlm() and normalize_tlm() methods to permanently
|
52
|
+
change a telemetry value. Note, this differs from set_tlm() as set_tlm() is over-written by new
|
53
|
+
incoming telemetry.<br/><br/>
|
54
|
+
For information on creating your own custom protocol please see <a href="http://cosmosrb.com/docs/protocols">cosmosrb.com/docs/protocols</a>
|
55
|
+
since: 4.0.0
|
56
|
+
parameters:
|
57
|
+
- name: Type
|
58
|
+
required: true
|
59
|
+
description: Whether to apply the protocol on incoming data, outgoing data, or both
|
60
|
+
values: ['READ', 'WRITE', 'READ_WRITE']
|
61
|
+
- name: Protocol Filename or Classname
|
62
|
+
required: true
|
63
|
+
description: Ruby file name or class name which implements the protocol
|
64
|
+
values: .*
|
65
|
+
- name: Protocol specific parameters
|
66
|
+
required: false
|
67
|
+
description: Additional parameters used by the protocol
|
data/data/config/screen.yaml
CHANGED
@@ -127,7 +127,7 @@ SUBSETTING:
|
|
127
127
|
values: .*
|
128
128
|
NAMED_WIDGET:
|
129
129
|
summary: Name a widget to allow access to it via the get_named_widget method
|
130
|
-
description: To programatically
|
130
|
+
description: To programatically access parts of a telemetry screen you need
|
131
131
|
to name the widget. This is useful when creating screens with buttons that
|
132
132
|
read values from other widgets.
|
133
133
|
warning: get_named_widget returns the widget itself and thus must be operated
|
data/data/crc.txt
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
"lib/cosmos/processors/processor.rb" 0x1FEB7030
|
19
19
|
"lib/cosmos/processors/statistics_processor.rb" 0xE732AE7F
|
20
20
|
"lib/cosmos/processors/watermark_processor.rb" 0x8829E260
|
21
|
-
"lib/cosmos/version.rb"
|
21
|
+
"lib/cosmos/version.rb" 0xB56C2898
|
22
22
|
"lib/cosmos/conversions/new_packet_log_conversion.rb" 0x4AA03555
|
23
23
|
"lib/cosmos/conversions/segmented_polynomial_conversion.rb" 0xC498CE81
|
24
24
|
"lib/cosmos/conversions/processor_conversion.rb" 0xC72B73BD
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"lib/cosmos/gui/dialogs/select_dialog.rb" 0x5DA0A692
|
49
49
|
"lib/cosmos/gui/dialogs/legal_dialog.rb" 0x74F13554
|
50
50
|
"lib/cosmos/gui/dialogs/about_dialog.rb" 0xDED08AF9
|
51
|
-
"lib/cosmos/gui/dialogs/exception_dialog.rb"
|
51
|
+
"lib/cosmos/gui/dialogs/exception_dialog.rb" 0x2FD04B65
|
52
52
|
"lib/cosmos/gui/dialogs/details_dialog.rb" 0x6CE432E1
|
53
53
|
"lib/cosmos/gui/dialogs/calendar_dialog.rb" 0xB91051CB
|
54
54
|
"lib/cosmos/gui/dialogs/cmd_tlm_raw_dialog.rb" 0xD9C26802
|
@@ -91,6 +91,7 @@
|
|
91
91
|
"lib/cosmos/gui/choosers/string_chooser.rb" 0x1326AF82
|
92
92
|
"lib/cosmos/gui/choosers/value_chooser.rb" 0x2374B886
|
93
93
|
"lib/cosmos/gui/choosers/telemetry_chooser.rb" 0xF8DC6A15
|
94
|
+
"lib/cosmos/packets/parsers/xtce_parser.rb" 0x939FA9BE
|
94
95
|
"lib/cosmos/packets/parsers/format_string_parser.rb" 0x38813037
|
95
96
|
"lib/cosmos/packets/parsers/limits_parser.rb" 0xD680A7A1
|
96
97
|
"lib/cosmos/packets/parsers/packet_item_parser.rb" 0x10F83156
|
@@ -99,14 +100,15 @@
|
|
99
100
|
"lib/cosmos/packets/parsers/state_parser.rb" 0xF8F43468
|
100
101
|
"lib/cosmos/packets/parsers/processor_parser.rb" 0xEC75BA88
|
101
102
|
"lib/cosmos/packets/parsers/packet_parser.rb" 0x26478943
|
103
|
+
"lib/cosmos/packets/parsers/xtce_converter.rb" 0x6B530ACF
|
102
104
|
"lib/cosmos/packets/telemetry.rb" 0xD779DE95
|
103
105
|
"lib/cosmos/packets/binary_accessor.rb" 0xCD678EF6
|
104
106
|
"lib/cosmos/packets/packet.rb" 0xCB2557A5
|
105
107
|
"lib/cosmos/packets/structure.rb" 0x1BADD8D4
|
106
108
|
"lib/cosmos/packets/commands.rb" 0xD310F0E6
|
107
109
|
"lib/cosmos/packets/limits_response.rb" 0xB836D388
|
108
|
-
"lib/cosmos/packets/packet_config.rb"
|
109
|
-
"lib/cosmos/packets/packet_item.rb"
|
110
|
+
"lib/cosmos/packets/packet_config.rb" 0x30D58A5E
|
111
|
+
"lib/cosmos/packets/packet_item.rb" 0xFA47EA74
|
110
112
|
"lib/cosmos/packets/limits.rb" 0x93BE03A8
|
111
113
|
"lib/cosmos/packets/packet_item_limits.rb" 0xC4534EAB
|
112
114
|
"lib/cosmos/packets/structure_item.rb" 0x99EF4057
|
@@ -121,15 +123,15 @@
|
|
121
123
|
"lib/cosmos/interfaces/cmd_tlm_server_interface.rb" 0x8921CFC1
|
122
124
|
"lib/cosmos/interfaces/serial_interface.rb" 0x5042BC9B
|
123
125
|
"lib/cosmos/interfaces/stream_interface.rb" 0x621E6153
|
124
|
-
"lib/cosmos/interfaces/protocols/template_protocol.rb"
|
125
|
-
"lib/cosmos/interfaces/protocols/length_protocol.rb"
|
126
|
-
"lib/cosmos/interfaces/protocols/preidentified_protocol.rb"
|
127
|
-
"lib/cosmos/interfaces/protocols/protocol.rb"
|
128
|
-
"lib/cosmos/interfaces/protocols/terminated_protocol.rb"
|
129
|
-
"lib/cosmos/interfaces/protocols/crc_protocol.rb"
|
130
|
-
"lib/cosmos/interfaces/protocols/burst_protocol.rb"
|
131
|
-
"lib/cosmos/interfaces/protocols/override_protocol.rb"
|
132
|
-
"lib/cosmos/interfaces/protocols/fixed_protocol.rb"
|
126
|
+
"lib/cosmos/interfaces/protocols/template_protocol.rb" 0x10AE1DEC
|
127
|
+
"lib/cosmos/interfaces/protocols/length_protocol.rb" 0x95412E32
|
128
|
+
"lib/cosmos/interfaces/protocols/preidentified_protocol.rb" 0xA87E48F9
|
129
|
+
"lib/cosmos/interfaces/protocols/protocol.rb" 0x13F588BE
|
130
|
+
"lib/cosmos/interfaces/protocols/terminated_protocol.rb" 0xE6AAACCA
|
131
|
+
"lib/cosmos/interfaces/protocols/crc_protocol.rb" 0x1E3E5AFB
|
132
|
+
"lib/cosmos/interfaces/protocols/burst_protocol.rb" 0xCF4EE7A5
|
133
|
+
"lib/cosmos/interfaces/protocols/override_protocol.rb" 0x64479CFF
|
134
|
+
"lib/cosmos/interfaces/protocols/fixed_protocol.rb" 0x587F0176
|
133
135
|
"lib/cosmos/interfaces/simulated_target_interface.rb" 0xA09DBFF7
|
134
136
|
"lib/cosmos/interfaces/interface.rb" 0x0A161A72
|
135
137
|
"lib/cosmos/interfaces/linc_interface.rb" 0xA85A43C1
|
@@ -175,7 +177,7 @@
|
|
175
177
|
"lib/cosmos/core_ext/range.rb" 0x5D3E08D1
|
176
178
|
"lib/cosmos/core_ext/file.rb" 0x988C5632
|
177
179
|
"lib/cosmos/core_ext/kernel.rb" 0xFF4DF6CF
|
178
|
-
"lib/cosmos/tools/config_editor/config_editor.rb"
|
180
|
+
"lib/cosmos/tools/config_editor/config_editor.rb" 0x4A68E1AB
|
179
181
|
"lib/cosmos/tools/config_editor/config_editor_frame.rb" 0x68487058
|
180
182
|
"lib/cosmos/tools/launcher/launcher.rb" 0xD924A01D
|
181
183
|
"lib/cosmos/tools/launcher/launcher_multitool.rb" 0x1020A3D0
|
@@ -192,8 +194,8 @@
|
|
192
194
|
"lib/cosmos/tools/cmd_sequence/cmd_sequence.rb" 0x86E87D8C
|
193
195
|
"lib/cosmos/tools/cmd_sequence/sequence_list.rb" 0x4AD01295
|
194
196
|
"lib/cosmos/tools/cmd_sequence/sequence_item.rb" 0x4385B8CD
|
195
|
-
"lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb"
|
196
|
-
"lib/cosmos/tools/tlm_viewer/tlm_viewer.rb"
|
197
|
+
"lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb" 0xBF274A70
|
198
|
+
"lib/cosmos/tools/tlm_viewer/tlm_viewer.rb" 0x815F6A88
|
197
199
|
"lib/cosmos/tools/tlm_viewer/widgets/labeltrendlimitsbar_widget.rb" 0xD8A2AADE
|
198
200
|
"lib/cosmos/tools/tlm_viewer/widgets/matrixbycolumns_widget.rb" 0xC65C7F90
|
199
201
|
"lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangecolumn_widget.rb" 0x5935BAC8
|
@@ -258,7 +260,7 @@
|
|
258
260
|
"lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb" 0x3B2B3BAD
|
259
261
|
"lib/cosmos/tools/tlm_viewer/widgets/canvaslabelvalue_widget.rb" 0x14270A26
|
260
262
|
"lib/cosmos/tools/tlm_viewer/widgets.rb" 0x31655A9F
|
261
|
-
"lib/cosmos/tools/tlm_viewer/screen.rb"
|
263
|
+
"lib/cosmos/tools/tlm_viewer/screen.rb" 0xBBA2E00E
|
262
264
|
"lib/cosmos/tools/data_viewer/data_viewer.rb" 0x4870B3D2
|
263
265
|
"lib/cosmos/tools/data_viewer/dump_component.rb" 0x6942C5D6
|
264
266
|
"lib/cosmos/tools/data_viewer/data_viewer_component.rb" 0xD25BA6EB
|
@@ -340,7 +342,7 @@
|
|
340
342
|
"lib/cosmos/tools/script_runner/script_runner_config.rb" 0xD5A30025
|
341
343
|
"lib/cosmos/conversions.rb" 0x43679D05
|
342
344
|
"lib/cosmos/script.rb" 0x25BB611B
|
343
|
-
"lib/cosmos/config/config_parser.rb"
|
345
|
+
"lib/cosmos/config/config_parser.rb" 0x3CCA586C
|
344
346
|
"lib/cosmos/config/meta_config_parser.rb" 0xE4521B6B
|
345
347
|
"lib/cosmos/utilities/csv.rb" 0x754FDC86
|
346
348
|
"lib/cosmos/utilities/ruby_lex_utils.rb" 0x340218C1
|
@@ -146,7 +146,7 @@ module Cosmos
|
|
146
146
|
|
147
147
|
# Called by the ERB template to render a partial
|
148
148
|
def render(template_name, options = {})
|
149
|
-
raise Error.new(self, "Partial name '#{template_name}' must begin with an underscore.") if template_name[0] != '_'
|
149
|
+
raise Error.new(self, "Partial name '#{template_name}' must begin with an underscore.") if File.basename(template_name)[0] != '_'
|
150
150
|
b = binding
|
151
151
|
if options[:locals]
|
152
152
|
if RUBY_VERSION.split('.')[0..1].join.to_i >= 21
|
@@ -162,7 +162,12 @@ module Cosmos
|
|
162
162
|
end
|
163
163
|
end
|
164
164
|
# Assume the file is there. If not we raise a pretty obvious error
|
165
|
-
|
165
|
+
if File.expand_path(template_name) == template_name # absolute path
|
166
|
+
path = template_name
|
167
|
+
else # relative to the current @filename
|
168
|
+
path = File.join(File.dirname(@filename), template_name)
|
169
|
+
end
|
170
|
+
ERB.new(File.read(path)).result(b)
|
166
171
|
end
|
167
172
|
|
168
173
|
# Processes a file and yields |config| to the given block
|
@@ -179,7 +184,7 @@ module Cosmos
|
|
179
184
|
yield_non_keyword_lines = false,
|
180
185
|
remove_quotes = true,
|
181
186
|
&block)
|
182
|
-
raise "Configuration file #{filename} does not exist." unless filename && File.exist?(filename)
|
187
|
+
raise Error.new(self, "Configuration file #{filename} does not exist.") unless filename && File.exist?(filename)
|
183
188
|
@filename = filename
|
184
189
|
|
185
190
|
# Create a temp file where we write the ERB parsed output
|
@@ -50,11 +50,26 @@ module Cosmos
|
|
50
50
|
# by the ConfigParser
|
51
51
|
when ConfigParser::Error
|
52
52
|
# Substitute the html tags '<' and '>' and then replace newlines with html breaks
|
53
|
-
usage
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
if exception.usage && !exception.usage.empty?
|
54
|
+
usage = "Usage: #{exception.usage.gsub("<", "<").gsub(">", ">").gsub("\n", "<br/>")}<br/><br/>"
|
55
|
+
else
|
56
|
+
usage = ''
|
57
|
+
end
|
58
|
+
if exception.message && !exception.message.empty?
|
59
|
+
message = exception.message.gsub("<", "<").gsub(">", ">").gsub("\n", "<br/>")
|
60
|
+
else
|
61
|
+
message = ''
|
62
|
+
end
|
63
|
+
if exception.keyword && exception.parameters
|
64
|
+
line = exception.keyword + ' ' + exception.parameters.join(' ').gsub("<", "<").gsub(">", ">").gsub("\n", "<br/>") + "<br/><br/>"
|
65
|
+
else
|
66
|
+
line = ''
|
67
|
+
end
|
68
|
+
text = "#{line}#{usage}#{message}"
|
69
|
+
if exception.filename && exception.line_number
|
70
|
+
text = "Error at #{exception.filename}:#{exception.line_number}<br/><br/>#{text}"
|
71
|
+
end
|
72
|
+
if exception.url && !exception.url.empty?
|
58
73
|
text << "<br/><br/>For more information see <a href='#{exception.url}'>#{exception.url}</a>."
|
59
74
|
end
|
60
75
|
# FatalErrors are errors explicitly raised when a known fatal issue
|
@@ -23,7 +23,8 @@ module Cosmos
|
|
23
23
|
# that will be searched for in the raw data. Bytes encountered before
|
24
24
|
# this pattern is found are discarded.
|
25
25
|
# @param fill_fields [Boolean] Fill any required fields when writing packets
|
26
|
-
|
26
|
+
# @param allow_empty_data [true/false/nil] See Protocol#initialize
|
27
|
+
def initialize(discard_leading_bytes = 0, sync_pattern = nil, fill_fields = false, allow_empty_data = nil)
|
27
28
|
super(allow_empty_data)
|
28
29
|
@discard_leading_bytes = discard_leading_bytes.to_i
|
29
30
|
@sync_pattern = ConfigParser.handle_nil(sync_pattern)
|
@@ -47,11 +48,20 @@ module Cosmos
|
|
47
48
|
@data << data
|
48
49
|
|
49
50
|
control = handle_sync_pattern()
|
50
|
-
return control if control
|
51
|
+
return control if control and data.length > 0
|
51
52
|
|
52
53
|
# Reduce the data to a single packet
|
53
54
|
packet_data = reduce_to_single_packet()
|
54
|
-
|
55
|
+
|
56
|
+
# Potentially allow blank string to be sent to other protocols if no packet is ready in this one
|
57
|
+
if Symbol === packet_data
|
58
|
+
if (data.length <= 0) and packet_data == :STOP
|
59
|
+
return super(data)
|
60
|
+
else
|
61
|
+
return packet_data
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
55
65
|
@sync_state = :SEARCHING
|
56
66
|
|
57
67
|
# Discard leading bytes if necessary
|