Simple Module TTQueueBuffer

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

C++ definition

Represents a queue buffer for time-triggered traffic. Messages are sent using the configured send window.

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

Author: Till Steinbach

TTQueueBuffer

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

Represents an abstract Buffer for time-triggerd traffic. Messages are sent using the configured send window.

Used in compound modules:

Name Type Description
Node1 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

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

sendWindowStart int

Beginning of the send window in number of ticks (Changes to this parameter will get active for future scheduled frames only)

sendWindowEnd int 0tick

End of the send window in number of ticks

period string "period[0]"

Period of Scheduler this buffer is assigned to

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 TTQueueBuffer

TTQueueBuffer is implemented by the TTQueueBuffer 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 SchedulerActionTimeEvent 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 dropped count packets

Source code:

//
// Represents a queue buffer for time-triggered traffic. Messages are sent using the configured
// send window.
//
// 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 TTBuffer, Buffer,
//
// @author Till Steinbach
simple TTQueueBuffer extends TTBuffer
{
    parameters:
        //TTQueueBuffer is implemented by the TTQueueBuffer C++ Class
        @class(TTQueueBuffer);
        @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 amount of packets that were dropped due to buffer overflows
        @statistic[dropped](title="Dropped"; 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);
}