circuitmatter.exchange ====================== .. py:module:: circuitmatter.exchange Attributes ---------- .. autoapisummary:: circuitmatter.exchange.MRP_MAX_TRANSMISSIONS circuitmatter.exchange.MRP_BACKOFF_BASE circuitmatter.exchange.MRP_BACKOFF_JITTER circuitmatter.exchange.MRP_BACKOFF_MARGIN circuitmatter.exchange.MRP_BACKOFF_THRESHOLD circuitmatter.exchange.MRP_STANDALONE_ACK_TIMEOUT_MS Classes ------- .. autoapisummary:: circuitmatter.exchange.Exchange Module Contents --------------- .. py:data:: MRP_MAX_TRANSMISSIONS :value: 5 The maximum number of transmission attempts for a given reliable message. The sender MAY choose this value as it sees fit. .. py:data:: MRP_BACKOFF_BASE :value: 1.6 The base number for the exponential backoff equation. .. py:data:: MRP_BACKOFF_JITTER :value: 0.25 The scaler for random jitter in the backoff equation. .. py:data:: MRP_BACKOFF_MARGIN :value: 1.1 The scaler margin increase to backoff over the peer idle interval. .. py:data:: MRP_BACKOFF_THRESHOLD :value: 1 The number of retransmissions before transitioning from linear to exponential backoff. .. py:data:: MRP_STANDALONE_ACK_TIMEOUT_MS :value: 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. .. py:class:: Exchange(session, protocols, initiator: bool = True, exchange_id: int = -1) .. py:attribute:: initiator .. py:attribute:: exchange_id .. py:attribute:: protocols .. py:attribute:: session .. py:attribute:: pending_acknowledgement :value: None Message number that is waiting for an ack from us .. py:attribute:: send_standalone_time :value: None .. py:attribute:: retry_count :value: 0 .. py:attribute:: next_retransmission_time :value: None When to next resend the message that hasn't been acked .. py:attribute:: pending_retransmission :value: None Message that we've attempted to send but hasn't been acked .. py:attribute:: pending_payloads :value: [] .. py:method:: send(application_payload=None, protocol_id=None, protocol_opcode=None, reliable=True) .. py:method:: send_pending(ignore_time=False) -> bool .. py:method:: send_standalone() .. py:method:: queue(payload) .. py:method:: receive(message) -> bool Process the message and return if the packet should be dropped. .. py:method:: close() .. py:method:: resend_pending()