Class simtix::sim::DelayQueue
template <class T, class Alloc>
ClassList > simtix > sim > DelayQueue
Inherits the following classes: simtix::sim::GenericDelayQueue
Public Types
Type | Name |
---|---|
typedef GenericDelayQueue< T, Alloc > | generic_delay_queue_ |
Public Types inherited from simtix::sim::GenericDelayQueue
See simtix::sim::GenericDelayQueue
Type | Name |
---|---|
typedef SizedQueue< T, Alloc > | sized_queue_ |
Public Types inherited from simtix::sim::SizedQueue
Type | Name |
---|---|
typedef std::deque< T, Alloc > | deque_ |
Public Functions
Type | Name |
---|---|
DelayQueue (const std::string & name, std::size_t capacity, uint32_t delay) |
|
bool | Enq (const T & val) |
bool | Enq (T && val) |
uint32_t | delay () noexcept const |
Public Functions inherited from simtix::sim::GenericDelayQueue
See simtix::sim::GenericDelayQueue
Type | Name |
---|---|
bool | CanDeq () const |
virtual std::optional< T > | Deq () override |
bool | Enq (const T & val, int delay) |
bool | Enq (T && val, int delay) |
GenericDelayQueue (const std::string & name, std::size_t capacity) |
Public Functions inherited from simtix::sim::SizedQueue
Type | Name |
---|---|
virtual std::optional< T > | Deq () |
bool | Enq (const T & val) |
bool | Enq (T && val) |
SizedQueue (std::size_t capacity) |
|
std::size_t | capacity () noexcept const |
bool | full () noexcept const |
virtual | ~SizedQueue () = default |
Public Functions inherited from simtix::sim::Clocked
Type | Name |
---|---|
Clocked (const std::string & name, TickPri pri=kDefaultPri) Constructor for clocled. |
|
const std::string & | name () const Get the name of the clocked object. |
virtual | ~Clocked () |
Protected Attributes
Type | Name |
---|---|
const uint32_t | kDelayCycles |
Protected Attributes inherited from simtix::sim::GenericDelayQueue
See simtix::sim::GenericDelayQueue
Type | Name |
---|---|
std::deque< int > | delays_ |
Protected Attributes inherited from simtix::sim::Clocked
Type | Name |
---|---|
std::string | name_ |
TickPri | pri_ |
Protected Static Attributes inherited from simtix::sim::Clocked
Type | Name |
---|---|
bool | busy_ = true |
std::map< TickPri, std::vector< Clocked * > > | clocked_objs_map_ |
uint64_t | cur_tick_ = 0 |
Protected Functions inherited from simtix::sim::GenericDelayQueue
See simtix::sim::GenericDelayQueue
Type | Name |
---|---|
virtual bool | HasPendingTasks () override Checks if any registered clocked objects have pending tasks at the current tick. |
virtual void | Tick () override Global tick function that advances the simulation by one cycle. |
Protected Functions inherited from simtix::sim::Clocked
Type | Name |
---|---|
virtual bool | HasPendingTasks () = 0 Checks if any registered clocked objects have pending tasks at the current tick. |
virtual void | Tick () = 0 Global tick function that advances the simulation by one cycle. |
Protected Static Functions inherited from simtix::sim::Clocked
Type | Name |
---|---|
void | Register (Clocked * c) Register a clocked object to participate in tick-driven simulation. |
void | Unregister (Clocked * c) Unregister a clocked object from tick-driven simulation. |
Public Types Documentation
typedef generic_delay_queue_
Public Functions Documentation
function DelayQueue
inline simtix::sim::DelayQueue::DelayQueue (
const std::string & name,
std::size_t capacity,
uint32_t delay
)
function Enq [1/2]
function Enq [2/2]
function delay
Protected Attributes Documentation
variable kDelayCycles
The documentation for this class was generated from the following file projects/simtix/src/simtix/sim/queue.h