Class: EmuPower::Notifications::ScheduleInfo

Inherits:
Notification 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

#enabledObject

Returns the value of attribute enabled.



381
382
383
# File 'lib/emu_power/notifications.rb', line 381

def enabled
  @enabled
end

#eventObject

Returns the value of attribute event.



379
380
381
# File 'lib/emu_power/notifications.rb', line 379

def event
  @event
end

#frequencyObject

Returns the value of attribute frequency.



380
381
382
# File 'lib/emu_power/notifications.rb', line 380

def frequency
  @frequency
end

#modeObject

Returns the value of attribute mode.



378
379
380
# File 'lib/emu_power/notifications.rb', line 378

def mode
  @mode
end

Instance Method Details

#build(hash) ⇒ Object



383
384
385
386
387
388
# File 'lib/emu_power/notifications.rb', line 383

def build(hash)
	self.mode = hash['Mode']
	self.event = hash['Event']
	self.frequency = parse_hex('Frequency')
	self.enabled = parse_bool('Enabled')
end