A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::SixLowPanNdContext Class Reference

6LoWPAN context container for 6LoWPAN ND. More...

#include "sixlowpan-nd-context.h"

Inheritance diagram for ns3::SixLowPanNdContext:
Collaboration diagram for ns3::SixLowPanNdContext:

Public Member Functions

 SixLowPanNdContext ()
 Constructor.
 SixLowPanNdContext (bool flagC, uint8_t cid, Time time, Ipv6Prefix context)
 Constructor.
 ~SixLowPanNdContext ()
 Destructor.
uint8_t GetCid () const
 Get the context identifier.
uint8_t GetContextLen () const
 Get the context length.
Ipv6Prefix GetContextPrefix () const
 Get the 6LoWPAN context prefix.
Time GetLastUpdateTime ()
 Get the last update time.
Time GetValidTime () const
 Get the valid lifetime.
bool IsFlagC () const
 Is compression flag ?
void PrintContext (Ptr< OutputStreamWrapper > stream)
 Print the 6LoWPAN context.
void SetCid (uint8_t cid)
 Set the context identifier.
void SetContextPrefix (Ipv6Prefix context)
 Set the 6LoWPAN context prefix.
void SetFlagC (bool c)
 Set the compression flag.
void SetLastUpdateTime (Time time)
 Set the last update time.
void SetValidTime (Time time)
 Set the valid lifetime.
Public Member Functions inherited from ns3::SimpleRefCount< SixLowPanNdContext >
 SimpleRefCount ()
 Default constructor.
uint32_t GetReferenceCount () const
 Get the reference count of the object.
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
void Ref () const
 Increment the reference count.
void Unref () const
 Decrement the reference count.

Private Attributes

bool m_c
 The compression flag, indicates that this context is valid for use in compression.
uint8_t m_cid
 The context identifier value.
Ipv6Prefix m_context
 The context prefix value.
Time m_lastUpdateTime
 The context last update time.
Time m_validTime
 The valid lifetime value.

Detailed Description

6LoWPAN context container for 6LoWPAN ND.

Definition at line 30 of file sixlowpan-nd-context.h.

Constructor & Destructor Documentation

◆ SixLowPanNdContext() [1/2]

ns3::SixLowPanNdContext::SixLowPanNdContext ( )

Constructor.

Definition at line 23 of file sixlowpan-nd-context.cc.

References m_c, m_cid, m_context, m_validTime, NS_LOG_FUNCTION, and ns3::Seconds().

Here is the call graph for this function:

◆ SixLowPanNdContext() [2/2]

ns3::SixLowPanNdContext::SixLowPanNdContext ( bool flagC,
uint8_t cid,
Time time,
Ipv6Prefix context )

Constructor.

Parameters
flagCcompression flag
cidcontext identifier ( 0 <= x <= 15)
timevalid lifetime of context
context6LoWPAN context advertised

Definition at line 32 of file sixlowpan-nd-context.cc.

References m_c, m_cid, m_context, NS_LOG_FUNCTION, and SetValidTime().

Here is the call graph for this function:

◆ ~SixLowPanNdContext()

ns3::SixLowPanNdContext::~SixLowPanNdContext ( )

Destructor.

Definition at line 41 of file sixlowpan-nd-context.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ GetCid()

uint8_t ns3::SixLowPanNdContext::GetCid ( ) const

Get the context identifier.

Returns
context identifier value

Definition at line 68 of file sixlowpan-nd-context.cc.

References m_cid, and NS_LOG_FUNCTION.

Referenced by PrintContext().

Here is the caller graph for this function:

◆ GetContextLen()

uint8_t ns3::SixLowPanNdContext::GetContextLen ( ) const

Get the context length.

Returns
context length value

Definition at line 47 of file sixlowpan-nd-context.cc.

References m_context, and NS_LOG_FUNCTION.

Referenced by PrintContext().

Here is the caller graph for this function:

◆ GetContextPrefix()

Ipv6Prefix ns3::SixLowPanNdContext::GetContextPrefix ( ) const

Get the 6LoWPAN context prefix.

Returns
context prefix value

Definition at line 124 of file sixlowpan-nd-context.cc.

References m_context, and NS_LOG_FUNCTION.

Referenced by PrintContext().

Here is the caller graph for this function:

◆ GetLastUpdateTime()

Time ns3::SixLowPanNdContext::GetLastUpdateTime ( )

Get the last update time.

Returns
the last update time

Definition at line 117 of file sixlowpan-nd-context.cc.

References m_lastUpdateTime, and NS_LOG_FUNCTION.

◆ GetValidTime()

Time ns3::SixLowPanNdContext::GetValidTime ( ) const

Get the valid lifetime.

Returns
valid lifetime value

Definition at line 83 of file sixlowpan-nd-context.cc.

References m_validTime, and NS_LOG_FUNCTION.

Referenced by PrintContext().

Here is the caller graph for this function:

◆ IsFlagC()

bool ns3::SixLowPanNdContext::IsFlagC ( ) const

Is compression flag ?

Returns
true if context is valid for use in compression, false otherwise

Definition at line 54 of file sixlowpan-nd-context.cc.

References m_c, and NS_LOG_FUNCTION.

Referenced by PrintContext().

Here is the caller graph for this function:

◆ PrintContext()

void ns3::SixLowPanNdContext::PrintContext ( Ptr< OutputStreamWrapper > stream)

Print the 6LoWPAN context.

Parameters
streamthe ostream the 6LoWPAN context is printed to

Definition at line 138 of file sixlowpan-nd-context.cc.

References GetCid(), GetContextLen(), GetContextPrefix(), GetValidTime(), IsFlagC(), and NS_LOG_FUNCTION.

Here is the call graph for this function:

◆ SetCid()

void ns3::SixLowPanNdContext::SetCid ( uint8_t cid)

Set the context identifier.

Parameters
cidthe context identifier value

Definition at line 75 of file sixlowpan-nd-context.cc.

References m_cid, NS_ASSERT, and NS_LOG_FUNCTION.

◆ SetContextPrefix()

void ns3::SixLowPanNdContext::SetContextPrefix ( Ipv6Prefix context)

Set the 6LoWPAN context prefix.

Parameters
contextthe context prefix value

Definition at line 131 of file sixlowpan-nd-context.cc.

References m_context, and NS_LOG_FUNCTION.

◆ SetFlagC()

void ns3::SixLowPanNdContext::SetFlagC ( bool c)

Set the compression flag.

Parameters
cthe compression flag

Definition at line 61 of file sixlowpan-nd-context.cc.

References m_c, and NS_LOG_FUNCTION.

◆ SetLastUpdateTime()

void ns3::SixLowPanNdContext::SetLastUpdateTime ( Time time)

Set the last update time.

Parameters
timethe last update time

Definition at line 110 of file sixlowpan-nd-context.cc.

References m_lastUpdateTime, and NS_LOG_FUNCTION.

◆ SetValidTime()

void ns3::SixLowPanNdContext::SetValidTime ( Time time)

Set the valid lifetime.

Parameters
timethe valid lifetime value

Definition at line 91 of file sixlowpan-nd-context.cc.

References m_validTime, ns3::MilliSeconds(), NS_LOG_FUNCTION, NS_LOG_WARN, and remainder.

Referenced by SixLowPanNdContext().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_c

bool ns3::SixLowPanNdContext::m_c
private

The compression flag, indicates that this context is valid for use in compression.

Definition at line 128 of file sixlowpan-nd-context.h.

Referenced by SixLowPanNdContext(), SixLowPanNdContext(), IsFlagC(), and SetFlagC().

◆ m_cid

uint8_t ns3::SixLowPanNdContext::m_cid
private

The context identifier value.

Definition at line 133 of file sixlowpan-nd-context.h.

Referenced by SixLowPanNdContext(), SixLowPanNdContext(), GetCid(), and SetCid().

◆ m_context

Ipv6Prefix ns3::SixLowPanNdContext::m_context
private

The context prefix value.

Definition at line 148 of file sixlowpan-nd-context.h.

Referenced by SixLowPanNdContext(), SixLowPanNdContext(), GetContextLen(), GetContextPrefix(), and SetContextPrefix().

◆ m_lastUpdateTime

Time ns3::SixLowPanNdContext::m_lastUpdateTime
private

The context last update time.

Definition at line 143 of file sixlowpan-nd-context.h.

Referenced by GetLastUpdateTime(), and SetLastUpdateTime().

◆ m_validTime

Time ns3::SixLowPanNdContext::m_validTime
private

The valid lifetime value.

Definition at line 138 of file sixlowpan-nd-context.h.

Referenced by SixLowPanNdContext(), GetValidTime(), and SetValidTime().


The documentation for this class was generated from the following files: