DABC (Data Acquisition Backbone Core)  2.9.9
Data Structures | Public Types | Public Member Functions | Protected Types | Protected Attributes
dabc::CommandsQueue Class Reference

Queue of commands More...

#include <dabc/CommandsQueue.h>

Data Structures

struct  QueueRec

Public Types

enum  EKind {
  kindNone , kindSubmit , kindReply , kindAssign ,

Public Member Functions

uint32_t ChangeKind (Command &cmd, EKind kind)
 Change kind of the entry for specified command. More...
void Cleanup (Mutex *m=nullptr, Worker *proc=nullptr, int res=cmd_false)
 CommandsQueue (EKind kind=kindNone)
 Normal constructor. More...
Command Front ()
EKind FrontKind ()
Command Pop ()
Command PopWithId (uint32_t id)
Command PopWithKind (EKind kind)
uint32_t Push (Command cmd, EKind kind=kindNone)
 Add reference on the command in the queue. More...
void ReplyAll (int res)
 Reply all commands. More...
void ReplyTimedout ()
 Reply timed-out commands. More...
unsigned Size () const
virtual ~CommandsQueue ()

Protected Types

typedef std::list< QueueRecQueueRecsList

Protected Attributes

uint32_t fIdCounter
EKind fKind
QueueRecsList fList

Detailed Description

Queue of commands

Specialized queue to keep commands

Definition at line 39 of file CommandsQueue.h.

Member Typedef Documentation

◆ QueueRecsList

typedef std::list<QueueRec> dabc::CommandsQueue::QueueRecsList

Definition at line 70 of file CommandsQueue.h.

Member Enumeration Documentation

◆ EKind


command submitted for execution


command replied to the worker


command assign with the worker, but not yet replied


command submitted but postponed to not increase execution recursion

Definition at line 43 of file CommandsQueue.h.

Constructor & Destructor Documentation

◆ CommandsQueue()

dabc::CommandsQueue::CommandsQueue ( EKind  kind = kindNone)

Normal constructor.

Definition at line 7 of file CommandsQueue.cxx.

◆ ~CommandsQueue()

dabc::CommandsQueue::~CommandsQueue ( )

Definition at line 14 of file CommandsQueue.cxx.

Member Function Documentation

◆ Push()

uint32_t dabc::CommandsQueue::Push ( Command  cmd,
EKind  kind = kindNone 

Add reference on the command in the queue.

Kind of command can be specified, if not - default queue kind is used Returns unique id for the command inside this queue

Definition at line 71 of file CommandsQueue.cxx.

◆ ChangeKind()

uint32_t dabc::CommandsQueue::ChangeKind ( Command cmd,
EKind  kind 

Change kind of the entry for specified command.

If entry not exists, command will be add to the queue. Returns unique id

Definition at line 138 of file CommandsQueue.cxx.

◆ Pop()

dabc::Command dabc::CommandsQueue::Pop ( )

Definition at line 87 of file CommandsQueue.cxx.

◆ PopWithId()

dabc::Command dabc::CommandsQueue::PopWithId ( uint32_t  id)

Definition at line 114 of file CommandsQueue.cxx.

◆ PopWithKind()

dabc::Command dabc::CommandsQueue::PopWithKind ( EKind  kind)

Definition at line 100 of file CommandsQueue.cxx.

◆ Front()

dabc::Command dabc::CommandsQueue::Front ( )

Definition at line 128 of file CommandsQueue.cxx.

◆ FrontKind()

dabc::CommandsQueue::EKind dabc::CommandsQueue::FrontKind ( )

Definition at line 133 of file CommandsQueue.cxx.

◆ Size()

unsigned dabc::CommandsQueue::Size ( ) const

Definition at line 97 of file CommandsQueue.h.

◆ ReplyAll()

void dabc::CommandsQueue::ReplyAll ( int  res)

Reply all commands.

Definition at line 150 of file CommandsQueue.cxx.

◆ ReplyTimedout()

void dabc::CommandsQueue::ReplyTimedout ( )

Reply timed-out commands.

Definition at line 56 of file CommandsQueue.cxx.

◆ Cleanup()

void dabc::CommandsQueue::Cleanup ( Mutex m = nullptr,
Worker proc = nullptr,
int  res = cmd_false 

Definition at line 19 of file CommandsQueue.cxx.

Field Documentation

◆ fList

QueueRecsList dabc::CommandsQueue::fList

Definition at line 72 of file CommandsQueue.h.

◆ fKind

EKind dabc::CommandsQueue::fKind

Definition at line 73 of file CommandsQueue.h.

◆ fIdCounter

uint32_t dabc::CommandsQueue::fIdCounter

Definition at line 74 of file CommandsQueue.h.

The documentation for this class was generated from the following files: