pdcomm::respondFormattedProgramTransferAndStore
Function
Sends S7F24 for a received S7F23 and applies a store action to the received program.
inline void respondFormattedProgramTransferAndStore(GemEndpoint &endpoint, GemResult &result, uint8_t acknowledgement, GemFormattedProgramStoreAction action)The acknowledgement and the action are independent: the ACKC7 never selects an action. For any action other than GemFormattedProgramStoreAction::RespondOnly the store change is prepared first and committed after the reply is queued; this requires both formatted program transfers and formatted program requests on the equipment. Repeating the call with the same code and action after success does nothing and succeeds.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint in GemCommunication::Communicating. |
result | Result with GemOutcome::FormattedProgramTransferReceived. |
acknowledgement | ACKC7, 0 to 7. |
action | Store action for the received program. |
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor a code above 7 or an invalid action;PDCOMM_INVALID_STATEon a host, when not communicating, without a store, or when the action conflicts with the store;PDCOMM_STALE_TOKENfor a stale result or a different repeated code or action;PDCOMM_BACKPRESSUREwhen the reply cannot be queued. - This call changes
result; do not run it concurrently with getters on it.