Skip to content
Start free evaluation

pdcomm_gem_result_command_parameter

Function

Copies one CPNAME/CPVAL pair of a received S2F41 request.

PdcommStatus pdcomm_gem_result_command_parameter(const PdcommGemResult *result, size_t index, PdcommSecsItem **out_name, PdcommSecsItem **out_value)

Declared in: #include <pdcomm_gem_commands.h>

Pairs keep their wire order, duplicates included, and both items keep their wire format.

Parameters

NameDescription
resultRequest result with outcome #PDCOMM_GEM_COMMAND_RECEIVED.
indexZero-based parameter index.
out_nameReceives a new CPNAME item; NULL after every failure.
out_valueReceives a new CPVAL 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 a remote 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().