Skip to content
Start free evaluation

pdcomm_gem_equipment_configure_alarms

Function

Installs the alarm store of a GEM Equipment endpoint.

PdcommStatus pdcomm_gem_equipment_configure_alarms(PdcommTcpEndpoint *endpoint, const PdcommGemAlarmOptions *options, const PdcommGemAlarmDefinition *definitions, size_t count)

Declared in: #include <pdcomm_gem_alarms.h>

Every definition is validated and copied into a temporary store, which is installed only when all definitions are valid and every present set or clear CEID exists in the report catalog. Alarms start cleared and with reporting disabled. The store can be configured only once per endpoint.

Parameters

NameDescription
endpointStopped TCP endpoint with a configured GEM Equipment (see pdcomm_gem_configure_equipment()).
optionsStore limits; struct_size must be at least sizeof(PdcommGemAlarmOptions).
definitionsArray of count definitions. May be NULL when count is 0, which installs an empty store.
countNumber of definitions; must not exceed options->max_alarms.

Returns

#PDCOMM_OK when the store was installed; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, options->struct_size is too small, version or reserved is wrong, max_alarms is 0, definitions is NULL with a nonzero count, a presence flag is not 0 or 1, a text pointer is NULL with a nonzero length, the text is not ASCII, a category is outside 1 to 63, an ALID is duplicated, or a present CEID is not in the report catalog; #PDCOMM_LIMIT_EXCEEDED when count exceeds max_alarms or a text length or the total text length exceeds its limit; #PDCOMM_INVALID_STATE when the endpoint is not stopped, holds a staged TCP event, has no GEM Equipment, or already has an alarm store; #PDCOMM_ALLOCATION_FAILED when memory could not be allocated; #PDCOMM_POISONED when the endpoint is poisoned or a panic was contained.

Notes

  • No input pointer is retained after the call returns.