Skip to content
Start free evaluation

pdcomm_gem_equipment_enhanced_command_at

Function

Reads one stored command of an object.

PdcommStatus pdcomm_gem_equipment_enhanced_command_at(PdcommTcpEndpoint *endpoint, size_t object_index, size_t command_index, PdcommGemCommandInfo *info, PdcommSecsItem **out_name)

Declared in: #include <pdcomm_gem_enhanced_commands.h>

*out_name is set to NULL and the known fields of info are cleared before the lookup. A numeric RCMD is returned as U1, or I1 when negative.

Parameters

NameDescription
endpointEndpoint with a configured enhanced command store.
object_indexZero-based object registration index.
command_indexZero-based command index within the object.
infoCaller storage; set info->struct_size before the call.
out_nameReceives 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 either index is out of range; #PDCOMM_INVALID_STATE when the endpoint has no GEM Equipment or no enhanced command store; #PDCOMM_LIMIT_EXCEEDED or #PDCOMM_ALLOCATION_FAILED when the name item cannot be created; #PDCOMM_POISONED when the endpoint is poisoned or a panic was contained.

Notes

  • Ownership: release *out_name with pdcomm_secs_destroy().