Class MacGraphicsCard
java.lang.Object
oshi.hardware.common.AbstractGraphicsCard
oshi.hardware.common.platform.mac.MacGraphicsCard
- All Implemented Interfaces:
GraphicsCard
Graphics card info obtained by system_profiler SPDisplaysDataType.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceFactory for creating GraphicsCard instances.protected static interfaceFunctional interface for sysctl long queries. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final booleanWhether running on Apple Silicon. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMacGraphicsCard(String name, String deviceId, String vendor, String versionInfo, long vram) Creates a MacGraphicsCard. -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<GraphicsCard> Parses graphics cards from system_profiler output.Methods inherited from class AbstractGraphicsCard
createStatsSession, getDeviceId, getName, getVendor, getVersionInfo, getVRam, toStringModifier and TypeMethodDescriptionOpens a newGpuStatssession for sampling dynamic GPU metrics.Retrieves the card's Device IDgetName()Retrieves the full name of the card.Retrieves the card's manufacturer/vendorRetrieves a list of version/revision data from the card.longgetVRam()Retrieves the Video RAM (VRAM) available on the GPUtoString()Returns a string representation of this graphics card including any available dynamic metrics.
-
Field Details
-
IS_APPLE_SILICON
protected static final boolean IS_APPLE_SILICONWhether running on Apple Silicon.
-
-
Constructor Details
-
MacGraphicsCard
-
-
Method Details
-
parseGraphicsCards
protected static List<GraphicsCard> parseGraphicsCards(MacGraphicsCard.GraphicsCardFactory factory, MacGraphicsCard.SysctlLong sysctl) Parses graphics cards from system_profiler output.- Parameters:
factory- the factory to create cardssysctl- the sysctl accessor- Returns:
- a list of graphics cards
-