Skip to content
Start free evaluation

pdcomm_gem_equipment_event_at

Function

Copies one collection event of the local report store by position.

PdcommStatus pdcomm_gem_equipment_event_at(PdcommTcpEndpoint *endpoint, size_t index, uint32_t *out_id, uint8_t *enabled, uint32_t *report_ids, size_t capacity, size_t *required)

Declared in: #include <pdcomm_gem_reports.h>

Events are enumerated in registration order. *out_id, *enabled, and *required are set to 0 before any other check. For a valid index the CEID, enable flag, and number of linked reports are returned even when the array is too short; a short array is not modified.

Parameters

NameDescription
endpointEquipment endpoint with a report store.
indexZero-based event position.
out_idReceives the CEID. Must not be NULL.
enabledReceives 1 when the event report is enabled, else 0. Must not be NULL.
report_idsDestination for the linked RPTIDs in link order. May be NULL only when capacity is 0.
capacityNumber of uint32_t elements at report_ids.
requiredReceives the number of linked reports. Must not be NULL.

Returns

#PDCOMM_OK when every RPTID was copied; #PDCOMM_BUFFER_TOO_SMALL when capacity is smaller than *required; #PDCOMM_INVALID_ARGUMENT when endpoint or a required output is NULL, report_ids is NULL with a nonzero capacity, or the output regions overlap; #PDCOMM_OUT_OF_RANGE when index is not less than the event count; #PDCOMM_BACKPRESSURE, #PDCOMM_INVALID_STATE (not an Equipment or no report store), or #PDCOMM_POISONED.

Notes

  • Outputs must be valid, aligned, and must not overlap each other.