pdcomm::putFormattedProgramStore
Function
Writes a program to the equipment's formatted program store.
inline void putFormattedProgramStore(GemEndpoint &endpoint, const SecsItem &id, const std::string &model, const std::string &softwareRevision, const std::vector<GemFormattedProgramStoreCommand> &commands, GemFormattedProgramStoreAction action)The program is validated as a complete S7F26 answer before the store changes. Programs in the store answer S7F25 requests and can be selected for execution.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint with formatted program requests configured. |
id | PPID: a non-empty ASCII or Binary item of at most 120 bytes. |
model | MDLN, ASCII, at most 20 bytes. |
softwareRevision | SOFTREV, ASCII, at most 20 bytes. |
commands | Program commands in order. |
action | GemFormattedProgramStoreAction::CreateOnly, ReplaceOnly or Upsert. |
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor GemFormattedProgramStoreAction::RespondOnly or invalid input;PDCOMM_INVALID_STATEon a host, without a store, or when CreateOnly finds the PPID or ReplaceOnly does not;PDCOMM_LIMIT_EXCEEDEDwhen the store, command, parameter, or SECS-II item limits are exceeded.