pdcomm_gem_formatted_program_verification_prepare
Function
Prepares an S7F27 verification report for negotiation.
PdcommStatus pdcomm_gem_formatted_program_verification_prepare(PdcommTcpEndpoint *endpoint, const PdcommSecsItem *id, const PdcommGemFormattedProgramVerificationNegotiationIssue *issues, size_t issue_count, PdcommGemResult **out_result)Equipment only. The report is validated, encoded, and copied, and its LENGTH is computed. Nothing is sent; call pdcomm_gem_formatted_program_verification_submit() with the result.
Parameters
| Name | Description |
|---|---|
endpoint | Communicating GEM equipment endpoint with the service configured. |
id | PPID: a nonempty ASCII or Binary item of at most 120 bytes. It is copied; the caller keeps ownership. |
issues | Array of issue_count issues. May be NULL when issue_count is 0. |
issue_count | Number of issues; at most max_issues. |
out_result | Receives the prepared result. It is set to NULL first whenever it is not NULL, so it is NULL after every failure. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when a pointer is NULL, id is not a valid identifier, an issue is invalid (code above 5, non-ASCII text, NULL text with a nonzero length), or a report limit (max_issues, max_issue_text_bytes, max_total_issue_text_bytes) is exceeded, or the report cannot be encoded within the SECS-II item limits; #PDCOMM_LIMIT_EXCEEDED when the S7F27 frame would not fit the endpoint's max_frame_bytes or max_prepared negotiations are unfinished; #PDCOMM_INVALID_STATE when the endpoint is not a communicating GEM equipment or the service is not configured; #PDCOMM_BACKPRESSURE when the endpoint holds a staged TCP event; #PDCOMM_ALLOCATION_FAILED; #PDCOMM_POISONED.
Notes
- Ownership: release the result with pdcomm_gem_result_destroy(). The prepared negotiation occupies a
max_preparedslot until it finishes (including by a timeout or a malformed reply) or the HSMS session ends, even if the result is released.