pdcomm_gem_spool_capture_event
Function
Builds an S6F11 event report and offers it to the spool.
PdcommStatus pdcomm_gem_spool_capture_event(PdcommTcpEndpoint *endpoint, uint32_t data_id, uint32_t event_id, const PdcommGemDataSample *samples, size_t count, uint64_t now, PdcommGemSpoolWriteInfo *info)The report is built exactly as pdcomm_gem_equipment_publish_event_with_data() would build it, as an S6F11 W1 message for a registered, linked, and enabled collection event, and then captured as in pdcomm_gem_spool_capture().
Parameters
| Name | Description |
|---|---|
endpoint | Synchronized endpoint configured as GEM Equipment with a spool and event reports. |
data_id | DATAID of the report. |
event_id | CEID of the collection event. |
samples | Array of count data samples used instead of cached values. May be NULL when count is 0. |
count | Number of samples. |
now | Application timestamp stored as the capture time. |
info | Receives the outcome. Must not be NULL. |
Returns
As pdcomm_gem_spool_capture(); additionally #PDCOMM_INVALID_STATE when reports are not configured, samples are given without data variables, the event is unknown or disabled, or a reported data value is unavailable; #PDCOMM_INVALID_ARGUMENT when a sample value is NULL, samples is NULL with a nonzero count, or a sample names an unknown or repeated DVID or has the wrong format or count; #PDCOMM_OUT_OF_RANGE when a reported VID has no value source; #PDCOMM_LIMIT_EXCEEDED when the sample count or bytes, or the built report, exceed their limits.
Notes
- Report values and samples resolve with the same statuses as in pdcomm_gem_equipment_publish_event_with_data(). An unknown or disabled event, or a missing report store, is #PDCOMM_INVALID_STATE here and #PDCOMM_INVALID_DATA there. An enabled event without linked reports is captured with an empty report list.