Skip to content
Start free evaluation

pdcomm_gem_equipment_configure_reports

Function

Installs an empty report store with the given collection events on an Equipment.

PdcommStatus pdcomm_gem_equipment_configure_reports(PdcommTcpEndpoint *endpoint, const PdcommGemReportOptions *options, const uint32_t *event_ids, size_t count)

Declared in: #include <pdcomm_gem_reports.h>

The event IDs are copied in order; every event starts unlinked and disabled. The store can be configured only once per endpoint, while the TCP endpoint is Stopped. Any previously configured alarm, command, or event directory configuration that refers to collection events is validated against the new store. On failure the Equipment is unchanged.

Parameters

NameDescription
endpointEquipment endpoint configured with pdcomm_gem_configure_equipment().
optionsStore limits. struct_size must be at least sizeof(PdcommGemReportOptions), version must be #PDCOMM_GEM_REPORT_OPTIONS_VERSION, and reserved must be 0.
event_idsArray of count CEIDs; must be unique. May be NULL when count is 0.
countNumber of event IDs; at most options->max_events.

Returns

#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, the options are invalid, event_ids is NULL with a nonzero count, or an event ID is duplicated; #PDCOMM_LIMIT_EXCEEDED when count exceeds max_events or the array size overflows; #PDCOMM_INVALID_STATE when the endpoint is not Stopped, holds a staged TCP event, is not an Equipment, already has a report store, or GEM communication is active; #PDCOMM_INVALID_DATA when existing alarm, command, or directory configuration names an event that is not in event_ids; #PDCOMM_ALLOCATION_FAILED or #PDCOMM_POISONED.

Notes

  • Thread safety: serialize with every other call on endpoint.