pdcomm_secs1_state
Function
Reads the identity and lifecycle flags of an endpoint.
PdcommStatus pdcomm_secs1_state(PdcommSecs1Endpoint *endpoint, PdcommSecs1State *state)Valid in every lifecycle state, including before start and after stop, and not blocked by a staged event. It is the only endpoint query that still succeeds after the endpoint is poisoned, so it can report PdcommSecs1State::poisoned.
Parameters
| Name | Description |
|---|---|
endpoint | Endpoint to inspect. |
state | Caller storage. Set state->struct_size to sizeof(PdcommSecs1State) or larger; on success every field is written and struct_size is set to the size written. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when state or endpoint is NULL or state->struct_size is too small; #PDCOMM_INVALID_STATE on a wrong-thread, concurrent, or reentrant call; #PDCOMM_POISONED when reading the state itself panics.
Notes
- Thread safety: call only on the creating thread.