Myriota UltraLite SDK 2.4.0
Loading...
Searching...
No Matches
Error logging

Application error and diagnostic logging. More...

Functions

MYRIOTA_USER_API int LogAdd (uint8_t ErrorCode, const void *Buffer, uint8_t BufferSize)
 Log errors.
 

Detailed Description

Application error and diagnostic logging.

Function Documentation

◆ LogAdd()

MYRIOTA_USER_API int LogAdd ( uint8_t  ErrorCode,
const void *  Buffer,
uint8_t  BufferSize 
)

Log errors.

The error codes are user-defined and should be in the range of 0 to 127. If BufferSize is set to 0, only the error code will be logged without any additional data.

Parameters
ErrorCodeThe error code to log.
Buffer[out]Pointer to the buffer containing additional log data.
BufferSizeSize of the buffer in bytes.
Returns
0 if logging succeeds and -1 if logging fails.