pdcomm::replaceFormattedProgramCapabilityCatalog
Function
Replaces the equipment's capability catalog that answers S7F21.
inline uint64_t replaceFormattedProgramCapabilityCatalog(GemEndpoint &endpoint, const std::string &model, const std::string &softwareRevision, uint8_t commandMaximum, uint32_t byteMaximum, const std::vector<GemFormattedProgramCapabilityCommand> &commands)The whole catalog is validated and copied; on failure the previous catalog stays. The call is allowed while the endpoint runs.
pdcomm::GemFormattedProgramCapabilityCommand command;
command.code = "MOVE"; command.name = "Move"; command.required = true;
command.blockDefinition = -1; command.before = {3, 7}; command.after = 9;
command.immediateAfter = {11}; command.parameters = {¶meter};
const auto revision = pdcomm::replaceFormattedProgramCapabilityCatalog(
equipment, "MODEL", "REV", 8, 4096, {command});Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint with capability exchange configured. |
model | MDLN, ASCII, at most 20 bytes. |
softwareRevision | SOFTREV, ASCII, at most 20 bytes. |
commandMaximum | CMDMAX. |
byteMaximum | BYTMAX. |
commands | Command descriptions in order. |
Returns
The new catalog revision.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEon a host or without configuration;PDCOMM_INVALID_ARGUMENTfor invalid text, BLKDEF or parameter shapes;PDCOMM_LIMIT_EXCEEDEDwhen limits are exceeded.