pdcomm_gem_equipment_configure_report_bindings
Function
Installs or replaces the explicit report binding store of an Equipment.
PdcommStatus pdcomm_gem_equipment_configure_report_bindings(PdcommTcpEndpoint *endpoint, const PdcommGemBindingOptions *options, const PdcommGemReportBinding *bindings, size_t count)STATUS and DATA bindings use source_id and require constant_id NULL. CONSTANT bindings require source_id 0 and a scalar ASCII or integer constant ID. Different VIDs may alias the same source; duplicate VIDs fail. Every source must exist, every VID used by an existing report must be bound, and every event directory VID must stay bound to a data variable. count 0 installs an explicit empty store with no fallback to status variables; use pdcomm_gem_equipment_clear_report_bindings() to return to legacy resolution.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint; the TCP endpoint must be Stopped. |
options | Store limits; version must be #PDCOMM_GEM_BINDING_OPTIONS_VERSION and reserved 0. |
bindings | Array of count bindings. May be NULL when count is 0. |
count | Number of bindings; at most options->max_bindings. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, the options are invalid, a binding has an unknown kind or invalid source fields, a VID is duplicated, a source does not exist, or an existing report or directory VID would be unbound; #PDCOMM_LIMIT_EXCEEDED when a binding or identifier 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.