en:software:qview:qview_6:qcl_library:bc21pushbuf

This translation is older than the original page and might be outdated. See what has changed.

BC21PushBuf

B = Buffer

C = Calculation functions

The BC21PushBuf function inserts a value into a FIFO memory. The function requires an input value in the 'NewElement' variable and puts it in the memory.

BC21PushBuf (Buffer, NewElement, ErrorCode, head, tail)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRGBL/ ARRSYS Buffer B/W/L/S Array containing the Buffer
IN GLOBAL NewElement L/S/W/B Variable containing the value to be placed in 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

After calling the function if there are any errors the error variable (ErrorCode) takes the following values:
0 - No error
1 - Data not entered due to: full memory.

Example

Inserts the value of the reference count of a device ring buffer of each front of the “gfInsVal” flags

MAIN:                 
      IF gfInsVal
            gfInsVal = 0
            NewElement = count:posit
            BC21PushBuf (Buffer, NewElement, ErrorCode, gl001, gl002)
      ENDIF

Note

  • Using this feature is linked to the BC21InitBuf function that initializes the memory.
  • Complementary to this function is the BC21PopBuf function that extracts a data from FIFO memory.
  • Last modified: 2019/08/29 17:01