Specifications:

  • Traffic Light Controller 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

    
    
    11
    12
    13
    14
    # File 'spec/site/tlc/signal_groups_spec.rb', line 11
    
    Validator::Site.connected do |task,supervisor,site|
            prepare task, site
            set_signal_start
          end
  • Traffic Light Controller 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

    
    
    21
    22
    23
    24
    # File 'spec/site/tlc/signal_groups_spec.rb', line 21
    
    Validator::Site.connected do |task,supervisor,site|
            prepare task, site
            set_signal_stop
          end
  • Traffic Light Controller 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

    
    
    33
    34
    35
    36
    # File 'spec/site/tlc/signal_groups_spec.rb', line 33
    
    Validator::Site.connected do |task,supervisor,site|
            request_status_and_confirm site, "signal group status",
              { S0001: [:signalgroupstatus, :cyclecounter, :basecyclecounter, :stage] }
          end
  • Traffic Light Controller 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

    
    
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    # File 'spec/site/tlc/signal_groups_spec.rb', line 45
    
    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
  • Traffic Light Controller 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

    
    
    64
    65
    66
    67
    # File 'spec/site/tlc/signal_groups_spec.rb', line 64
    
    Validator::Site.connected do |task,supervisor,site|
            prepare task, site
            set_signal_start_or_stop '5,4134,65;5,11'
          end
  • Traffic Light Controller 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

    
    
    76
    77
    78
    79
    # File 'spec/site/tlc/signal_groups_spec.rb', line 76
    
    Validator::Site.connected do |task,supervisor,site|
            request_status_and_confirm site, "number of signal groups",
              { S0017: [:number] }
          end
  • Traffic Light Controller 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

    
    
    88
    89
    90
    91
    92
    93
    94
    95
    # File 'spec/site/tlc/signal_groups_spec.rb', line 88
    
    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