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

pdcomm::GemFormattedProgramSelectionSnapshot

클래스

장비의 정형 프로그램 선택을 복사한 변경 불가능한 사본입니다.

class GemFormattedProgramSelectionSnapshot

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

현재 상태를 살펴보려면 formattedProgramSelectionSnapshot()으로, 방금 준비(ready) 상태로 확인된 선택이 필요하면 validateFormattedProgramSelection()으로 얻습니다. 스냅숏은 내용을 소유하므로 이후 변경이나 끝점 소멸 뒤에도 유효합니다.

auto token = pdcomm::selectFormattedProgram(equipment, id);
auto snapshot = pdcomm::formattedProgramSelectionSnapshot(equipment);
if (snapshot.info().validForExecution)
    std::cout << snapshot.model() << ' ' << snapshot.info().commandCount << '\n';

참고

  • 이동 전용(move-only) RAII 래퍼입니다. getter는 동시에 실행할 수 있지만 소멸과 경합해서는 안 됩니다. 빈 스냅숏의 getter는 PDCOMM_INVALID_ARGUMENT와 함께 pdcomm::Error를 던집니다.

멤버

GemFormattedProgramSelectionSnapshot

생성자

네이티브 핸들을 소유하지 않는 빈 스냅숏을 만듭니다.

GemFormattedProgramSelectionSnapshot() noexcept = default

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

GemFormattedProgramSelectionSnapshot

생성자

other가 소유한 네이티브 핸들의 소유권을 가져옵니다.

GemFormattedProgramSelectionSnapshot(GemFormattedProgramSelectionSnapshot &&other) noexcept

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

매개변수

이름설명
other원본 래퍼입니다. 호출 후 비게 됩니다.

GemFormattedProgramSelectionSnapshot

생성자

복사할 수 없습니다. 래퍼가 네이티브 핸들을 단독으로 소유합니다.

GemFormattedProgramSelectionSnapshot(const GemFormattedProgramSelectionSnapshot &) = delete

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

commandCode

메서드

선택된 프로그램의 명령 하나에서 CCODE를 반환합니다.

SecsItem commandCode(size_t index) const

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

매개변수

이름설명
index0부터 시작하는 명령 위치입니다.

반환값

독립적으로 소유되는 아이템입니다.

참고

  • 예외 pdcomm::Error: 선택된 것이 없으면 PDCOMM_INVALID_STATE, index가 잘못되면 PDCOMM_OUT_OF_RANGE입니다.

commandInfo

메서드

선택된 프로그램의 명령 하나를 설명합니다.

GemFormattedProgramSelectionCommandInfo commandInfo(size_t index) const

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

매개변수

이름설명
index0부터 시작하는 명령 위치입니다. GemFormattedProgramSelectionInfo::commandCount보다 작아야 합니다.

반환값

파라미터 수와 CCODE 형식입니다.

참고

  • 예외 pdcomm::Error: 선택된 것이 없으면 PDCOMM_INVALID_STATE, index가 잘못되면 PDCOMM_OUT_OF_RANGE입니다.

id

메서드

선택된 프로그램의 PPID를 반환합니다.

SecsItem id() const

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

반환값

독립적으로 소유되는 ASCII 또는 Binary 아이템입니다.

참고

  • 예외 pdcomm::Error: 선택된 것이 없으면 PDCOMM_INVALID_STATE입니다.

info

메서드

스냅숏에 담긴 선택 상태를 반환합니다.

GemFormattedProgramSelectionInfo info() const

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

반환값

상태, 오래된 이유, 세대 값과 명령 수입니다.

참고

  • 예외 pdcomm::Error: 빈 스냅숏이면 PDCOMM_INVALID_ARGUMENT입니다.

model

메서드

선택된 프로그램의 MDLN을 복사합니다.

std::string model() const

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

반환값

모델 텍스트입니다.

참고

  • 예외 pdcomm::Error: 선택된 것이 없으면 PDCOMM_INVALID_STATE입니다.

operator bool

메서드

래퍼가 네이티브 스냅숏을 소유하는지 알려 줍니다.

explicit operator bool() const noexcept

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

반환값

스냅숏을 소유하면 true입니다.

operator=

메서드

현재 핸들을 해제한 다음 other가 소유한 핸들의 소유권을 가져옵니다.

GemFormattedProgramSelectionSnapshot &operator=(GemFormattedProgramSelectionSnapshot &&other) noexcept

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

매개변수

이름설명
other원본 래퍼입니다. 호출 후 비게 됩니다.

반환값

이 래퍼입니다.

operator=

메서드

복사 대입할 수 없습니다. 래퍼가 네이티브 핸들을 단독으로 소유합니다.

GemFormattedProgramSelectionSnapshot &operator=(const GemFormattedProgramSelectionSnapshot &) = delete

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

parameter

메서드

선택된 프로그램의 명령 하나에서 PPARM 하나를 반환합니다.

SecsItem parameter(size_t command, size_t index) const

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

매개변수

이름설명
command0부터 시작하는 명령 위치입니다.
index0부터 시작하는 파라미터 위치입니다.

반환값

독립적으로 소유되는 아이템입니다.

참고

  • 예외 pdcomm::Error: 선택된 것이 없으면 PDCOMM_INVALID_STATE, 인덱스가 잘못되면 PDCOMM_OUT_OF_RANGE입니다.

softwareRevision

메서드

선택된 프로그램의 SOFTREV를 복사합니다.

std::string softwareRevision() const

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

반환값

소프트웨어 리비전 텍스트입니다.

참고

  • 예외 pdcomm::Error: 선택된 것이 없으면 PDCOMM_INVALID_STATE입니다.

~GemFormattedProgramSelectionSnapshot

메서드

pdcomm_gem_formatted_program_selection_snapshot_destroy()로 네이티브 핸들을 해제합니다.

~GemFormattedProgramSelectionSnapshot()

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

빈 스냅숏은 아무것도 해제하지 않습니다.