Differences
This shows you the differences between two versions of the page.
en:software:qview:qview_6:qcl_library:bc21pushbuf [2017/02/07 17:42] – created qem103 | en:software:qview:qview_6:qcl_library:bc21pushbuf [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== BC21PushBuf ====== | ||
+ | |||
+ | **B = **// | ||
+ | |||
+ | **C = **// | ||
+ | |||
+ | The BC21PushBuf function __inserts a value into a FIFO memory__. The function requires an input value in the ' | ||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | **BC21PushBuf (Buffer, NewElement, ErrorCode, head, tail)** | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | ARRGBL/ ARRSYS | ||
+ | | IN | GLOBAL | ||
+ | | OUT | GLOBAL | ||
+ | | IN | GLOBAL / SYSTEM | ||
+ | | IN | GLOBAL / SYSTEM | ||
+ | |||
+ | ==== Error ==== | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | <code QCL> | ||
+ | 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. | ||