Specifications:
Verify that output status can be read with S0004
-
Given the site is connected
-
When we subscribe to S0004
-
We should receive a status updated
-
And the outputstatus attribute should be a digit string
113 114 115 116 117
# File 'spec/site/tlc/io_spec.rb', line 113 Validator::Site.connected do |task,supervisor,site| prepare task, site request_status_and_confirm site, "output status", { S0004: [:outputstatus] } end
-
Verify that output status can be read with S0004
-
Given the site is connected
-
When we subscribe to S0004
-
We should receive a status updated
-
And the outputstatus attribute should be a digit string
113 114 115 116 117
# File 'spec/site/tlc/io_spec.rb', line 113 Validator::Site.connected do |task,supervisor,site| prepare task, site request_status_and_confirm site, "output status", { S0004: [:outputstatus] } end
-
Verify that forced output status can be read with S0030
-
Given the site is connected
-
Request status
-
Expect status response before timeout
138 139 140 141 142
# File 'spec/site/tlc/io_spec.rb', line 138 Validator::Site.connected do |task,supervisor,site| prepare task, site request_status_and_confirm site, "forced output status", { S0030: [:status] } end
-
Verify that output can be forced with M0020
-
Given the site is connected
-
When we force output with M0020
-
Wait for status = true
150 151 152 153 154 155 156 157 158 159 160
# File 'spec/site/tlc/io_spec.rb', line 150 Validator::Site.connected do |task,supervisor,site| prepare task, site outputs = Validator.get_config('items','outputs') skip("No outputs configured") if outputs.nil? || outputs.empty? outputs.each do |output| force_output output: output, status:'True', value:'True' force_output output: output, status:'True', value:'False' ensure force_output output: output, status:'False', validate: false end end
-