Skip to content
Start free evaluation

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)

Declared in: #include <pdcomm/modbus/pdcomm_modbus.h>

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

NameDescription
outputDestination, or null when capacity is zero.
capacitySize of output in bytes.
requiredReceives 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

  • output and required must not overlap.