Skip to content
Start free evaluation

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)

Declared in: #include <pdcomm_gem_formatted_program_capabilities.hpp>

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 = {&parameter};
const auto revision = pdcomm::replaceFormattedProgramCapabilityCatalog(
    equipment, "MODEL", "REV", 8, 4096, {command});

Parameters

NameDescription
endpointEquipment endpoint with capability exchange configured.
modelMDLN, ASCII, at most 20 bytes.
softwareRevisionSOFTREV, ASCII, at most 20 bytes.
commandMaximumCMDMAX.
byteMaximumBYTMAX.
commandsCommand descriptions in order.

Returns

The new catalog revision.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE on a host or without configuration; PDCOMM_INVALID_ARGUMENT for invalid text, BLKDEF or parameter shapes; PDCOMM_LIMIT_EXCEEDED when limits are exceeded.