pdcomm_gem_equipment_configure_constants
Function
Installs the equipment constant store of an Equipment.
PdcommStatus pdcomm_gem_equipment_configure_constants(PdcommTcpEndpoint *endpoint, const PdcommGemConstantOptions *options, const PdcommGemConstantDefinition *definitions, size_t count)Builds a temporary complete store from the definitions, validates it (IDs, ASCII metadata, formats, counts, bounds, NaN and JIS-8 rejection, byte budgets) and the existing report bindings and directory, and installs it only if everything is valid. The store can be configured once, while the TCP endpoint is Stopped. A failure changes nothing. Afterwards the Equipment answers S2F13 and S2F29 automatically and reports S2F15 as #PDCOMM_GEM_CONSTANT_CHANGES_RECEIVED.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint. |
options | Store limits; version must be #PDCOMM_GEM_CONSTANT_OPTIONS_VERSION and reserved 0. |
definitions | Array of count definitions. May be NULL when count is 0. |
count | Number of definitions; at most options->max_constants. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, the options or their item limits are invalid, a required item is NULL, a string pointer is NULL with a nonzero length, an ID or metadata is invalid or duplicated, or a value violates its format, count, bound, NaN, or JIS-8 rules; #PDCOMM_LIMIT_EXCEEDED when a count, identifier, metadata, value, or item limit is exceeded; #PDCOMM_INVALID_STATE when the endpoint is not Stopped, holds a staged TCP event, is not an Equipment, already has a constant store, or GEM communication is active; #PDCOMM_INVALID_DATA when an existing binding or directory target becomes invalid; #PDCOMM_ALLOCATION_FAILED or #PDCOMM_POISONED.