Circular buffer implementation

woju93
Posts: 2
Joined: Mon Jan 07, 2019 10:00 am

Circular buffer implementation

Postby woju93 » Mon Jan 07, 2019 10:05 am

Hi All,

I have a task, I need to store the last n measurement (a struct) to a queue. I think so I need a circular buffer for this. Is there a component for this in esp?

thx,
Woju

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Circular buffer implementation

Postby ESP_krzychb » Mon Jan 07, 2019 11:39 am

Hi woju93,

Yes, there is a ringbuffer component in ESP-IDF together with detailed documentation.

woju93
Posts: 2
Joined: Mon Jan 07, 2019 10:00 am

Re: Circular buffer implementation

Postby woju93 » Mon Jan 07, 2019 12:56 pm

Hi Krzychb,

Are you sure is it good for me?
I will never get an element from this buffer. I always put items to this, and I need to read whole queue because it is a statistics for the last n events.

thx,
woju

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 99 guests