EMANE  1.2.1
EMANE::Controls::R2RISelfMetricControlMessage Class Reference

R2RI Self Metric Control Message is sent to an NEM's transport layer to specify the parameters necessary to interpret R2RI neighbor and queue metric control messages. More...

#include <r2riselfmetriccontrolmessage.h>

Inheritance diagram for EMANE::Controls::R2RISelfMetricControlMessage:
EMANE::ControlMessage EMANE::Serializable EMANE::Cloneable< ControlMessage >

Public Types

enum  { IDENTIFIER = EMANE_CONTROL_MEASSGE_R2RI_SELF_METRIC }
 

Public Member Functions

R2RISelfMetricControlMessageclone () const override
 
 ~R2RISelfMetricControlMessage ()
 
std::uint64_t getBroadcastDataRatebps () const
 
std::uint64_t getMaxDataRatebps () const
 
const MicrosecondsgetReportInterval () const
 
Serialization serialize () const override
 
ControlMessageId getId () const
 

Static Public Member Functions

static R2RISelfMetricControlMessagecreate (const Serialization &serialization)
 
static R2RISelfMetricControlMessagecreate (std::uint64_t u64BroadcastDataRatebps, std::uint64_t u64MaxDataRatebps, const Microseconds &reportInteral)
 

Detailed Description

R2RI Self Metric Control Message is sent to an NEM's transport layer to specify the parameters necessary to interpret R2RI neighbor and queue metric control messages.

Note
This control message will be encapsulated in a SerializedControlMessage when delivered as via EMANE::DownstreamTransport::processDownstreamControl() or EMANE::UpstreamTransport::processUpstreamControl().
Instances are immutable

Definition at line 59 of file r2riselfmetriccontrolmessage.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDENTIFIER 

Definition at line 144 of file r2riselfmetriccontrolmessage.h.

Constructor & Destructor Documentation

◆ ~R2RISelfMetricControlMessage()

EMANE::Controls::R2RISelfMetricControlMessage::~R2RISelfMetricControlMessage ( )

Destroys an instance

Definition at line 87 of file r2riselfmetriccontrolmessage.cc.

Member Function Documentation

◆ clone()

EMANE::Controls::R2RISelfMetricControlMessage * EMANE::Controls::R2RISelfMetricControlMessage::clone ( ) const
overridevirtual

Clones the control message on the heap

Returns
cloned message
Note
Caller assumes ownership of the clone

Implements EMANE::Cloneable< ControlMessage >.

Definition at line 150 of file r2riselfmetriccontrolmessage.cc.

◆ create() [1/2]

EMANE::Controls::R2RISelfMetricControlMessage * EMANE::Controls::R2RISelfMetricControlMessage::create ( const Serialization serialization)
static

Creates an R2RISelfMetricControlMessage from a serialization on the heap

Parameters
serializationMessage serialization
Exceptions
SerializationExceptionwhen a valid message cannot be de-serialized
Note
Once a control message is passed to another NEM layer using EMANE::UpstreamTransport::processUpstreamPacket(), EMANE::UpstreamTransport::processUpstreamControl(), EMANE::DownstreamTransport::processDownstreamPacket() or EMANE::DownstreamTransport::processDownstreamControl() object ownership is transferred to the emulator infrastructure along with deallocation responsibility. It is not valid to use a control message instance after it has been passed to another layer.

Definition at line 134 of file r2riselfmetriccontrolmessage.cc.

◆ create() [2/2]

EMANE::Controls::R2RISelfMetricControlMessage * EMANE::Controls::R2RISelfMetricControlMessage::create ( std::uint64_t  u64BroadcastDataRatebps,
std::uint64_t  u64MaxDataRatebps,
const Microseconds reportInteral 
)
static

Creates an R2RISelfMetricControlMessage the heap

Parameters
u64BroadcastDataRatebpsBroadcast datarate in bps
u64MaxDataRatebpsMax unicast datarate in bps
reportInteralMessage report interval in microseconds
Note
Once a control message is passed to another NEM layer using EMANE::UpstreamTransport::processUpstreamPacket(), EMANE::UpstreamTransport::processUpstreamControl(), EMANE::DownstreamTransport::processDownstreamPacket() or EMANE::DownstreamTransport::processDownstreamControl() object ownership is transferred to the emulator infrastructure along with deallocation responsibility. It is not valid to use a control message instance after it has been passed to another layer.

Definition at line 106 of file r2riselfmetriccontrolmessage.cc.

◆ getBroadcastDataRatebps()

std::uint64_t EMANE::Controls::R2RISelfMetricControlMessage::getBroadcastDataRatebps ( ) const

Gets the broadcast datarate in bps

Returns
datarate

Definition at line 90 of file r2riselfmetriccontrolmessage.cc.

◆ getId()

ControlMessageId EMANE::ControlMessage::getId ( ) const
inlineinherited

Gets the control message id

Returns
control messase id

Definition at line 64 of file controlmessage.h.

◆ getMaxDataRatebps()

std::uint64_t EMANE::Controls::R2RISelfMetricControlMessage::getMaxDataRatebps ( ) const

Gets the max unicast datarate in bps

Returns
datarate

Definition at line 95 of file r2riselfmetriccontrolmessage.cc.

◆ getReportInterval()

const EMANE::Microseconds & EMANE::Controls::R2RISelfMetricControlMessage::getReportInterval ( ) const

Gets the report interval in microseconds

Returns
interval

Definition at line 100 of file r2riselfmetriccontrolmessage.cc.

◆ serialize()

EMANE::Serialization EMANE::Controls::R2RISelfMetricControlMessage::serialize ( ) const
overridevirtual

Serializes the instance

Exceptions
SerializationExceptionif the instance cannot be serialized

Reimplemented from EMANE::Serializable.

Definition at line 115 of file r2riselfmetriccontrolmessage.cc.


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