Hi all ,
i'm writing a program that communicates with com port.
i need to send a few packets.
the thing is that i want to wait after each packet so that the receiver could send me an ack !
in pseud code :
for (x=0;x<Packets.Lenth;x++)
{
sendData(Packets[x]);
waitForDataReceivedEvent ();
}
my question is how do i implement waitForDataReceivedEvent ?
a serialport class event is raised - its called SerialDataReceivedEventHandler. how can i make my original method (the one with the for loop) to wait until this event is raised ?
thanks
Zvika