Simple Module RCQueueBuffer

Package: core4inet.buffer.AS6802
File: src/core4inet/buffer/AS6802/RCQueueBuffer.ned

C++ definition

Represents a queue buffer for rate-constrained traffic. Messages are sent using the configured gandwidth alocation gap.

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: RCBuffer, Buffer,

Author: Till Steinbach

RCQueueBuffer

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
RCBuffer simple module

Represents an abstract Buffer for rate-constrained traffic. Messages are sent using the configured bandwidth allocation gap.

Used in compound modules:

Name Type Description
Node1 compound module (no description)
Node2 compound module

unit2: configuration in unit2.ini.

node2 compound module (no description)
Node3 compound module

unit3: configuration in unit3.ini.

Node3 compound module (no description)
node3 compound module (no description)
Switch1 compound module

switch1(1,2,3,4): configuration in switch1(1,2,3,4).ini Forwards time-triggered messages with VL-ID 100 and rc messages with VL-ID 101

Switch1 compound module

switch1(1,2,3,4): configuration in switch1(1,2,3,4).ini Forwards time-triggered messages with VL-ID 100 and rate-constrained messages with VL-ID 101

Switch1 compound module

switch1(1,2,3,4): configuration in switch1(1,2,3,4).ini Forwards time-triggered messages with VL-ID 100

switch1 compound module (no description)
Tic compound module

tic: configuration in tic.ini.

Toc compound module

tic: configuration in tic.ini.

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

priority int -1

Priority of the buffer (currently only used for rate-constrained traffic)

ct_id int

Critical traffic ID of the buffer

ct_marker int

Critical traffic marker of the buffer

ct_mask int

Critical traffic mask of the buffer

oscillator string "^.scheduler.oscillator"

Oscillator this buffer is assigned to

timer string "^.scheduler.timer"

Timer this buffer is assigned to

max_dispatch_delay int 0tick

Not used

bag int 0tick

Bandwidth allocation gap in number of ticks (Changes to this parameter will get active for future frames only)

jitter int 0tick

Maximum jitter for the bandwidth allocation gap in number of ticks

size int -1

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 RCQueueBuffer

RCQueueBuffer is implemented by the RCQueueBuffer C++ Class

display q=frames

Gates:

Name Direction Size Description
in input

The buffers Input

out output

The buffers Output

WARNING: CURRENTLY NOT USED!

schedulerIn input

Input gate for the incoming SchedulerTimerEvent messages

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 packets dropped count packets

Source code:

//
// Represents a queue buffer for rate-constrained traffic. Messages are sent using the configured
// gandwidth alocation gap.
//
// 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 RCBuffer, Buffer,
//
// @author Till Steinbach
simple RCQueueBuffer extends RCBuffer
{
    parameters:
        //RCQueueBuffer is implemented by the RCQueueBuffer C++ Class
        @class(RCQueueBuffer);
        @display("q=frames");

        //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 number of packets that were dropped due to buffer overflows
        @statistic[dropped](title="Dropped packets"; source=dropped; unit=packets; record=count);

        //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);
}