Class: NRB::BCSInterrogator
- Inherits:
-
Object
- Object
- NRB::BCSInterrogator
- Defined in:
- lib/bcs_interrogator.rb,
lib/bcs_interrogator/api.rb,
lib/bcs_interrogator/entity.rb,
lib/bcs_interrogator/version.rb,
lib/bcs_interrogator/api/ultemp.rb,
lib/bcs_interrogator/api/sysname.rb,
lib/bcs_interrogator/api/endpoint.rb,
lib/bcs_interrogator/api/response.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.0.2'
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#last_update ⇒ Object
readonly
Returns the value of attribute last_update.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ BCSInterrogator
constructor
A new instance of BCSInterrogator.
- #input_names ⇒ Object
- #inputs ⇒ Object
- #output_names ⇒ Object
- #outputs ⇒ Object
- #setpoints ⇒ Object
- #temp_probe_names ⇒ Object
- #temps ⇒ Object
- #update(args = {}) ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ BCSInterrogator
Returns a new instance of BCSInterrogator.
14 15 16 |
# File 'lib/bcs_interrogator.rb', line 14 def initialize(args={}) @api = API.new base_url: args[:base_url] end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
12 13 14 |
# File 'lib/bcs_interrogator.rb', line 12 def api @api end |
#last_update ⇒ Object (readonly)
Returns the value of attribute last_update.
12 13 14 |
# File 'lib/bcs_interrogator.rb', line 12 def last_update @last_update end |
Class Method Details
.version ⇒ Object
4 |
# File 'lib/bcs_interrogator/version.rb', line 4 def self.version; VERSION; end |
Instance Method Details
#input_names ⇒ Object
18 |
# File 'lib/bcs_interrogator.rb', line 18 def input_names; api.sysname.input_names; end |
#inputs ⇒ Object
19 |
# File 'lib/bcs_interrogator.rb', line 19 def inputs; api.ultemp.outputs; end |
#output_names ⇒ Object
20 |
# File 'lib/bcs_interrogator.rb', line 20 def output_names; api.sysname.output_names; end |
#outputs ⇒ Object
21 |
# File 'lib/bcs_interrogator.rb', line 21 def outputs; api.ultemp.outputs; end |
#setpoints ⇒ Object
24 |
# File 'lib/bcs_interrogator.rb', line 24 def setpoints; api.ultemp.setpoints; end |
#temp_probe_names ⇒ Object
22 |
# File 'lib/bcs_interrogator.rb', line 22 def temp_probe_names; api.sysname.temp_probe_names; end |
#temps ⇒ Object
23 |
# File 'lib/bcs_interrogator.rb', line 23 def temps; api.ultemp.temps; end |
#update(args = {}) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/bcs_interrogator.rb', line 26 def update(args={}) api.ultemp.api_call if args[:deep] api.sysname.api_call end @last_update = Time.now true end |