Skip to content
Start free evaluation

pdcomm::selectFormattedProgram

Function

Selects a program from the equipment's formatted program store.

inline GemFormattedProgramSelectionToken selectFormattedProgram(GemEquipment &endpoint, const SecsItem &id)

Declared in: #include <pdcomm_gem_formatted_program_selections.hpp>

Selection only records local state and takes a private copy of the program; it never starts physical execution. Selecting the same unchanged program again returns the same token. Later changes to the store entry, a new connection or a disconnect make the selection stale.

Parameters

NameDescription
endpointEquipment endpoint with formatted program requests configured (configureFormattedProgramQueries()).
idPPID of a stored program.

Returns

The selection token.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE on a host, without a store, or when the PPID is not stored; PDCOMM_LIMIT_EXCEEDED when the program is larger than the endpoint's message limit; PDCOMM_INVALID_ARGUMENT for an invalid PPID.