Class: NRB::BCSInterrogator::Entity
- Inherits:
-
Object
- Object
- NRB::BCSInterrogator::Entity
- Defined in:
- lib/bcs_interrogator/entity.rb
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Entity
constructor
A new instance of Entity.
- #input_name ⇒ Object
- #last_update ⇒ Object
- #name ⇒ Object
- #output ⇒ Object
- #output_name ⇒ Object
- #setpoint ⇒ Object
- #temp ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Entity
Returns a new instance of Entity.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bcs_interrogator/entity.rb', line 5 def initialize(args={}) @bcs = args[:bcs] raise ArgumentError("Please provide a BCS object") if @bcs.nil? if args[:positions].is_a?(Fixnum) @positions = { output_names: args[:positions], outputs: args[:positions], temp_probe_names: args[:positions], temps: args[:positions], setpoints: args[:positions] } else @positions = args[:positions] end end |
Instance Method Details
#input_name ⇒ Object
21 |
# File 'lib/bcs_interrogator/entity.rb', line 21 def input_name; data :input_names; end |
#last_update ⇒ Object
22 |
# File 'lib/bcs_interrogator/entity.rb', line 22 def last_update; @bcs.last_update; end |
#name ⇒ Object
23 |
# File 'lib/bcs_interrogator/entity.rb', line 23 def name; data :temp_probe_names; end |
#output ⇒ Object
25 |
# File 'lib/bcs_interrogator/entity.rb', line 25 def output; data :outputs; end |
#output_name ⇒ Object
24 |
# File 'lib/bcs_interrogator/entity.rb', line 24 def output_name; data :output_names; end |
#setpoint ⇒ Object
26 |
# File 'lib/bcs_interrogator/entity.rb', line 26 def setpoint; data :setpoints; end |
#temp ⇒ Object
27 |
# File 'lib/bcs_interrogator/entity.rb', line 27 def temp; data :temps; end |
#update ⇒ Object
28 |
# File 'lib/bcs_interrogator/entity.rb', line 28 def update; @bcs.update; end |