en:software:qview:qview_6:qcl_library:bc21popbuf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:software:qview:qview_6:qcl_library:bc21popbuf [2017/02/07 17:53] – created qem103en: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 = **//Buffer//
 +
 +**C = **//Calculation functions//
 +
 +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/OUT^VARIABLE TYPE^EXAMPLE NAME^DIM^^
 +|  IN  |  ARRGBL / ARRSYS  |  Buffer  |  B/W/L/ |Array containing the Buffer|
 +|  OUT  |  GLOBAL  |  Element  |  L/S / W / B  |Variable on which you place the value retrieved from the buffer|
 +|  OUT  |  GLOBAL  |  ErrorCode  |  F  |Variable containing the error possibly occurred during insertion of the value|
 +|  IN  |  GLOBAL / SYSTEM  |  head  |  L  |Internal index|
 +|  IN  |  GLOBAL / SYSTEM  |  tail  |  L  |Internal index|
 +
 +==== 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 "glDato" at every front of the "gfEstrai" variable
 +
 +<code QCL>
 +MAIN:                 
 +      IF gfExtract
 +             gfExtract = 0
 +             BC21PopBuf (Buffer, Element, ErrorCode, gl001, gl002)
 +               IF NOT ErrorCode
 +                   glDato = Element
 +               ENDIF
 +      ENDIF
 +</code>
 +
 +=== 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.