콘텐츠로 이동
무료 평가 시작

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)

선언 위치: #include <pdcomm_gem_formatted_program_transfers.hpp>

메시지를 큐에 넣기 전에 모든 입력을 검증하고 복사합니다. 장비의 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);

매개변수

이름설명
endpointGemCommunication::Communicating 상태의 호스트 끝점입니다.
idPPID입니다. 비어 있지 않고 최대 120바이트인 ASCII 또는 Binary 아이템이어야 합니다.
modelMDLN이며 ASCII, 최대 20바이트입니다.
softwareRevisionSOFTREV이며 ASCII, 최대 20바이트입니다.
commands순서대로 나열한 프로그램 명령입니다.

반환값

제출된 요청의 토큰입니다.

참고

  • 예외 pdcomm::Error: 장비이거나, 구성되지 않았거나, 통신 중이 아니면 PDCOMM_INVALID_STATE, PPID·텍스트·명령 코드가 잘못되었거나 아이템이 nullptr이면 PDCOMM_INVALID_ARGUMENT, 한도나 maxPending을 넘으면 PDCOMM_LIMIT_EXCEEDED, 비어 있는 대기 슬롯이 없으면 PDCOMM_BACKPRESSURE입니다.