Class: EmuPower::Notifications::FastPollStatus

Inherits:
Notification
  • Object
show all
Defined in:
lib/emu_power/notifications.rb

Constant Summary

Constants inherited from Notification

Notification::UNIX_TIME_OFFSET

Instance Attribute Summary collapse

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

#end_timeObject

Returns the value of attribute end_time.



244
245
246
# File 'lib/emu_power/notifications.rb', line 244

def end_time
  @end_time
end

#frequencyObject

Returns the value of attribute frequency.



243
244
245
# File 'lib/emu_power/notifications.rb', line 243

def frequency
  @frequency
end

Instance Method Details

#build(hash) ⇒ Object



246
247
248
249
# File 'lib/emu_power/notifications.rb', line 246

def build(hash)
  self.frequency = parse_hex('Frequency')
  self.end_time = parse_timestamp('EndTime')
end