Specifications:
Verify that we can read input status with S0003
-
Given the site is connected
-
When we read input with S0029
-
Then we should receive a valid response
14 15 16 17
# File 'spec/site/tlc/io_spec.rb', line 14 Validator::Site.connected do |task,supervisor,site| request_status_and_confirm site, "input status", { S0003: [:inputstatus] } end
-
Verify that we can read input status with S0003
-
Given the site is connected
-
When we read input with S0029
-
Then we should receive a valid response
14 15 16 17
# File 'spec/site/tlc/io_spec.rb', line 14 Validator::Site.connected do |task,supervisor,site| request_status_and_confirm site, "input status", { S0003: [:inputstatus] } end
-
Verify that we can read forced input status with S0029
-
Given the site is connected
-
When we read input with S0029
-
Then we should receive a valid response
36 37 38 39
# File 'spec/site/tlc/io_spec.rb', line 36 Validator::Site.connected do |task,supervisor,site| request_status_and_confirm site, "forced input status", { S0029: [:status] } end
-
Verify that we can force input with M0019
-
Given the site is connected
-
And the input is forced off
-
When we force the input on
-
Then S0003 should show the input on
49 50 51 52 53 54 55 56 57 58 59
# File 'spec/site/tlc/io_spec.rb', line 49 Validator::Site.connected do |task,supervisor,site| prepare task, site inputs = Validator.get_config('items','inputs') skip("No inputs configured") if inputs.nil? || inputs.empty? inputs.each do |input| force_input input: input, status: 'True', value: 'False' force_input input: input, status: 'True', value: 'True' ensure force_input input: input, status: 'False', validate: false end end
-
Verify that we can activate input with M0006
-
Given the site is connected
-
When we activate input with M0006
-
Then S0003 should show the input is active
-
When we deactivate input with M0006
-
Then S0003 should show the input is inactive
70 71 72 73 74 75 76
# File 'spec/site/tlc/io_spec.rb', line 70 Validator::Site.connected do |task,supervisor,site| prepare task, site inputs = Validator.get_config('items','inputs') skip("No inputs configured") if inputs.nil? || inputs.empty? prepare task, site inputs.each { |input| switch_input input } end
-
Verify that we can acticate/deactivate a series of inputs with M0013
-
Given the site is connected
-
Send control command to set a serie of input
-
Wait for status = true
84 85 86 87 88 89 90
# File 'spec/site/tlc/io_spec.rb', line 84 Validator::Site.connected do |task,supervisor,site| prepare task, site inputs = Validator.get_config('items','inputs') skip("No inputs configured") if inputs.nil? || inputs.empty? status = "1,3,12;5,5,10" set_series_of_inputs status end
-
Verify that input sensitivity can be set with M0021
-
Given the site is connected
-
When we set sensitivity with M0021
-
Then we receive a confirmation
98 99 100 101 102
# File 'spec/site/tlc/io_spec.rb', line 98 Validator::Site.connected do |task,supervisor,site| prepare task, site status = '1-50' set_trigger_level status end
-