pdcomm_gem_equipment_constant_at
Function
Reads one constant definition and its ID by position.
PdcommStatus pdcomm_gem_equipment_constant_at(PdcommTcpEndpoint *endpoint, size_t index, PdcommGemConstantInfo *info, PdcommSecsItem **out_id)Constants are enumerated in definition order. *out_id is set to NULL and the known fields of info are zeroed before the endpoint is inspected.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint. |
index | Zero-based position. |
info | Caller storage; set info->struct_size first. |
out_id | Receives the constant ID as a new item (numeric IDs normalized to I8 or U8). 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 index is not less than the constant count; #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
*out_idwith pdcomm_secs_destroy().