Difference between revisions of "Component: Circular Buffer (8-bit) (Buffer)"
Line 22: | Line 22: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 50: | Line 52: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 121: | Line 125: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LookForValue''' | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" | Value | ||
+ | |- | ||
+ | | colspan="2" | Value to look for, can be a string or byte array, | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | NumChars | ||
+ | |- | ||
+ | | colspan="2" | The number of characters you wish to try and match | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | RemoveContent | ||
+ | |- | ||
+ | | colspan="2" | 0=Leave data alone, 1=Remove data from buffer | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | ResetFind | ||
+ | |- | ||
+ | | colspan="2" | 0=Continue the find from the last operation, 1=Start again | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetArray''' | ||
+ | |- | ||
+ | | colspan="2" | Reads an array of Bytes from the circular buffer. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data | ||
+ | |- | ||
+ | | colspan="2" | Data array to store the data into | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | NumBytes | ||
+ | |- | ||
+ | | colspan="2" | Number of bytes to read from the buffer | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetString''' | ||
+ | |- | ||
+ | | colspan="2" | Reads a string of characters from the circular buffer. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | MaxLength | ||
+ | |- | ||
+ | | colspan="2" | Max number of bytes the string can store including the null byte | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PutArray''' | ||
+ | |- | ||
+ | | colspan="2" | Writes an array of bytes into the circular buffer. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data | ||
+ | |- | ||
+ | | colspan="2" | Byte array to write into the buffer | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | NumBytes | ||
+ | |- | ||
+ | | colspan="2" | Number of bytes to write into the buffer | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIndexedByte''' | ||
+ | |- | ||
+ | | colspan="2" | Gets the value of a single byte at a known location in the buffer. Leaves the buffer contents and pointers untouched. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | address | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitForValue''' | ||
+ | |- | ||
+ | | 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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" | Value | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | NumChars | ||
+ | |- | ||
+ | | colspan="2" | Number of characters to try and look for | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | RemoveContent | ||
+ | |- | ||
+ | | colspan="2" | 0=Leave the buffer contents untouched, 1=Remove values as you go | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Timeout | ||
+ | |- | ||
+ | | colspan="2" | Max amount of time to wait in milliseconds before returning 0=WaitForever | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetNumberBytes''' | ||
+ | |- | ||
+ | | colspan="2" | Returns the number of valid data bytes currently inside the buffer. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle''' | ||
+ | |- | ||
+ | | colspan="2" | Gets the handle to the console allowing data displaying on the panel etc. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PeekByte''' | ||
+ | |- | ||
+ | | colspan="2" | Reads the next available byte from the circular buffer without advancing the current index, Returns 255/512 if the buffer is empty. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PutString''' | ||
+ | |- | ||
+ | | colspan="2" | Writes a string of characters into the circular buffer. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" | Data | ||
+ | |- | ||
+ | | colspan="2" | String data array to write into the buffer | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PutByte''' | ||
+ | |- | ||
+ | | colspan="2" | Add byte 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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetByte''' | ||
+ | |- | ||
+ | | colspan="2" | Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FlushBuffer''' | ||
+ | |- | ||
+ | | colspan="2" | Clears the contents of the buffer and re-initialises the index locations. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Property reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Buffer Size | ||
+ | |- | ||
+ | | colspan="2" | Sets the number of byte elements inside the circular buffer. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Storage Type | ||
+ | |- | ||
+ | | colspan="2" | When buffer is full this property decides what to do. Store first x values - Will retain the information inside the buffer, new data will be discarded. Store last x values - Will discard the oldest location in the buffer and overwrite with new data. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Memory Type | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Return Type | ||
+ | |- | ||
+ | | colspan="2" | Specifies the way the receive function indicates a timeout. 8 Bit mode - Timeout is represented by the value 255. 16 Bit mode - Timeout is represented by the value 512 allowing the value 255 to represent valid data | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Console | ||
+ | |- | ||
+ | | colspan="2" | Decides if the contents of the buffer are shown in a console tab. | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 09:55, 27 January 2023
Author | Matrix Ltd |
Version | 1.5 |
Category | Buffer |
Contents
Circular Buffer (8-bit) component
Circular buffer component allowing easy and efficient first in first out (FIFO) style data byte storage. Useful when used with a comms component to capture data as it comes in ready for processing when we have time. Also features macros to allow you to check for specific incoming responses such as "OK" or "ERROR".
Component Source Code
Please click here to download the component source project: FC_Comp_Source_CircularBuffer.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_CircularBuffer.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Basic Example
Circular Buffer Example File demonstrating the storage and retrieval of data.
CircularBuffer
System panel showing data in and data out of the FIFO circular buffer.
Console window showing data in the circular buffer on the first simulation run.
Console window showing data in the circular buffer on the second simulation run, note that the start location has been shifted and will eventually wrap hence the name, circular buffer.
Keypad Based Door Entry System
Each key press on the keypad is fed into the Circular Buffer component. We then poll the buffer to see if the correct characters for the password have been entered.
Keypad Door Entry
If the correct sequence is detected then we activate the solenoid component for 5 seconds.
Reliable Communications Data
This example takes bytes received from the Serial UART and uses the circular buffer to store the bytes as they come in using an interrupt. The main routine then forwards the bytes through to a PC using a USB serial connection. This example would work equally well for creating a bridge between several UARTs or translating Serial to SPI or I2C etc.
UART to USB Serial Data Bridge
AT Command Responses
This example sends out AT commands to an AT based communications module e.g. GSM or Bluetooth. The response from the module is stored in the circular buffer and we then scan the buffer for appropriate responses from the module. The outcome of the command is then printed to the LCD to let you know if the command was accepted, caused an error or simply timed out.
Reliable AT Command Response
Searching for none ASCII characters
The LookForValue and WaitForValue functions can be useful when searching for ASCII data in the circular buffer. You can also use the escape sequence \x to search for hexadecimal values in the buffer.
e.g. "ABC\xFF\x80"
Will look for the ASCII characters A,B,C followed by the byte values 255 (0xFF) and 128 (0x80).
Macro reference
![]() |
GetArray |
Reads an array of Bytes from the circular buffer. | |
![]() |
Data |
Data array to store the data into | |
![]() |
NumBytes |
Number of bytes to read from the buffer | |
![]() |
Return |
![]() |
GetString |
Reads a string of characters from the circular buffer. | |
![]() |
MaxLength |
Max number of bytes the string can store including the null byte | |
![]() |
Return |
![]() |
PutArray |
Writes an array of bytes into the circular buffer. | |
![]() |
Data |
Byte array to write into the buffer | |
![]() |
NumBytes |
Number of bytes to write into the buffer | |
![]() |
Return |
![]() |
GetIndexedByte |
Gets the value of a single byte at a known location in the buffer. Leaves the buffer contents and pointers untouched. | |
![]() |
address |
![]() |
Return |
![]() |
GetNumberBytes |
Returns the number of valid data bytes currently inside the buffer. | |
![]() |
Return |
![]() |
GetConsoleHandle |
Gets the handle to the console allowing data displaying on the panel etc. | |
![]() |
Return |
![]() |
PeekByte |
Reads the next available byte from the circular buffer without advancing the current index, Returns 255/512 if the buffer is empty. | |
![]() |
Return |
![]() |
PutString |
Writes a string of characters into the circular buffer. | |
![]() |
Data |
String data array to write into the buffer | |
![]() |
Return |
![]() |
GetByte |
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | |
![]() |
Return |
![]() |
FlushBuffer |
Clears the contents of the buffer and re-initialises the index locations. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
GetArray |
Reads an array of Bytes from the circular buffer. | |
![]() |
Data |
Data array to store the data into | |
![]() |
NumBytes |
Number of bytes to read from the buffer | |
![]() |
Return |
![]() |
GetString |
Reads a string of characters from the circular buffer. | |
![]() |
MaxLength |
Max number of bytes the string can store including the null byte | |
![]() |
Return |
![]() |
PutArray |
Writes an array of bytes into the circular buffer. | |
![]() |
Data |
Byte array to write into the buffer | |
![]() |
NumBytes |
Number of bytes to write into the buffer | |
![]() |
Return |
![]() |
GetIndexedByte |
Gets the value of a single byte at a known location in the buffer. Leaves the buffer contents and pointers untouched. | |
![]() |
address |
![]() |
Return |
![]() |
GetNumberBytes |
Returns the number of valid data bytes currently inside the buffer. | |
![]() |
Return |
![]() |
GetConsoleHandle |
Gets the handle to the console allowing data displaying on the panel etc. | |
![]() |
Return |
![]() |
PeekByte |
Reads the next available byte from the circular buffer without advancing the current index, Returns 255/512 if the buffer is empty. | |
![]() |
Return |
![]() |
PutString |
Writes a string of characters into the circular buffer. | |
![]() |
Data |
String data array to write into the buffer | |
![]() |
Return |
![]() |
GetByte |
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | |
![]() |
Return |
![]() |
FlushBuffer |
Clears the contents of the buffer and re-initialises the index locations. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
GetArray |
Reads an array of Bytes from the circular buffer. | |
![]() |
Data |
Data array to store the data into | |
![]() |
NumBytes |
Number of bytes to read from the buffer | |
![]() |
Return |
![]() |
GetString |
Reads a string of characters from the circular buffer. | |
![]() |
MaxLength |
Max number of bytes the string can store including the null byte | |
![]() |
Return |
![]() |
PutArray |
Writes an array of bytes into the circular buffer. | |
![]() |
Data |
Byte array to write into the buffer | |
![]() |
NumBytes |
Number of bytes to write into the buffer | |
![]() |
Return |
![]() |
GetIndexedByte |
Gets the value of a single byte at a known location in the buffer. Leaves the buffer contents and pointers untouched. | |
![]() |
address |
![]() |
Return |
![]() |
GetNumberBytes |
Returns the number of valid data bytes currently inside the buffer. | |
![]() |
Return |
![]() |
GetConsoleHandle |
Gets the handle to the console allowing data displaying on the panel etc. | |
![]() |
Return |
![]() |
PeekByte |
Reads the next available byte from the circular buffer without advancing the current index, Returns 255/512 if the buffer is empty. | |
![]() |
Return |
![]() |
PutString |
Writes a string of characters into the circular buffer. | |
![]() |
Data |
String data array to write into the buffer | |
![]() |
Return |
![]() |
GetByte |
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | |
![]() |
Return |
![]() |
FlushBuffer |
Clears the contents of the buffer and re-initialises the index locations. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
GetArray |
Reads an array of Bytes from the circular buffer. | |
![]() |
Data |
Data array to store the data into | |
![]() |
NumBytes |
Number of bytes to read from the buffer | |
![]() |
Return |
![]() |
GetString |
Reads a string of characters from the circular buffer. | |
![]() |
MaxLength |
Max number of bytes the string can store including the null byte | |
![]() |
Return |
![]() |
PutArray |
Writes an array of bytes into the circular buffer. | |
![]() |
Data |
Byte array to write into the buffer | |
![]() |
NumBytes |
Number of bytes to write into the buffer | |
![]() |
Return |
![]() |
GetIndexedByte |
Gets the value of a single byte at a known location in the buffer. Leaves the buffer contents and pointers untouched. | |
![]() |
address |
![]() |
Return |
![]() |
GetNumberBytes |
Returns the number of valid data bytes currently inside the buffer. | |
![]() |
Return |
![]() |
GetConsoleHandle |
Gets the handle to the console allowing data displaying on the panel etc. | |
![]() |
Return |
![]() |
PeekByte |
Reads the next available byte from the circular buffer without advancing the current index, Returns 255/512 if the buffer is empty. | |
![]() |
Return |
![]() |
PutString |
Writes a string of characters into the circular buffer. | |
![]() |
Data |
String data array to write into the buffer | |
![]() |
Return |
![]() |
GetByte |
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | |
![]() |
Return |
![]() |
FlushBuffer |
Clears the contents of the buffer and re-initialises the index locations. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
GetArray |
Reads an array of Bytes from the circular buffer. | |
![]() |
Data |
Data array to store the data into | |
![]() |
NumBytes |
Number of bytes to read from the buffer | |
![]() |
Return |
![]() |
GetString |
Reads a string of characters from the circular buffer. | |
![]() |
MaxLength |
Max number of bytes the string can store including the null byte | |
![]() |
Return |
![]() |
PutArray |
Writes an array of bytes into the circular buffer. | |
![]() |
Data |
Byte array to write into the buffer | |
![]() |
NumBytes |
Number of bytes to write into the buffer | |
![]() |
Return |
![]() |
GetIndexedByte |
Gets the value of a single byte at a known location in the buffer. Leaves the buffer contents and pointers untouched. | |
![]() |
address |
![]() |
Return |
![]() |
GetNumberBytes |
Returns the number of valid data bytes currently inside the buffer. | |
![]() |
Return |
![]() |
GetConsoleHandle |
Gets the handle to the console allowing data displaying on the panel etc. | |
![]() |
Return |
![]() |
PeekByte |
Reads the next available byte from the circular buffer without advancing the current index, Returns 255/512 if the buffer is empty. | |
![]() |
Return |
![]() |
PutString |
Writes a string of characters into the circular buffer. | |
![]() |
Data |
String data array to write into the buffer | |
![]() |
Return |
![]() |
GetByte |
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | |
![]() |
Return |
![]() |
FlushBuffer |
Clears the contents of the buffer and re-initialises the index locations. | |
![]() |
Return |