Skip to content
Start free evaluation

pdcomm_gem_equipment_constant_get

Function

Copies one field of a local constant.

PdcommStatus pdcomm_gem_equipment_constant_get(PdcommTcpEndpoint *endpoint, const PdcommSecsItem *id, uint32_t field, PdcommSecsItem **out_item)

Declared in: #include <pdcomm_gem_constants.h>

An absent optional default, minimum, or maximum value returns #PDCOMM_OK with *out_item NULL, which differs from an empty ASCII value.

Parameters

NameDescription
endpointEquipment endpoint.
idConstant ID item to look up (ASCII or single-element integer).
field#PDCOMM_GEM_CONSTANT_ID through #PDCOMM_GEM_CONSTANT_CURRENT.
out_itemReceives the new item or NULL; set to NULL first. Must not be NULL.

Returns

#PDCOMM_OK on success, including an absent optional value; #PDCOMM_INVALID_ARGUMENT when a pointer is NULL, field is unknown, or id is not a valid constant ID; #PDCOMM_OUT_OF_RANGE when id is not defined; #PDCOMM_INVALID_STATE when the endpoint is not an Equipment or has no constant store; #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_POISONED.

Notes

  • Ownership: release a non-NULL item with pdcomm_secs_destroy().