Traffic Light Controller Signal Group
Tests
- Signal group follow startup sequence after yellow flash
- Signal group is ordered to green with M0010
- Signal group is ordered to red with M0011
- Signal group list size is read with S0017
- Signal group red/green predictions is read with S0025
- Signal group series can be started/stopped with M0012
- Signal group state is read with S0001
Signal group follow startup sequence after yellow flash
Verify that we can activate normal control after yellow flash mode is turned off
- Given the site is connected and in yellow flash mode
- When we activate normal control
- All signal groups should go through e, f and g
View Source
Validator::Site.connected do |task,supervisor,site|
prepare task, site
verify_startup_sequence do
switch_yellow_flash
set_functional_position 'NormalControl'
end
set_functional_position 'NormalControl'
end
Signal group is ordered to green with M0010
Validate that a signal group can be ordered to green using the M0010 command.
- Verify connection
- Send control command to start signalgrup, set_signal_start= true, include security_code
- Wait for status = true
View Source
Validator::Site.connected do |task,supervisor,site|
prepare task, site
set_signal_start
end
Signal group is ordered to red with M0011
- Verify connection
- Send control command to stop signalgrup, set_signal_start= false, include security_code
- Wait for status = true
View Source
Validator::Site.connected do |task,supervisor,site|
prepare task, site
set_signal_stop
end
Signal group list size is read with S0017
Verify status S0017 number of signal groups
- Given the site is connected
- Request status
- Expect status response before timeout
View Source
Validator::Site.connected do |task,supervisor,site|
request_status_and_confirm site, "number of signal groups",
{ S0017: [:number] }
end
Signal group red/green predictions is read with S0025
Verify that time-of-green/time-of-red can be read with S0025.
- Given the site is connected
- Request status
- Expect status response before timeout
View Source
Validator::Site.connected do |task,supervisor,site|
request_status_and_confirm site, "time-of-green/time-of-red",
{ S0025: [
:minToGEstimate,
:maxToGEstimate,
:likelyToGEstimate,
:ToGConfidence,
:minToREstimate,
:maxToREstimate,
:likelyToREstimate
] },
Validator.get_config('components','signal_group').keys.first
end
Signal group series can be started/stopped with M0012
- Verify connection
- Send control command to start or stop a serie of signalgroups
- Wait for status = true
View Source
Validator::Site.connected do |task,supervisor,site|
prepare task, site
set_signal_start_or_stop '5,4134,65;5,11'
end
Signal group state is read with S0001
Verify that signal group status can be read with S0001.
- Given the site is connected
- Request status
- Expect status response before timeout
View Source
Validator::Site.connected do |task,supervisor,site|
request_status_and_confirm site, "signal group status",
{ S0001: [:signalgroupstatus, :cyclecounter, :basecyclecounter, :stage] }
end