pdcomm_gem_equipment_command_at
Function
Reads one stored command by registration index.
PdcommStatus pdcomm_gem_equipment_command_at(PdcommTcpEndpoint *endpoint, size_t index, PdcommGemCommandInfo *info, PdcommSecsItem **out_name)*out_name is set to NULL and the known fields of info are cleared before the lookup. Numeric names are returned in normalized form (U1, or I1 when negative).
Parameters
| Name | Description |
|---|---|
endpoint | Endpoint with a configured command store. |
index | Zero-based registration index. |
info | Caller storage; set info->struct_size before the call. |
out_name | Receives a new item holding the RCMD. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint, info, or out_name is NULL, they overlap, or info->struct_size is too small; #PDCOMM_OUT_OF_RANGE when index is not less than the command count; #PDCOMM_INVALID_STATE when the endpoint has no GEM Equipment or no command store; #PDCOMM_LIMIT_EXCEEDED or #PDCOMM_ALLOCATION_FAILED when the name item cannot be created within the endpoint item limits; #PDCOMM_POISONED when the endpoint is poisoned or a panic was contained.
Notes
- Ownership: release
*out_namewith pdcomm_secs_destroy().