Skip to content
Start free evaluation

pdcomm::submitFormattedProgramTransfer

Function

Sends S7F23 Formatted Process Program Send from the host.

inline PdcommTcpToken submitFormattedProgramTransfer(GemEndpoint &endpoint, const SecsItem &id, const std::string &model, const std::string &softwareRevision, const std::vector<GemFormattedProgramTransferCommand> &commands)

Declared in: #include <pdcomm_gem_formatted_program_transfers.hpp>

All inputs are validated and copied before the message is queued. The equipment's S7F24 yields GemOutcome::FormattedProgramTransferAcknowledgement with ACKC7.

auto id = pdcomm::SecsItem::primitive(
    PDCOMM_SECS_ASCII, std::vector<uint8_t>{'O', 'N', 'L', 'Y'}, limits);
auto code = pdcomm::SecsItem::primitive(
    PDCOMM_SECS_ASCII, std::vector<uint8_t>{'R', 'U', 'N'}, limits);
const std::vector<pdcomm::GemFormattedProgramTransferCommand> commands = {{&code, {}}};
auto token = pdcomm::submitFormattedProgramTransfer(host, id, "MODEL", "REV", commands);

Parameters

NameDescription
endpointHost endpoint in GemCommunication::Communicating.
idPPID: a non-empty ASCII or Binary item of at most 120 bytes.
modelMDLN, ASCII, at most 20 bytes.
softwareRevisionSOFTREV, ASCII, at most 20 bytes.
commandsProgram commands in order.

Returns

Token of the submitted request.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE on equipment, without configuration or when not communicating; PDCOMM_INVALID_ARGUMENT for an invalid PPID, text or command code, or a nullptr item; PDCOMM_LIMIT_EXCEEDED when limits or maxPending are exceeded; PDCOMM_BACKPRESSURE when no pending slot is free.