Chapter 5. WESCL Communication Agent (WCA)

Table of Contents
Circular Buffer
Message Structure
Sending Messages
Assigned Registers

WESCL Communication Agent (WCA) provides ability to:

Circular Buffer

This is the implementation of a Circular Buffer, which is capable to store up to the 8 WESCL-registers along with the current timestamp into one record. All information of the buffer resides in the non-volatile memory. The following operations are provided to operate the buffer:

OperationDescription
Write a new record to the circular bufferSetting a non-zero value to the S40 register causes copying the values of the S50..S57 registers to the circular buffer record, with the current timestamp automatically added.
Clear contents of the circular bufferSetting a non-zero value to the S41 register removes all the entries from the circular buffer.
Read the circular buffer length (capacity)S47 register contains information about length (capacity) of the circular buffer.
Read the usage level of the bufferS46 register contains information about the current usage level of the circular buffer (from 0 to the value of S47 register).
Read the circular buffer overflow statusIf writing a new record to the buffer reaches the maximum of the buffer length, then S48 register contains a non-zero value. Thus, new record overwrites the old one. WCA does not clear S48 register automatically, so it is the programmer's responsibility to do so.