Compound Module Scheduler

Package: core4inet.scheduler
File: src/core4inet/scheduler/Scheduler.ned

The Scheduler provides timing events for other modules.

See also: ~ITTEScheduler, ~Timer, ~IOscillator, ~Period

Author: Till Steinbach

Timer IOscillator Period

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.

Parameters:

Name Type Default value Description
numPeriods int 1

Number of Periods

tick double 80ns

Length of a tick

Properties:

Name Value Description
display i=block/cogwheel;bgb=293,141

Unassigned submodule parameters:

Name Type Default value Description
timer.allowedEventDelay int -1tick

Maximum delay in ticks that an time-triggered event is allowed to be "delayed" or off-schedule due to clock correction. This can occur if the clock is late and is being corrected. The timer may jump over upcoming events without triggering. This parameter allows to immediately schedule events that are in the past after clock correciton.

period.cycle_ticks int 37500tick

Number of ticks for one cycle

period.offset_ticks int 0tick

Number of ticks offset

Source code:

//
// The Scheduler provides timing events for other modules. 
//
// @see ~ITTEScheduler, ~Timer, ~IOscillator, ~Period
//
// @author Till Steinbach
//
module Scheduler like ITTEScheduler
{
    parameters:
        @display("i=block/cogwheel;bgb=293,141");

        // Number of Periods
        int numPeriods = default(1);
        // Length of a tick
        double tick @unit(s) = default(80ns);

    submodules:
        // Implements a timer with adjustable precision that may be synchronized by a synchronization module
        timer: Timer {
            @display("p=160,40");
            gates:
                period_in[numPeriods];
        }

        // Module representing an oscillator with a simple clock drift behavior.
        oscillator: <default("SimpleOscillator")> like IOscillator {
            parameters:
                @display("p=70,40");
                tick = tick;
        }

        // Periods define the cycles for events
        period[numPeriods]: Period {
            @display("p=70,100,row,60");
        }

    connections:
        for i=0..sizeof(period)-1 {
            period[i].out --> timer.period_in[i];
        }
        oscillator.out --> timer.oscillator_in;
}