Skip to content
Start free evaluation

pdcomm_gem_result_constant_metadata

Function

Copies one metadata field of one entry of an S2F30 reply.

PdcommStatus pdcomm_gem_result_constant_metadata(const PdcommGemResult *result, size_t index, uint32_t field, PdcommSecsItem **out_item)

Declared in: #include <pdcomm_gem_constants.h>

Fields are returned exactly as received, including empty ASCII values that the Equipment uses for an absent value or an unknown ID; no presence flag is inferred.

Parameters

NameDescription
resultResult with outcome #PDCOMM_GEM_CONSTANT_METADATA_RECEIVED.
indexZero-based entry position.
field#PDCOMM_GEM_CONSTANT_ID through #PDCOMM_GEM_CONSTANT_UNITS.
out_itemReceives the item; set to NULL first. Must not be NULL.

Returns

#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when a pointer is NULL or field is greater than #PDCOMM_GEM_CONSTANT_UNITS; #PDCOMM_INVALID_STATE when result is not a validated S2F30 reply; #PDCOMM_OUT_OF_RANGE when index is not less than the entry count; #PDCOMM_INVALID_DATA, #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_INTERNAL_ERROR.

Notes

  • Ownership: release the item with pdcomm_secs_destroy().