Class IOKitUtilFFM
java.lang.Object
oshi.util.platform.mac.IOKitUtilFFM
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentgetBSDNameMatchingDict(String bsdName) Convenience method to get the IO dictionary matching a bsd name.static intGets a pointer to the Mach Master Port.static IOKit.IOServicegetMatchingService(MemorySegment matchingDictionary) Opens a the first IOService matching a dictionary.static IOKit.IOServicegetMatchingService(String serviceName) Opens a the first IOService matching a service name.static IOKit.IOIteratorgetMatchingServices(MemorySegment matchingDictionary) Convenience method to get IOService objects matching a dictionary.static IOKit.IOIteratorgetMatchingServices(String serviceName) Convenience method to get IOService objects matching a service name.static IOKit.IORegistryEntrygetRoot()Gets the IO Registry root.
-
Method Details
-
getMasterPort
public static int getMasterPort()Gets a pointer to the Mach Master Port.- Returns:
- The master port.
Multiple calls to
getMasterPort()will not result in leaking ports but it is considered good programming practice to deallocate the port when you are finished with it, using mach_port_deallocate.
-
getRoot
Gets the IO Registry root.- Returns:
- a handle to the IORoot. Callers should release when finished.
-
getMatchingService
Opens a the first IOService matching a service name.- Parameters:
serviceName- The service name to match- Returns:
- a handle to an IOService if successful,
nullif failed. Callers should release when finished.
-
getMatchingService
Opens a the first IOService matching a dictionary.- Parameters:
matchingDictionary- The dictionary to match. This method will consume a reference to the dictionary.- Returns:
- a handle to an IOService if successful,
nullif failed. Callers should release when finished.
-
getMatchingServices
Convenience method to get IOService objects matching a service name.- Parameters:
serviceName- The service name to match- Returns:
- a handle to an IOIterator if successful,
nullif failed. Callers should release when finished.
-
getMatchingServices
Convenience method to get IOService objects matching a dictionary.- Parameters:
matchingDictionary- The dictionary to match. This method will consume a reference to the dictionary.- Returns:
- a handle to an IOIterator if successful,
nullif failed. Callers should release when finished.
-
getBSDNameMatchingDict
Convenience method to get the IO dictionary matching a bsd name.- Parameters:
bsdName- The bsd name of the registry entry- Returns:
- The dictionary ref if successful,
nullif failed. Callers should release when finished.
-