Differences
This shows you the differences between two versions of the page.
| en:software:qview:qview_6:qcl_library:bc10popbuf [2017/02/07 17:25] – created qem103 | en:software:qview:qview_6:qcl_library:bc10popbuf [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== BC10PopBuf ====== | ||
| + | |||
| + | **B = **// | ||
| + | |||
| + | **C = **// | ||
| + | |||
| + | The BC10PopBuf function extracts__ a value from a ring buffer__. Each time the latter function makes sure to extract from the circular buffer queue the first data entered and than place it in a variable. | ||
| + | |||
| + | ===== IMPLEMENTATION ===== | ||
| + | |||
| + | **BC10PopBuf (Buffer, Element, ErrorCode)** | ||
| + | |||
| + | Parameters: | ||
| + | |||
| + | ^IN/ | ||
| + | | IN | ARRSYS | ||
| + | | OUT | GLOBAL | ||
| + | | OUT | GLOBAL | ||
| + | |||
| + | ==== Error ==== | ||
| + | |||
| + | After calling the function if there are any errors the error variable (ErrorCode) take the following values:\\ | ||
| + | 0 - No error\\ | ||
| + | 1 - Empty Buffer | ||
| + | |||
| + | === Example === | ||
| + | |||
| + | Extracts an data by the buffer queue and puts it in the " | ||
| + | |||
| + | <code QCL> | ||
| + | MAIN: | ||
| + | IF gfExtract | ||
| + | | ||
| + | | ||
| + | IF NOT ErrorCode | ||
| + | glDato = Element | ||
| + | ENDIF | ||
| + | ENDIF | ||
| + | </ | ||
| + | |||
| + | === Note === | ||
| + | |||
| + | *Using this feature is linked to the **BC10InitBuf** function that initializes the buffer and that must be called at least once before the BC10PushBuf function. | ||
| + | *Complementary to this function is the **BC10PushBuf** function who places a data in a ring buffer queue. | ||