Class: EmuPower::Notifications::CurrentSummationDelivered
- Inherits:
-
Notification
- Object
- Notification
- EmuPower::Notifications::CurrentSummationDelivered
- Defined in:
- lib/emu_power/notifications.rb
Constant Summary
Constants inherited from Notification
Notification::UNIX_TIME_OFFSET
Instance Attribute Summary collapse
-
#delivered ⇒ Object
Returns the value of attribute delivered.
-
#digits_left ⇒ Object
Returns the value of attribute digits_left.
-
#digits_right ⇒ Object
Returns the value of attribute digits_right.
-
#received ⇒ Object
Returns the value of attribute received.
-
#suppress_leading_zeroes ⇒ Object
Returns the value of attribute suppress_leading_zeroes.
Attributes inherited from Notification
#device_mac, #meter_mac, #raw, #timestamp
Instance Method Summary collapse
Methods inherited from Notification
#initialize, #parse_amount, #parse_bool, #parse_hex, #parse_timestamp, root_name, subclasses, #to_s
Constructor Details
This class inherits a constructor from EmuPower::Notifications::Notification
Instance Attribute Details
#delivered ⇒ Object
Returns the value of attribute delivered.
310 311 312 |
# File 'lib/emu_power/notifications.rb', line 310 def delivered @delivered end |
#digits_left ⇒ Object
Returns the value of attribute digits_left.
313 314 315 |
# File 'lib/emu_power/notifications.rb', line 313 def digits_left @digits_left end |
#digits_right ⇒ Object
Returns the value of attribute digits_right.
312 313 314 |
# File 'lib/emu_power/notifications.rb', line 312 def digits_right @digits_right end |
#received ⇒ Object
Returns the value of attribute received.
311 312 313 |
# File 'lib/emu_power/notifications.rb', line 311 def received @received end |
#suppress_leading_zeroes ⇒ Object
Returns the value of attribute suppress_leading_zeroes.
314 315 316 |
# File 'lib/emu_power/notifications.rb', line 314 def suppress_leading_zeroes @suppress_leading_zeroes end |
Instance Method Details
#build(hash) ⇒ Object
316 317 318 319 320 321 322 |
# File 'lib/emu_power/notifications.rb', line 316 def build(hash) self.delivered = parse_amount('SummationDelivered') self.received = parse_amount('SummationReceived') self.digits_right = parse_hex('DigitsRight') self.digits_left = parse_hex('DigitsLeft') self.suppress_leading_zeroes = parse_bool('SuppressLeadingZero') end |