what number of byte in i/o sampling?

what actually frame in io/o sampling?
in different site i am getting different pls help me out .
i am sensing LDR from remote xbee s2, here i attaching code pls help me out.

void setup() {
Serial.begin(9600);
}

;
void loop() {

// Remote XBee: AT, Base XBee: API
if (Serial.available() >= 23) { // Make sure the frame is all there
if (Serial.read() == 0x7E) { // 7E is the start byte
for (int i = 1; i<20; i++) { // Skip ahead to the analog data
byte discardByte = Serial.read();
}
int analogMSB = Serial.read(); // Read the first analog byte data
int analogLSB = Serial.read(); // Read the second byte
int analogReading = analogLSB + (analogMSB * 256);

Serial.print(analogReading);

}
Serial.println();
}
}

I am sorry but I don’t understand your question. What do you mean by LDR? Have you looked at the radios product manual or XCTU’s API frame generator?