pdcomm_gem_formatted_program_capability_respond
Function
Answers a received S7F21 request with S7F22 from the catalog.
PdcommStatus pdcomm_gem_formatted_program_capability_respond(PdcommTcpEndpoint *endpoint, PdcommGemResult *result)On the first call the current catalog is captured into result, and that snapshot is sent. A retry after a failure such as #PDCOMM_BACKPRESSURE sends the same snapshot even if the catalog changed in between. After a successful send the result's outcome becomes #PDCOMM_GEM_REPLIED and reply_sent becomes 1; later calls return #PDCOMM_OK without sending again. The capability accessors then read the snapshot that was sent.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint that produced result. |
result | Result with outcome #PDCOMM_GEM_FORMATTED_PROGRAM_CAPABILITY_RECEIVED. |
Returns
#PDCOMM_OK when S7F22 was queued or had already been sent; #PDCOMM_INVALID_ARGUMENT when endpoint or result is NULL; #PDCOMM_INVALID_STATE when the endpoint is not a communicating GEM equipment, capabilities are not configured, result is not a capability result, or no catalog is installed; #PDCOMM_STALE_TOKEN when result is not a received request of this endpoint, or the HSMS session was reselected or reconnected since it was received; #PDCOMM_BACKPRESSURE when the endpoint holds a staged TCP event or the send queue is full (retry later); #PDCOMM_LIMIT_EXCEEDED or #PDCOMM_INVALID_DATA when the snapshot cannot be captured or encoded within the configured limits; #PDCOMM_ALLOCATION_FAILED; #PDCOMM_POISONED; other TCP statuses such as #PDCOMM_IO_ERROR from the reply.
Notes
- Until it is answered, the request occupies one
max_receivedslot and its HSMS incoming transaction; both are released when the session ends.