local read of xbee id

I have XBEE PRO 900HPs. Certain pins are programmed as input, e.g. DIO4. I wish to read digital and analog I/O from the module through the serial link to the local processor, process them, and then transmit them. How do I do this?
Thanks,
Michael

Example: XBEE PRO 900HP 32k programmable. A switch is connected to DIO4 which is configured as input. I need the onboard processor to read the number of switch closures in an 1/2 hour interval and then transmit the total.

Sounds like you need to look over the examples found in the SDK. There is one there that does what you are referring to.