en:software:qview:qview_6:qcl_library:bc10pushbuf

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

This is an old revision of the document!


BC10PushBuf

B = Buffer

C = Calculation functions

The BC10PushBuf function inserts a value into a circular buffer. The function requires an input value in the 'NewElement' variable and enters it in the buffer in a location that is unknown to the user and that is managed solely by the push function and complementary pop function.

BC10PushBuf (Buffer, NewElement, ErrorCode)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRSYS Buffer B/W/L/S Array containing the Buffer
IN GLOBAL NewElement L/S 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

After calling the function if there are any errors the error variable (ErrorCode) takes the following values:
0 - No error
1 - Full Buffer

Example

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

MAIN:                 
    IF gfInsVal
         gfInsVal = 0
         NewElement = count:posit
         BC10PushBuf (Buffer, NewElement, ErrorCode)**
    ENDIF

Note

  • Using this feature is linked to the function BC10InitBuf that initializes the buffer and that must be called at least once before the BC10PushBuf function.
  • Complementary to this function is the BC10PopBuf function that extracts che estrae a data by the circular buffer queue.
  • Last modified: 2019/08/29 17:01