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)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
| Name | Description |
|---|---|
endpoint | Equipment endpoint. |
index | Zero-based position. |
info | Caller storage; set info->struct_size first. Known fields are zeroed before the endpoint is inspected. |
out_constant_id | Receives 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_idwith pdcomm_secs_destroy().