Skip to content
Start free evaluation

pdcomm_gem_result_formatted_program_issue_at

Function

Copies one issue of a verification report.

PdcommStatus pdcomm_gem_result_formatted_program_issue_at(const PdcommGemResult *result, size_t index, uint32_t *code, uint32_t *sequence, char *text, size_t capacity, size_t *required)

Declared in: #include <pdcomm_gem_formatted_programs.h>

The text copy is atomic: for a valid result and index *required always receives the text length, and nothing is written to text, code, or sequence when capacity is too small. Pass NULL and 0 to query the size. The text is ASCII without a terminating NUL. Works for the same results as pdcomm_gem_result_formatted_program_id_get().

Parameters

NameDescription
resultGEM result.
indexZero-based issue index, less than issue_count.
codeReceives the ACKC7A code (0 to 5).
sequenceReceives the SEQNUM command number.
textDestination for the ERRW7 text. May be NULL only when capacity is 0.
capacitySize of text in bytes.
requiredReceives the text length in bytes.

Returns

#PDCOMM_OK when the issue was copied; #PDCOMM_BUFFER_TOO_SMALL when capacity is smaller than *required (nothing else written); #PDCOMM_INVALID_ARGUMENT when result, code, sequence, or required is NULL, or text is NULL with a nonzero capacity; #PDCOMM_OUT_OF_RANGE when the result has no report or index is out of range (*required is not written); #PDCOMM_INTERNAL_ERROR when a panic was contained.

Notes

  • code, sequence, text, and required must not overlap each other or the result.