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)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
| Name | Description |
|---|---|
endpoint | Equipment endpoint with a report store. |
index | Zero-based event position. |
out_id | Receives the CEID. Must not be NULL. |
enabled | Receives 1 when the event report is enabled, else 0. Must not be NULL. |
report_ids | Destination for the linked RPTIDs in link order. May be NULL only when capacity is 0. |
capacity | Number of uint32_t elements at report_ids. |
required | Receives 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.