rsmp 0.14.6 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/config/tlc.yaml +1 -1
- data/lib/rsmp/component.rb +1 -1
- data/lib/rsmp/proxy.rb +6 -0
- data/lib/rsmp/supervisor_proxy.rb +1 -1
- data/lib/rsmp/tlc/detector_logic.rb +7 -7
- data/lib/rsmp/tlc/signal_group.rb +6 -6
- data/lib/rsmp/tlc/traffic_controller.rb +86 -72
- data/lib/rsmp/version.rb +1 -1
- data/rsmp.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53db2e5d294329ddcaed57088f8b1ef6a3b3bae1327d7a41727b5b242df5e9d7
|
4
|
+
data.tar.gz: fa5926fe27b1f24be2998d7860ba8ceaddb1d51a23bedc3554d31e48b0293ec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f3448a60f9bd4edda200b165a612217f57086b0342b04f11d6a03087c77500093fd61c21c85946d4cf91b1b228404634d6d884fc0ffc7de7f62f8b552fa373e
|
7
|
+
data.tar.gz: 87ce720b9a3e2c7b9ed7db64c07a18ac84058b38007172fabe1c8847513c93fd1002ac9c8e6f3ba6635d24c9bf36c9f3b36324d6edc0b135887bcc3039d3dc61
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rsmp (0.
|
4
|
+
rsmp (0.15.0)
|
5
5
|
async (~> 1.30.3)
|
6
6
|
async-io (~> 1.33.0)
|
7
7
|
colorize (~> 0.8.1)
|
8
|
-
rsmp_schema (~> 0.2.
|
8
|
+
rsmp_schema (~> 0.2.3)
|
9
9
|
thor (~> 1.2.1)
|
10
10
|
|
11
11
|
GEM
|
@@ -80,7 +80,7 @@ GEM
|
|
80
80
|
nio4r (2.5.8)
|
81
81
|
rake (13.0.6)
|
82
82
|
regexp_parser (2.5.0)
|
83
|
-
rsmp_schema (0.2.
|
83
|
+
rsmp_schema (0.2.3)
|
84
84
|
json_schemer (~> 0.2.21)
|
85
85
|
thor (~> 1.2.1)
|
86
86
|
rspec (3.10.0)
|
data/config/tlc.yaml
CHANGED
data/lib/rsmp/component.rb
CHANGED
@@ -9,7 +9,7 @@ module RSMP
|
|
9
9
|
raise UnknownCommand.new "Command #{command_code} not implemented by #{self.class}"
|
10
10
|
end
|
11
11
|
|
12
|
-
def get_status status_code, status_name=nil
|
12
|
+
def get_status status_code, status_name=nil, options={}
|
13
13
|
raise UnknownStatus.new "Status #{status_code}/#{status_name} not implemented by #{self.class}"
|
14
14
|
end
|
15
15
|
|
data/lib/rsmp/proxy.rb
CHANGED
@@ -647,5 +647,11 @@ module RSMP
|
|
647
647
|
message.attributes['ntsOId'] = (main && main.ntsOId) ? main.ntsOId : ''
|
648
648
|
message.attributes['xNId'] = (main && main.xNId) ? main.xNId : ''
|
649
649
|
end
|
650
|
+
|
651
|
+
# use Gem class to check version requirement
|
652
|
+
def self.version_requirement_met? requirement, version
|
653
|
+
Gem::Requirement.new(requirement).satisfied_by?(Gem::Version.new(version))
|
654
|
+
end
|
655
|
+
|
650
656
|
end
|
651
657
|
end
|
@@ -275,7 +275,7 @@ module RSMP
|
|
275
275
|
component = @site.find_component component_id
|
276
276
|
log "Received #{message.type}", message: message, level: :log
|
277
277
|
sS = message.attributes["sS"].map do |arg|
|
278
|
-
value, quality = component.get_status arg['sCI'], arg['n']
|
278
|
+
value, quality = component.get_status arg['sCI'], arg['n'], {sxl_version: sxl_version}
|
279
279
|
{ "s" => value.to_s, "q" => quality.to_s }.merge arg
|
280
280
|
end
|
281
281
|
response = StatusResponse.new({
|
@@ -9,7 +9,7 @@ module RSMP
|
|
9
9
|
@value = 0
|
10
10
|
end
|
11
11
|
|
12
|
-
def get_status code, name=nil
|
12
|
+
def get_status code, name=nil, options={}
|
13
13
|
case code
|
14
14
|
when 'S0201', 'S0202', 'S0203', 'S0204'
|
15
15
|
return send("handle_#{code.downcase}", code, name)
|
@@ -18,7 +18,7 @@ module RSMP
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def handle_s0201 status_code, status_name=nil
|
21
|
+
def handle_s0201 status_code, status_name=nil, options={}
|
22
22
|
case status_name
|
23
23
|
when 'starttime'
|
24
24
|
TrafficControllerSite.make_status @node.clock.to_s
|
@@ -27,7 +27,7 @@ module RSMP
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def handle_s0202 status_code, status_name=nil
|
30
|
+
def handle_s0202 status_code, status_name=nil, options={}
|
31
31
|
case status_name
|
32
32
|
when 'starttime'
|
33
33
|
TrafficControllerSite.make_status @node.clock.to_s
|
@@ -36,7 +36,7 @@ module RSMP
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
def handle_s0203 status_code, status_name=nil
|
39
|
+
def handle_s0203 status_code, status_name=nil, options={}
|
40
40
|
case status_name
|
41
41
|
when 'starttime'
|
42
42
|
TrafficControllerSite.make_status @node.clock.to_s
|
@@ -45,7 +45,7 @@ module RSMP
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
def handle_s0204 status_code, status_name=nil
|
48
|
+
def handle_s0204 status_code, status_name=nil, options={}
|
49
49
|
case status_name
|
50
50
|
when 'starttime'
|
51
51
|
TrafficControllerSite.make_status @node.clock.to_s
|
@@ -70,7 +70,7 @@ module RSMP
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
def handle_command command_code, arg
|
73
|
+
def handle_command command_code, arg, options={}
|
74
74
|
case command_code
|
75
75
|
when 'M0008'
|
76
76
|
handle_m0008 arg
|
@@ -79,7 +79,7 @@ module RSMP
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
def handle_m0008 arg
|
82
|
+
def handle_m0008 arg, options={}
|
83
83
|
@node.verify_security_code 2, arg['securityCode']
|
84
84
|
status = arg['status']=='True'
|
85
85
|
mode = arg['mode']=='True'
|
@@ -35,17 +35,17 @@ module RSMP
|
|
35
35
|
state
|
36
36
|
end
|
37
37
|
|
38
|
-
def handle_command command_code, arg
|
38
|
+
def handle_command command_code, arg, options={}
|
39
39
|
case command_code
|
40
40
|
when 'M0010', 'M0011'
|
41
|
-
return send("handle_#{command_code.downcase}", arg)
|
41
|
+
return send("handle_#{command_code.downcase}", arg, options)
|
42
42
|
else
|
43
43
|
raise UnknownCommand.new "Unknown command #{command_code}"
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
# Start of signal group. Orders a signal group to green
|
48
|
-
def handle_m0010 arg
|
48
|
+
def handle_m0010 arg, options={}
|
49
49
|
@node.verify_security_code 2, arg['securityCode']
|
50
50
|
if TrafficControllerSite.from_rsmp_bool arg['status']
|
51
51
|
log "Start signal group #{c_id}, go to green", level: :info
|
@@ -53,14 +53,14 @@ module RSMP
|
|
53
53
|
end
|
54
54
|
|
55
55
|
# Stop of signal group. Orders a signal group to red
|
56
|
-
def handle_m0011 arg
|
56
|
+
def handle_m0011 arg, options={}
|
57
57
|
@node.verify_security_code 2, arg['securityCode']
|
58
58
|
if TrafficControllerSite.from_rsmp_bool arg['status']
|
59
59
|
log "Stop signal group #{c_id}, go to red", level: :info
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def get_status code, name=nil
|
63
|
+
def get_status code, name=nil, options={}
|
64
64
|
case code
|
65
65
|
when 'S0025'
|
66
66
|
return send("handle_#{code.downcase}", code, name)
|
@@ -69,7 +69,7 @@ module RSMP
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
def handle_s0025 status_code, status_name=nil
|
72
|
+
def handle_s0025 status_code, status_name=nil, options={}
|
73
73
|
now = @node.clock.to_s
|
74
74
|
case status_name
|
75
75
|
when 'minToGEstimate'
|
@@ -204,25 +204,25 @@ module RSMP
|
|
204
204
|
@signal_groups.map { |group| group.state }.join
|
205
205
|
end
|
206
206
|
|
207
|
-
def handle_command command_code, arg
|
207
|
+
def handle_command command_code, arg, options={}
|
208
208
|
case command_code
|
209
209
|
when 'M0001', 'M0002', 'M0003', 'M0004', 'M0005', 'M0006', 'M0007',
|
210
210
|
'M0012', 'M0013', 'M0014', 'M0015', 'M0016', 'M0017', 'M0018',
|
211
211
|
'M0019', 'M0020', 'M0021', 'M0022',
|
212
212
|
'M0103', 'M0104'
|
213
213
|
|
214
|
-
return send("handle_#{command_code.downcase}", arg)
|
214
|
+
return send("handle_#{command_code.downcase}", arg, options)
|
215
215
|
else
|
216
216
|
raise UnknownCommand.new "Unknown command #{command_code}"
|
217
217
|
end
|
218
218
|
end
|
219
219
|
|
220
|
-
def handle_m0001 arg
|
220
|
+
def handle_m0001 arg, options={}
|
221
221
|
@node.verify_security_code 2, arg['securityCode']
|
222
222
|
switch_functional_position arg['status'], timeout: arg['timeout'].to_i*60
|
223
223
|
end
|
224
224
|
|
225
|
-
def handle_m0002 arg
|
225
|
+
def handle_m0002 arg, options={}
|
226
226
|
@node.verify_security_code 2, arg['securityCode']
|
227
227
|
if TrafficControllerSite.from_rsmp_bool(arg['status'])
|
228
228
|
switch_plan arg['timeplan']
|
@@ -231,12 +231,12 @@ module RSMP
|
|
231
231
|
end
|
232
232
|
end
|
233
233
|
|
234
|
-
def handle_m0003 arg
|
234
|
+
def handle_m0003 arg, options={}
|
235
235
|
@node.verify_security_code 2, arg['securityCode']
|
236
236
|
@traffic_situation = arg['traficsituation'].to_i
|
237
237
|
end
|
238
238
|
|
239
|
-
def handle_m0004 arg
|
239
|
+
def handle_m0004 arg, options={}
|
240
240
|
@node.verify_security_code 2, arg['securityCode']
|
241
241
|
# don't restart immeediately, since we need to first send command response
|
242
242
|
# instead, defer an action, which will be handled by the TLC site
|
@@ -244,7 +244,7 @@ module RSMP
|
|
244
244
|
@node.defer :restart
|
245
245
|
end
|
246
246
|
|
247
|
-
def handle_m0005 arg
|
247
|
+
def handle_m0005 arg, options={}
|
248
248
|
@node.verify_security_code 2, arg['securityCode']
|
249
249
|
@emergency_route = (arg['status'] == 'True')
|
250
250
|
@emergency_route_number = arg['emergencyroute'].to_i
|
@@ -272,7 +272,7 @@ module RSMP
|
|
272
272
|
end
|
273
273
|
end
|
274
274
|
|
275
|
-
def handle_m0006 arg
|
275
|
+
def handle_m0006 arg, options={}
|
276
276
|
@node.verify_security_code 2, arg['securityCode']
|
277
277
|
input = arg['input'].to_i
|
278
278
|
status = string_to_bool arg['status']
|
@@ -288,16 +288,16 @@ module RSMP
|
|
288
288
|
input_logic input, change if change != nil
|
289
289
|
end
|
290
290
|
|
291
|
-
def handle_m0007 arg
|
291
|
+
def handle_m0007 arg, options={}
|
292
292
|
@node.verify_security_code 2, arg['securityCode']
|
293
293
|
set_fixed_time_control arg['status']
|
294
294
|
end
|
295
295
|
|
296
|
-
def handle_m0012 arg
|
296
|
+
def handle_m0012 arg, options={}
|
297
297
|
@node.verify_security_code 2, arg['securityCode']
|
298
298
|
end
|
299
299
|
|
300
|
-
def handle_m0013 arg
|
300
|
+
def handle_m0013 arg, options={}
|
301
301
|
@node.verify_security_code 2, arg['securityCode']
|
302
302
|
end
|
303
303
|
|
@@ -307,7 +307,7 @@ module RSMP
|
|
307
307
|
plan
|
308
308
|
end
|
309
309
|
|
310
|
-
def handle_m0014 arg
|
310
|
+
def handle_m0014 arg, options={}
|
311
311
|
@node.verify_security_code 2, arg['securityCode']
|
312
312
|
plan = find_plan arg['plan']
|
313
313
|
arg['status'].split(',').each do |item|
|
@@ -319,15 +319,15 @@ module RSMP
|
|
319
319
|
end
|
320
320
|
end
|
321
321
|
|
322
|
-
def handle_m0015 arg
|
322
|
+
def handle_m0015 arg, options={}
|
323
323
|
@node.verify_security_code 2, arg['securityCode']
|
324
324
|
end
|
325
325
|
|
326
|
-
def handle_m0016 arg
|
326
|
+
def handle_m0016 arg, options={}
|
327
327
|
@node.verify_security_code 2, arg['securityCode']
|
328
328
|
end
|
329
329
|
|
330
|
-
def handle_m0017 arg
|
330
|
+
def handle_m0017 arg, options={}
|
331
331
|
@node.verify_security_code 2, arg['securityCode']
|
332
332
|
arg['status'].split(',').each do |item|
|
333
333
|
elems = item.split('-')
|
@@ -343,7 +343,7 @@ module RSMP
|
|
343
343
|
end
|
344
344
|
end
|
345
345
|
|
346
|
-
def handle_m0018 arg
|
346
|
+
def handle_m0018 arg, options={}
|
347
347
|
@node.verify_security_code 2, arg['securityCode']
|
348
348
|
end
|
349
349
|
|
@@ -373,7 +373,7 @@ module RSMP
|
|
373
373
|
bool ? '1' : '0'
|
374
374
|
end
|
375
375
|
|
376
|
-
def handle_m0019 arg
|
376
|
+
def handle_m0019 arg, options={}
|
377
377
|
@node.verify_security_code 2, arg['securityCode']
|
378
378
|
input = arg['input'].to_i
|
379
379
|
force = string_to_bool arg['status']
|
@@ -390,20 +390,20 @@ module RSMP
|
|
390
390
|
input_logic input, change if change != nil
|
391
391
|
end
|
392
392
|
|
393
|
-
def handle_m0020 arg
|
393
|
+
def handle_m0020 arg, options={}
|
394
394
|
@node.verify_security_code 2, arg['securityCode']
|
395
395
|
end
|
396
396
|
|
397
|
-
def handle_m0021 arg
|
397
|
+
def handle_m0021 arg, options={}
|
398
398
|
@node.verify_security_code 2, arg['securityCode']
|
399
399
|
end
|
400
400
|
|
401
|
-
def handle_m0103 arg
|
401
|
+
def handle_m0103 arg, options={}
|
402
402
|
level = {'Level1'=>1,'Level2'=>2}[arg['status']]
|
403
403
|
@node.change_security_code level, arg['oldSecurityCode'], arg['newSecurityCode']
|
404
404
|
end
|
405
405
|
|
406
|
-
def handle_m0104 arg
|
406
|
+
def handle_m0104 arg, options={}
|
407
407
|
@node.verify_security_code 1, arg['securityCode']
|
408
408
|
time = Time.new(
|
409
409
|
arg['year'],
|
@@ -459,7 +459,7 @@ module RSMP
|
|
459
459
|
mode
|
460
460
|
end
|
461
461
|
|
462
|
-
def get_status code, name=nil
|
462
|
+
def get_status code, name=nil, options={}
|
463
463
|
case code
|
464
464
|
when 'S0001', 'S0002', 'S0003', 'S0004', 'S0005', 'S0006', 'S0007',
|
465
465
|
'S0008', 'S0009', 'S0010', 'S0011', 'S0012', 'S0013', 'S0014',
|
@@ -468,13 +468,13 @@ module RSMP
|
|
468
468
|
'S0029', 'S0030', 'S0031',
|
469
469
|
'S0091', 'S0092', 'S0095', 'S0096', 'S0097',
|
470
470
|
'S0205', 'S0206', 'S0207', 'S0208'
|
471
|
-
return send("handle_#{code.downcase}", code, name)
|
471
|
+
return send("handle_#{code.downcase}", code, name, options)
|
472
472
|
else
|
473
473
|
raise InvalidMessage.new "unknown status code #{code}"
|
474
474
|
end
|
475
475
|
end
|
476
476
|
|
477
|
-
def handle_s0001 status_code, status_name=nil
|
477
|
+
def handle_s0001 status_code, status_name=nil, options={}
|
478
478
|
case status_name
|
479
479
|
when 'signalgroupstatus'
|
480
480
|
TrafficControllerSite.make_status format_signal_group_status
|
@@ -487,14 +487,14 @@ module RSMP
|
|
487
487
|
end
|
488
488
|
end
|
489
489
|
|
490
|
-
def handle_s0002 status_code, status_name=nil
|
490
|
+
def handle_s0002 status_code, status_name=nil, options={}
|
491
491
|
case status_name
|
492
492
|
when 'detectorlogicstatus'
|
493
493
|
TrafficControllerSite.make_status @detector_logics.map { |dl| bool_to_digit(dl.value) }.join
|
494
494
|
end
|
495
495
|
end
|
496
496
|
|
497
|
-
def handle_s0003 status_code, status_name=nil
|
497
|
+
def handle_s0003 status_code, status_name=nil, options={}
|
498
498
|
case status_name
|
499
499
|
when 'inputstatus'
|
500
500
|
TrafficControllerSite.make_status @inputs.actual_string
|
@@ -503,7 +503,7 @@ module RSMP
|
|
503
503
|
end
|
504
504
|
end
|
505
505
|
|
506
|
-
def handle_s0004 status_code, status_name=nil
|
506
|
+
def handle_s0004 status_code, status_name=nil, options={}
|
507
507
|
case status_name
|
508
508
|
when 'outputstatus'
|
509
509
|
TrafficControllerSite.make_status 0
|
@@ -512,14 +512,14 @@ module RSMP
|
|
512
512
|
end
|
513
513
|
end
|
514
514
|
|
515
|
-
def handle_s0005 status_code, status_name=nil
|
515
|
+
def handle_s0005 status_code, status_name=nil, options={}
|
516
516
|
case status_name
|
517
517
|
when 'status'
|
518
518
|
TrafficControllerSite.make_status @is_starting
|
519
519
|
end
|
520
520
|
end
|
521
521
|
|
522
|
-
def handle_s0006 status_code, status_name=nil
|
522
|
+
def handle_s0006 status_code, status_name=nil, options={}
|
523
523
|
case status_name
|
524
524
|
when 'status'
|
525
525
|
TrafficControllerSite.make_status @emergency_route
|
@@ -528,7 +528,7 @@ module RSMP
|
|
528
528
|
end
|
529
529
|
end
|
530
530
|
|
531
|
-
def handle_s0007 status_code, status_name=nil
|
531
|
+
def handle_s0007 status_code, status_name=nil, options={}
|
532
532
|
case status_name
|
533
533
|
when 'intersection'
|
534
534
|
TrafficControllerSite.make_status @intersection
|
@@ -537,7 +537,7 @@ module RSMP
|
|
537
537
|
end
|
538
538
|
end
|
539
539
|
|
540
|
-
def handle_s0008 status_code, status_name=nil
|
540
|
+
def handle_s0008 status_code, status_name=nil, options={}
|
541
541
|
case status_name
|
542
542
|
when 'intersection'
|
543
543
|
TrafficControllerSite.make_status @intersection
|
@@ -546,7 +546,7 @@ module RSMP
|
|
546
546
|
end
|
547
547
|
end
|
548
548
|
|
549
|
-
def handle_s0009 status_code, status_name=nil
|
549
|
+
def handle_s0009 status_code, status_name=nil, options={}
|
550
550
|
case status_name
|
551
551
|
when 'intersection'
|
552
552
|
TrafficControllerSite.make_status @intersection
|
@@ -555,7 +555,7 @@ module RSMP
|
|
555
555
|
end
|
556
556
|
end
|
557
557
|
|
558
|
-
def handle_s0010 status_code, status_name=nil
|
558
|
+
def handle_s0010 status_code, status_name=nil, options={}
|
559
559
|
case status_name
|
560
560
|
when 'intersection'
|
561
561
|
TrafficControllerSite.make_status @intersection
|
@@ -564,7 +564,7 @@ module RSMP
|
|
564
564
|
end
|
565
565
|
end
|
566
566
|
|
567
|
-
def handle_s0011 status_code, status_name=nil
|
567
|
+
def handle_s0011 status_code, status_name=nil, options={}
|
568
568
|
case status_name
|
569
569
|
when 'intersection'
|
570
570
|
TrafficControllerSite.make_status @intersection
|
@@ -573,7 +573,7 @@ module RSMP
|
|
573
573
|
end
|
574
574
|
end
|
575
575
|
|
576
|
-
def handle_s0012 status_code, status_name=nil
|
576
|
+
def handle_s0012 status_code, status_name=nil, options={}
|
577
577
|
case status_name
|
578
578
|
when 'intersection'
|
579
579
|
TrafficControllerSite.make_status @intersection
|
@@ -582,7 +582,7 @@ module RSMP
|
|
582
582
|
end
|
583
583
|
end
|
584
584
|
|
585
|
-
def handle_s0013 status_code, status_name=nil
|
585
|
+
def handle_s0013 status_code, status_name=nil, options={}
|
586
586
|
case status_name
|
587
587
|
when 'intersection'
|
588
588
|
TrafficControllerSite.make_status @intersection
|
@@ -591,49 +591,49 @@ module RSMP
|
|
591
591
|
end
|
592
592
|
end
|
593
593
|
|
594
|
-
def handle_s0014 status_code, status_name=nil
|
594
|
+
def handle_s0014 status_code, status_name=nil, options={}
|
595
595
|
case status_name
|
596
596
|
when 'status'
|
597
597
|
TrafficControllerSite.make_status @plan
|
598
598
|
end
|
599
599
|
end
|
600
600
|
|
601
|
-
def handle_s0015 status_code, status_name=nil
|
601
|
+
def handle_s0015 status_code, status_name=nil, options={}
|
602
602
|
case status_name
|
603
603
|
when 'status'
|
604
604
|
TrafficControllerSite.make_status @traffic_situation
|
605
605
|
end
|
606
606
|
end
|
607
607
|
|
608
|
-
def handle_s0016 status_code, status_name=nil
|
608
|
+
def handle_s0016 status_code, status_name=nil, options={}
|
609
609
|
case status_name
|
610
610
|
when 'number'
|
611
611
|
TrafficControllerSite.make_status @detector_logics.size
|
612
612
|
end
|
613
613
|
end
|
614
614
|
|
615
|
-
def handle_s0017 status_code, status_name=nil
|
615
|
+
def handle_s0017 status_code, status_name=nil, options={}
|
616
616
|
case status_name
|
617
617
|
when 'number'
|
618
618
|
TrafficControllerSite.make_status @signal_groups.size
|
619
619
|
end
|
620
620
|
end
|
621
621
|
|
622
|
-
def handle_s0018 status_code, status_name=nil
|
622
|
+
def handle_s0018 status_code, status_name=nil, options={}
|
623
623
|
case status_name
|
624
624
|
when 'number'
|
625
625
|
TrafficControllerSite.make_status @plans.size
|
626
626
|
end
|
627
627
|
end
|
628
628
|
|
629
|
-
def handle_s0019 status_code, status_name=nil
|
629
|
+
def handle_s0019 status_code, status_name=nil, options={}
|
630
630
|
case status_name
|
631
631
|
when 'number'
|
632
632
|
TrafficControllerSite.make_status @num_traffic_situations
|
633
633
|
end
|
634
634
|
end
|
635
635
|
|
636
|
-
def handle_s0020 status_code, status_name=nil
|
636
|
+
def handle_s0020 status_code, status_name=nil, options={}
|
637
637
|
case status_name
|
638
638
|
when 'intersection'
|
639
639
|
TrafficControllerSite.make_status @intersection
|
@@ -642,21 +642,21 @@ module RSMP
|
|
642
642
|
end
|
643
643
|
end
|
644
644
|
|
645
|
-
def handle_s0021 status_code, status_name=nil
|
645
|
+
def handle_s0021 status_code, status_name=nil, options={}
|
646
646
|
case status_name
|
647
647
|
when 'detectorlogics'
|
648
648
|
TrafficControllerSite.make_status @detector_logics.map { |logic| bool_to_digit(logic.forced)}.join
|
649
649
|
end
|
650
650
|
end
|
651
651
|
|
652
|
-
def handle_s0022 status_code, status_name=nil
|
652
|
+
def handle_s0022 status_code, status_name=nil, options={}
|
653
653
|
case status_name
|
654
654
|
when 'status'
|
655
655
|
TrafficControllerSite.make_status @plans.keys.join(',')
|
656
656
|
end
|
657
657
|
end
|
658
658
|
|
659
|
-
def handle_s0023 status_code, status_name=nil
|
659
|
+
def handle_s0023 status_code, status_name=nil, options={}
|
660
660
|
case status_name
|
661
661
|
when 'status'
|
662
662
|
dynamic_bands = @plans.map { |nr,plan| plan.dynamic_bands_string }
|
@@ -665,21 +665,21 @@ module RSMP
|
|
665
665
|
end
|
666
666
|
end
|
667
667
|
|
668
|
-
def handle_s0024 status_code, status_name=nil
|
668
|
+
def handle_s0024 status_code, status_name=nil, options={}
|
669
669
|
case status_name
|
670
670
|
when 'status'
|
671
671
|
TrafficControllerSite.make_status '1-0'
|
672
672
|
end
|
673
673
|
end
|
674
674
|
|
675
|
-
def handle_s0026 status_code, status_name=nil
|
675
|
+
def handle_s0026 status_code, status_name=nil, options={}
|
676
676
|
case status_name
|
677
677
|
when 'status'
|
678
678
|
TrafficControllerSite.make_status '0-00'
|
679
679
|
end
|
680
680
|
end
|
681
681
|
|
682
|
-
def handle_s0027 status_code, status_name=nil
|
682
|
+
def handle_s0027 status_code, status_name=nil, options={}
|
683
683
|
case status_name
|
684
684
|
when 'status'
|
685
685
|
status = @day_time_table.map do |i,item|
|
@@ -689,60 +689,74 @@ module RSMP
|
|
689
689
|
end
|
690
690
|
end
|
691
691
|
|
692
|
-
def handle_s0028 status_code, status_name=nil
|
692
|
+
def handle_s0028 status_code, status_name=nil, options={}
|
693
693
|
case status_name
|
694
694
|
when 'status'
|
695
695
|
TrafficControllerSite.make_status '00-00'
|
696
696
|
end
|
697
697
|
end
|
698
698
|
|
699
|
-
def handle_s0029 status_code, status_name=nil
|
699
|
+
def handle_s0029 status_code, status_name=nil, options={}
|
700
700
|
case status_name
|
701
701
|
when 'status'
|
702
702
|
TrafficControllerSite.make_status @inputs.forced_string
|
703
703
|
end
|
704
704
|
end
|
705
705
|
|
706
|
-
def handle_s0030 status_code, status_name=nil
|
706
|
+
def handle_s0030 status_code, status_name=nil, options={}
|
707
707
|
case status_name
|
708
708
|
when 'status'
|
709
709
|
TrafficControllerSite.make_status ''
|
710
710
|
end
|
711
711
|
end
|
712
712
|
|
713
|
-
def handle_s0031 status_code, status_name=nil
|
713
|
+
def handle_s0031 status_code, status_name=nil, options={}
|
714
714
|
case status_name
|
715
715
|
when 'status'
|
716
716
|
TrafficControllerSite.make_status ''
|
717
717
|
end
|
718
718
|
end
|
719
719
|
|
720
|
-
def handle_s0091 status_code, status_name=nil
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
720
|
+
def handle_s0091 status_code, status_name=nil, options={}
|
721
|
+
if Proxy.version_requirement_met? '>=1.1',options[:sxl_version]
|
722
|
+
case status_name
|
723
|
+
when 'user'
|
724
|
+
TrafficControllerSite.make_status 0
|
725
|
+
end
|
726
|
+
else
|
727
|
+
case status_name
|
728
|
+
when 'user'
|
729
|
+
TrafficControllerSite.make_status 'nobody'
|
730
|
+
when 'status'
|
731
|
+
TrafficControllerSite.make_status 'logout'
|
732
|
+
end
|
726
733
|
end
|
727
734
|
end
|
728
735
|
|
729
|
-
def handle_s0092 status_code, status_name=nil
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
736
|
+
def handle_s0092 status_code, status_name=nil, options={}
|
737
|
+
if Proxy.version_requirement_met? '>=1.1',options[:sxl_version]
|
738
|
+
case status_name
|
739
|
+
when 'user'
|
740
|
+
TrafficControllerSite.make_status 0
|
741
|
+
end
|
742
|
+
else
|
743
|
+
case status_name
|
744
|
+
when 'user'
|
745
|
+
TrafficControllerSite.make_status 'nobody'
|
746
|
+
when 'status'
|
747
|
+
TrafficControllerSite.make_status 'logout'
|
748
|
+
end
|
735
749
|
end
|
736
750
|
end
|
737
751
|
|
738
|
-
def handle_s0095 status_code, status_name=nil
|
752
|
+
def handle_s0095 status_code, status_name=nil, options={}
|
739
753
|
case status_name
|
740
754
|
when 'status'
|
741
755
|
TrafficControllerSite.make_status RSMP::VERSION
|
742
756
|
end
|
743
757
|
end
|
744
758
|
|
745
|
-
def handle_s0096 status_code, status_name=nil
|
759
|
+
def handle_s0096 status_code, status_name=nil, options={}
|
746
760
|
now = clock.now
|
747
761
|
case status_name
|
748
762
|
when 'year'
|
@@ -760,7 +774,7 @@ module RSMP
|
|
760
774
|
end
|
761
775
|
end
|
762
776
|
|
763
|
-
def handle_s0097 status_code, status_name=nil
|
777
|
+
def handle_s0097 status_code, status_name=nil, options={}
|
764
778
|
case status_name
|
765
779
|
when 'checksum'
|
766
780
|
TrafficControllerSite.make_status '1'
|
@@ -770,7 +784,7 @@ module RSMP
|
|
770
784
|
end
|
771
785
|
end
|
772
786
|
|
773
|
-
def handle_s0205 status_code, status_name=nil
|
787
|
+
def handle_s0205 status_code, status_name=nil, options={}
|
774
788
|
case status_name
|
775
789
|
when 'start'
|
776
790
|
TrafficControllerSite.make_status clock.to_s
|
@@ -779,7 +793,7 @@ module RSMP
|
|
779
793
|
end
|
780
794
|
end
|
781
795
|
|
782
|
-
def handle_s0206 status_code, status_name=nil
|
796
|
+
def handle_s0206 status_code, status_name=nil, options={}
|
783
797
|
case status_name
|
784
798
|
when 'start'
|
785
799
|
TrafficControllerSite.make_status clock.to_s
|
@@ -788,7 +802,7 @@ module RSMP
|
|
788
802
|
end
|
789
803
|
end
|
790
804
|
|
791
|
-
def handle_s0207 status_code, status_name=nil
|
805
|
+
def handle_s0207 status_code, status_name=nil, options={}
|
792
806
|
case status_name
|
793
807
|
when 'start'
|
794
808
|
TrafficControllerSite.make_status clock.to_s
|
@@ -797,7 +811,7 @@ module RSMP
|
|
797
811
|
end
|
798
812
|
end
|
799
813
|
|
800
|
-
def handle_s0208 status_code, status_name=nil
|
814
|
+
def handle_s0208 status_code, status_name=nil, options={}
|
801
815
|
case status_name
|
802
816
|
when 'start'
|
803
817
|
TrafficControllerSite.make_status clock.to_s
|
data/lib/rsmp/version.rb
CHANGED
data/rsmp.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_dependency "async-io", "~> 1.33.0"
|
35
35
|
spec.add_dependency "colorize", "~> 0.8.1"
|
36
36
|
spec.add_dependency "thor", "~> 1.2.1"
|
37
|
-
spec.add_dependency "rsmp_schema", "~> 0.2.
|
37
|
+
spec.add_dependency "rsmp_schema", "~> 0.2.3"
|
38
38
|
|
39
39
|
spec.add_development_dependency "bundler", "~> 2.3.7"
|
40
40
|
spec.add_development_dependency "rake", "~> 13.0.6"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsmp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emil Tin
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.2.
|
75
|
+
version: 0.2.3
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.2.
|
82
|
+
version: 0.2.3
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|