Component: Circular Buffer (Float) (Buffer): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (One intermediate revision by the same user not shown) | |||
| Line 63: | Line 63: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''FlushBuffer''' | ||
|- | |- | ||
| colspan="2" | Clears the contents of the buffer and re-initialises the index locations. | | colspan="2" | Clears the contents of the buffer and re-initialises the index locations. | ||
| Line 77: | Line 77: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetData''' | ||
|- | |- | ||
| colspan="2" | Reads the next available 32-bit floating point value from the circular buffer, Returns the default value if the buffer is empty. | | colspan="2" | Reads the next available 32-bit floating point value from the circular buffer, Returns the default value if the buffer is empty. | ||
| Line 91: | Line 91: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetIndexedValue''' | ||
|- | |- | ||
| colspan="2" | Gets the value of a single 32-bit floating point value at a known location in the buffer. Leaves the buffer contents and pointers untouched. | | colspan="2" | Gets the value of a single 32-bit floating point value at a known location in the buffer. Leaves the buffer contents and pointers untouched. | ||
| Line 110: | Line 110: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetNumberValues''' | ||
|- | |- | ||
| colspan="2" | Returns the number of valid 16-bit data values currently stored inside the buffer. | | colspan="2" | Returns the number of valid 16-bit data values currently stored inside the buffer. | ||
| Line 124: | Line 124: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetSize''' | ||
|- | |- | ||
| colspan="2" | Returns the number of 16-bit values that can be stored in the buffer. Either in total or the number of values remaining based on Mode. | | colspan="2" | Returns the number of 16-bit values that can be stored in the buffer. Either in total or the number of values remaining based on Mode. | ||
| Line 143: | Line 143: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''LookForValues''' | ||
|- | |- | ||
| colspan="2" | Scans the buffer for an array of specific values. Returns 0 if the value is not found. Returns 1 if the value is found. | | colspan="2" | Scans the buffer for an array of specific values. Returns 0 if the value is not found. Returns 1 if the value is found. | ||
| Line 177: | Line 177: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''PeekData''' | ||
|- | |- | ||
| colspan="2" | Reads the next available 16-bit data value from the circular buffer without advancing the current index, Returns the default value if the buffer is empty. | | colspan="2" | Reads the next available 16-bit data value from the circular buffer without advancing the current index, Returns the default value if the buffer is empty. | ||
| Line 191: | Line 191: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''PutData''' | ||
|- | |- | ||
| colspan="2" | Add a 32-bit floating point value to the next free location inside the circular buffer. If the data goes into the buffer correctly then return 1. Otherwise the buffer is full and the return value will equal 0. | | colspan="2" | Add a 32-bit floating point value to the next free location inside the circular buffer. If the data goes into the buffer correctly then return 1. Otherwise the buffer is full and the return value will equal 0. | ||
| Line 210: | Line 210: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WaitForValues''' | ||
|- | |- | ||
| colspan="2" | Waits for an array of values to appear in the circular buffer. Returns 0 to indicate a timeout. Returns 1 to indicate the data has been found. | | colspan="2" | Waits for an array of values to appear in the circular buffer. Returns 0 to indicate a timeout. Returns 1 to indicate the data has been found. | ||
| Line 244: | Line 244: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:22, 13 July 2026
| Author | Matrix Ltd |
| Version | 1.5 |
| Category | Buffer |
Circular Buffer (Float) component
Circular buffer component allowing easy and efficient first in first out (FIFO) style data storage. Also features macros to allow you to check for specific floating point values.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
FlushBuffer
| FlushBuffer | |
| Clears the contents of the buffer and re-initialises the index locations. | |
| Return | |
GetData
| GetData | |
| Reads the next available 32-bit floating point value from the circular buffer, Returns the default value if the buffer is empty. | |
| Return | |
GetIndexedValue
| GetIndexedValue | |
| Gets the value of a single 32-bit floating point value at a known location in the buffer. Leaves the buffer contents and pointers untouched. | |
| address | |
| Return | |
GetNumberValues
| GetNumberValues | |
| Returns the number of valid 16-bit data values currently stored inside the buffer. | |
| Return | |
GetSize
LookForValues
PeekData
| PeekData | |
| Reads the next available 16-bit data value from the circular buffer without advancing the current index, Returns the default value if the buffer is empty. | |
| Return | |
PutData
WaitForValues
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_CircularBufferFloat.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_CircularBufferFloat.fcfx