Skip to content
Start free evaluation

pdcomm_gem_equipment_status_get

Function

Copies the current value of a registered status variable.

PdcommStatus pdcomm_gem_equipment_status_get(PdcommTcpEndpoint *endpoint, uint32_t id, PdcommSecsItem **out_item)

Declared in: #include <pdcomm_gem.h>

Parameters

NameDescription
endpointLive TCP endpoint with an equipment role.
idRegistered status variable ID.
out_itemReceives a new item that owns a copy of the value. Set to NULL first, so it is NULL after every failure. Must not be NULL.

Returns

#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or out_item is NULL; #PDCOMM_OUT_OF_RANGE when id is not registered; #PDCOMM_INVALID_STATE when the endpoint has no equipment role; #PDCOMM_BACKPRESSURE when a staged TCP event exists; #PDCOMM_ALLOCATION_FAILED or #PDCOMM_POISONED.

Notes

  • Ownership: release the item with pdcomm_secs_destroy(). It stays valid after the endpoint is destroyed.