• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Switching Planes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switching Planes


  • Subject: Re: Switching Planes
  • From: Alexei Kosut <email@hidden>
  • Date: Mon, 23 Jun 2008 18:30:56 -0700

On Jun 23, 2008, at 5:47 PM, Robert Kukuchka wrote:
Is there an easy way to "switch planes" for iteration within the IORegistry? Or perhaps I'm missing some fundamental concept. Essentially I've got USB devices that I'm finding through notifications. From there I want to discover information within the context of the service plane. It seems silly for me to have to start a the root of the service plane. Can IOUsbDevice act as a "via" to another plane?

Sure. Once you have a reference to a registry entry, it doesn't matter which plane you got it from; they're all the same.


The specific context is I wish to discover the IOSerialBSDClients a device publishes. My thought was to get the USBDevice (such as in USBNotificationExample), then iterating the children of that device.

Are you an in-kernel or user-space client? Both sets registry iteration APIs allow you to start at a specific entry in a specific plane. For the kernel, use IORegistryIterator::iterateOver(), and for a user application, call IORegistryEntryCreateIterator() and pass the appropriate entry and plane. If you just want direct children, you can simplify things by using getChildIterator() or IORegistryEntryGetChildIterator(), respectively, both of which also take the plane as an argument.


Alexei
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Switching Planes (From: Robert Kukuchka <email@hidden>)

  • Prev by Date: Switching Planes
  • Next by Date: dtrace with kexts?
  • Previous by thread: Switching Planes
  • Next by thread: dtrace with kexts?
  • Index(es):
    • Date
    • Thread