Class: FANUC::Ekg::EkgData
- Inherits:
-
Object
- Object
- FANUC::Ekg::EkgData
- Defined in:
- lib/fanuc-ekg.rb
Instance Attribute Summary collapse
-
#alarms ⇒ Object
Returns the value of attribute alarms.
-
#bins ⇒ Object
Returns the value of attribute bins.
Instance Method Summary collapse
- #axis(id) ⇒ Object
-
#initialize ⇒ EkgData
constructor
A new instance of EkgData.
Constructor Details
#initialize ⇒ EkgData
Returns a new instance of EkgData.
131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/fanuc-ekg.rb', line 131 def initialize @bins = { :zero => Bin.new, :v1t1 => Bin.new, :v2t1 => Bin.new, :v1t2 => Bin.new, :v2t2 => Bin.new } @alarms = { :recent => [], :worst => [] } end |
Instance Attribute Details
#alarms ⇒ Object
Returns the value of attribute alarms.
130 131 132 |
# File 'lib/fanuc-ekg.rb', line 130 def alarms @alarms end |
#bins ⇒ Object
Returns the value of attribute bins.
130 131 132 |
# File 'lib/fanuc-ekg.rb', line 130 def bins @bins end |
Instance Method Details
#axis(id) ⇒ Object
145 146 147 148 149 150 151 152 |
# File 'lib/fanuc-ekg.rb', line 145 def axis(id) @sum = 0 @bins.each do |key,bin| @sum += bin[id] end # should i remove bin 0? @sum end |