pdcomm_gem_equipment_configure_data_variables
Function
Installs or replaces the complete data variable store of an Equipment.
PdcommStatus pdcomm_gem_equipment_configure_data_variables(PdcommTcpEndpoint *endpoint, const PdcommGemDataOptions *options, const PdcommGemDataDefinition *definitions, size_t count)Every definition is validated and copied into a new store; then existing DATA bindings and event directory variables are checked against it. Only when everything is valid does the new store replace the old one. Every SECS-II format is supported and each cached value keeps its exact top-level format and count.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint; the TCP endpoint must be Stopped. |
options | Store limits; version must be #PDCOMM_GEM_DATA_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_variables. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, the options or their item limits are invalid, a format code is unknown, a string pointer is NULL with a nonzero length, metadata is not ASCII, an ID is duplicated, min_count exceeds max_count, a cached value does not match its format or count, or an existing DATA binding or directory variable no longer has a target; #PDCOMM_LIMIT_EXCEEDED when a count, metadata, value, or item limit is exceeded; #PDCOMM_BACKPRESSURE when a TCP event is staged; #PDCOMM_INVALID_STATE when the endpoint is not Stopped, is not an Equipment, or GEM communication is active; #PDCOMM_ALLOCATION_FAILED or #PDCOMM_POISONED.