Skip to content
Start free evaluation

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)

Declared in: #include <pdcomm_gem_formatted_program_store.hpp>

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

NameDescription
endpointEquipment endpoint in GemCommunication::Communicating.
resultResult with GemOutcome::FormattedProgramTransferReceived.
acknowledgementACKC7, 0 to 7.
actionStore action for the received program.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_ARGUMENT for a code above 7 or an invalid action; PDCOMM_INVALID_STATE on a host, when not communicating, without a store, or when the action conflicts with the store; PDCOMM_STALE_TOKEN for a stale result or a different repeated code or action; PDCOMM_BACKPRESSURE when the reply cannot be queued.
  • This call changes result; do not run it concurrently with getters on it.