Circula Buffer Question

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

seokgi
Posts: 116
Joined: Fri Jan 13, 2012 4:21 am
Has thanked: 18 times
Been thanked: 11 times
Contact:

Circula Buffer Question

Postby seokgi » Wed Nov 06, 2019 6:49 am

Hi,
I want to use Circula Buffer.

Question 1
I want to find some value (LookForValue) and put the pointer in a certain position and take the next 3 bytes.

Question 2
Sometimes FlushBuffer doesn't seem to be running.

Question 3
Is there a way to loop the contents of a FlushBuffer into a different buffer without looping?

Thank you for your help in asking questions.

User avatar
Benj
Matrix Staff
Posts: 14371
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4447 times
Been thanked: 4146 times
Contact:

Re: Circula Buffer Question

Postby Benj » Wed Nov 06, 2019 11:13 am

Hello,

In answer to your questions.

1) If you call Look for value with the parameters Remove Content = 1 and Reset Find = 0 then if the return value is true then the value has been found and the next value you read from the buffer will contain the data you want.

2) I'm not aware of any issues with the flush buffer function. It doesn't scrub the buffer contents but it resets the read/write pointers which effectively does the same job.

3) Not sure what you're after here. Yes you can copy one buffer to another a value at a time the easiest way is to use a loop to do it.