pdcomm_modbus_logging_status
Function
Copies the diagnostic log status as UTF-8 JSON without a terminator.
int32_t pdcomm_modbus_logging_status(uint8_t *output, size_t capacity, size_t *required)The status reports the active configuration (enabled, level, level_name, sink, max_bytes, files, forensics) and the counters written, dropped, write_errors and configuration_errors.
Pass a null output and zero capacity to query the size first.
Parameters
| Name | Description |
|---|---|
output | Destination, or null when capacity is zero. |
capacity | Size of output in bytes. |
required | Receives the full status size in bytes; must not be null. |
Returns
#PDCOMM_MODBUS_OK, #PDCOMM_MODBUS_BUFFER_TOO_SMALL when capacity is smaller than *required (the output is unchanged), #PDCOMM_MODBUS_INVALID_INPUT, or #PDCOMM_MODBUS_INTERNAL_ERROR.
Notes
outputandrequiredmust not overlap.