circuitmatter.exchange
Attributes
The maximum number of transmission attempts for a given reliable message. The sender MAY choose |
|
The base number for the exponential backoff equation. |
|
The scaler for random jitter in the backoff equation. |
|
The scaler margin increase to backoff over the peer idle interval. |
|
The number of retransmissions before transitioning from linear to exponential backoff. |
|
Amount of time to wait for an opportunity to piggyback an acknowledgement on an outbound message |
Classes
Module Contents
- circuitmatter.exchange.MRP_MAX_TRANSMISSIONS = 5
The maximum number of transmission attempts for a given reliable message. The sender MAY choose this value as it sees fit.
- circuitmatter.exchange.MRP_BACKOFF_BASE = 1.6
The base number for the exponential backoff equation.
- circuitmatter.exchange.MRP_BACKOFF_JITTER = 0.25
The scaler for random jitter in the backoff equation.
- circuitmatter.exchange.MRP_BACKOFF_MARGIN = 1.1
The scaler margin increase to backoff over the peer idle interval.
- circuitmatter.exchange.MRP_BACKOFF_THRESHOLD = 1
The number of retransmissions before transitioning from linear to exponential backoff.
- circuitmatter.exchange.MRP_STANDALONE_ACK_TIMEOUT_MS = 200
Amount of time to wait for an opportunity to piggyback an acknowledgement on an outbound message before falling back to sending a standalone acknowledgement.
- class circuitmatter.exchange.Exchange(session, protocols, initiator: bool = True, exchange_id: int = -1)
- initiator
- exchange_id
- protocols
- session
- pending_acknowledgement = None
Message number that is waiting for an ack from us
- send_standalone_time = None
- retry_count = 0
- next_retransmission_time = None
When to next resend the message that hasn’t been acked
- pending_retransmission = None
Message that we’ve attempted to send but hasn’t been acked
- pending_payloads = []
- send(application_payload=None, protocol_id=None, protocol_opcode=None, reliable=True)
- send_standalone()
- queue(payload)
- close()
- resend_pending()