pdcomm_gem_equipment_status_update
Function
Replaces the value of a registered status variable.
PdcommStatus pdcomm_gem_equipment_status_update(PdcommTcpEndpoint *endpoint, uint32_t id, const PdcommSecsItem *value)Updates are allowed at any time, including while communicating. The new value must have the same top-level format as the registered one. The item is cloned, never consumed. On any error the registry is unchanged.
Parameters
| Name | Description |
|---|---|
endpoint | Live TCP endpoint with an equipment role. |
id | Registered status variable ID. |
value | New value. Must not be NULL. |
Returns
#PDCOMM_OK when the value was replaced; #PDCOMM_INVALID_ARGUMENT when endpoint or value is NULL or the format differs from the registered format; #PDCOMM_OUT_OF_RANGE when id is not registered; #PDCOMM_LIMIT_EXCEEDED when max_value_bytes or an item limit would be exceeded; #PDCOMM_INVALID_STATE when the endpoint has no equipment role; #PDCOMM_BACKPRESSURE when a staged TCP event exists; #PDCOMM_ALLOCATION_FAILED or #PDCOMM_POISONED.