EMANE  1.2.1
EMANE::Controls::FlowControlControlMessage Class Reference

Flow Control Control Messages are sent between a MAC layer and a transport in order to communicate data rate and congestion. More...

#include <flowcontrolcontrolmessage.h>

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

Public Types

enum  { IDENTIFIER = EMANE_CONTROL_MEASSGE_FLOW_CONTROL }
 

Public Member Functions

FlowControlControlMessageclone () const override
 
 ~FlowControlControlMessage ()
 
std::uint16_t getTokens () const
 
Serialization serialize () const override
 
ControlMessageId getId () const
 

Static Public Member Functions

static FlowControlControlMessagecreate (const Serialization &serialization)
 
static FlowControlControlMessagecreate (std::uint16_t u16Tokens)
 

Detailed Description

Flow Control Control Messages are sent between a MAC layer and a transport in order to communicate data rate and congestion.

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 58 of file flowcontrolcontrolmessage.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDENTIFIER 

Definition at line 124 of file flowcontrolcontrolmessage.h.

Constructor & Destructor Documentation

◆ ~FlowControlControlMessage()

EMANE::Controls::FlowControlControlMessage::~FlowControlControlMessage ( )

Destroys an instance

Definition at line 63 of file flowcontrolcontrolmessage.cc.

Member Function Documentation

◆ clone()

EMANE::Controls::FlowControlControlMessage * EMANE::Controls::FlowControlControlMessage::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 107 of file flowcontrolcontrolmessage.cc.

◆ create() [1/2]

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

Creates a FlowControlControlMessage instance 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 94 of file flowcontrolcontrolmessage.cc.

◆ create() [2/2]

EMANE::Controls::FlowControlControlMessage * EMANE::Controls::FlowControlControlMessage::create ( std::uint16_t  u16Tokens)
static

Creates a FlowControlControlMessage instance on the heap

Parameters
u16TokensThe current number of tokens
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 88 of file flowcontrolcontrolmessage.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.

◆ getTokens()

std::uint16_t EMANE::Controls::FlowControlControlMessage::getTokens ( ) const

Gets the token count

Definition at line 66 of file flowcontrolcontrolmessage.cc.

◆ serialize()

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

Serializes the instance

Exceptions
SerializationExceptionif the instance cannot be serialized

Reimplemented from EMANE::Serializable.

Definition at line 72 of file flowcontrolcontrolmessage.cc.


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