pub struct Schedule {
    pub hyper_period: Option<Duration>,
    pub deadlines: Vec<Deadline, Global>,
}
Expand description

A schedule for the periodic streams.

The schedule is a sequence of deadlines and describes a single hyper-period. Hence, the sequences is meant to repeat afterwards.

Fields§

§hyper_period: Option<Duration>

The hyper_period is the duration after which the schedule is meant to repeat.

It is therefore the least common multiple of all periods. If there are no statically scheduled streams, the hyper-period is None.

Example:

If there are three streams, one running at 0.5Hz, one with 1Hz, and one with 2Hz. The hyper-period then is 2000ms.

§deadlines: Vec<Deadline, Global>

A sequence of deadlines within a hyper-period.

Deadlines represent points in time at which periodic stream needs to be updated. Deadlines may not be empty. The first deadline is due Deadline::pause time units after the start of the schedule. Subsequent deadlines are due Deadline::pause time units after their predecessor.

Example:

Assume there are two periodic streams, a running at 1Hz and b running at 2Hz. The deadlines are thus {b} at time 500ms and {a, b} 500ms later. Then, the schedule repeats.

See Also

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.