class WeaveMessageLayer
Defined at line 522 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
The definition of the WeaveMessageLayer class, which manages communication
with other Weave nodes. It employs one of several InetLayer endpoints
to establish a communication channel with other Weave nodes.
Public Members
System::Layer * SystemLayer
InetLayer * Inet
WeaveFabricState * FabricState
void * AppState
WeaveExchangeManager * ExchangeMgr
WeaveSecurityManager * SecurityMgr
uint32_t IncomingConIdleTimeout
uint8_t State
bool IsListening
bool mDropMessage
MessageReceiveFunct OnMessageReceived
TunneledMsgReceiveFunct OnUDPTunneledMessageReceived
ReceiveErrorFunct OnReceiveError
ConnectionReceiveFunct OnConnectionReceived
AcceptErrorFunct OnAcceptError
BleLayer * mBle
Public Methods
void WeaveMessageLayer ()
WEAVE_ERROR Init (InitContext * context)
WEAVE_ERROR Shutdown ()
WEAVE_ERROR SendMessage (WeaveMessageInfo * msgInfo, PacketBuffer * msgBuf)
WEAVE_ERROR SendMessage (const IPAddress &destAddr,WeaveMessageInfo *msgInfo,PacketBuffer *msgBuf)
WEAVE_ERROR SendMessage (const IPAddress &destAddr,uint16_tdestPort,InterfaceIdsendIntfId,WeaveMessageInfo *msgInfo,PacketBuffer *msgBuf)
WEAVE_ERROR ResendMessage (WeaveMessageInfo * msgInfo, PacketBuffer * msgBuf)
WEAVE_ERROR ResendMessage (const IPAddress &destAddr,WeaveMessageInfo *msgInfo,PacketBuffer *msgBuf)
WEAVE_ERROR ResendMessage (const IPAddress &destAddr,uint16_tdestPort,WeaveMessageInfo *msgInfo,PacketBuffer *msgBuf)
WEAVE_ERROR ResendMessage (const IPAddress &destAddr,uint16_tdestPort,InterfaceIdinterfaceId,WeaveMessageInfo *msgInfo,PacketBuffer *msgBuf)
WEAVE_ERROR SendUDPTunneledMessage (const IPAddress &destAddr,WeaveMessageInfo *msgInfo,PacketBuffer *msgBuf)
Function to send a Tunneled packet over a local UDP tunnel.
WeaveConnection * NewConnection ()
WeaveConnectionTunnel * NewConnectionTunnel ()
void GetConnectionPoolStats (nl::Weave::System::Stats::count_t & aOutInUse)
WEAVE_ERROR CreateTunnel (WeaveConnectionTunnel **tunPtr,WeaveConnection &conOne,WeaveConnection &conTwo,uint32_tinactivityTimeoutMS)
WEAVE_ERROR SetUnsecuredConnectionListener (ConnectionReceiveFunctnewOnUnsecuredConnectionReceived,CallbackRemovedFunctnewOnUnsecuredConnectionCallbacksRemoved,boolforce,void *listenerState)
Set OnUnsecuredConnectionReceived callbacks. Return WEAVE_INCORRECT_STATE if callbacks already set unless force
flag set to true. If force flag is true, overwrite existing callbacks with provided values after call to
OnUnsecuredConnectionCallbackRemoved.
WEAVE_ERROR ClearUnsecuredConnectionListener (ConnectionReceiveFunct oldOnUnsecuredConnectionReceived, CallbackRemovedFunct newOnUnsecuredConnectionCallbacksRemoved)
Clear OnUnsecuredConnectionReceived and OnUnsecuredConnectionCallbackRemoved as requested by current
callback owner, using function pointer args as proof of identification.
WEAVE_ERROR DecodeHeader (PacketBuffer *msgBuf,WeaveMessageInfo *msgInfo,uint8_t **payloadStart)
WEAVE_ERROR ReEncodeMessage (PacketBuffer * buf)
WEAVE_ERROR EncodeMessage (WeaveMessageInfo *msgInfo,PacketBuffer *msgBuf,WeaveConnection *con,uint16_tmaxLen,uint16_treserve)
WEAVE_ERROR EncodeMessage (const IPAddress &destAddr,uint16_tdestPort,InterfaceIdsendIntId,WeaveMessageInfo *msgInfo,PacketBuffer *payload)
WEAVE_ERROR RefreshEndpoints ()
WEAVE_ERROR CloseEndpoints ()
bool IPv4ListenEnabled ()
Check if the WeaveMessageLayer is configured to listen for inbound communications
over IPv4.
Defined at line 850 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
bool IPv6ListenEnabled ()
Check if the WeaveMessageLayer is configured to listen for inbound communications
over IPv4.
Defined at line 870 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
bool TCPListenEnabled ()
Check if the WeaveMessageLayer is configured to listen for inbound TCP connections.
Defined at line 884 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
void SetTCPListenEnabled (bool val)
Enable or disable listening for inbound TCP connections in the WeaveMessageLayer.
NOTE:
must be called after the TCP listening state is changed.
Defined at line 894 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
bool UDPListenEnabled ()
Check if the WeaveMessageLayer is configured to listen for inbound UDP messages.
Defined at line 902 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
void SetUDPListenEnabled (bool val)
Enable or disable listening for inbound UDP messages in the WeaveMessageLayer.
NOTE:
must be called after the UDP listening state is changed.
Defined at line 912 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
bool UnsecuredListenEnabled ()
Check if unsecured listening is enabled.
Defined at line 947 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
bool EphemeralUDPPortEnabled ()
Check if locally initiated Weave UDP exchanges should be sent from an ephemeral
UDP source port.
Defined at line 921 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
bool IsBoundToLocalIPv4Address ()
Check if the WeaveMessageLayer is bound to a local IPv4 address.
Defined at line 955 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
bool IsBoundToLocalIPv6Address ()
Check if the WeaveMessageLayer is bound to a local IPv6 address.
Defined at line 967 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
void SetSignalMessageLayerActivityChanged (MessageLayerActivityChangeHandlerFunct messageLayerActivityChangeHandler)
bool IsMessageLayerActive ()
uint32_t GetMaxWeavePayloadSize (const PacketBuffer *msgBuf,boolisUDP,uint32_tudpMTU)
void GetPeerDescription (char *buf,size_tbufSize,uint64_tnodeId,const IPAddress *addr,uint16_tport,InterfaceIdinterfaceId,const WeaveConnection *con)
void GetPeerDescription (char *buf,size_tbufSize,const WeaveMessageInfo *msgInfo)
Enumerations
enum State
| Name | Value | Comments |
|---|---|---|
| kState_NotInitialized | 0 |
State when the WeaveMessageLayer is not initialized. |
| kState_Initializing | 1 |
State when the WeaveMessageLayer is in the process of being initialized. |
| kState_Initialized | 2 |
State when the WeaveMessageLayer is initialized. |
The state of the WeaveMessageLayer.
Defined at line 537 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Core/WeaveMessageLayer.h
Records
Friends
class WeaveFabricState
class ExchangeContext
class WeaveExchangeManager
class WeaveConnection
class WeaveMessageLayerTestObject