Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added states for Hardware #30

Merged
merged 26 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dfc620c
added hardware files
NidhiHemanth Jun 13, 2023
0d7ca92
adding documentation for all hardware files
NidhiHemanth Jun 13, 2023
f6b8315
Merge branch 'master' of github.com:NidhiHemanth/windows-snapshot
NidhiHemanth Jun 19, 2023
1fb0615
added Win32_Fan state
NidhiHemanth Jun 19, 2023
b87d422
added Win32_HeatPipe state
NidhiHemanth Jun 19, 2023
6b57793
added Win32_Refrigeration state
NidhiHemanth Jun 19, 2023
fbad28d
added Win32_TemperatureProbe state
NidhiHemanth Jun 19, 2023
b2cd304
added Win32_Keyboard state
NidhiHemanth Jun 20, 2023
c92f2c1
added Win32_PointingDevice state
NidhiHemanth Jun 20, 2023
2fc68cf
added Win32_AutochkSetting state
NidhiHemanth Jun 20, 2023
0e2a59f
added Win32_CDROMDrive state
NidhiHemanth Jun 20, 2023
364f4ba
added Win32_DiskDrive state
NidhiHemanth Jun 20, 2023
ec9c0db
added Win32_PhysicalMedia state
NidhiHemanth Jun 20, 2023
91ea30b
added Win32_TapeDrive state
NidhiHemanth Jun 20, 2023
ea47e16
added Win32_NetworkAdapter state
NidhiHemanth Jun 20, 2023
1759a5c
added Win32_NetworkAdapterConfiguration state
NidhiHemanth Jun 21, 2023
55f8985
added Win32_POTSModem state
NidhiHemanth Jun 21, 2023
31b0ce9
made requested changes
NidhiHemanth Jun 26, 2023
c23724a
added Win32_Battery state
NidhiHemanth Jun 26, 2023
58772a9
added Win32_CurrentProbe state
NidhiHemanth Jun 26, 2023
5c998ea
added Win32_PortableBattery state
NidhiHemanth Jun 26, 2023
b1d2900
added Win32_PowerManagementEvent state
NidhiHemanth Jun 26, 2023
0dab9d6
added Win32_VoltageProbe state
NidhiHemanth Jun 26, 2023
7ea2265
added Win32_DesktopMonitor state
NidhiHemanth Jun 26, 2023
2195931
added Win32_DisplayControllerConfiguration state
NidhiHemanth Jun 26, 2023
ca694ef
added Win32_VideoController state
NidhiHemanth Jun 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/bin/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ async fn main() {

let mut k = windows_snapshot::state::Windows::default();

//k.async_update().await;
//k.update(); // for synchronous update
// k.async_update().await;
// k.update(); // for synchronous update

// println!("{k:#?}");
k.async_update().await;
// k.startup_commands.update();
// k.async_update().await;
k.video_controllers.update();

println!("{:#?}", k);
println!("{:#?}", k.video_controllers);
}
739 changes: 739 additions & 0 deletions src/hardware/cooling_device.rs

Large diffs are not rendered by default.

429 changes: 429 additions & 0 deletions src/hardware/input_device.rs

Large diffs are not rendered by default.

1,116 changes: 1,116 additions & 0 deletions src/hardware/mass_storage.rs

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions src/hardware/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//! [Computer System Hardware Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes)
//!
//! The Computer System Hardware category groups classes together that represent hardware related
//! objects. Examples include input devices, hard disks, expansion cards, video devices, networking
//! devices, and system power.
//!
//! The Hardware System category is grouped into the following subcategories:
//!
//! - [Cooling Device Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#cooling-device-classes)
//! - [Input Device Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#input-device-classes)
//! - [Mass Storage Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#mass-storage-classes)
//! - [Networking Device Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#networking-device-classes)
//! - [Power Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#power-classes)
//! - [Telephony Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#telephony-classes)
//! - [Video and Monitor Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#video-and-monitor-classes)

pub mod cooling_device;
pub mod input_device;
pub mod mass_storage;
pub mod networking_device;
pub mod power;
pub mod telephony;
pub mod video_monitor;
55 changes: 55 additions & 0 deletions src/hardware/motherboard_controller_port.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
//! The Motherboard, Controllers, and Ports subcategory groups classes that represent system devices. Examples include system memory, cache memory, and controllers.
//!
//! | Class | Description |
//! |-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
//! | [**Win32\_1394Controller**](win32-1394controller) | Represents the capabilities and management of a 1394 controller.<br/> |
//! | [**Win32\_1394ControllerDevice**](win32-1394controllerdevice) | Relates the high-speed serial bus (IEEE 1394 Firewire) Controller and the [**CIM\_LogicalDevice**](cim-logicaldevice) instance connected to it.<br/> |
//! | [**Win32\_AllocatedResource**](win32-allocatedresource) | Relates a logical device to a system resource.<br/> |
//! | [**Win32\_AssociatedProcessorMemory**](win32-associatedprocessormemory) | Relates a processor and its cache memory.<br/> |
//! | [**Win32\_BaseBoard**](win32-baseboard) | Represents a baseboard (also known as a motherboard or system board).<br/> |
//! | [**Win32\_BIOS**](win32-bios) | Represents the attributes of the computer system's basic input or output services (BIOS) that are installed on the computer.<br/> |
//! | [**Win32\_Bus**](win32-bus) | Represents a physical bus as seen by a Windows operating system.<br/> |
//! | [**Win32\_CacheMemory**](win32-cachememory) | Represents cache memory (internal and external) on a computer system.<br/> |
//! | [**Win32\_ControllerHasHub**](/previous-versions/windows/desktop/cimwin32a/win32-controllerhashub) | Represents the hubs downstream from the universal serial bus (USB) controller.<br/> |
//! | [**Win32\_DeviceBus**](win32-devicebus) | Relates a system bus and a logical device using the bus.<br/> |
//! | [**Win32\_DeviceMemoryAddress**](win32-devicememoryaddress) | Represents a device memory address on a Windows system.<br/> |
//! | [**Win32\_DeviceSettings**](win32-devicesettings) | Relates a logical device and a setting that can be applied to it.<br/> |
//! | [**Win32\_DMAChannel**](win32-dmachannel) | Represents a direct memory access (DMA) channel on a computer system running Windows.<br/> |
//! | [**Win32\_FloppyController**](win32-floppycontroller) | Represents the capabilities and management capacity of a floppy disk drive controller.<br/> |
//! | [**Win32\_IDEController**](win32-idecontroller) | Represents the capabilities of an Integrated Drive Electronics (IDE) controller device.<br/> |
//! | [**Win32\_IDEControllerDevice**](win32-idecontrollerdevice) | Association class that relates an IDE controller and the logical device.<br/> |
//! | [**Win32\_InfraredDevice**](win32-infrareddevice) | Represents the capabilities and management of an infrared device.<br/> |
//! | [**Win32\_IRQResource**](win32-irqresource) | Represents an interrupt request line (IRQ) number on a Windows computer system.<br/> |
//! | [**Win32\_MemoryArray**](win32-memoryarray) | Represents the properties of the computer system memory array and mapped addresses.<br/> |
//! | [**Win32\_MemoryArrayLocation**](win32-memoryarraylocation) | Relates a logical memory array and the physical memory array upon which it exists.<br/> |
//! | [**Win32\_MemoryDevice**](win32-memorydevice) | Represents the properties of a computer system's memory device along with its associated mapped addresses.<br/> |
//! | [**Win32\_MemoryDeviceArray**](win32-memorydevicearray) | Relates a memory device and the memory array in which it resides.<br/> |
//! | [**Win32\_MemoryDeviceLocation**](win32-memorydevicelocation) | Association class that relates a memory device and the physical memory on which it exists.<br/> |
//! | [**Win32\_MotherboardDevice**](win32-motherboarddevice) | Represents a device that contains the central components of the computer system running Windows.<br/> |
//! | [**Win32\_OnBoardDevice**](win32-onboarddevice) | Represents common adapter devices built into the motherboard (system board).<br/> |
//! | [**Win32\_ParallelPort**](win32-parallelport) | Represents the properties of a parallel port on a computer system running Windows.<br/> |
//! | [**Win32\_PCMCIAController**](win32-pcmciacontroller) | Manages the capabilities of a Personal Computer Memory Card Interface Adapter (PCMCIA) controller device.<br/> |
//! | [**Win32\_PhysicalMemory**](win32-physicalmemory) | Represents a physical memory device located on a computer as available to the operating system.<br/> |
//! | [**Win32\_PhysicalMemoryArray**](win32-physicalmemoryarray) | Represents details about the computer system's physical memory.<br/> |
//! | [**Win32\_PhysicalMemoryLocation**](win32-physicalmemorylocation) | Relates an array of physical memory and its physical memory.<br/> |
//! | [**Win32\_PNPAllocatedResource**](win32-pnpallocatedresource) | Represents an association between logical devices and system resources.<br/> |
//! | [**Win32\_PNPDevice**](win32-pnpdevice) | Relates a device (known to Configuration Manager as a PNPEntity), and the function it performs.<br/> |
//! | [**Win32\_PNPEntity**](win32-pnpentity) | Represents the properties of a Plug and Play device.<br/> |
//! | [**Win32\_PortConnector**](win32-portconnector) | Represents physical connection ports, such as DB-25 pin male, Centronics, and PS/2.<br/> |
//! | [**Win32\_PortResource**](win32-portresource) | Represents an I/O port on a computer system running Windows.<br/> |
//! | [**Win32\_Processor**](win32-processor) | Represents a device capable of interpreting a sequence of machine instructions on a computer system running Windows.<br/> |
//! | [**Win32\_SCSIController**](win32-scsicontroller) | Represents a small computer system interface (SCSI) controller on a computer system running Windows.<br/> |
//! | [**Win32\_SCSIControllerDevice**](win32-scsicontrollerdevice) | Relates a SCSI controller and the logical device (disk drive) connected to it.<br/> |
//! | [**Win32\_SerialPort**](win32-serialport) | Represents a serial port on a computer system running Windows.<br/> |
//! | [**Win32\_SerialPortConfiguration**](win32-serialportconfiguration) | Represents the settings for data transmission on a Windows serial port.<br/> |
//! | [**Win32\_SerialPortSetting**](win32-serialportsetting) | Relates a serial port and its configuration settings.<br/> |
//! | [**Win32\_SMBIOSMemory**](win32-smbiosmemory) | Represents the capabilities and management of memory-related logical devices.<br/> |
//! | [**Win32\_SoundDevice**](win32-sounddevice) | Represents the properties of a sound device on a computer system running Windows.<br/> |
//! | [**Win32\_SystemBIOS**](win32-systembios) | Relates a computer system (including data such as startup properties, time zones, boot configurations, or administrative passwords) and a system BIOS (services, languages, and system management properties).<br/> |
//! | [**Win32\_SystemDriverPNPEntity**](win32-systemdriverpnpentity) | Relates a Plug and Play device on the Windows computer system and the driver that supports the Plug and Play device.<br/> |
//! | [**Win32\_SystemEnclosure**](win32-systemenclosure) | Represents the properties associated with a physical system enclosure.<br/> |
//! | [**Win32\_SystemMemoryResource**](win32-systemmemoryresource) | Represents a system memory resource on a Windows system.<br/> |
//! | [**Win32\_SystemSlot**](win32-systemslot) | Represents physical connection points including ports, motherboard slots and peripherals, and proprietary connections points.<br/> |
//! | [**Win32\_USBController**](win32-usbcontroller) | Manages the capabilities of a universal serial bus (USB) controller.<br/> |
//! | [**Win32\_USBControllerDevice**](win32-usbcontrollerdevice) | Relates a USB controller and the [**CIM\_LogicalDevice**](cim-logicaldevice) instances connected to it.<br/> |
//! | [**Win32\_USBHub**](/previous-versions/windows/desktop/cimwin32a/win32-usbhub) | Represents the management characteristics of a USB hub.<br/> |
Loading