pdcomm_gem_result_command_issue
Function
Copies one CPACK entry of a command request validation or a received reply.
PdcommStatus pdcomm_gem_result_command_issue(const PdcommGemResult *result, size_t index, PdcommSecsItem **out_name, uint8_t *out_code)For an Equipment request, the entries are the frozen validation issues; their names are logical names in normalized numeric form (U8, or I8 when negative). For a Host reply, the entries are the received CPACK entries and the names keep their wire format. Order, including duplicates, is preserved.
Parameters
| Name | Description |
|---|---|
result | Result with outcome #PDCOMM_GEM_COMMAND_RECEIVED or #PDCOMM_GEM_COMMAND_ACK. |
index | Zero-based entry index. |
out_name | Receives a new CPNAME item; NULL after every failure. |
out_code | Receives the CPACK code; 0 after every failure. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when result, out_name, or out_code is NULL, or the two outputs overlap; #PDCOMM_INVALID_STATE when result is not a remote command result; #PDCOMM_OUT_OF_RANGE when index is not less than the entry count; #PDCOMM_INVALID_DATA when a stored reply entry is malformed; #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_INTERNAL_ERROR.
Notes
- Ownership: release
*out_namewith pdcomm_secs_destroy().