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)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
| Name | Description |
|---|---|
result | GEM result. |
index | Zero-based issue index, less than issue_count. |
code | Receives the ACKC7A code (0 to 5). |
sequence | Receives the SEQNUM command number. |
text | Destination for the ERRW7 text. May be NULL only when capacity is 0. |
capacity | Size of text in bytes. |
required | Receives 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, andrequiredmust not overlap each other or the result.