Aduino RF communication-multiple send

I have one master and one slave both with a transmitter and receiver.I use Virtualwire libray.On the slave have to send errors to the master. If I have more than one error in the slave have to send a message for each error. Example:

if(temp>50){
....
vw_send((uint8_t *)buf1, strlen(buf1));
}

if(volts>1){
....
vw_send((uint8_t *)buf1, strlen(buf1));
}

If both is true i have send information on the same time.Any idea tu send multi erros but not on same time?

Will the error messages actually be sent at the same time or will one follow the other ?

I would suggest that you add markers to the end (and possibly the start) of the messages sent so that you can separate them at the receiving end. Any characters that will not be present in the error message could be used as markers.

Another possible solution is to build a string containing all the errors and then just do a single send. The receiving device would need to be able to separate the error messages.

It may make the communication logic on the two devices easier if everything was contained in a single reply.

...R

How about sending an indication of what caused the error ? As far as I can see from the limited code posted (HINT) the error message will currently always be the same.

Thank you for the replies. In this example, messages are identical but are not. Send a message to all errors can be solution but if you have many errors the buffer is too long.

How long is too long?

You must have a lot of errors?

Can you not encode each error as a single byte, or maybe even a bit within a byte?

...R

When the slave detects an error with the error sends the Arduino pin that is in error and value. For example if it is a thermistor, sends the temperature and the pin input the have the thermistor. If i have a lot of errors to send on the same buffer makes the buffer long.

I can't make sense of what you are saying. Even if you read data from every pin on a Uno and send a value and a pin number that's only 40 bytes.

...R

What is receiving and responding to the error messages ?