Class: EmuPower::Notifications::DeviceInfo

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

#date_codeObject

Returns the value of attribute date_code.



226
227
228
# File 'lib/emu_power/notifications.rb', line 226

def date_code
  @date_code
end

#firmware_versionObject

Returns the value of attribute firmware_version.



221
222
223
# File 'lib/emu_power/notifications.rb', line 221

def firmware_version
  @firmware_version
end

#hardware_versionObject

Returns the value of attribute hardware_version.



222
223
224
# File 'lib/emu_power/notifications.rb', line 222

def hardware_version
  @hardware_version
end

#image_typeObject

Returns the value of attribute image_type.



223
224
225
# File 'lib/emu_power/notifications.rb', line 223

def image_type
  @image_type
end

#install_codeObject

Returns the value of attribute install_code.



219
220
221
# File 'lib/emu_power/notifications.rb', line 219

def install_code
  @install_code
end

Returns the value of attribute link_key.



220
221
222
# File 'lib/emu_power/notifications.rb', line 220

def link_key
  @link_key
end

#manufacturerObject

Returns the value of attribute manufacturer.



224
225
226
# File 'lib/emu_power/notifications.rb', line 224

def manufacturer
  @manufacturer
end

#modelObject

Returns the value of attribute model.



225
226
227
# File 'lib/emu_power/notifications.rb', line 225

def model
  @model
end

Instance Method Details

#build(hash) ⇒ Object



228
229
230
231
232
233
234
235
236
237
# File 'lib/emu_power/notifications.rb', line 228

def build(hash)
	self.install_code = hash['InstallCode']
	self.link_key = hash['LinkKey']
	self.firmware_version = hash['FWVersion']
	self.hardware_version = hash['HWVersion']
	self.image_type = hash['ImageType']
	self.manufacturer = hash['Manufacturer']
	self.model = hash['ModelId']
	self.date_code = hash['DateCode']
end