pdcomm_gem_result_constant_value
Function
Copies one value, and its requested ID, from an S2F14 reply.
PdcommStatus pdcomm_gem_result_constant_value(const PdcommGemResult *result, size_t index, PdcommSecsItem **out_id, PdcommSecsItem **out_value)For an explicit-ID request, *out_id receives the original request ID at the same position. An all-constants request has no IDs on the wire, so *out_id stays NULL. An empty List value alone does not establish that an ID is unknown.
Parameters
| Name | Description |
|---|---|
result | Result with outcome #PDCOMM_GEM_CONSTANT_VALUES_RECEIVED. |
index | Zero-based value position. |
out_id | Receives the request ID item or NULL; set to NULL first. Must not be NULL or overlap out_value. |
out_value | Receives the value item; set to NULL first. Must not be NULL. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when a pointer is NULL or the outputs overlap; #PDCOMM_INVALID_STATE when result is not a validated S2F14 reply; #PDCOMM_OUT_OF_RANGE when index is not less than the value count; #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_INTERNAL_ERROR. Both outputs are NULL after a failure.
Notes
- Ownership: release every non-NULL item with pdcomm_secs_destroy().