Traffic Light Controller System
Tests
- System operator logged in/out of OP-panel is read with S0091
- System operator logged in/out of web-interface is read with S0092
- System security code is rejected when incorrect
- System security code is set with M0103
- System version is read with S0095
System operator logged in/out of OP-panel is read with S0091
Verify status S0091 operator logged in/out OP-panel
- Given the site is connected
- Request status
- Expect status response before timeout
View Source
Validator::Site.connected do |task,supervisor,site|
if RSMP::Proxy.version_meets_requirement?( site.sxl_version, '>=1.1' )
status_list = { S0091: [:user] }
else
status_list = { S0091: [:user, :status] }
end
request_status_and_confirm site, "operator logged in/out OP-panel", status_list
end
System operator logged in/out of web-interface is read with S0092
Verify status S0092 operator logged in/out web-interface
- Given the site is connected
- Request status
- Expect status response before timeout
View Source
Validator::Site.connected do |task,supervisor,site|
if RSMP::Proxy.version_meets_requirement?( site.sxl_version, '>=1.1' )
status_list = { S0092: [:user] }
else
status_list = { S0092: [:user, :status] }
end
request_status_and_confirm site, "operator logged in/out web-interface", status_list
end
System security code is rejected when incorrect
Verify that the site responds with NotAck if we send incorrect security cdoes. RThis hehaviour is defined in SXL >= 1.1. For earlier versions, The behaviour is undefined.
- Given the site is connected
- When we send a M0008 command with incorrect security codes
- Then we should received a NotAck
View Source
Validator::Site.connected do |task,supervisor,site|
prepare task, site
expect { wrong_security_code }.to raise_error(RSMP::MessageRejected)
end
System security code is set with M0103
- Verify connection
- Send control command to set securitycode_level
- Wait for status = true
- Send control command to setsecuritycode_level
- Wait for status = true
View Source
Validator::Site.connected do |task,supervisor,site|
prepare task, site
set_security_code 1
set_security_code 2
end
System version is read with S0095
Verify status S0095 version of traffic controller
- 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, "version of traffic controller",
{ S0095: [:status] }
end