Indice

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.

IMPLEMENTATION

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

Error

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