pub enum OutgoingEvent<'a> {
Show 14 variants
Nothing,
SendCon,
SendNon,
SendPing,
AckReceived,
Success(EncodedMessage<'a>),
Timeout,
PiggybackedWrongToken,
ResetReceived,
DuplicatedResponse,
SendNotification,
NotificationAck,
NotificationRst(Token),
NotificationTimeout,
}Expand description
What has happened in the OutgoingCommunication path when calling
CoapEndpoint::process
This type is annotated with must_use because some events require user interaction to avoid
getting stuck in specific states. See the documentation for the specific events for more
information.
Variants§
Nothing
No real event happened. This pseudo-event is included as a variant here to allow concise event handling on the user side.
SendCon
A CON message has been sent
SendNon
A NON message has been sent
SendPing
A ping has been sent
AckReceived
We have received an ACK to our request. This brings us into the
OutgoingState::AwaitingResponse state.
Success(EncodedMessage<'a>)
We got a response to our request and consider the whole communication as successful. The
response is included in the event. Afterwards, the OutgoingState will be [Idle(true)]
which allows to obtain the response via message for later use.
Timeout
The communication attempt timed out.
PiggybackedWrongToken
We got a piggybacked response but the token does not match our request.
ResetReceived
We got a RST message. This cancels the ongoing request and brings us back to
[Idle(false)].
DuplicatedResponse
We have received a response again which we have received before. If it is a separate CON response, the ACK is sent again automatically.
SendNotification
The notification message has been sent. If it was a CON message, we still wait for the ACK
or RST. If it was a NON message, this includes a state transition into
OutgoingState::Idle.
NotificationAck
A CON notification message has been acked. This includes a state transition into
OutgoingState::Idle.
NotificationRst(Token)
The (CON or NON) notification message has been responded to with a RST. This signifies that the observer/receiver is not interested in further notifications about this resource. It should be removed from the list of registered observers for this resource.
NotificationTimeout
Transmitting a CON notification (with retransmissions) has timed out.