Detector Logics

Tests

Detector Logics forcing is read with S0021

Verify status S0021 manually set detector logic

  1. Given the site is connected
  2. Request status
  3. Expect status response before timeout
View Source
it 'forcing is read with S0021' do
  with_site(:connected, sxl: '>=1.0.7') do |site_proxy|
    site_proxy.request_status_and_collect({ S0021: [:detectorlogics] },
                                          within: RSMP::Validator.get_config('timeouts', 'status_response')).value!
  end
end

Detector Logics forcing is set with M0008

  1. Given the site is connected
  2. When we force each detector logic on with M0008
  3. Then S0002 should show the detector logic is on
  4. When we force the detector logic off with M0008
  5. Then S0002 should show the detector logic is off
View Source
it 'forcing is set with M0008' do
  with_site(:connected, sxl: '>=1.0.7') do |site_proxy|
    RSMP::Validator.get_config('components', 'detector_logic').keys.each_with_index do |component, indx|
      timeout = RSMP::Validator.get_config('timeouts', 'command_response')
      site_proxy.tlc.force_detector_logic!(component, status: 'True', mode: 'True', within: timeout)
      wait_for_status(
        site_proxy,
        "detector logic #{component} to be True",
        [{ 'sCI' => 'S0002', 'n' => 'detectorlogicstatus', 's' => /^.{#{indx}}1/ }]
      )
      site_proxy.tlc.force_detector_logic!(component, status: 'True', mode: 'False', within: timeout)
      wait_for_status(
        site_proxy,
        "detector logic #{component} to be False",
        [{ 'sCI' => 'S0002', 'n' => 'detectorlogicstatus', 's' => /^.{#{indx}}0/ }]
      )
    end
  end
end

Detector Logics list size is read with S0016

Verify status S0016 number of detector logics

  1. Given the site is connected
  2. Request status
  3. Expect status response before timeout
View Source
it 'list size is read with S0016' do
  with_site(:connected, sxl: '>=1.0.7') do |site_proxy|
    site_proxy.request_status_and_collect({ S0016: [:number] },
                                          within: RSMP::Validator.get_config('timeouts', 'status_response')).value!
  end
end

Detector Logics sensitivity is read with S0031

Verify status S0031 trigger level sensitivity for loop detector

  1. Given the site is connected
  2. Request status
  3. Expect status response before timeout
View Source
it 'sensitivity is read with S0031' do
  with_site(:connected, sxl: '>=1.0.15') do |site_proxy|
    site_proxy.request_status_and_collect({ S0031: [:status] },
                                          within: RSMP::Validator.get_config('timeouts', 'status_response')).value!
  end
end

Detector Logics status is read with S0002

Verify status S0002 detector logic status

  1. Given the site is connected
  2. Request status
  3. Expect status response before timeout
View Source
it 'status is read with S0002' do
  with_site(:connected, sxl: '>=1.0.7') do |site_proxy|
    site_proxy.request_status_and_collect({ S0002: [:detectorlogicstatus] },
                                          within: RSMP::Validator.get_config('timeouts', 'status_response')).value!
  end
end

This site uses Just the Docs, a documentation theme for Jekyll.