Skip to content
Start free evaluation

pdcomm_gem_result_body

Function

Copies the SECS-II body of the message behind a result.

PdcommStatus pdcomm_gem_result_body(const PdcommGemResult *result, PdcommSecsItem **out_item)

Declared in: #include <pdcomm_gem.h>

For example, the body of an S1F2 identity reply holds MDLN and SOFTREV.

Parameters

NameDescription
resultLive result.
out_itemReceives a new item that owns a copy of the body. Set to NULL first, so it is NULL after every failure. Must not be NULL.

Returns

#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when result or out_item is NULL; #PDCOMM_OUT_OF_RANGE when the message had no body or its body could not be decoded within the role's item limits; #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_INTERNAL_ERROR.

Notes

  • Ownership: release the item with pdcomm_secs_destroy().
  • Thread safety: read-only result getters may run concurrently with each other, but not with pdcomm_gem_result_destroy().