DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Implementations of the Queue class are responsible for relaying data between DAQModules within a DAQ Application. More...
#include <Queue.hpp>
Public Types | |
using | value_t = T |
Type stored in the Queue. | |
using | duration_t = std::chrono::milliseconds |
Base duration type for timeouts. | |
![]() | |
using | NodePtr = std::weak_ptr<MonitorableObject> |
using | NewNodePtr = std::shared_ptr<MonitorableObject> |
using | ElementId = std::string |
Public Member Functions | |
Queue (const std::string &name) | |
Queue Constructor. | |
virtual bool | can_push () const |
Determine whether the Queue may be pushed onto. | |
virtual bool | can_pop () const |
Determine whether the Queue may be popped from. | |
virtual void | push (value_t &&val, const duration_t &timeout)=0 |
Push a value onto the Queue. | |
virtual void | pop (value_t &val, const duration_t &timeout)=0 |
Pop the first value off of the queue. | |
virtual bool | try_push (value_t &&val, const duration_t &timeout)=0 |
virtual bool | try_pop (value_t &val, const duration_t &timeout)=0 |
![]() | |
QueueBase (const std::string &name) | |
QueueBase Constructor. | |
virtual size_t | get_capacity () const =0 |
Get the capacity (max size) of the queue. | |
virtual size_t | get_num_elements () const =0 |
![]() | |
NamedObject (const std::string &name) | |
NamedObject Constructor. | |
NamedObject (NamedObject const &)=delete | |
NamedObject is not copy-constructible. | |
NamedObject (NamedObject &&)=default | |
NamedObject is move-constructible. | |
NamedObject & | operator= (NamedObject const &)=delete |
NamedObject is not copy-assignable. | |
NamedObject & | operator= (NamedObject &&)=default |
NamedObject is move-assignable. | |
virtual | ~NamedObject ()=default |
Default virtual destructor. | |
const std::string & | get_name () const final |
Get the name of this NamedObejct. | |
![]() | |
Named ()=default | |
Named Constructor. | |
Named (Named const &)=delete | |
Named is not copy-constructible. | |
Named (Named &&)=default | |
Named is move-constructible. | |
Named & | operator= (Named const &)=delete |
Named is not copy-assignable. | |
Named & | operator= (Named &&)=default |
Named is move-assignable. | |
virtual | ~Named ()=default |
Default virtual destructor. | |
![]() | |
MonitorableObject (const MonitorableObject &)=delete | |
MonitorableObject & | operator= (const MonitorableObject &)=delete |
MonitorableObject (MonitorableObject &&)=delete | |
MonitorableObject & | operator= (MonitorableObject &&)=delete |
virtual | ~MonitorableObject ()=default |
auto | get_opmon_id () const noexcept |
auto | get_opmon_level () const noexcept |
Private Member Functions | |
Queue (const Queue &)=delete | |
Queue & | operator= (const Queue &)=delete |
Queue (Queue &&)=default | |
Queue & | operator= (Queue &&)=default |
Additional Inherited Members | |
![]() | |
static bool | publishable_metric (OpMonLevel entry, OpMonLevel system) noexcept |
![]() | |
void | generate_opmon_data () override |
Method to retrieve information (occupancy) from queues. | |
![]() | |
MonitorableObject ()=default | |
void | register_node (ElementId name, NewNodePtr) |
void | publish (google::protobuf::Message &&, CustomOrigin &&co={}, OpMonLevel l=to_level(EntryOpMonLevel::kDefault)) const noexcept |
Implementations of the Queue class are responsible for relaying data between DAQModules within a DAQ Application.
Note that while the Queue class itself is not templated on a data type (so it can be included in generic containers), all implementations should be.
using dunedaq::iomanager::Queue< T >::duration_t = std::chrono::milliseconds |
using dunedaq::iomanager::Queue< T >::value_t = T |
|
inlineexplicit |
|
privatedelete |
|
privatedefault |
|
inlinevirtual |
Determine whether the Queue may be popped from.
Reimplemented in dunedaq::iomanager::FollyQueue< T, FollyQueueType >, and dunedaq::iomanager::StdDeQueue< T >.
Definition at line 65 of file Queue.hpp.
|
inlinevirtual |
Determine whether the Queue may be pushed onto.
Reimplemented in dunedaq::iomanager::FollyQueue< T, FollyQueueType >, and dunedaq::iomanager::StdDeQueue< T >.
Definition at line 58 of file Queue.hpp.
|
privatedelete |
|
privatedefault |
|
pure virtual |
Pop the first value off of the queue.
val | Reference to the value that is popped from the queue |
timeout | Timeout for the pop operation |
This is a pure virtual function If pop takes longer than the timeout, implementations should throw an exception
Implemented in dunedaq::iomanager::FollyQueue< T, FollyQueueType >, and dunedaq::iomanager::StdDeQueue< T >.
|
pure virtual |
Push a value onto the Queue.
val | Value to push (rvalue) |
timeout | Timeout for the push operation. |
This is a pure virtual function. If push takes longer than the timeout, implementations should throw an exception.
Implemented in dunedaq::iomanager::FollyQueue< T, FollyQueueType >, and dunedaq::iomanager::StdDeQueue< T >.
|
pure virtual |
Implemented in dunedaq::iomanager::FollyQueue< T, FollyQueueType >, and dunedaq::iomanager::StdDeQueue< T >.
|
pure virtual |
Implemented in dunedaq::iomanager::FollyQueue< T, FollyQueueType >, and dunedaq::iomanager::StdDeQueue< T >.