Zigbee - How to send ZDO commands

I'm writing some "generic" zigbee device driver libraries and, as part of that, am trying to figure out how to send some Zigbee device discovery commands (since this is part of some library functions, I don't want to assume specific functionality).

As part of this, I'm trying to figure out how to format / send some zdo and zdl commands shown here: Silicon Labs Community

For example, is it possible to send commands like:

zdo simple <dest ShortId> <dest Endpoint>

I assume there may at least be some kind of a "general" command sending function where I could specify, e.g., the profile ID, command #, destination, endpoint, etc. and generate the command, but I can't find anything. Does anybody know -- is there a way to do this?

Or maybe the endpoint information is all captured at pairing time and there is some function to access it? Is there?

Any help is appreciated. Thanks.

@mike.maxwell is mostly likely your guy for this.

I'd love an example of how to query the power descriptor via zdo. I have a device that only returns its battery level via the power descriptor bitmap (100/66/33/0%).