nl::Weave::WeaveSessionKey

#include <src/lib/core/WeaveFabricState.h>

Contains information about a Weave session key.

Summary

Public types

FlagsEnum{
  kFlag_IsLocallyInitiated = 0x01,
  kFlag_IsSharedSession = 0x02,
  kFlag_IsRemoveOnIdle = 0x04,
  kFlag_RecentlyActive = 0x08
}
enum

Public attributes

AuthMode
WeaveAuthMode
The means by which the peer node was authenticated during session establishment.
BoundCon
The connection to which the key is bound.
Flags
uint8_t
Various flags associated with the session.
MaxRcvdMsgId
uint32_t
The maximum message id received under the session key.
MsgEncKey
The Weave message encryption key.
NextMsgId
The next message id to be used under the session key.
NodeId
uint64_t
The id of the node with which the session key is shared.
RcvFlags
WeaveSessionState::ReceiveFlagsType
Flags tracking messages received under the key.
ReserveCount
uint8_t
Number of times the session key has been reserved.

Public functions

Clear(void)
void
Reset a WeaveSessionKey object.
ClearRecentlyActive()
void
Signals the session as NOT having been active in the recent past.
Init(void)
void
Initialize a WeaveSessionKey object.
IsAllocated() const
bool
IsKeySet() const
bool
IsLocallyInitiated() const
bool
IsRecentlyActive() const
bool
IsRemoveOnIdle() const
bool
IsSharedSession() const
bool
MarkRecentlyActive()
void
Signals the session as having been active in the recent past.
SetLocallyInitiated(bool val)
void
SetRemoveOnIdle(bool val)
void
Sets a flag indicating whether the session should be automatically removed after a period of idle time.
SetSharedSession(bool val)
void
Sets a flag indicating whether the session is a shared session.

Public types

FlagsEnum

 FlagsEnum
Properties
kFlag_IsLocallyInitiated

The session was initiated by the local node.

kFlag_IsRemoveOnIdle

The session should be removed when idle (only applies to sessions that are not bound to a connection).

kFlag_IsSharedSession

The session is a shared session.

kFlag_RecentlyActive

The session was recently active.

Public attributes

AuthMode

WeaveAuthMode AuthMode

The means by which the peer node was authenticated during session establishment.

BoundCon

WeaveConnection * BoundCon

The connection to which the key is bound.

Flags

uint8_t Flags

Various flags associated with the session.

MaxRcvdMsgId

uint32_t MaxRcvdMsgId

The maximum message id received under the session key.

MsgEncKey

WeaveMsgEncryptionKey MsgEncKey

The Weave message encryption key.

NextMsgId

MonotonicallyIncreasingCounter NextMsgId

The next message id to be used under the session key.

NodeId

uint64_t NodeId

The id of the node with which the session key is shared.

RcvFlags

WeaveSessionState::ReceiveFlagsType RcvFlags

Flags tracking messages received under the key.

ReserveCount

uint8_t ReserveCount

Number of times the session key has been reserved.

Public functions

Clear

void Clear(
  void
)

Reset a WeaveSessionKey object.

ClearRecentlyActive

void ClearRecentlyActive()

Signals the session as NOT having been active in the recent past.

Init

void Init(
  void
)

Initialize a WeaveSessionKey object.

IsAllocated

bool IsAllocated() const 

Details
Returns
True if the WeaveSessionKey object is allocated.

IsKeySet

bool IsKeySet() const 

Details
Returns
True if the encryption key value has been set in a WeaveSessionKey object.

IsLocallyInitiated

bool IsLocallyInitiated() const 

Details
Returns
True if the session was initiated by the local node.

IsRecentlyActive

bool IsRecentlyActive() const 

Details
Returns
True if the session has been active in the recent past.

IsRemoveOnIdle

bool IsRemoveOnIdle() const 

Details
Returns
True if the session is flagged for automatic removal when idle for a period of time.

IsSharedSession

bool IsSharedSession() const 

MarkRecentlyActive

void MarkRecentlyActive()

Signals the session as having been active in the recent past.

SetLocallyInitiated

void SetLocallyInitiated(
  bool val
)

SetRemoveOnIdle

void SetRemoveOnIdle(
  bool val
)

Sets a flag indicating whether the session should be automatically removed after a period of idle time.

Details
Parameters
[in] val
The value to set the kFlag_IsRemoveOnIdle flag to.

SetSharedSession

void SetSharedSession(
  bool val
)

Sets a flag indicating whether the session is a shared session.

Details
Parameters
[in] val
The value to set the kFlag_IsSharedSession flag to.