pdcomm_gem_host_define_reports
Function
Sends a Define Report request (S2F33) from a Host.
PdcommStatus pdcomm_gem_host_define_reports(PdcommTcpEndpoint *endpoint, uint32_t data_id, const PdcommGemReportSpec *specs, size_t count, PdcommTcpToken *out_token)Each spec defines one RPTID with its VIDs. A spec with zero VIDs deletes that report and its links. An empty spec list (count 0) deletes every report and every link on the Equipment. The message is checked against the Host item limits before it is queued; the specs are not retained. The Equipment answers with S2F34, which pdcomm_gem_handle_event() reports as #PDCOMM_GEM_RESPONSE with request kind #PDCOMM_GEM_DEFINE_REPORTS, outcome #PDCOMM_GEM_DEFINE_REPORTS_ACK, and the DRACK in acknowledgement.
Parameters
| Name | Description |
|---|---|
endpoint | Host endpoint. |
data_id | DATAID sent with the request (U4). |
specs | Array of count report specs. May be NULL when count is 0. |
count | Number of specs. |
out_token | Zeroed first; receives the transaction token on success. Must not be NULL. |
Returns
#PDCOMM_OK when the request was queued; #PDCOMM_INVALID_ARGUMENT when endpoint or out_token is NULL or an array pointer is NULL with a nonzero count; #PDCOMM_LIMIT_EXCEEDED when the message would exceed the Host item limits; #PDCOMM_INVALID_STATE when the endpoint is not a Host or is not Communicating; #PDCOMM_BACKPRESSURE when a TCP event is staged or all 32 pending slots or the send queue are full; #PDCOMM_ALLOCATION_FAILED, #PDCOMM_IO_ERROR, or #PDCOMM_POISONED.