The XBee manual describes the data format used with the ADC. You’ll get a three-byte header, in which the first byte indicates how many samples will be sent, and the second and third bytes are bit flags telling you which analog and digital channels are active.
Then you’ll get some number of bytes representing the data. You’ll first get two bytes that tell you which of the digital channels are high and which are low. Then for each active ADC channel you’ll get two bytes: MSB and LSB of the corresponding channel’s analog voltage.
For example, you might receive these data:
Header bytes (3)
00000110 00000010 00001010 = 6 samples, ADC 1 on, DIO 1 and 3 on
Sample bytes (24: 6 sets of 2 bytes representing the status of the digital lines, followed by 2 bytes representing each of the ADC samples)
00000000 00001010 00000000 00011011 = 27 ← value of the sample
00000000 00001010 00000000 00011000 = 24
00000000 00001010 00000000 00011001 = 25
00000000 00001010 00000000 00011010 = 26
00000000 00001010 00000000 00011010 = 26
00000000 00001010 00000000 00011000 = 24
I recorded these using a light meter to provide analog input.
What I have not figured out is why after the header and data, I consistently receive 9 additional bytes. Still working on that part.
It is also possible to use I/O line passing, and in fact this sounds closer to what you’re asking about. I haven’t tried it yet, but the manual says that you can use the analog input to the AD0 pin to change a PWM value sent out pin PWM0 of a receiving XBee module. Presumably AD1 will control PWM1 as well, giving you two lines of analog line passing.
In short, you can either have a digital value on the receiving end, or an analog one, whichever works better for you. There are more lines available for transmitting the ADC values as digital values, though.