Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: nicodev24 on June 19, 2013, 03:52:49 PM

Title: wclClient - wclClientTransport.ctSerial - high priority event
Post by: nicodev24 on June 19, 2013, 03:52:49 PM
Hello,

I use a wclClient configured in wclClientTransport.ctSerial to deal with serial port.

I listen to the OnData event and then read the available data.

Code: [Select]
void wclST_OnData(object sender, wclDataEventArgs e)
        {
            byte[] buffLu = e.Data;
}

I have another process that takes a long time to achieve, and I don't receive in"real time" the data from my serial port.
Is there any way to set priority to the serial object , from normal to higher ?
Or is there a way to read the available data on the buffer, instead of wait for them ?

Thanks for yours answers,
Nicolas
Title: Re: wclClient - wclClientTransport.ctSerial - high priority event
Post by: Mike Petrichenko on June 19, 2013, 08:34:08 PM
Hello,

As you may know Windows is not real time platform. So the only way is to:

1. Move all your communication code to separate thread so you can set its priority to high,
2. Use wclSyncClient and its Read method.