pdcomm_gem_equipment_publish_event
Function
Sends an Event Report Send (S6F11, W-bit set) for an enabled event.
PdcommStatus pdcomm_gem_equipment_publish_event(PdcommTcpEndpoint *endpoint, uint32_t data_id, uint32_t event_id, PdcommTcpToken *out_token)The report body is built from the current values of every VID in every linked report, resolved through the report bindings (or, without bindings, from the registered status variables), and queued as an independent snapshot. The Host's S6F12 later produces #PDCOMM_GEM_RESPONSE with request kind #PDCOMM_GEM_EVENT_REPORT and outcome #PDCOMM_GEM_EVENT_ACK; the ACKC6 value (0 to 63) is preserved in acknowledgement. This is equivalent to pdcomm_gem_equipment_publish_event_with_data() without samples.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint in the Communicating state. |
data_id | DATAID to send (U4). |
event_id | CEID to report. |
out_token | Zeroed first; receives the transaction token on success. Must not be NULL. |
Returns
#PDCOMM_OK when the report was queued; #PDCOMM_INVALID_ARGUMENT when endpoint or out_token is NULL; #PDCOMM_INVALID_STATE when the endpoint is not an Equipment, is not Communicating, or a data variable value is unavailable; #PDCOMM_INVALID_DATA when no report store is configured or the event is unknown or disabled; #PDCOMM_OUT_OF_RANGE when a reported VID has no value source; #PDCOMM_LIMIT_EXCEEDED when the message exceeds the item limits; #PDCOMM_BACKPRESSURE when a TCP event is staged or the pending slots or send queue are full; #PDCOMM_ALLOCATION_FAILED, #PDCOMM_IO_ERROR, or #PDCOMM_POISONED.