XBee Library; how to send and receive data

Using XBee library from Andrew Rapp.

I need clarification how to send and receive (parse) the content data using this library.

I have been able so far, using API (AP=2) and 16 bit-addressing mode, to establish bi-directional communication between 2 Arduino Uno using XBee Pro.
I have 1 switch and 2 LED on each breadboard attached to the Arduino. Pressing the button on one board turn one LED Off and the other one On. The button number (I only have one for now) is send to the other Arduino using the payload[0]. 
On the receiving end, a function is called which also turn one LED Off and the other one ON, using data(0).

These data fields "payload" and "data" are exactly the same used by Andrew Rapp in his examples programs Series1_Rx and Series1_Tx.

So far so good, now I am trying to get to my next phase of my project.
Eventually, each station will have 3 switches and 6 LED. These switches will locally or remotely  activate a relay (pumps and heating) while the LED will display their status. In addition there will be 3 One Wire Digital Temperature Sensors - DS18B20 and a sensor to see the water level within a tank.

I need to be able to send the following for each transaction (some being real time while other driven by TimeAlarms:
          -  Type of Data (example button number, temperature or water level)
          -  The identification of the button or the thermometer
          -  The value of the reading for the temperature and the thermometer.

I got the impression, from all my reading and poking around , that all data packet (if this is what I should called it) and converted in HEX before sending.

I would appreciate any help, suggestions how to do it. Should I use data structure ? What data type would be appropriate ? If the data have to be send in HEX, how do I parse and reconstruct it at the receiving end ?

While I am asking for help, there is also another challenge that I would like to tackle.

// 16-bit addressing: Enter address of remote XBee, typically the coordinator
// TBD set possible 3 differewnt addresses
uint16_t addr_Central_Station= 0x1111;
Tx16Request tx = Tx16Request(addr_Central_Station, payload, sizeof(payload));

[/endcode]
When sending data, my current program is using "tx" as created above. Is is possible to create multiple instances of this tx. Or variable tx because I will have multiple Station, each one having its own address.

I have been able to resolve most of my problems and challenges.

I am using the array Payload [ ] to prepare and send the data. Payload [0] is used to store the transaction type, Payload [1] and others are used to transmit the data for each type of transactions.
See the following extract from the Sending Arduino;

       payload[0] = 0x01;  // Transaction type : 1 -> Button; 2 -> Temperature; 3 -> Water level; etc....  
       payload[1] = k;     // Button Number, key being of type Byte, no need to translate
       xbee.send(tx);      // Send the data
       check_status_response();  // Verify that the packet have been received
      payload[0] = 0x02;            // Transaction type : 1 -> Button; 2 -> Temperature; 3 -> Water level; etc....
      payload[1] = highByte(pin5);  // Temperature
      payload[2] = lowByte(pin5);   // Temperature to be recontructed at the other end with word data = word(payload[2], payload[1] 
      xbee.send(tx);      // Send the data
      check_status_response();    // Verify that the packet have been received

And here is the extract from the Receiving Arduino:

xbee.readPacket();
    
    if (xbee.getResponse().isAvailable()) {
      // got something
      if (xbee.getResponse().getApiId() == RX_16_RESPONSE || xbee.getResponse().getApiId() == RX_64_RESPONSE) {
        // got a rx packet
        //flashLed(statusLed, 5, 50);
        if (xbee.getResponse().getApiId() == RX_16_RESPONSE) {
                xbee.getResponse().getRx16Response(rx16);
        	option = rx16.getOption();
        	data = rx16.getData(0);
        } else {
                xbee.getResponse().getRx64Response(rx64);
        	option = rx64.getOption();
        	data = rx64.getData(1);
        }
        
         if (rx16.getData(0) == 1)  // Transaction type : 0 -> Button; 1 -> Temperature; 3 -> Water level; etc....
        {
          relay_on_off(rx16.getData(1),0); // Pass on the button number and execute the function  
        }
      } else {
       .................................

Each transaction type will have its own function. I would change this code later to use CASE instead of IF.

Hoping that this could help someone else, Gaston