HardwareImpl

class HardwareImpl(systemInfo: SystemInfo) : Hardware

Implementation of the Hardware interface. This class provides detailed information about the system's hardware, including processors, memory, storage devices, network interfaces, displays, and more. It lazily loads hardware data using the provided SystemInfo object and transforms it into domain-specific objects that implement the relevant interfaces.

Author

N7ghtm4r3

Parameters

systemInfo

The SystemInfo object that provides access to the hardware information.

See also

Constructors

Link copied to clipboard
constructor(systemInfo: SystemInfo)

Properties

Link copied to clipboard

centralProcessor The central processor (CPU) information, including processor details like name, cores, threads, etc. It is lazily loaded using the hardwareInfo object.

Link copied to clipboard
open override val computerSystem: ComputerSystem

computerSystem The computer system information, including manufacturer, model, serial number, etc. It is lazily loaded using the hardwareInfo object.

Link copied to clipboard
open override val diskStores: List<HWDiskStore>

diskStores List of storage devices (disks) in the system. The list is generated by loading disk information from the hardwareInfo object.

Link copied to clipboard
open override val displays: List<Display>

displays List of displays connected to the system. The list is generated by loading display information from the hardwareInfo object.

Link copied to clipboard
open override val globalMemory: GlobalMemory

globalMemory The global memory (RAM) information, including total, available memory, and other memory-related stats. It is lazily loaded using the hardwareInfo object.

Link copied to clipboard
open override val graphicsCards: List<GraphicsCard>

graphicsCards List of graphics cards available on the system. The list is generated by loading graphics card data from the hardwareInfo object.

Link copied to clipboard
private val hardwareInfo: HardwareAbstractionLayer

hardwareInfo Contains the raw hardware data from the SystemInfo object. This object is lazily loaded, which makes it easier to access system-specific details like processor, memory, and more.

Link copied to clipboard

logicalVolumeGroups List of logical volume groups on the system. The list is generated by loading logical volume group information from the hardwareInfo object.

Link copied to clipboard
open override val networkIFs: List<NetworkIF>

networkIFs List of network interfaces (e.g., Ethernet, Wi-Fi). The list is generated by loading network interface information from the hardwareInfo object.

Link copied to clipboard
open override val powerSources: List<PowerSource>

powerSources List of power sources (e.g., battery or AC power) available in the system. The list is generated by loading power source data from the hardwareInfo object.

Link copied to clipboard
open override val sensors: Sensors

sensors The system's sensors (e.g., temperature, fan speed). The sensor data is lazily loaded from the hardwareInfo object.

Link copied to clipboard
open override val soundCards: List<SoundCard>

soundCards List of sound cards available on the system. The list is generated by loading sound card data from the hardwareInfo object.

Functions

Link copied to clipboard
open override fun getNetworkIfs(includeLocalInterfaces: Boolean): List<NetworkIF>

Retrieves the network interfaces, with the option to include local interfaces.

Link copied to clipboard
open override fun getUsbDevices(tree: Boolean): List<UsbDevice>

getUsbDevices Retrieves the USB devices connected to the system, with the option to represent them as a device tree.

Link copied to clipboard
private fun loadDisks(sourceList: List<HWDiskStore>): List<HWDiskStore>

Loads and converts a list of HWDiskStore objects from raw oshi.hardware.HWDiskStore data.

Link copied to clipboard
private fun loadDisplays(sourceList: List<Display>): List<Display>

Loads and converts a list of Display objects from raw oshi.hardware.Display data.

Link copied to clipboard
private fun loadGraphicCards(sourceList: List<GraphicsCard>): List<GraphicsCard>

Loads and converts a list of GraphicsCard objects from raw oshi.hardware.GraphicsCard data.

Link copied to clipboard
private fun loadLogicalVolumeGroup(sourceList: List<LogicalVolumeGroup>): List<LogicalVolumeGroup>

Loads and converts a list of LogicalVolumeGroup objects from raw oshi.hardware.LogicalVolumeGroup data.

Link copied to clipboard
private fun loadNetworkIf(sourceList: List<NetworkIF>): List<NetworkIF>

Loads and converts a list of NetworkIF objects from raw oshi.hardware.NetworkIF data.

Link copied to clipboard
private fun loadPartitions(sourceList: List<HWPartition>): List<HWPartition>

Loads and converts a list of HWPartition objects from raw oshi.hardware.HWPartition data.

Link copied to clipboard
private fun loadPowerSources(sourceList: List<PowerSource>): List<PowerSource>

Loads and converts a list of PowerSource objects from raw oshi.hardware.PowerSource data.

Link copied to clipboard
private fun loadSoundcards(sourceList: List<SoundCard>): List<SoundCard>

Loads and converts a list of SoundCard objects from raw oshi.hardware.SoundCard data.

Link copied to clipboard
private fun loadUsbDevices(sourceList: List<UsbDevice>): List<UsbDevice>

Loads and converts a list of UsbDevice objects from raw oshi.hardware.UsbDevice data.