Differences
This shows you the differences between two versions of the page.
en:software:qview:qview_6:qcl_library:bc21popbuf [2017/02/07 17:53] – created qem103 | en:software:qview:qview_6:qcl_library:bc21popbuf [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== BC21PopBuf ====== | ||
+ | |||
+ | **B = **// | ||
+ | |||
+ | **C = **// | ||
+ | |||
+ | The BC21PopBuf functionm extracts__ a value from a FIFO memory__. FIFO memory is implemented using a variable of array type. | ||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | **BC21PopBuf (array, Element, ErrorCode, head, tail)** | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | ARRGBL / ARRSYS | ||
+ | | OUT | GLOBAL | ||
+ | | OUT | GLOBAL | ||
+ | | IN | GLOBAL / SYSTEM | ||
+ | | IN | GLOBAL / SYSTEM | ||
+ | |||
+ | ==== Error ==== | ||
+ | |||
+ | After calling the function if there are any errors the error (ErrorCode) variable takes the following values:\\ | ||
+ | 0 - No error, extract data\\ | ||
+ | 1 - The FIFO memory is empty | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | Extracts a data by the buffer queue and places it in the variable " | ||
+ | |||
+ | <code QCL> | ||
+ | MAIN: | ||
+ | IF gfExtract | ||
+ | | ||
+ | | ||
+ | IF NOT ErrorCode | ||
+ | | ||
+ | ENDIF | ||
+ | ENDIF | ||
+ | </ | ||
+ | |||
+ | === Note === | ||
+ | |||
+ | *The use of this function is linked to the **BC21InitBuf** function that initializes the buffer and that must be called at least once before the BC20PushBuf function. | ||
+ | *Complementary to this function is the **BC21PushBuf** function who places a data in the FIFO memory. | ||