EMANE  1.2.1
EMANE::Controls::R2RINeighborMetricControlMessage Class Reference

R2RI Neighbor Metric Control Message is sent to an NEM's transport layer to convey information about MAC layer neighbors. More...

#include <r2rineighbormetriccontrolmessage.h>

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

Public Types

enum  { IDENTIFIER = EMANE_CONTROL_MEASSGE_R2RI_NEIGHBOR_METRIC }
 

Public Member Functions

R2RINeighborMetricControlMessageclone () const override
 
 ~R2RINeighborMetricControlMessage ()
 
const R2RINeighborMetricsgetNeighborMetrics () const
 
std::string serialize () const override
 
ControlMessageId getId () const
 

Static Public Member Functions

static R2RINeighborMetricControlMessagecreate (const Serialization &serialization)
 
static R2RINeighborMetricControlMessagecreate (const R2RINeighborMetrics &neighborMetrics)
 

Detailed Description

R2RI Neighbor Metric Control Message is sent to an NEM's transport layer to convey information about MAC layer neighbors.

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 r2rineighbormetriccontrolmessage.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDENTIFIER 

Definition at line 128 of file r2rineighbormetriccontrolmessage.h.

Constructor & Destructor Documentation

◆ ~R2RINeighborMetricControlMessage()

EMANE::Controls::R2RINeighborMetricControlMessage::~R2RINeighborMetricControlMessage ( )

Destroys an instance

Definition at line 67 of file r2rineighbormetriccontrolmessage.cc.

Member Function Documentation

◆ clone()

EMANE::Controls::R2RINeighborMetricControlMessage * EMANE::Controls::R2RINeighborMetricControlMessage::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 152 of file r2rineighbormetriccontrolmessage.cc.

◆ create() [1/2]

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

Creates an R2RINeighborMetricControlMessage 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 121 of file r2rineighbormetriccontrolmessage.cc.

◆ create() [2/2]

EMANE::Controls::R2RINeighborMetricControlMessage * EMANE::Controls::R2RINeighborMetricControlMessage::create ( const R2RINeighborMetrics neighborMetrics)
static

Creates an R2RINeighborMetricControlMessage on the heap

Parameters
neighborMetricsNeighbor metrics
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 77 of file r2rineighbormetriccontrolmessage.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.

◆ getNeighborMetrics()

const EMANE::Controls::R2RINeighborMetrics & EMANE::Controls::R2RINeighborMetricControlMessage::getNeighborMetrics ( ) const

Gets the neighbor metrics

Returns
metrics

Definition at line 71 of file r2rineighbormetriccontrolmessage.cc.

◆ serialize()

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

Serializes the instance

Exceptions
SerializationExceptionif the instance cannot be serialized

Reimplemented from EMANE::Serializable.

Definition at line 82 of file r2rineighbormetriccontrolmessage.cc.


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