Skip to content
Start free evaluation

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)

Declared in: #include <pdcomm_gem_spooling.h>

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

NameDescription
endpointSynchronized endpoint configured as GEM Equipment with a spool and event reports.
data_idDATAID of the report.
event_idCEID of the collection event.
samplesArray of count data samples used instead of cached values. May be NULL when count is 0.
countNumber of samples.
nowApplication timestamp stored as the capture time.
infoReceives 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.