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)Parameters
| Name | Description |
|---|---|
endpoint | Live TCP endpoint with an equipment role. |
id | Registered status variable ID. |
out_item | Receives 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.