Class: ComputeUnit::Asic

Inherits:
ComputeBase show all
Defined in:
lib/compute_unit/asic.rb

Constant Summary collapse

DEVICE_CLASS_NAME =
'Asic'

Constants inherited from ComputeBase

ComputeBase::CACHE_TIMEOUT

Constants inherited from Device

Device::PROC_PATH, Device::SYSFS_DEVICES_PATH

Instance Attribute Summary

Attributes inherited from ComputeBase

#compute_type, #index, #meta, #power_offset, #serial, #timestamp, #type, #uuid

Attributes inherited from Device

#device_class_id, #device_id, #device_path, #device_vendor_id, #make, #model, #subsystem_device_id, #subsystem_vendor_id, #vendor

Class Method Summary collapse

Methods inherited from ComputeBase

#attached_processes, compute_classes, #device_class_name, devices, #expired_metadata?, #initialize, #top_processes

Methods included from Logger

color, log_file, log_level, logger, #logger

Methods inherited from Device

#base_hwmon_path, device, device_class, device_lookup, device_vendor, #expired_metadata?, #generic_model, #hwmon_path, #initialize, #lock_rom, logger, manual_device_database, manual_device_lookup, manual_vendor_lookup, manual_vendors, name_map, name_translation, pci_database, #read_file, #read_hwmon_data, read_kernel_setting, #read_kernel_setting, #rom_data, #rom_path, subsystem_device, subsystem_device_lookup, subsystem_vendor, subsystem_vendor_lookup, #sysfs_model_name, system_checksum, #to_h, #to_json, #unlock_rom, vendor_lookup, #write_hwmon_data, #write_kernel_setting, write_kernel_setting

Methods included from Utils

check_for_root, #root?, root?

Constructor Details

This class inherits a constructor from ComputeUnit::ComputeBase

Class Method Details

.create_from_path(device_path, index) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/compute_unit/asic.rb', line 12

def self.create_from_path(device_path, index)
  opts = {
    device_class_id: device_class(device_path),
    device_id: device(device_path),
    device_vendor_id: device_vendor(device_path),
    subsystem_vendor_id: subsystem_vendor(device_path),
    subsystem_device_id: subsystem_device(device_path),
    index: index
  }
  new(device_path, opts)
end

.find_allObject



8
9
10
# File 'lib/compute_unit/asic.rb', line 8

def self.find_all
  []
end