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