LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::qn::PollingInfo< T > Struct Template Reference

Port of State.pollingInfo: the derived description of a polling controller. More...

#include <line/lang/qn/polling_info.h>

Collaboration diagram for line::qn::PollingInfo< T >:

Public Attributes

lang::PollingType ptype = lang::PollingType::EXHAUSTIVE
std::size_t pk = 1
std::vector< bool > polled
std::vector< bool > has_sw
std::vector< std::size_t > ksw
std::vector< Matrix< T > > sw_d0
std::vector< Matrix< T > > sw_d1
std::vector< std::vector< T > > sw_pie
std::vector< bool > non_ph
std::size_t off = 0
std::size_t width = 0
std::size_t ipos = static_cast<std::size_t>(-1)
std::size_t iswk = static_cast<std::size_t>(-1)
std::size_t ictr = static_cast<std::size_t>(-1)
bool valid = false
lang::PollingOrder order = lang::PollingOrder::CYCLIC
std::size_t thr_class = 0
 1-based THRESHOLD class, 0 when none
long thr_l = 0
lang::PollingTimer tmode = lang::PollingTimer::NONE
bool tpreempt = false
bool table = false
bool ld = false
bool repeats = false
bool ext = false
std::vector< std::size_t > ring
 1-based classes, length M
std::size_t M = 0
std::vector< std::size_t > tk
 timer phases per class (0 = none)
std::vector< Matrix< T > > t_d0
std::vector< Matrix< T > > t_d1
std::vector< std::vector< T > > t_pie
std::vector< bool > t_nonph
std::vector< bool > swclass
 the class drives a SWITCH event
std::vector< std::size_t > pos_of
 1-based first position of each class
std::size_t canon_pos = 0
std::size_t src_default = 0
std::vector< bool > keep
std::vector< std::size_t > loc
std::size_t isrc = static_cast<std::size_t>(-1)
std::size_t itht = static_cast<std::size_t>(-1)
std::vector< std::size_t > itrt

Detailed Description

template<class T>
struct line::qn::PollingInfo< T >

Port of State.pollingInfo: the derived description of a polling controller.

The controller lives in the shared node block of the local variables and holds, in order, [pos, swk, ctr]. Each column is materialized ONLY when the discipline needs it, so a polling station never carries state its dynamics cannot distinguish:

pos the buffer the server is at or heading to. Needed only when some switchover is non-immediate: while a job is in service pos equals that job's class, and while the station is empty with immediate switchovers the position is unobservable. swk 0 when the server sits at pos, else the phase of the switchover into it. Same condition as pos. ctr the visit budget. Every discipline except EXHAUSTIVE bounds a visit.

An Immediate switchover is deliberately NOT a state: its rate is ~1e8, and taking that literally would make the generator stiff and add a spurious state per buffer. polling_next folds it into the enclosing transition.

EVERY POLLING STATION HAS A CONTROLLER, whichever API declared it and even when none did. The reference returns [] only for a node that is not a polling station and otherwise defaults to EXHAUSTIVE with every switchover immediate, so NetworkStruct::effective_polling resolves the two C++ spellings – set_polling writing sn.pollingparam, and setPollingType / setSwitchover writing the Station fields – into one description.

BUILDING NO CONTROLLER WAS NOT A DEGRADED MODEL BUT A CRASH. Reading only pollingparam left every station declared the other way (the JSON reader included) with valid = false and, with it, an EMPTY polled. polling_next indexes polled[pos-1] with no size test, and an empty std::vector<bool> holds a NULL word pointer, so that index segfaults rather than returning a garbage bit – which is why the failure surfaced as a SIGSEGV inside after_event_station_arv and not as a wrong number.

Definition at line 75 of file polling_info.h.

Member Data Documentation

◆ canon_pos

template<class T>
std::size_t line::qn::PollingInfo< T >::canon_pos = 0

◆ ext

template<class T>
bool line::qn::PollingInfo< T >::ext = false

Definition at line 101 of file polling_info.h.

Referenced by line::qn::polling_info().

◆ has_sw

◆ ictr

template<class T>
std::size_t line::qn::PollingInfo< T >::ictr = static_cast<std::size_t>(-1)

◆ ipos

template<class T>
std::size_t line::qn::PollingInfo< T >::ipos = static_cast<std::size_t>(-1)

◆ isrc

template<class T>
std::size_t line::qn::PollingInfo< T >::isrc = static_cast<std::size_t>(-1)

◆ iswk

template<class T>
std::size_t line::qn::PollingInfo< T >::iswk = static_cast<std::size_t>(-1)

◆ itht

template<class T>
std::size_t line::qn::PollingInfo< T >::itht = static_cast<std::size_t>(-1)

◆ itrt

template<class T>
std::vector<std::size_t> line::qn::PollingInfo< T >::itrt

◆ keep

template<class T>
std::vector<bool> line::qn::PollingInfo< T >::keep

Definition at line 111 of file polling_info.h.

Referenced by line::qn::polling_blocks(), and line::qn::polling_info().

◆ ksw

◆ ld

◆ loc

template<class T>
std::vector<std::size_t> line::qn::PollingInfo< T >::loc

Definition at line 112 of file polling_info.h.

Referenced by line::qn::polling_info().

◆ M

template<class T>
std::size_t line::qn::PollingInfo< T >::M = 0

◆ non_ph

template<class T>
std::vector<bool> line::qn::PollingInfo< T >::non_ph

Definition at line 84 of file polling_info.h.

Referenced by line::qn::polling_info(), and line::qn::polling_require_ph().

◆ off

◆ order

Definition at line 96 of file polling_info.h.

Referenced by line::qn::polling_choose(), and line::qn::polling_info().

◆ pk

template<class T>
std::size_t line::qn::PollingInfo< T >::pk = 1

◆ polled

◆ pos_of

template<class T>
std::vector<std::size_t> line::qn::PollingInfo< T >::pos_of

1-based first position of each class

Definition at line 109 of file polling_info.h.

Referenced by line::qn::polling_blocks(), line::qn::polling_get(), and line::qn::polling_info().

◆ ptype

◆ repeats

template<class T>
bool line::qn::PollingInfo< T >::repeats = false

Definition at line 101 of file polling_info.h.

Referenced by line::qn::polling_info().

◆ ring

template<class T>
std::vector<std::size_t> line::qn::PollingInfo< T >::ring

◆ src_default

template<class T>
std::size_t line::qn::PollingInfo< T >::src_default = 0

Definition at line 110 of file polling_info.h.

Referenced by line::qn::polling_get_full(), and line::qn::polling_info().

◆ sw_d0

template<class T>
std::vector<Matrix<T> > line::qn::PollingInfo< T >::sw_d0

Definition at line 80 of file polling_info.h.

Referenced by line::qn::after_event_station_switch(), and line::qn::polling_info().

◆ sw_d1

template<class T>
std::vector<Matrix<T> > line::qn::PollingInfo< T >::sw_d1

Definition at line 80 of file polling_info.h.

Referenced by line::qn::after_event_station_switch(), and line::qn::polling_info().

◆ sw_pie

template<class T>
std::vector<std::vector<T> > line::qn::PollingInfo< T >::sw_pie

◆ swclass

template<class T>
std::vector<bool> line::qn::PollingInfo< T >::swclass

the class drives a SWITCH event

Definition at line 108 of file polling_info.h.

Referenced by line::qn::after_event_station_switch(), line::qn::polling_info(), and line::qn::refresh_sync().

◆ t_d0

template<class T>
std::vector<Matrix<T> > line::qn::PollingInfo< T >::t_d0

Definition at line 105 of file polling_info.h.

Referenced by line::qn::after_event_station_switch(), and line::qn::polling_info().

◆ t_d1

template<class T>
std::vector<Matrix<T> > line::qn::PollingInfo< T >::t_d1

Definition at line 105 of file polling_info.h.

Referenced by line::qn::after_event_station_switch(), and line::qn::polling_info().

◆ t_nonph

template<class T>
std::vector<bool> line::qn::PollingInfo< T >::t_nonph

Definition at line 107 of file polling_info.h.

Referenced by line::qn::polling_info(), and line::qn::polling_require_ph().

◆ t_pie

template<class T>
std::vector<std::vector<T> > line::qn::PollingInfo< T >::t_pie

◆ table

template<class T>
bool line::qn::PollingInfo< T >::table = false

Definition at line 101 of file polling_info.h.

Referenced by line::qn::polling_info().

◆ thr_class

template<class T>
std::size_t line::qn::PollingInfo< T >::thr_class = 0

1-based THRESHOLD class, 0 when none

Definition at line 97 of file polling_info.h.

Referenced by line::qn::polling_choose(), and line::qn::polling_info().

◆ thr_l

template<class T>
long line::qn::PollingInfo< T >::thr_l = 0

Definition at line 98 of file polling_info.h.

Referenced by line::qn::polling_choose(), and line::qn::polling_info().

◆ tk

template<class T>
std::vector<std::size_t> line::qn::PollingInfo< T >::tk

◆ tmode

◆ tpreempt

template<class T>
bool line::qn::PollingInfo< T >::tpreempt = false

◆ valid

◆ width

template<class T>
std::size_t line::qn::PollingInfo< T >::width = 0

Definition at line 85 of file polling_info.h.

Referenced by line::qn::append_local_vars(), and line::qn::polling_info().


The documentation for this struct was generated from the following file: