pdcomm_gem_equipment_configure_event_directory
Function
Installs or replaces the complete event directory of an Equipment.
PdcommStatus pdcomm_gem_equipment_configure_event_directory(PdcommTcpEndpoint *endpoint, const PdcommGemDirectoryOptions *options, const PdcommGemEventDefinition *definitions, size_t count)The directory event IDs must exactly match the collection events of the report store, and every VID must be explicitly bound to an existing data variable. Duplicate event IDs, or duplicate VIDs within one entry, are invalid. On failure the old directory and its counters are preserved.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint; the TCP endpoint must be Stopped. |
options | Directory limits; version must be #PDCOMM_GEM_DIRECTORY_OPTIONS_VERSION and reserved 0. |
definitions | Array of count entries. May be NULL when count is 0, which configures an empty directory. |
count | Number of entries; at most options->max_events. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, the options are invalid, a pointer is NULL with a nonzero length, a name is not ASCII, an ID is duplicated, the event IDs do not match the report store, or a VID is not bound to a data variable; #PDCOMM_LIMIT_EXCEEDED when an entry, VID, or name 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.