How can I read messages from the RT using the function BusTools_RT_MessageRead()?

In the RT setups you define a structure of buffers indexed by message number for every RT/SA and RT/TX combination. In the call to BusTools_RT_CbufWrite, you program the number of buffers for each RT/SA/TX/RX combination. On the interrupt, it is this buffer index returned from:   

messno = psIntFIFO->fifo[tail].buffered

so you need the RT/SA and TX/RX to read the data in the buffer. The following is an example of how you get that information from the API_INT_FIFO.

BT_INT _stdcall intFunction(BT_UINT cardnum, struct api_int_fifo *sIntFIFO)
{
  int status;
  API_RT_MBUF_READ rt_mbuf;
  BT_INT tail;
  BT_UINT messno;
  BT_UINT rt_addr,sub_addr,trans;

  tail = sIntFIFO->tail_index;

  while(tail != sIntFIFO->head_index)
  {
    messno    = sIntFIFO->fifo[tail].bufferID;
    rt_addr   = sIntFIFO->fifo[tail].rtaddress;   // RT address
    trans     = sIntFIFO->fifo[tail].transrec;    // Transmit/Receive
    sub_addr  = sIntFIFO->fifo[tail].subaddress;  // Subaddress number
        

    status = BusTools_RT_MessageRead(cardnum, rt_addr, sub_addr, 0, 0, &rt_mbuf);
    printf("RT = %d - SA = %d - Messno = %d\n"