pdcomm_gem_result_enhanced_command_parameter
Function
Copies one CPNAME/CEPVAL pair of a received S2F49 request.
PdcommStatus pdcomm_gem_result_enhanced_command_parameter(const PdcommGemResult *result, size_t index, PdcommSecsItem **out_name, PdcommSecsItem **out_value)Pairs keep their wire order, duplicates included, and both items keep their wire format.
Parameters
| Name | Description |
|---|---|
result | Request result with outcome #PDCOMM_GEM_ENHANCED_COMMAND_RECEIVED. |
index | Zero-based parameter index. |
out_name | Receives a new CPNAME item; NULL after every failure. |
out_value | Receives a new CEPVAL item; NULL after every failure. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when result, out_name, or out_value is NULL, or the two outputs overlap; #PDCOMM_INVALID_STATE when result is not an enhanced command request; #PDCOMM_OUT_OF_RANGE when index is not less than the parameter count; #PDCOMM_INVALID_DATA when the stored pair is malformed; #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_INTERNAL_ERROR.
Notes
- Ownership: release both items with pdcomm_secs_destroy().