I would like to create a buffer into which a thread can push incoming
data and the main thread can extract it for processing.
Data are coming from the serial port in a worker thread and should be
consumed by the main thread. The data is a byte stream.
Are there any good examples available?
I have
>Bo,
>
>Most of the users on this forum have never interfaced with hardware , as
you
>can see from the responses. Those who have interfaced with hardware have
>developed circular buffers which they know work , and they reuse them
again
>and again.
I did this about 10 years ago when working on a P
On Mon, 7 Sep 2020 14:45:31 -0700 (MST), Brian via fpc-pascal
wrote:
>Bo,
>
>Most of the users on this forum have never interfaced with hardware , as you
>can see from the responses. Those who have interfaced with hardware have
>developed circular buffers which they know work , and they reuse th
Bo,
Most of the users on this forum have never interfaced with hardware , as you
can see from the responses. Those who have interfaced with hardware have
developed circular buffers which they know work , and they reuse them again
and again.
I will describe in general terms the structure a circul
On 03/09/2020 17:44, Martin Frb via fpc-pascal wrote:
type
TMyData = class
FData: array of byte;
end;
TMyThreadedQueue = specialize TLazThreadedQueue;
Of course you can do
TMyData = array of byte; // or record end if you want
TMyThreadedQueue = specialize TLazThreadedQueue
On 03/09/2020 16:36, Bo Berglund via fpc-pascal wrote:
A "simplest case" usage example would be nice to have.
True. Once you got enough info from this thread, please write one.
I still when looking at the sources have no clue as to how it would be
used...
It seems to me like at the very least
On Thu, 3 Sep 2020 15:47:53 +0200, Martin Frb via fpc-pascal
wrote:
>On 03/09/2020 14:54, Bo Berglund via fpc-pascal wrote:
>> Now to my question:
>> Is there some *example* around for using TLazThreadedQueue as a
>> circular buffer?
>> In the examples dir are only examples for LazUnicode and
>>
On 03/09/2020 14:54, Bo Berglund via fpc-pascal wrote:
Now to my question:
Is there some *example* around for using TLazThreadedQueue as a
circular buffer?
In the examples dir are only examples for LazUnicode and
LookUpStringList...
And when reading the sources I cannot really say I understand wh
On Thu, 3 Sep 2020 10:22:17 +0200, Martin Frb via fpc-pascal
wrote:
>On 03/09/2020 10:09, Bo Berglund via fpc-pascal wrote:
>> I would like to create a buffer into which a thread can push incoming
>> data and the main thread can extract it for processing.
>> Data are coming from the serial port i
On 03/09/2020 10:09, Bo Berglund via fpc-pascal wrote:
I would like to create a buffer into which a thread can push incoming
data and the main thread can extract it for processing.
Data are coming from the serial port in a worker thread and should be
consumed by the main thread. The data is a byt
I would like to create a buffer into which a thread can push incoming
data and the main thread can extract it for processing.
Data are coming from the serial port in a worker thread and should be
consumed by the main thread. The data is a byte stream.
Are there any good examples available?
I have
11 matches
Mail list logo