Functions
BRSE_ARL_Alloc()
This function allocates a FIFO buffer of the given size to be used for logbook writing functions. It also takes parameters for the BRSE_ARL_Cyclic() function.
This function should be called in the _INIT part of a task.
The following is done in BRSE_ARL_Cyclic(): If logbook does not exist a new one will be created with the supplied name. If no name has been supplied, the default user logbook will be used.
Direction | Name | Type | Description |
---|---|---|---|
In | ID | Logger ID of the logbook to be written to | |
In | Name | Name of the logbook to which to write to | |
In | LogbookSize | Size of the logbook in bytes (if a new one has to be created). Note: at least 4096 | |
In | MessageSize | Maximum length of a single message string for the logbook | |
In | BufferedEntries | Maximum number of messages that can be stored in the FIFO buffer | |
Return | 0 indicates success |
BRSE_ARL_Cyclic()
This function writes pending entries to the logbook and has to be called cyclically.
Direction | Name | Type | Description |
---|---|---|---|
In | ID | Logger ID of the logbook to be written to | |
Return | UDINT | Status of the function block |
BRSE_ARL_Fatal()
Writes a fatal message to the logbook. This function writes a fatal message to the buffered logbook using the given ErrorNumber and ErrorMessage. Custom error IDs should be > 50000, lower IDs are reserved for AS.
If the address of a BRSE_ARL_Arguments_typ structure is passed, its variables can be referenced in the ErrorMessage string by [b|i|r|s], see examples.c
Direction | Name | Type | Description |
---|---|---|---|
In | ID | Logger ID of the logbook to be written to | |
In | ErrorNumber | Error number to show up in the logbook | |
In | ErrorMessage | Error message in the logbook | |
In | pArguments | Address of a BRSE_ARL_Arguments_typ structure that contains data values | |
Return | 0 indicates success |
BRSE_ARL_Free()
De-allocates the FIFO buffer. This function writes all pending entries to the logbook and closes down the buffer.
This function should be called in the exit routine of a task.
Direction | Name | Type | Description |
---|---|---|---|
In | ID | Logger ID of the logbook to be written to | |
Return | 0 indicates success |
BRSE_ARL_Info()
This function writes an info message to the buffered logbook using the given ErrorNumber and ErrorMessage. Custom error IDs should be > 50000, lower IDs are reserved for AS.
If the address of a BRSE_ARL_Arguments_typ structure is passed, its variables can be referenced in the ErrorMessage string by [b|i|r|s]. Each usage of a wildcard consumes the according variable and moves on to the next one within the array.
Direction | Name | Type | Description |
---|---|---|---|
In | ID | Logger ID of the logbook to be written to | |
In | ErrorNumber | Error number to show up in the logbook | |
In | ErrorMessage | Error message in the logbook | |
In | pArguments | Address of a BRSE_ARL_Arguments_typ structure that contains data values | |
Return | 0 indicates success |
BRSE_ARL_Warning()
This function writes a warning message to the buffered logbook using the given ErrorNumber and ErrorMessage. Custom error IDs should be > 50000, lower IDs are reserved for AS.
If the address of a BRSE_ARL_Arguments_typ structure is passed, its variables can be referenced in the ErrorMessage string by [b|i|r|s]. Each usage of a wildcard consumes the according variable and moves on the next one within the array.
Direction | Name | Type | Description |
---|---|---|---|
In | ID | Logger ID of the logbook to be written to | |
In | ErrorNumber | Error number to show up in the logbook | |
In | ErrorMessage | Error message in the logbook | |
In | pArguments | Address of a BRSE_ARL_Arguments_typ structure that contains data values | |
Return | 0 indicates success |