Skip to content
Start free evaluation

pdcomm_gem_result_event_value

Function

Copies one value of one report in a received S6F11.

PdcommStatus pdcomm_gem_result_event_value(const PdcommGemResult *result, size_t report_index, size_t value_index, PdcommSecsItem **out_item)

Declared in: #include <pdcomm_gem_reports.h>

Values carry no VIDs; position value_index corresponds to the VID at the same position in the report definition.

Parameters

NameDescription
resultResult with outcome #PDCOMM_GEM_EVENT_RECEIVED.
report_indexZero-based report position in the message.
value_indexZero-based value position in the report.
out_itemReceives a new, independently owned item. 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_INVALID_STATE when result is not a received event report; #PDCOMM_OUT_OF_RANGE when either index is out of range; #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_INTERNAL_ERROR.

Notes

  • Ownership: release the item with pdcomm_secs_destroy(). It remains valid after the result, the TCP event, and the endpoint are destroyed.