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)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
| Name | Description |
|---|---|
endpoint | Host endpoint in GemCommunication::Communicating. |
id | PPID: a non-empty ASCII or Binary item of at most 120 bytes. |
model | MDLN, ASCII, at most 20 bytes. |
softwareRevision | SOFTREV, ASCII, at most 20 bytes. |
commands | Program commands in order. |
Returns
Token of the submitted request.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEon equipment, without configuration or when not communicating;PDCOMM_INVALID_ARGUMENTfor an invalid PPID, text or command code, or anullptritem;PDCOMM_LIMIT_EXCEEDEDwhen limits ormaxPendingare exceeded;PDCOMM_BACKPRESSUREwhen no pending slot is free.