Traffic Light Controller Signal Group

Tests

Signal group follow startup sequence after yellow flash

Verify that we can activate normal control after yellow flash mode is turned off

  1. Given the site is connected and in yellow flash mode
  2. When we activate normal control
  3. 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.

  1. Verify connection
  2. Send control command to start signalgrup, set_signal_start= true, include security_code
  3. 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

  1. Verify connection
  2. Send control command to stop signalgrup, set_signal_start= false, include security_code
  3. 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

  1. Given the site is connected
  2. Request status
  3. 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.

  1. Given the site is connected
  2. Request status
  3. 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

  1. Verify connection
  2. Send control command to start or stop a serie of signalgroups
  3. 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.

  1. Given the site is connected
  2. Request status
  3. 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