Skip to content
Start free evaluation

pdcomm_gem_equipment_binding_at

Function

Reads one binding by position.

PdcommStatus pdcomm_gem_equipment_binding_at(PdcommTcpEndpoint *endpoint, size_t index, PdcommGemBindingInfo *info, PdcommSecsItem **out_constant_id)

Declared in: #include <pdcomm_gem_data.h>

Bindings are enumerated in stored order. For a CONSTANT binding *out_constant_id receives an independent item holding the constant ID; ASCII IDs keep their text, and numeric IDs are normalized to I8 (negative) or U8. For STATUS and DATA bindings it stays NULL and source_id holds the source.

Parameters

NameDescription
endpointEquipment endpoint.
indexZero-based position.
infoCaller storage; set info->struct_size first. Known fields are zeroed before the endpoint is inspected.
out_constant_idReceives the constant ID item or NULL; set to NULL first. Must not be NULL or overlap info.

Returns

#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when a pointer is NULL, info is too small, or the outputs overlap; #PDCOMM_OUT_OF_RANGE when no binding store is installed or index is not less than the binding count; #PDCOMM_INVALID_STATE when the endpoint is not an Equipment; #PDCOMM_BACKPRESSURE, #PDCOMM_LIMIT_EXCEEDED, #PDCOMM_ALLOCATION_FAILED, or #PDCOMM_POISONED.

Notes

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