Skip to content
Start free evaluation

pdcomm_gem_equipment_configure_commands

Function

Installs the remote command store of a GEM Equipment endpoint.

PdcommStatus pdcomm_gem_equipment_configure_commands(PdcommTcpEndpoint *endpoint, const PdcommGemCommandOptions *options, const PdcommGemCommandDefinition *definitions, size_t count)

Declared in: #include <pdcomm_gem_commands.h>

Every definition is validated and copied into a temporary store, which is installed only when all definitions are valid and every completion CEID exists in the report catalog. The store can be configured only once.

Parameters

NameDescription
endpointStopped TCP endpoint with a configured GEM Equipment.
optionsStore limits; struct_size must be at least sizeof(PdcommGemCommandOptions).
definitionsArray of count command definitions. May be NULL when count is 0.
countNumber of definitions; must not exceed options->max_commands.

Returns

#PDCOMM_OK when the store was installed; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, options->struct_size is too small, version or reserved is wrong, max_commands is 0, an array pointer or name item is NULL, a flag is not 0 or 1, a name or format is invalid, min_count exceeds max_count, bounds are set without an integer format or with minimum above maximum, a command or parameter name is duplicated, or a completion CEID is not in the report catalog; #PDCOMM_LIMIT_EXCEEDED when a count, parameter total, or name length exceeds its limit; #PDCOMM_INVALID_STATE when the endpoint is not stopped, holds a staged TCP event, has no GEM Equipment, or already has a command store; #PDCOMM_ALLOCATION_FAILED when memory could not be allocated; #PDCOMM_POISONED when the endpoint is poisoned or a panic was contained.

Notes

  • No input pointer or item is retained after the call returns.