pdcomm::selectFormattedProgram
Function
Selects a program from the equipment's formatted program store.
inline GemFormattedProgramSelectionToken selectFormattedProgram(GemEquipment &endpoint, const SecsItem &id)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
| Name | Description |
|---|---|
endpoint | Equipment endpoint with formatted program requests configured (configureFormattedProgramQueries()). |
id | PPID of a stored program. |
Returns
The selection token.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEon a host, without a store, or when the PPID is not stored;PDCOMM_LIMIT_EXCEEDEDwhen the program is larger than the endpoint's message limit;PDCOMM_INVALID_ARGUMENTfor an invalid PPID.