ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
hardware_monitor.hardware_utils Namespace Reference

Functions

str _read (str path, str default='')
 
str _readlink_base (str path)
 
str _run (list[str] cmd, float timeout=3.0)
 
int _parse_cache_kb (str s)
 
tuple[str, str] _pci_class_label (str class_hex)
 
dict get_system_info ()
 
dict get_cpu_info ()
 
dict get_ram_info ()
 
list[dict] get_accelerator_info ()
 
list[dict] get_pci_devices ()
 
list[dict] get_usb_devices ()
 
list[dict] get_serial_devices ()
 
list[dict] get_network_interfaces ()
 
list[dict] get_storage_devices ()
 
list[dict] get_sensor_devices ()
 
list[dict] get_audio_devices ()
 
list[dict] get_input_devices ()
 
list[dict] get_power_info ()
 

Variables

dictionary _PCI_BASE_CLASS
 
dictionary _PCI_SUBCLASS
 
dictionary _USB_CLASS
 
dictionary _UART_TYPES
 

Function Documentation

◆ _parse_cache_kb()

int hardware_monitor.hardware_utils._parse_cache_kb ( str  s)
private
Here is the caller graph for this function:

◆ _pci_class_label()

tuple[str, str] hardware_monitor.hardware_utils._pci_class_label ( str  class_hex)
private
Return (base_label, subclass_label) from a 0xCCSSPP hex string.
Here is the caller graph for this function:

◆ _read()

str hardware_monitor.hardware_utils._read ( str  path,
str   default = '' 
)
private
Here is the caller graph for this function:

◆ _readlink_base()

str hardware_monitor.hardware_utils._readlink_base ( str  path)
private
Here is the caller graph for this function:

◆ _run()

str hardware_monitor.hardware_utils._run ( list[str]  cmd,
float   timeout = 3.0 
)
private
Here is the caller graph for this function:

◆ get_accelerator_info()

list[dict] hardware_monitor.hardware_utils.get_accelerator_info ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_audio_devices()

list[dict] hardware_monitor.hardware_utils.get_audio_devices ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_cpu_info()

dict hardware_monitor.hardware_utils.get_cpu_info ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_input_devices()

list[dict] hardware_monitor.hardware_utils.get_input_devices ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_network_interfaces()

list[dict] hardware_monitor.hardware_utils.get_network_interfaces ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pci_devices()

list[dict] hardware_monitor.hardware_utils.get_pci_devices ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_power_info()

list[dict] hardware_monitor.hardware_utils.get_power_info ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_ram_info()

dict hardware_monitor.hardware_utils.get_ram_info ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_sensor_devices()

list[dict] hardware_monitor.hardware_utils.get_sensor_devices ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_serial_devices()

list[dict] hardware_monitor.hardware_utils.get_serial_devices ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_storage_devices()

list[dict] hardware_monitor.hardware_utils.get_storage_devices ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_system_info()

dict hardware_monitor.hardware_utils.get_system_info ( )
Here is the caller graph for this function:

◆ get_usb_devices()

list[dict] hardware_monitor.hardware_utils.get_usb_devices ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _PCI_BASE_CLASS

dictionary hardware_monitor.hardware_utils._PCI_BASE_CLASS
private
Initial value:
1 = {
2  0x00: 'Unclassified', 0x01: 'Mass Storage',
3  0x02: 'Network', 0x03: 'Display',
4  0x04: 'Multimedia', 0x05: 'Memory Controller',
5  0x06: 'Bridge', 0x07: 'Communication',
6  0x08: 'System Peripheral', 0x09: 'Input Device',
7  0x0A: 'Docking Station', 0x0B: 'Processor',
8  0x0C: 'Serial Bus', 0x0D: 'Wireless',
9  0x0E: 'Intelligent I/O', 0x0F: 'Satellite',
10  0x10: 'Encryption', 0x11: 'Signal Processing',
11  0x12: 'Processing Accelerator', 0x40: 'Co-Processor',
12  0xFF: 'Unassigned',
13 }

◆ _PCI_SUBCLASS

dictionary hardware_monitor.hardware_utils._PCI_SUBCLASS
private
Initial value:
1 = {
2  (0x01, 0x00): 'SCSI Bus', (0x01, 0x01): 'IDE',
3  (0x01, 0x05): 'ATA', (0x01, 0x06): 'SATA (AHCI)',
4  (0x01, 0x07): 'SAS', (0x01, 0x08): 'NVMe',
5  (0x02, 0x00): 'Ethernet', (0x02, 0x01): 'Token Ring',
6  (0x02, 0x02): 'FDDI', (0x02, 0x80): 'Network (other)',
7  (0x03, 0x00): 'VGA Compatible', (0x03, 0x01): '8514 Compatible',
8  (0x03, 0x02): 'XGA', (0x03, 0x80): 'GPU (other)',
9  (0x04, 0x00): 'Video', (0x04, 0x01): 'Audio',
10  (0x04, 0x03): 'Audio Device', (0x04, 0x80): 'Multimedia (other)',
11  (0x06, 0x00): 'Host Bridge', (0x06, 0x01): 'ISA Bridge',
12  (0x06, 0x04): 'PCI-PCIe Bridge',(0x06, 0x09): 'PCI-PCI Bridge',
13  (0x07, 0x00): 'Serial (UART)', (0x07, 0x01): 'Parallel Port',
14  (0x07, 0x03): 'Modem', (0x07, 0x80): 'Communication (other)',
15  (0x0B, 0x20): 'GPU (co-processor)',
16  (0x0C, 0x00): 'FireWire', (0x0C, 0x03): 'USB Controller',
17  (0x0C, 0x04): 'Fibre Channel', (0x0C, 0x05): 'SMBus',
18  (0x0C, 0x06): 'InfiniBand', (0x0C, 0x07): 'IPMI',
19  (0x0D, 0x00): 'iRDA', (0x0D, 0x11): 'Bluetooth',
20  (0x0D, 0x12): 'Broadband', (0x0D, 0x20): 'Wi-Fi 802.11a',
21  (0x0D, 0x21): 'Wi-Fi 802.11b', (0x0D, 0x80): 'Wireless (other)',
22  (0x12, 0x00): 'Processing Accelerator', (0x12, 0x01): 'AI/ML Accelerator',
23 }

◆ _UART_TYPES

dictionary hardware_monitor.hardware_utils._UART_TYPES
private
Initial value:
1 = {
2  '0': 'unknown', '1': '8250', '2': '16450', '3': '16550',
3  '4': '16550A', '5': 'Cirrus', '6': '16650V2','7': '16750',
4  '12': '16950/954', '14': 'RSA',
5 }

◆ _USB_CLASS

dictionary hardware_monitor.hardware_utils._USB_CLASS
private
Initial value:
1 = {
2  '00': 'Per-Interface', '01': 'Audio', '02': 'CDC/Serial',
3  '03': 'HID', '05': 'Physical', '06': 'Image',
4  '07': 'Printer', '08': 'Mass Storage','09': 'Hub',
5  '0a': 'CDC-Data', '0b': 'Smart Card', '0d': 'Content Security',
6  '0e': 'Video', '0f': 'PHDC', '10': 'AV',
7  'dc': 'Diagnostic', 'e0': 'Wireless', 'ef': 'Miscellaneous',
8  'fe': 'App Specific', 'ff': 'Vendor Specific',
9 }