pdcomm::submitFormattedProgramTransfer
함수
호스트에서 S7F23 Formatted Process Program Send를 보냅니다.
inline PdcommTcpToken submitFormattedProgramTransfer(GemEndpoint &endpoint, const SecsItem &id, const std::string &model, const std::string &softwareRevision, const std::vector<GemFormattedProgramTransferCommand> &commands)메시지를 큐에 넣기 전에 모든 입력을 검증하고 복사합니다. 장비의 S7F24는 ACKC7을 담은 GemOutcome::FormattedProgramTransferAcknowledgement를 만듭니다.
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);매개변수
| 이름 | 설명 |
|---|---|
endpoint | GemCommunication::Communicating 상태의 호스트 끝점입니다. |
id | PPID입니다. 비어 있지 않고 최대 120바이트인 ASCII 또는 Binary 아이템이어야 합니다. |
model | MDLN이며 ASCII, 최대 20바이트입니다. |
softwareRevision | SOFTREV이며 ASCII, 최대 20바이트입니다. |
commands | 순서대로 나열한 프로그램 명령입니다. |
반환값
제출된 요청의 토큰입니다.
참고
- 예외
pdcomm::Error: 장비이거나, 구성되지 않았거나, 통신 중이 아니면PDCOMM_INVALID_STATE, PPID·텍스트·명령 코드가 잘못되었거나 아이템이nullptr이면PDCOMM_INVALID_ARGUMENT, 한도나maxPending을 넘으면PDCOMM_LIMIT_EXCEEDED, 비어 있는 대기 슬롯이 없으면PDCOMM_BACKPRESSURE입니다.