class ExchangeContext

Defined at line 120 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveExchangeMgr.h

This class represents an ongoing conversation (ExchangeContext) between two or more nodes.

It defines methods for encoding and communicating Weave messages within an ExchangeContext

over various transport mechanisms, for example, TCP, UDP, or Weave Reliable Messaging.

Public Members

WeaveExchangeManager * ExchangeMgr
uint16_t mMsgProtocolVersion
WeaveConnection * Con
uint64_t PeerNodeId
IPAddress PeerAddr
InterfaceId PeerIntf
uint16_t PeerPort
uint16_t ExchangeId
void * AppState
bool AllowDuplicateMsgs
uint8_t EncryptionType
uint16_t KeyId
uint32_t RetransInterval
Timeout ResponseTimeout
WRMPConfig mWRMPConfig
MessageReceiveFunct OnMessageReceived
ResponseTimeoutFunct OnResponseTimeout
RetransmissionTimeoutFunct OnRetransmissionTimeout
ConnectionClosedFunct OnConnectionClosed
KeyErrorFunct OnKeyError
WRMPPauseRcvdFunct OnThrottleRcvd
WRMPPauseRcvdFunct OnDDRcvd
WRMPSendErrorFunct OnSendError
WRMPAckRcvdFunct OnAckRcvd

Public Methods

bool IsInitiator ()
bool IsConnectionClosed ()
bool IsResponseExpected ()
void SetInitiator (bool inInitiator)
void SetConnectionClosed (bool inConnectionClosed)
bool ShouldDropAck ()
bool IsAckPending ()
void SetDropAck (bool inDropAck)
void SetAckPending (bool inAckPending)
bool HasPeerRequestedAck ()
void SetPeerRequestedAck (bool inPeerRequestedAck)
bool HasRcvdMsgFromPeer ()
void SetMsgRcvdFromPeer (bool inMsgRcvdFromPeer)
WEAVE_ERROR WRMPFlushAcks ()
uint32_t GetCurrentRetransmitTimeout ()
void SetResponseExpected (bool inResponseExpected)
bool AutoRequestAck ()
void SetAutoRequestAck (bool autoReqAck)
bool GetAutoReleaseKey ()
void SetAutoReleaseKey (bool autoReleaseKey)
bool ShouldAutoReleaseConnection ()
void SetShouldAutoReleaseConnection (bool autoReleaseCon)
bool UseEphemeralUDPPort ()

Defined at line 555 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveExchangeMgr.h

WEAVE_ERROR SendMessage (uint32_t profileId, uint8_t msgType, PacketBuffer * msgPayload, uint16_t sendFlags, void * msgCtxt)
WEAVE_ERROR SendMessage (uint32_t profileId, uint8_t msgType, PacketBuffer * msgBuf, uint16_t sendFlags, WeaveMessageInfo * msgInfo, void * msgCtxt)
WEAVE_ERROR SendCommonNullMessage ()
WEAVE_ERROR EncodeExchHeader (WeaveExchangeHeader * exchangeHeader, uint32_t profileId, uint8_t msgType, PacketBuffer * msgBuf, uint16_t sendFlags)
void TeardownTrickleRetransmit ()
WEAVE_ERROR SetupTrickleRetransmit (uint32_t retransInterval, uint8_t threshold, uint32_t timeout)
void CancelRetrans ()
void HandleTrickleMessage (const IPPacketInfo * pktInfo, const WeaveMessageInfo * msgInfo)
WEAVE_ERROR WRMPSendThrottleFlow (uint32_t PauseTimeMillis)
WEAVE_ERROR WRMPSendDelayedDelivery (uint32_t PauseTimeMillis, uint64_t DelayedNodeId)
void AddRef ()

in order to use reference counting (see refCount below)

we use a hold/free paradigm where users of the exchange

can hold onto it while it's out of their direct control

to make sure it isn't closed before everyone's ready.

void Close ()
void Abort ()
void Release ()
WEAVE_ERROR StartTimerT ()
void GetPeerDescription (char * buf, uint32_t bufSize)

Enumerations

enum 
Name Value
kSendFlag_AutoRetrans 0x0001
kSendFlag_ExpectResponse 0x0002
kSendFlag_RetransmissionTrickle 0x0004
kSendFlag_DelaySend 0x0008
kSendFlag_ReuseMessageId 0x0010
kSendFlag_ReuseSourceId 0x0020
kSendFlag_RetainBuffer 0x0040
kSendFlag_AlreadyEncoded 0x0080
kSendFlag_DefaultMulticastSourceAddress 0x0100
kSendFlag_FromInitiator 0x0200
kSendFlag_RequestAck 0x0400
kSendFlag_NoAutoRequestAck 0x0800
kSendFlag_MulticastFromLinkLocal kSendFlag_DefaultMulticastSourceAddress

Defined at line 146 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveExchangeMgr.h

enum 
Name Value
kGetPeerDescription_MaxLength nl::Weave::kWeavePeerDescription_MaxLength

Defined at line 338 of file gen/third_party/openweave-core/src/include/Weave/Core/WeaveExchangeMgr.h

Friends

class WeaveMessageLayer
class WeaveExchangeManager