Simple Module BGQueueBuffer

Package: core4inet.buffer.base
File: src/core4inet/buffer/base/BGQueueBuffer.ned

C++ definition

Represents a queue buffer for background traffic. Messages are forwarded immediatly

The buffer stores "size" messages in a fifo queue. The buffer removes and sends the first message in the queue. The when full the oldest frame is dropped before inserting the new frame. Can be configured to drop new frame instead using the dropNew parameter (default: false)

See also: BGBuffer, Buffer,

Author: Till Steinbach

BGQueueBuffer

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Extends:

Name Type Description
BGBuffer simple module

Represents an abstract Buffer for background traffic. Messages are immediatly forwarded.

Used in compound modules:

Name Type Description
IEEE8021QEtherHost compound module

Module for a IEEE 802.1Q Host. Contains a EtherEncap for best-effort traffic and a IEEE8021QPHYPort module as physical port.

RTIPHost compound module

Contains the common lower layers (linklayer and networklayer) of Router, StandardHost, WirelessHost etc.

TTEAVBEtherHost compound module

Module for a TTEAVBEthernet Host. Contains handler for TT, AVB, RC and BE Messages.

TTEEtherHost compound module

Module for a TTEthernet Host. Contains a BGEtherEncap for best-effort traffic, a TTEPHYPort module as physical port, sync module (Sync) and a TTEScheduler module.

Parameters:

Name Type Default value Description
destination_gates string ""

Comma seperated list of gates where the frames of the buffer are delivered

maxMessageSize int 1522B

The maximum allowed message size for this buffer. Larger Frames are dropped.

enabled bool true

Switch to enable and disable the buffer

size int -1

Maximum size of the buffer negative means infinite

dropNew bool false

Dropping policy, Should the newest frame instead of the oldest frame be dropped when the buffer is full (see size parameter)

Properties:

Name Value Description
class BGQueueBuffer

BGQueueBuffer is implemented by the BGQueueBuffer C++ Class

display q=frames

Gates:

Name Direction Size Description
in input

The buffers Input

out output

The buffers Output

WARNING: CURRENTLY NOT USED!

Signals:

Name Type Unit
size unsigned long B
length unsigned long packets
dropped inet::EtherFrame

Statistics:

Name Title Source Record Unit Interpolation Mode
size Queue Size size vector B sample-hold
length Queue Length length vector packets sample-hold
dropped Dropped frames dropped sum packets

Source code:

//
// Represents a queue buffer for background traffic. Messages are forwarded immediatly
//
// The buffer stores "size" messages in a fifo queue.
// The buffer removes and sends the first message in the queue.
// The when full the oldest frame is dropped before inserting the new frame. Can be configured to drop new frame instead
// using the dropNew parameter (default: false)
//
// @see BGBuffer, Buffer,
//
// @author Till Steinbach
simple BGQueueBuffer extends BGBuffer
{
    parameters:
        @display("q=frames");
        //BGQueueBuffer is implemented by the BGQueueBuffer C++ Class
        @class(BGQueueBuffer);

        //Signal emitted when queuelength changes, contains new length
        @signal[length](type=unsigned long; unit=packets);
        //Signal emitted when queuelength changes, contains new size in bytes
        @signal[size](type=unsigned long; unit=B);
        //Signal emitted when frame is dropped due to buffer overflow, contains dropped EtherFrame
        @signal[dropped](type=inet::EtherFrame);

        //Statistic of the queue length of the buffer
        @statistic[length](title="Queue Length"; source=length; unit=packets; record=vector; interpolationmode=sample-hold);
        //Statistic of the queue size of the buffer in bytes
        @statistic[size](title="Queue Size"; source=size; record=vector; unit=B; interpolationmode=sample-hold);
        //Statistic of the amount of packets that were dropped due to buffer overflows
        @statistic[dropped](title="Dropped frames"; source=dropped; unit=packets; record=sum);

        //Maximum size of the buffer negative means infinite
        int size = default(-1);

        //Dropping policy, Should the newest frame instead of the oldest frame be dropped when the buffer is full (see size parameter)
        bool dropNew = default(false);
}