Types and Enums
datbufBuffer_typ
A data buffer. Declare one variable of this type per buffer and pass its address to the library functions. The members are maintained by the library; read them, but do not write them directly.
| Name | Type | Description |
|---|---|---|
| pData | UDINT | Address of the buffer’s data storage. 0 until the buffer is initialized. |
| currentLength | UDINT | Number of bytes of data currently in the buffer |
| maxLength | UDINT | Size of the data storage in bytes, as passed to datbufInitBuffer |
DATBUF_ERR_enum
Status values returned by the library functions. A return value of 0 means success.
| Name | Value | Description |
|---|---|---|
| DATBUF_ERR_INVALIDINPUT | 50000 | A required address is 0, or maxLength is 0 |
| DATBUF_ERR_MEMALLOC | 50001 | The buffer’s memory could not be allocated |
| DATBUF_ERR_NOTINITIALIZED | 50002 | The buffer’s pData is 0: it has not been initialized with datbufInitBuffer |
| DATBUF_ERR_BUFFERFULL | 50003 | The data did not fit in the buffer. The part that fit was appended. |